/* Base — reset + typography + reveal + container */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Navy band behind the nav — covers the white .page-body padding strip
   between nav-bottom and the hero, preventing flashes during the
   nav-height transition. Fixed at full nav-h so it always covers the
   transition zone. Snaps in instantly on scroll-up; fades out smoothly
   on scroll-down so the band doesn't show below the compact nav. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--ink);
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0ms;
}
body:has(.site-nav.is-scrolled-deep)::before {
  opacity: 0;
  transition: opacity 420ms ease;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--brand-2); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); line-height: 1.25; }
h5 { font-size: var(--fs-h5); line-height: 1.3; }

p { color: var(--text-2); }
p + p { margin-top: .8em; }

ul, ol { padding-left: 1.25em; }
li + li { margin-top: .35em; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

::selection { background: var(--halo); color: var(--ink); }

/* Utility — container */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container-wide { max-width: var(--container-wide); }
.container-narrow { max-width: var(--container-narrow); }

/* Utility — eyebrow label (small sans all-caps used above section headings) */
.eyebrow {
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  display: inline-block;
}
.eyebrow-blue { color: var(--brand); }

/* Utility — section rhythm */
.section { padding-block: var(--space-6); }
.section-sm { padding-block: var(--space-5); }
.section-lg { padding-block: var(--space-7); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark p { color: var(--on-dark-2); }
.section-soft { background: var(--bg-2); }

.section > .container > .section-head {
  max-width: 760px;
  margin-bottom: var(--space-4);
}
.section-head h2 { margin-top: .75rem; }
.section-head p.lede {
  margin-top: .9rem;
  font-size: var(--fs-lg);
  color: var(--muted);
  line-height: 1.55;
}

/* Reveal animation utility */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 460ms cubic-bezier(.22,.61,.36,1), transform 460ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--stag, 0) * 70ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mask-wipe reveal for images entering viewport */
.reveal-mask {
  -webkit-clip-path: inset(0 100% 0 0);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 900ms cubic-bezier(.22,.61,.36,1), -webkit-clip-path 900ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--stag, 0) * 90ms);
  will-change: clip-path;
}
.reveal-mask.is-visible {
  -webkit-clip-path: inset(0 0 0 0);
  clip-path: inset(0 0 0 0);
}

/* Slide-in from left for stats and similar tiles */
.reveal-slide {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 540ms cubic-bezier(.22,.61,.36,1), transform 540ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--stag, 0) * 80ms);
  will-change: opacity, transform;
}
.reveal-slide.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.stagger-children > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 460ms cubic-bezier(.22,.61,.36,1), transform 460ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.stagger-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger-children > *, .reveal-mask, .reveal-slide {
    opacity: 1; transform: none; transition: none;
    -webkit-clip-path: none; clip-path: none;
  }
  html { scroll-behavior: auto; }
  .scroll-progress, .pulse-accent, .float-y { animation: none !important; }
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-hi) 100%);
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(37,99,235,.5);
  transition: width 60ms linear;
}

/* Generic float-up bobbing (subtle, ~3px, 4s) for floating badges */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.float-y { animation: float-y 5s ease-in-out infinite; }

/* Pulsing accent rule — glows gold */
@keyframes pulse-accent {
  0%, 100% { opacity: .9; box-shadow: 0 0 32px rgba(255,216,54,.55); }
  50%      { opacity: 1;  box-shadow: 0 0 64px rgba(255,216,54,.95); }
}
.pulse-accent { animation: pulse-accent 4s ease-in-out infinite; }

/* Cursor-tracked spotlight on card surfaces */
.spotlight-card {
  position: relative;
  isolation: isolate;
}
.spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, -200px) var(--my, -200px),
              rgba(37,99,235,.18), transparent 45%);
  opacity: 0;
  transition: opacity 240ms ease;
  z-index: 0;
}
.spotlight-card:hover::after { opacity: 1; }
.spotlight-card > * { position: relative; z-index: 1; }

/* Scrollbar — subtle, navy-tinted */
html { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
body::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* Screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
