/* ====================================================================
   HOMEPAGE (/) — landing dashboard.
   Hero banner (real observatory imagery) + quick nav + tonight's
   forecast + telescope status + latest gallery photos.
   Only base.css tokens/reset and the sidebar shell are shared with the
   rest of the app.
   ==================================================================== */

.hm-page {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ==================== HERO ==================== */
.hm-hero {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(180deg, rgba(14, 14, 18, 0.35) 0%, rgba(14, 14, 18, 0.55) 45%, rgba(14, 14, 18, 0.92) 100%),
        url("../icon/background.jpg") center 35% / cover no-repeat;
    border: 1px solid var(--border-hairline);
    box-shadow: var(--shadow-primary);
}

.hm-hero-content {
    position: relative;
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hm-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--secondary-purple);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hm-hero-content h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hm-hero-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hm-dot {
    color: rgba(255, 255, 255, 0.4);
}

.hm-alert-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(240, 184, 79, 0.2);
    border: 1px solid rgba(240, 184, 79, 0.5);
    color: #ffd479;
    font-weight: 500;
    font-size: 0.82rem;
    margin-left: 4px;
}

/* ==================== QUICK LINKS ==================== */
.hm-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.hm-qcard {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: var(--surface-1);
    border: 1px solid var(--border-hairline);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
}

.hm-qcard:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hm-qicon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background: var(--primary-gradient);
    color: #fff;
    flex-shrink: 0;
}

.hm-qlabel {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ==================== PANEL PRIMITIVE ==================== */
.hm-panel {
    background: var(--surface-1);
    border: 1px solid var(--border-hairline);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-primary);
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.hm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.hm-panel-head h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hm-panel-link {
    font-size: 0.8rem;
    color: var(--secondary-purple);
    text-decoration: none;
    white-space: nowrap;
}

.hm-panel-link:hover {
    color: var(--text-primary);
}

/* ==================== FORECAST + SCOPES GRID ==================== */
.hm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 900px) {
    .hm-grid {
        grid-template-columns: 1.3fr 1fr;
        align-items: start;
    }
}

.hm-panel-forecast .hm-panel-media {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--surface-sunken);
}

.hm-panel-forecast iframe {
    width: 100%;
    height: 620px;
    border: 0;
    display: block;
}

.hm-credit {
    text-align: center;
    margin-top: 8px;
}

.hm-credit a {
    color: var(--text-faint);
    text-decoration: none;
    font-size: 0.75em;
}

/* ==================== TELESCOPE STATUS ==================== */
.hm-scope-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hm-scope-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border-hairline);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.hm-scope-row:hover {
    background: var(--surface-3);
    border-color: var(--border-hairline-strong);
}

.hm-scope-name {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ==================== SECTION SCAFFOLD (gallery) ==================== */
.hm-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hm-section-head h2 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--secondary-purple);
}

.hm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.hm-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--surface-sunken);
    border: 1px solid var(--border-hairline);
    display: block;
    transition: var(--transition-fast);
}

.hm-gallery-item:hover {
    border-color: var(--border-accent);
}

.hm-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hm-gallery-item:hover img {
    transform: scale(1.05);
}

.hm-gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 10px 7px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-gallery-empty {
    grid-column: 1 / -1;
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--surface-1);
    border: 1px dashed var(--border-hairline-strong);
    border-radius: var(--border-radius);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .hm-hero-content {
        padding: 26px 20px;
    }

    .hm-hero-content h1 {
        font-size: 1.8rem;
    }

    .hm-panel-forecast iframe {
        height: 640px;
    }
}
