/* Home briefing page (/). Standalone: does not load styles.css or the
   SPA layouts, so the page paints without Cesium/Three.js. Tokens mirror
   the UA brand values in styles.css. */

:root {
    --ua-navy-deep: #001529;
    --ua-blue: #0066CC;
    --ua-gold: #FFBF00;
    --bg: #020B17;
    --surface: rgba(0, 34, 68, 0.45);
    --surface-quiet: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.09);
    --text: #E8EEF6;
    --text-strong: #FFFFFF;
    --text-2: #B9C7D9;
    --text-3: #A3B4CA;
    --eyebrow: #9FB4CF;
    --link: #9FC3EE;
    --climbing: #34D399;
    --cruising: #60A5FA;
    --descending: #FB923C;
    /* On-time tiers match otpTier() in layout-a.js (80 / 65). */
    --otp-good: #2DD4A5;
    --otp-warn: #F59E0B;
    --otp-bad: #F87171;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background:
        radial-gradient(1200px 700px at 78% 6%, rgba(0, 102, 204, 0.22), rgba(2, 11, 23, 0) 60%),
        var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    min-height: 100vh;
}
a { color: var(--link); }
a:hover { color: var(--text-strong); }
a:focus-visible, button:focus-visible { outline: 2px solid #5AA9FF; outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 8px; padding: 8px 14px; border-radius: 8px; background: var(--ua-blue); color: #fff; z-index: 20; }
.skip-link:focus { left: 16px; }

.hm-wrap { max-width: 1320px; margin: 0 auto; padding-left: clamp(16px, 3vw, 40px); padding-right: clamp(16px, 3vw, 40px); }

/* ---- Header ---- */
.hm-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(0, 18, 41, 0.82);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hm-header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 12px; padding-bottom: 12px; }
.hm-brand { display: flex; align-items: center; gap: 12px; color: var(--text-strong); text-decoration: none; }
.hm-brand-text { display: flex; flex-direction: column; gap: 2px; }
.hm-brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.hm-brand-tag { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #8FA3BD; }
.hm-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; flex: 1 1 420px; font-size: 14px; font-weight: 500; }
.hm-nav a { color: #AFC0D6; text-decoration: none; padding: 6px 0; white-space: nowrap; }
.hm-nav a:hover, .hm-nav a[aria-current="page"] { color: var(--text-strong); }
.hm-status { display: flex; align-items: center; gap: 14px; }
.hm-live {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.16); color: var(--text-2);
}
.hm-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748B; }
.hm-live[data-state="live"] { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.35); color: #86EFAC; }
.hm-live[data-state="live"] .hm-live-dot { background: #22C55E; animation: hm-pulse 2s infinite; }
.hm-live[data-state="stale"] { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.4); color: #FCD34D; }
.hm-live[data-state="stale"] .hm-live-dot { background: var(--otp-warn); }
.hm-clock { font-family: var(--mono); font-size: 14px; color: #D5DFEC; white-space: nowrap; }
@keyframes hm-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hm-banner {
    margin-top: 16px; padding: 10px 14px; border-radius: 12px; font-size: 14px;
    background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); color: #FDE68A;
}

/* ---- Hero ---- */
.hm-hero {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
    gap: 24px 48px; align-items: center; padding: clamp(28px, 6vw, 72px) 0 32px;
}
.hm-hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hm-kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--eyebrow); }
.hm-hero h1 { margin: 0; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; color: var(--text-strong); }
.hm-hero h1 .hm-accent { color: var(--ua-gold); }
.hm-lede { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 34em; }
.hm-phases { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hm-phases li {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; color: var(--text-3);
}
.hm-phases b { font-size: 18px; font-weight: 700; color: var(--text-strong); }
.hm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #64748B; flex: none; }
.hm-dot[data-phase="climbing"] { background: var(--climbing); }
.hm-dot[data-phase="cruising"] { background: var(--cruising); }
.hm-dot[data-phase="descending"] { background: var(--descending); }
.hm-dot[data-phase="ok"] { width: 7px; height: 7px; background: #22C55E; margin-right: 8px; vertical-align: 1px; }
.hm-ctas { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.hm-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 12px;
    font-weight: 600; font-size: 15px; text-decoration: none;
}
.hm-btn-primary { background: var(--ua-blue); color: #fff; box-shadow: 0 0 24px rgba(0, 102, 204, 0.35); }
.hm-btn-primary:hover { background: #0B76E0; color: #fff; }
.hm-btn-ghost { border: 1px solid rgba(255, 255, 255, 0.16); color: var(--text); }

.hm-globe { position: relative; display: block; width: 100%; max-width: 620px; justify-self: center; aspect-ratio: 1 / 1; text-decoration: none; }
.hm-globe img, .hm-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hm-callouts { position: absolute; inset: 0; pointer-events: none; }
.hm-callout {
    position: absolute; transform: translate(10px, -50%); padding: 5px 10px; border-radius: 8px; white-space: nowrap;
    background: rgba(0, 18, 41, 0.88); border: 1px solid rgba(255, 191, 0, 0.45); font-size: 12px; color: var(--text-strong);
}
.hm-callout[data-tone="bad"] { border-color: rgba(248, 113, 113, 0.55); }
.hm-callout b { font-family: var(--mono); }
.hm-callout.flip { transform: translate(calc(-100% - 10px), -50%); }
.hm-globe-note { position: absolute; right: 4%; bottom: 3%; font-size: 11px; color: #8FA3BD; }

/* ---- Sections ---- */
.hm-section { padding: 28px 0 8px; scroll-margin-top: 120px; }
.hm-section + .hm-section { padding-top: 40px; }
.hm-section:last-of-type { padding-bottom: 56px; }
.hm-eyebrow { margin: 0 0 16px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--eyebrow); }
.hm-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.hm-section-head .hm-eyebrow { margin: 0; }
.hm-system { margin: 0; font-size: 14px; color: var(--text-2); }
.hm-system b { color: var(--text-strong); }
.hm-footnote { margin: 12px 0 0; font-size: 12px; color: var(--text-3); }

.hm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.hm-card {
    display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none;
    transition: border-color 150ms ease;
}
.hm-card:hover { border-color: rgba(255, 191, 0, 0.45); color: inherit; }
.hm-card[data-tone="bad"] { border-color: rgba(248, 113, 113, 0.35); }
.hm-card-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hm-card-kicker[data-tone="gold"] { color: #FFD666; }
.hm-card-kicker[data-tone="blue"] { color: #93C5FD; }
.hm-card-kicker[data-tone="violet"] { color: #C4B5FD; }
.hm-card-kicker[data-tone="red"] { color: #FCA5A5; }
.hm-card-kicker[data-tone="green"] { color: #86EFAC; }
.hm-card-big { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--text-strong); }
.hm-card-line { font-size: 15px; color: #C9D5E4; }
.hm-card-note { font-size: 13px; line-height: 1.5; color: var(--text-3); }
.hm-card-note:empty { display: none; }
.hm-meter { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.hm-meter > span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--ua-gold); transition: width 400ms ease; }

/* 118px min keeps all nine hubs on one row at the 1320px content width. */
.hm-hubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 118px), 1fr)); gap: 10px; }
.hm-hub {
    display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px;
    background: var(--surface-quiet); border: 1px solid rgba(255, 255, 255, 0.08); color: inherit; text-decoration: none;
}
.hm-hub:hover { border-color: rgba(255, 191, 0, 0.45); color: inherit; }
.hm-hub-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.hm-hub-code { font-family: var(--mono); font-weight: 700; font-size: 17px; color: var(--text-strong); }
.hm-hub-wx { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hm-hub-otp { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 22px; font-weight: 700; color: var(--text-strong); }
.hm-hub-bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.hm-hub-bar > span { display: block; height: 100%; border-radius: 2px; }
.hm-hub-tier { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.hm-hub-tier .hm-dot { width: 7px; height: 7px; }
[data-tier="good"] { --tier: var(--otp-good); }
[data-tier="warn"] { --tier: var(--otp-warn); }
[data-tier="bad"] { --tier: var(--otp-bad); }
.hm-hub[data-tier] .hm-hub-bar > span, .hm-hub[data-tier] .hm-dot { background: var(--tier); }
.hm-faa { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; padding: 1px 6px; border-radius: 6px; border: 1px solid rgba(248, 113, 113, 0.5); color: #FCA5A5; }
.hm-faa[data-tone="orange"], .hm-faa[data-tone="yellow"] { border-color: rgba(245, 158, 11, 0.5); color: #FCD34D; }

/* FAA briefing under the hub tiles: programs now + the operations plan. */
.hm-faa-brief {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px 24px;
    margin-top: 16px; padding: 16px 20px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.08);
}
.hm-faa-brief[hidden] { display: none; }
.hm-faa-col { min-width: 0; }
.hm-faa-head { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--eyebrow); }
.hm-faa-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hm-faa-list li {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; color: var(--text-2);
    padding-left: 12px; border-left: 2px solid rgba(255, 255, 255, 0.12);
}
.hm-faa-list li[data-tone="red"] { border-left-color: var(--otp-bad); }
.hm-faa-list li[data-tone="orange"] { border-left-color: #FB923C; }
.hm-faa-list li[data-tone="yellow"] { border-left-color: var(--otp-warn); }
.hm-faa-list li[data-tone="clear"] { border-left-color: var(--otp-good); }
.hm-faa-list b { font-family: var(--mono); color: var(--text-strong); }
.hm-faa-detail { font-size: 12px; color: var(--text-3); }
.hm-faa-window { font-family: var(--mono); font-size: 12px; color: var(--ua-gold); white-space: nowrap; }
.hm-faa-source { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--text-3); }

/* Nine tiles: 320px min gives a clean 3x3 on desktop. */
.hm-explore { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.hm-tile {
    display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.02); color: inherit; text-decoration: none;
}
.hm-tile:hover { border-color: rgba(255, 191, 0, 0.45); color: inherit; }
.hm-tile b { font-size: 16px; color: var(--text-strong); }
.hm-tile span { font-size: 14px; color: var(--text-2); }

/* ---- Footer ---- */
.hm-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.hm-footer-row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding-top: 18px; padding-bottom: 18px; font-size: 12px; color: var(--text-3); }
.hm-noscript { padding: 16px 0 32px; color: var(--text-2); }

/* Skeleton shimmer while the first payload loads */
.is-loading .hm-card-big, .is-loading .hm-hub-otp { color: transparent; background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.11), rgba(255,255,255,0.05)); background-size: 200% 100%; border-radius: 6px; animation: hm-shimmer 1.4s linear infinite; }
@keyframes hm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 720px) {
    .hm-brand-tag { display: none; }
    .hm-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 18px; padding-bottom: 2px; scrollbar-width: none; }
    .hm-nav::-webkit-scrollbar { display: none; }
    .hm-status { margin-left: auto; }
    .hm-clock { display: none; }
    .hm-globe-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-live[data-state="live"] .hm-live-dot { animation: none; }
    .is-loading .hm-card-big, .is-loading .hm-hub-otp { animation: none; }
    .hm-meter > span { transition: none; }
}
