:root {
  --navy: #000B47;
  --navy-light: #0a1660;
  --gold: #F9A825;
  --gold-deep: #E09200;
  --gold-soft: #FEF3C7;
  --line-dark: #1a2560;
  --line: #E8EBF0;
  --ink: #0F172A;
  --paper: #FFFFFF;
}

body { -webkit-font-smoothing: antialiased; }

/* ── Brand utilities (Tailwind CDN may not JIT custom tokens) ── */
.bg-navy { background-color: var(--navy) !important; }
.bg-navy-light { background-color: var(--navy-light) !important; }
.bg-gold { background-color: var(--gold) !important; }
.bg-gold-soft { background-color: var(--gold-soft) !important; }
.bg-paper { background-color: var(--paper) !important; }
.text-navy { color: var(--navy) !important; }
.text-gold { color: var(--gold) !important; }
.text-gold-deep { color: var(--gold-deep) !important; }
.text-ink { color: var(--ink) !important; }
.border-line-dark { border-color: var(--line-dark) !important; }
.border-gold { border-color: var(--gold) !important; }
.border-gold\/50 { border-color: rgba(249, 168, 37, 0.5) !important; }
.border-gold\/30 { border-color: rgba(249, 168, 37, 0.3) !important; }
.bg-navy\/95 { background-color: rgba(0, 11, 71, 0.95) !important; }
.hover\:bg-gold-deep:hover { background-color: var(--gold-deep) !important; }
.hover\:bg-navy-light:hover { background-color: var(--navy-light) !important; }
.hover\:border-gold\/50:hover { border-color: rgba(249, 168, 37, 0.5) !important; }
.bg-gold\/20 { background-color: rgba(249, 168, 37, 0.12) !important; }
.accent-gold { accent-color: var(--gold); }

/* ── Semantic chrome (nav/footer injected after load) ── */
.site-header {
  background-color: rgba(0, 11, 71, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.site-footer {
  background-color: var(--navy);
  border-top: 1px solid var(--line-dark);
  color: #fff;
}

/* ── Scroll reveal (JS-gated so content stays visible without JS) ── */
.reveal { opacity: 1; transform: none; }
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
html.js .reveal.in { opacity: 1; transform: none; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.stat-card {
  border-left: 3px solid var(--gold);
}

.nav-link-active { color: var(--gold) !important; }

#mobile-menu.open { display: block; }

/* ── Hero + scan alignment ── */
.hero-with-scan {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-with-scan {
    grid-template-columns: 1fr min(380px, 42%);
    gap: 3rem 4rem;
    align-items: stretch;
  }
  .hero-with-scan__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 0.5rem;
  }
}
.hero-with-scan__copy {
  max-width: 36rem;
}
.hero-with-scan__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .hero-with-scan__visual {
    max-width: none;
    margin-inline: 0;
    justify-content: flex-end;
    align-self: center;
  }
}
.hero-with-scan__visual .cxr-scan,
.hero-with-scan__visual[data-lung-scan]:empty {
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .hero-with-scan__visual .cxr-scan,
  .hero-with-scan__visual[data-lung-scan]:empty {
    max-width: 380px;
    width: 100%;
    max-height: min(480px, 85vh);
    margin-inline: 0;
  }
}

/* ── Lung scan animation ("deep scan" AI panel) placeholder before JS loads ── */
[data-lung-scan]:empty {
  min-height: 360px;
  aspect-ratio: 4 / 5;
  background: radial-gradient(120% 90% at 50% 12%, #0d1c46 0%, #070d22 62%, #04060f 100%);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-with-scan__visual[data-lung-scan]:empty {
  width: 100%;
  max-width: 380px;
}
@media (min-width: 1024px) {
  .hero-with-scan__visual[data-lung-scan]:empty {
    max-width: none;
    max-height: 480px;
  }
}

.cxr-scan {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

/* AI variant — dark "deep scan" field where the neural mesh + beam read brightest */
.cxr-scan--ai {
  background: radial-gradient(120% 90% at 50% 12%, #0d1c46 0%, #070d22 62%, #04060f 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px -30px rgba(0, 11, 71, 0.7);
}
.cxr-scan--ai .cxr-scan__hud { border-color: rgba(255, 255, 255, 0.12); }
.cxr-scan--ai .cxr-scan__status {
  color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(transparent, rgba(4, 8, 20, 0.85));
}
.cxr-scan--ai .cxr-scan__file { color: var(--gold); }

.cxr-scan__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cxr-scan__hud {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(12, 31, 107, 0.14);
  border-radius: 6px;
  pointer-events: none;
  z-index: 3;
}

.cxr-scan__hud::before,
.cxr-scan__hud::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--gold);
  border-style: solid;
}

.cxr-scan__hud::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}

.cxr-scan__hud::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}

.cxr-scan__status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  color: #000B47;
  background: linear-gradient(transparent, rgba(238, 242, 251, 0.95));
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 4;
}

.cxr-scan__file { color: var(--gold-deep, #b9812c); }

.cxr-scan__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(249, 168, 37, 0.7);
  animation: cxr-blink 1.2s ease-in-out infinite;
}

@keyframes cxr-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .cxr-scan__dot { animation: none; }
}
