/* Thalassys HUD — Bridge / Deep-Cyan preset.
   Palette and tokens lifted from hud-app.jsx. */
:root {
    --hud-bg: #040810;
    --hud-bg-tint: #0a1320;
    --hud-accent: #52e0ff;
    --hud-accent-2: #3a7bff;
    --hud-text: #e6f0f6;
    --hud-muted: #6e8290;
    --hud-glass-bg: rgba(20, 59, 77, 0.32);
    --hud-glass-border: rgba(82, 224, 255, 0.22);
    --hud-warn: #f0c060;
    --hud-l1: #7af28e;
    --hud-l3: #e07ad4;
    --hud-density: 32px;
    --hud-gap: 16px;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --display: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.hud {
    margin: 0;
    background: var(--hud-bg);
    color: var(--hud-text);
    font-family: var(--display);
    font-feature-settings: "ss01", "cv11";
    overflow-x: hidden;
}
body.hud a { color: inherit; text-decoration: none; }
body.hud main { display: block; }

/* Vignette wash on the body */
body.hud::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse at top, var(--hud-bg-tint) 0%, var(--hud-bg) 60%);
}

/* Subtle scanlines layer */
.hud-scanlines {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent 2px,
        rgba(82, 224, 255, 0.025) 2px,
        rgba(82, 224, 255, 0.025) 4px
    );
}

/* Animated noise grain */
.hud-noise {
    position: fixed; inset: 0; z-index: 2; pointer-events: none;
    opacity: .04; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
}

/* Starfield (CSS twinkle) */
.hud-starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.hud-starfield svg { width: 100%; height: 100%; display: block; }

@keyframes hud-twinkle {
    0%, 100% { opacity: .65; }
    50% { opacity: .12; }
}
.hud-starfield circle { animation: hud-twinkle var(--dur, 4s) ease-in-out infinite; }

/* ─── Top status bar ─────────────────────────────────── */
.hud-topbar {
    position: relative; z-index: 5;
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 32px;
    border-bottom: 1px solid var(--hud-glass-border);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .04em;
}
.hud-topbar .live { color: var(--hud-accent); }
.hud-topbar .live .dot {
    display: inline-block; width: 7px; height: 7px;
    border-radius: 50%; background: var(--hud-accent);
    box-shadow: 0 0 8px var(--hud-accent);
    margin-right: 8px; vertical-align: 1px;
    animation: hud-blink 1.4s steps(2) infinite;
}
@keyframes hud-blink { to { opacity: 0; } }
.hud-topbar .telemetry { color: var(--hud-muted); }
.hud-topbar .region { color: var(--hud-accent); }

/* ─── Nav ─────────────────────────────────────────────── */
.hud-nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 32px;
    background: rgba(4, 8, 16, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hud-glass-border);
}
.hud-brand { display: flex; align-items: center; gap: 14px; }
.hud-brand svg { display: block; }
.hud-brand-logo { display: block; height: 85px; width: auto; }
.hud-brand-name {
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: .3em;
    font-weight: 700;
    color: var(--hud-accent);
}
.hud-brand-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--hud-muted);
}
.hud-nav-links {
    display: flex; gap: 28px;
    font-size: 12px;
    font-family: var(--mono);
    letter-spacing: .2em;
    text-transform: uppercase;
}
.hud-nav-links a { color: var(--hud-text); padding: 4px 0; border-bottom: 1px solid transparent; }
.hud-nav-links a:hover { color: var(--hud-accent); border-bottom-color: var(--hud-accent); }
.hud-nav-right { display: flex; align-items: center; gap: 16px; }
.hud-lang {
    background: transparent;
    color: var(--hud-text);
    border: 1px solid var(--hud-glass-border);
    border-radius: 0;
    padding: 6px 8px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .15em;
    cursor: pointer;
}

/* ─── Buttons ─────────────────────────────────────────── */
.hud-btn {
    display: inline-block;
    font-family: inherit;
    font-size: 13px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--hud-accent);
    color: var(--hud-accent);
    cursor: pointer;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 400;
    border-radius: 0;
    transition: background .2s, color .2s, box-shadow .2s, transform .2s;
}
.hud-btn:hover { background: rgba(82, 224, 255, .1); transform: translateY(-1px); }
.hud-btn-primary {
    background: var(--hud-accent);
    color: var(--hud-bg);
    font-weight: 700;
    box-shadow: 0 0 30px rgba(82, 224, 255, .4);
}
.hud-btn-primary:hover { background: #7ce9ff; box-shadow: 0 0 40px rgba(82, 224, 255, .6); color: var(--hud-bg); }
.hud-btn-sm { font-size: 11px; padding: 10px 14px; }
.hud-btn-block { display: block; width: 100%; text-align: center; }

/* ─── Ticker ──────────────────────────────────────────── */
.hud-ticker {
    position: relative; z-index: 4;
    border-bottom: 1px solid var(--hud-glass-border);
    padding: 10px 0;
    overflow: hidden;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--hud-muted);
}
.hud-ticker-track { display: flex; gap: 48px; white-space: nowrap; animation: hud-ticker-scroll 60s linear infinite; }
.hud-ticker-track span { flex-shrink: 0; }
.hud-ticker-track .arrow { color: var(--hud-accent); margin-right: 6px; }
@keyframes hud-ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── Glass panel ─────────────────────────────────────── */
.hud-panel {
    position: relative;
    background: var(--hud-glass-bg);
    border: 1px solid var(--hud-glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0;
    padding: 20px;
}
.hud-panel::before {
    content: ''; position: absolute; top: -1px; left: -1px; right: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hud-accent), transparent);
    opacity: .7;
}
.hud-panel .corner {
    position: absolute; width: 12px; height: 12px;
    border-color: var(--hud-accent); border-style: solid; border-width: 0;
}
.hud-panel .corner.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.hud-panel .corner.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.hud-panel .corner.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-panel .corner.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.hud-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--hud-glass-border);
    padding-bottom: 10px; margin-bottom: 14px;
}
.hud-panel-header .title {
    color: var(--hud-accent);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.hud-panel-header .meta {
    color: var(--hud-muted);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .04em;
}

/* ─── Section primitives ──────────────────────────────── */
.hud-section { padding: 24px 32px; position: relative; z-index: 3; }
.hud-section--lg { padding: 56px 32px 64px; }
.hud-section-label {
    color: var(--hud-accent);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .3em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.hud-section-title {
    font-size: 48px;
    font-weight: 200;
    margin: 0 0 36px;
    letter-spacing: -.01em;
    line-height: 1.05;
    font-family: var(--display);
}
.hud-section-title em { font-style: normal; color: var(--hud-accent); }

/* ─── Hero — bridge dashboard ─────────────────────────── */
.hud-hero { padding: 16px 32px 0; position: relative; z-index: 3; }
.hud-bridge {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 20px;
    align-items: start;
}
.hud-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--hud-glass-border);
    font-size: 12px;
    font-family: var(--mono);
}
.hud-row:last-child { border-bottom: none; }
.hud-row .count { color: var(--hud-muted); }
.hud-row .status { color: var(--hud-accent); }
.hud-row .status.warn { color: var(--hud-warn); }
.hud-meter-label {
    margin-top: 16px;
    color: var(--hud-accent);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.hud-axis-labels {
    display: flex; justify-content: space-between;
    font-size: 9px; font-family: var(--mono); color: var(--hud-muted); margin-top: 4px;
}
.hud-heading-row { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center; }
.hud-heading-row .data {
    font-family: var(--mono); font-size: 11px; color: var(--hud-muted); line-height: 1.6;
}
.hud-heading-row .data .v { color: var(--hud-accent); }

/* center globe panel */
.hud-globe-panel { min-height: 540px; }
.hud-globe-wrap {
    aspect-ratio: 1/1; max-height: 460px;
    margin: 0 auto; position: relative;
}
.hud-globe-foot {
    position: absolute; bottom: 16px; left: 24px; right: 24px;
    display: flex; justify-content: space-between;
    font-size: 10px; color: var(--hud-muted);
    font-family: var(--mono); letter-spacing: .04em;
}
.hud-globe-foot .live { color: var(--hud-accent); }

/* live brief */
.hud-brief-headline {
    font-size: 22px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.01em;
}
.hud-brief-headline em { color: var(--hud-accent); font-style: normal; }
.hud-brief-body {
    font-size: 13px; color: var(--hud-muted); line-height: 1.55; margin-top: 12px;
}
.hud-report-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--hud-glass-border);
    font-size: 12px;
}
.hud-report-row .lvl { font-family: var(--mono); color: var(--hud-accent); font-weight: 700; }
.hud-report-row .ts { font-family: var(--mono); color: var(--hud-muted); font-size: 11px; }

/* hero centered headline */
.hud-hero-title-block { margin: 80px auto 0; text-align: center; max-width: 980px; }
.hud-hero-eyebrow {
    color: var(--hud-accent); font-family: var(--mono);
    font-size: 11px; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 20px;
}
.hud-hero-title {
    font-size: clamp(48px, 7vw, 88px);
    line-height: .95;
    font-weight: 200;
    margin: 0;
    letter-spacing: -.02em;
    font-family: var(--display);
    text-shadow: 0 0 24px rgba(82, 224, 255, .35);
}
.hud-hero-title em { color: var(--hud-accent); font-style: normal; }
.hud-hero-sub {
    font-size: 17px;
    color: var(--hud-muted);
    max-width: 760px;
    margin: 28px auto 0;
    line-height: 1.6;
}
.hud-hero-cta { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Capabilities grid ───────────────────────────────── */
.hud-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hud-gap); }
.hud-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hud-gap); }
.hud-cap { padding: 24px; }
.hud-cap-head {
    display: flex; justify-content: space-between; align-items: center;
}
.hud-cap-mod {
    font-family: var(--mono); font-size: 11px;
    color: var(--hud-accent); letter-spacing: .25em;
}
.hud-cap-idx {
    font-family: var(--mono); font-size: 10px; color: var(--hud-muted);
}
.hud-cap-title {
    font-size: 28px; font-weight: 200; margin-top: 18px;
    letter-spacing: -.01em; font-family: var(--display);
}
.hud-cap-body { font-size: 13px; color: var(--hud-muted); line-height: 1.55; margin-top: 12px; min-height: 60px; }
.hud-cap-foot {
    margin-top: 20px; display: flex; align-items: flex-end; gap: 12px;
}
.hud-cap-foot .bars { flex: 1; }
.hud-cap-foot .metric {
    font-family: var(--mono); font-size: 11px; color: var(--hud-accent); white-space: nowrap;
}

/* ─── Pipeline ────────────────────────────────────────── */
.hud-pipeline-panel { padding: 32px; }
.hud-pipe-svg { width: 100%; height: 120px; display: block; }
.hud-pipe-legend {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 8px; margin-top: 12px;
    font-family: var(--mono); font-size: 11px;
    text-align: center;
}
.hud-pipe-legend .stage { color: var(--hud-accent); font-size: 12px; font-weight: 700; }
.hud-pipe-legend .meta { color: var(--hud-muted); margin-top: 2px; font-size: 10px; }

/* ─── Depth — L1 / L2 / L3 ────────────────────────────── */
.hud-depth-panel { padding: 32px; }
.hud-depth-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.hud-depth-col {
    padding: 0 24px;
}
.hud-depth-col + .hud-depth-col { border-left: 1px solid var(--hud-glass-border); }
.hud-depth-num {
    font-family: var(--mono); font-size: 72px;
    font-weight: 200; line-height: 1;
}
.hud-depth-num.l1 { color: var(--hud-l1); text-shadow: 0 0 30px rgba(122, 242, 142, .35); }
.hud-depth-num.l2 { color: var(--hud-accent); text-shadow: 0 0 30px rgba(82, 224, 255, .35); }
.hud-depth-num.l3 { color: var(--hud-l3); text-shadow: 0 0 30px rgba(224, 122, 212, .35); }
.hud-depth-title { font-size: 24px; font-weight: 200; margin-top: 16px; font-family: var(--display); }
.hud-depth-body { font-size: 13px; color: var(--hud-muted); margin-top: 10px; line-height: 1.55; }
.hud-depth-items { margin-top: 16px; font-family: var(--mono); font-size: 11px; }
.hud-depth-items div { display: flex; gap: 8px; padding: 4px 0; color: var(--hud-muted); }
.hud-depth-items .arrow.l1 { color: var(--hud-l1); }
.hud-depth-items .arrow.l2 { color: var(--hud-accent); }
.hud-depth-items .arrow.l3 { color: var(--hud-l3); }
.hud-depth-delay {
    font-family: var(--mono); font-size: 11px;
    color: var(--hud-accent); margin-top: 16px; letter-spacing: .2em;
}

/* ─── Architecture ────────────────────────────────────── */
.hud-arch-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--hud-gap); }
.hud-arch-radar { padding: 32px; }
.hud-radar-wrap { aspect-ratio: 1/1; max-width: 420px; margin: 0 auto; }
.hud-arch-stack { padding: 32px; }
.hud-stack-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--hud-glass-border);
}
.hud-stack-row:last-child { border-bottom: none; }
.hud-stack-key {
    font-family: var(--mono); font-size: 11px;
    color: var(--hud-accent); letter-spacing: .15em; text-transform: uppercase;
}
.hud-stack-val { font-size: 14px; color: var(--hud-muted); margin-top: 4px; line-height: 1.5; }

/* ─── FAQ ─────────────────────────────────────────────── */
.hud-faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hud-gap); }
.hud-faq-item { padding: 24px; display: flex; gap: 16px; }
.hud-faq-num {
    font-family: var(--mono); color: var(--hud-accent);
    font-size: 11px; letter-spacing: .2em; white-space: nowrap;
}
.hud-faq-q { font-size: 18px; font-weight: 500; line-height: 1.3; }
.hud-faq-a { font-size: 13px; color: var(--hud-muted); margin-top: 10px; line-height: 1.6; }

/* ─── CTA ─────────────────────────────────────────────── */
.hud-cta {
    padding: 96px 32px; text-align: center; position: relative;
    border-top: 1px solid var(--hud-glass-border);
}
.hud-cta-title {
    font-size: clamp(36px, 5.6vw, 64px);
    font-weight: 200; margin: 0 auto;
    max-width: 22ch; letter-spacing: -.02em; line-height: 1.05;
    text-shadow: 0 0 24px rgba(82, 224, 255, .25);
}
.hud-cta-title em { color: var(--hud-accent); font-style: normal; }
.hud-cta-title i { font-style: italic; font-weight: 400; }
.hud-cta-sub { font-size: 17px; color: var(--hud-muted); max-width: 640px; margin: 24px auto 0; line-height: 1.6; }
.hud-cta-buttons { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ──────────────────────────────────────────── */
.hud-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--hud-glass-border);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 10px; font-family: var(--mono);
    letter-spacing: .22em; text-transform: uppercase;
    position: relative; z-index: 3;
}
.hud-footer .label { color: var(--hud-accent); }
.hud-footer .meta { color: var(--hud-muted); }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
    .hud-bridge { grid-template-columns: 1fr; }
    .hud-globe-panel { min-height: 0; }
    .hud-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hud-arch-grid { grid-template-columns: 1fr; }
    .hud-faq-grid { grid-template-columns: 1fr; }
    .hud-depth-grid { grid-template-columns: 1fr; }
    .hud-depth-col + .hud-depth-col { border-left: none; border-top: 1px solid var(--hud-glass-border); margin-top: 24px; padding-top: 24px; }
    .hud-pipe-legend { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .hud-section, .hud-hero { padding-left: 16px; padding-right: 16px; }
    .hud-topbar { padding: 8px 16px; flex-wrap: wrap; gap: 8px; }
    .hud-topbar .telemetry { display: none; }
    .hud-nav { padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
    .hud-nav-links { display: none; }
    .hud-grid-3, .hud-grid-2 { grid-template-columns: 1fr; }
    .hud-pipe-legend { grid-template-columns: repeat(2, 1fr); }
    .hud-footer { padding: 16px; flex-direction: column; gap: 6px; }
}
