/* ===============================================================
   Helix Horizon Labs
   ---------------------------------------------------------------
   Accent lock ....... one accent for the whole page: --color-primary
                       Corporate Blue #0376c6 and Deep Navy #000062.
   Shape lock ........ cards and media 28px, elements nested inside a
                       card 16px, every interactive control full pill.
                       That rule holds everywhere, no exceptions.
   Theme lock ........ auto light/dark via [data-theme]; sections stay
                       inside their theme family. The single deliberate
                       colour-block is the closing #join section.
   Motion ............ native only. CSS scroll-driven timelines with an
                       IntersectionObserver fallback, plus the Web
                       Animations API. No libraries, no scroll listeners.
   =============================================================== */

/* ---------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------- */

@font-face {
  font-family: "Metropolis";
  src: url("./assets/fonts/Metropolis-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  --brand-navy: #000062;
  --brand-blue: #0376c6;
  --color-bg: #060622;
  --color-surface: #0d1032;
  --color-surface-2: #161c43;
  --color-text: #f2f8fc;
  --color-muted: #9aabb7;
  --color-hairline: #55666f;
  --color-border: rgb(255 255 255 / 14%);
  --color-border-strong: rgb(255 255 255 / 30%);

  --color-primary: #65bafa;
  --color-primary-deep: #0376c6;
  --color-primary-bright: #a0d8ff;
  --color-primary-wash: rgb(3 118 198 / 18%);
  --color-on-primary: #04121d;

  --shadow-card: none;
  --shadow-lift: 0 0 0 1px var(--color-primary);

  color-scheme: dark;
}

:root {
  --font-display: "Metropolis", "Helvetica Neue", sans-serif;
  --font-body: "Metropolis", "Helvetica Neue", sans-serif;
  font-synthesis: none;

  --text-xs: clamp(0.75rem, 0.71rem + 0.18vw, 0.85rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.98rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --text-lg: clamp(1.12rem, 1rem + 0.6vw, 1.42rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.3vw, 2.2rem);
  --text-2xl: clamp(2.4rem, 1.35rem + 4.1vw, 5.4rem);
  --text-hero: clamp(2.9rem, 1.4rem + 5.6vw, 6.6rem);

  --gutter: clamp(1.25rem, 5vw, 6rem);
  --section-y: clamp(5.5rem, 11vh, 9.5rem);
  --content-wide: 86rem;
  --header-height: 6rem;
  --logo-header-width: 7.5rem;
  --logo-footer-width: 10rem;

  --radius-card: 28px;
  --radius-inner: 16px;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
  --t-fast: 180ms;
  --t-med: 340ms;
  --t-slow: 720ms;
}

[data-theme="light"] {
  --color-bg: #ffffff;
  --color-surface: #f4f8fb;
  --color-surface-2: #e9f2f9;
  --color-text: #000062;
  --color-muted: #55636d;
  --color-hairline: #9aa6ae; /* hairline / decorative only, never text */
  --color-border: rgb(7 19 28 / 11%);
  --color-border-strong: rgb(7 19 28 / 22%);

  --color-primary: #0376c6;
  --color-primary-deep: #000062;
  --color-primary-bright: #0376c6;
  --color-primary-wash: rgb(3 118 198 / 12%);
  --color-on-primary: #ffffff;

  --shadow-card: 0 2px 6px -2px rgb(10 60 95 / 8%), 0 22px 50px -26px rgb(10 60 95 / 30%);
  --shadow-lift: 0 18px 44px -20px rgb(10 60 95 / 40%);

  --radius-card: 28px;
  --radius-inner: 16px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
  --t-fast: 180ms;
  --t-med: 340ms;
  --t-slow: 720ms;

  color-scheme: light;
}


body {
  /* clip rather than hidden: hidden creates a scroll container and
     silently breaks every position: sticky on the page. */
  overflow-x: hidden;
  overflow-x: clip;
  transition: background var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}

/* ---------------------------------------------------------------
   2. SHARED PRIMITIVES
   --------------------------------------------------------------- */

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.lead {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: -0.01em;
}

h1 em,
h2 em {
  color: var(--color-primary);
}

section {
  position: relative;
  padding-inline: var(--gutter);
}

/* Pointer spotlight. JS writes --mx / --my; the card lights up under
   the cursor so hover reads as physical rather than a colour swap. */
[data-spotlight] {
  position: relative;
  isolation: isolate;
}

[data-spotlight]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    22rem circle at var(--mx, 50%) var(--my, 0%),
    var(--color-primary-wash),
    transparent 68%
  );
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}

[data-spotlight]:hover::before,
[data-spotlight]:focus-within::before {
  opacity: 1;
}

/* ---------------------------------------------------------------
   3. SCROLL RAIL
   --------------------------------------------------------------- */

.scroll-rail {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto 0;
  height: 2px;
  pointer-events: none;
}

.scroll-rail span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-bright));
}

@supports (animation-timeline: scroll()) {
  .scroll-rail span {
    animation: fill-x linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes fill-x {
  to {
    transform: scaleX(1);
  }
}

/* ---------------------------------------------------------------
   3b. SECTION INDEX
   A running position readout, the way a numbered slider tells you
   where you are. Wayfinding on a long single page, not decoration.
   --------------------------------------------------------------- */

.section-index {
  position: fixed;
  z-index: 90;
  bottom: 1.5rem;
  left: var(--gutter);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0.95rem;
  pointer-events: none;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-bg) 72%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.section-index b {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.section-index span {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-index b,
.section-index span {
  transition: opacity var(--t-fast) linear;
}

.section-index.swapping b,
.section-index.swapping span {
  opacity: 0;
}

/* ---------------------------------------------------------------
   3c. PULL QUOTES
   Full-bleed breathing room between the dense sections, with the
   line drifting against the scroll so the page keeps moving.
   --------------------------------------------------------------- */

.quote {
  display: grid;
  place-items: center;
  min-height: clamp(60vh, 78vh, 52rem);
  padding-block: var(--section-y);
  overflow: clip;
}

.quote blockquote {
  display: grid;
  gap: 0.1em;
  max-width: var(--content-wide);
  width: 100%;
}

.quote-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.2rem + 6vw, 7.5rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.quote-line:last-child {
  color: var(--color-primary);
  justify-self: end;
  text-align: right;
}

@supports (animation-timeline: view()) {
  .quote-line:first-child {
    animation: drift-right linear both;
    animation-timeline: view(block);
  }

  .quote-line:last-child {
    animation: drift-left linear both;
    animation-timeline: view(block);
  }
}

@keyframes drift-right {
  from {
    transform: translate3d(-9vw, 0, 0);
  }
  to {
    transform: translate3d(4vw, 0, 0);
  }
}

@keyframes drift-left {
  from {
    transform: translate3d(9vw, 0, 0);
  }
  to {
    transform: translate3d(-4vw, 0, 0);
  }
}

/* ---------------------------------------------------------------
   4. HEADER
   --------------------------------------------------------------- */

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: var(--header-height);
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 80%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

@media (prefers-reduced-transparency: reduce) {
  .site-header.scrolled {
    background: var(--color-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.brand,
.header-actions,
.desktop-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.6rem;
  width: fit-content;
  line-height: 1.1;
}

.brand-logo {
  display: block;
  width: var(--logo-header-width);
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.footer-logo {
  width: var(--logo-footer-width);
}

.theme-logo-light {
  display: none;
}

[data-theme="light"] .theme-logo-light {
  display: block;
}

[data-theme="light"] .theme-logo-dark {
  display: none;
}

.brand-symbol {
  position: relative;
  display: block;
  width: 3rem;
  aspect-ratio: 1004 / 670;
  flex: 0 0 auto;
  transition: transform var(--t-med) var(--ease-spring);
}

.brand:hover .brand-symbol {
  transform: rotate(-10deg) scale(1.08);
}

.brand-symbol-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-symbol-light {
  display: none;
}

[data-theme="light"] .brand-symbol-dark {
  display: none;
}

[data-theme="light"] .brand-symbol-light {
  display: block;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
}

.brand-lockup strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.brand-lockup strong b {
  font-weight: 800;
}

.brand-lockup small {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Nav with a pill that slides to whichever link is hovered. */
.desktop-nav {
  position: relative;
  gap: 0.25rem;
  justify-self: center;
  white-space: nowrap;
}

.nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--color-primary-wash);
  opacity: 0;
  transition: transform var(--t-med) var(--ease-spring), width var(--t-med) var(--ease-spring),
    opacity var(--t-fast) var(--ease-out);
  pointer-events: none;
}

.desktop-nav.pill-on .nav-pill {
  opacity: 1;
}

.desktop-nav a {
  position: relative;
  padding: 0.5rem 0.95rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  border-radius: var(--radius-pill);
  transition: color var(--t-fast) var(--ease-out);
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--color-primary);
}

.header-actions {
  gap: 0.6rem;
  justify-self: end;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}

.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-wash);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.theme-toggle .icon-sun,
[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

/* ---------------------------------------------------------------
   5. BUTTONS AND LINKS
   --------------------------------------------------------------- */

.nav-cta,
.primary-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 700;
  color: var(--color-on-primary);
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  isolation: isolate;
  transform: translate3d(var(--magx, 0px), var(--magy, 0px), 0);
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-fast) var(--ease-out);
}

.nav-cta {
  padding: 0.62rem 1.25rem;
  font-size: var(--text-sm);
}

.primary-action {
  padding: 0.95rem 1.7rem;
  font-size: var(--text-base);
}

.nav-cta::before,
.primary-action::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--color-primary-deep);
  transform: translateY(101%);
  transition: transform var(--t-med) var(--ease-out);
}

.nav-cta:hover,
.primary-action:hover {
  box-shadow: var(--shadow-lift);
}

.nav-cta:hover::before,
.primary-action:hover::before {
  transform: translateY(0);
}

.nav-cta:active,
.primary-action:active {
  transform: translate3d(var(--magx, 0px), var(--magy, 0px), 0) scale(0.97);
}

.primary-action svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-med) var(--ease-out);
}

.primary-action:hover svg {
  transform: translateX(5px);
}

.research-link,
.evidence-standard a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  padding-bottom: 0.25rem;
}

.research-link svg,
.evidence-standard a svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-med) var(--ease-out);
}

.research-link::after,
.evidence-standard a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-med) var(--ease-out);
}

.research-link:hover::after,
.research-link:focus-visible::after,
.evidence-standard a:hover::after,
.evidence-standard a:focus-visible::after {
  transform: scaleX(1);
}

.research-link:hover svg,
.evidence-standard a:hover svg {
  transform: translateX(5px);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.menu-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t-med) var(--ease-out);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  z-index: 99;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--color-bg);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu nav {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 26rem);
  padding-inline: var(--gutter);
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  padding-block: 0.4rem;
  opacity: 0;
  transform: translateY(18px);
  animation: menu-in 460ms var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 65ms + 60ms);
}

.mobile-menu .mobile-cta {
  margin-top: 1.4rem;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0;
}

@keyframes menu-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------
   6. HERO
   --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100dvh;
  padding-top: 6rem;
  padding-bottom: clamp(3rem, 8vh, 6rem);
  overflow: clip;
}

/* A single soft blue wash that tracks the pointer. One accent, low
   opacity, no mesh gradient. */
.hero-wash {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    38rem circle at var(--wx, 70%) var(--wy, 35%),
    var(--color-primary-wash),
    transparent 62%
  );
  transition: background 600ms linear;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: calc(100dvh - 12rem);
  max-width: var(--content-wide);
  margin-inline: auto;
}

@supports (animation-timeline: view()) {
  .hero-inner {
    animation: hero-exit linear both;
    animation-timeline: view(block);
    animation-range: exit 0% exit 75%;
  }
}

@keyframes hero-exit {
  to {
    opacity: 0;
    transform: translate3d(0, -6%, 0) scale(0.95);
  }
}

.hero-copy {
  display: grid;
  gap: clamp(1rem, 2.2vh, 1.6rem);
  justify-items: start;
}

.hero-copy h1 {
  font-size: var(--text-hero);
  line-height: 0.94;
}

/* JS wraps each word in .word > span so the headline can rise into
   place one word at a time. */
.hero-copy h1 .word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.16em;
  margin-bottom: -0.14em;
  vertical-align: bottom;
}

.hero-copy h1 .word > span {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 105%, 0);
}

.hero-intro {
  font-size: var(--text-lg);
  color: var(--color-muted);
  max-width: 34ch;
}

.hero-actions {
  margin-top: 0.4rem;
}

[data-hero-part] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(54vh, 30rem);
  perspective: 1100px;
}

.orbit-canvas {
  position: absolute;
  inset: -18% -12%;
  width: 124%;
  height: 136%;
  pointer-events: none;
}

.hero-emblem {
  position: relative;
  width: min(90%, 27rem);
  aspect-ratio: 712 / 430;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 500ms var(--ease-out);
  will-change: transform;
}

.hero-emblem-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
}

.hero-emblem-light {
  display: none;
}

[data-theme="light"] .hero-emblem-dark {
  display: none;
}

[data-theme="light"] .hero-emblem-light {
  display: block;
}

/* ---------------------------------------------------------------
   7. TICKER - the one marquee on the page
   --------------------------------------------------------------- */

.ticker {
  overflow: hidden;
  padding-inline: 0;
  padding-block: clamp(1.2rem, 2.6vh, 2rem);
  border-block: 1px solid var(--color-border);
  background: var(--color-surface);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

/* Two layers: a constant drift, plus a scroll-linked shift so the
   strip visibly reacts to the reader's own scrolling. */
.ticker-shift {
  width: max-content;
}

@supports (animation-timeline: scroll()) {
  .ticker-shift {
    animation: ticker-shift linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes ticker-shift {
  to {
    transform: translate3d(-10vw, 0, 0);
  }
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-run 42s linear infinite;
}

.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}

.ticker-set {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  padding-right: clamp(1.4rem, 3vw, 2.6rem);
}

.ticker-set span {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.ticker-set i {
  font-style: normal;
  font-size: clamp(1.1rem, 3vw, 2rem);
  color: var(--color-primary);
}

@keyframes ticker-run {
  to {
    transform: translate3d(-33.3333%, 0, 0);
  }
}

/* ---------------------------------------------------------------
   8. METHOD - drawn curve, then a stack of pinned cards
   --------------------------------------------------------------- */

.method {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-block: var(--section-y);
}

.method-intro {
  display: grid;
  gap: 1.1rem;
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.method-intro h2 {
  font-size: var(--text-2xl);
}

.method-intro > p:last-child {
  color: var(--color-muted);
  max-width: 58ch;
}

.trajectory {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.trajectory svg {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 260;
  overflow: visible;
}

.trajectory path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.trajectory-base {
  stroke: var(--color-border-strong);
  stroke-dasharray: 3 9;
}

.trajectory-progress {
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}

/* A zero-length dash with a round cap reads as a marker riding the curve. */
.trajectory-dot {
  stroke: var(--color-primary);
  stroke-width: 13;
  stroke-dasharray: 0.1 1400;
  stroke-dashoffset: 1400;
}

@supports (animation-timeline: view()) {
  .trajectory-progress,
  .trajectory-dot {
    animation: draw-path linear both;
    animation-timeline: view(block);
    animation-range: entry 80% exit 30%;
  }
}

@keyframes draw-path {
  to {
    stroke-dashoffset: 0;
  }
}

.trajectory-caption {
  margin-top: 1.1rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
  max-width: none;
}

/* Sticky stack: each card pins under the header and the next one
   slides up over it, leaving the previous heading visible. */
.stack {
  display: grid;
  gap: clamp(1rem, 3vh, 2rem);
  margin-top: clamp(2.5rem, 7vh, 5rem);
  padding-bottom: 22vh;
}

.stack-card {
  position: sticky;
  top: calc(6.25rem + var(--i) * 3.4rem);
  display: grid;
  gap: 0.55rem;
  align-content: start;
  min-height: clamp(14rem, 32vh, 19rem);
  padding: 1.35rem clamp(1.5rem, 4vw, 3rem) clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
  transform: scale(calc(1 - (2 - var(--i)) * 0.018));
  transition: box-shadow var(--t-med) var(--ease-out);
}

.stack-card:hover {
  box-shadow: var(--shadow-lift);
}

.stack-index {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.stack-card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.stack-card p {
  color: var(--color-muted);
  max-width: 52ch;
}

/* ---------------------------------------------------------------
   9. FIELDS - pinned horizontal pan
   --------------------------------------------------------------- */

.fields-section {
  padding-block: var(--section-y);
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.fields-heading {
  display: grid;
  gap: 1rem;
  max-width: var(--content-wide);
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.fields-heading h2 {
  font-size: var(--text-2xl);
}

.fields-heading p {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

/* Baseline: a plain vertical stack. The pinned pan below is an
   enhancement, so anything without scroll timelines still reads. */
.pan-wrap {
  margin-inline: calc(var(--gutter) * -1);
}

.pan-track {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-inline: var(--gutter);
}

.pan-progress {
  display: none;
}

.field-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-med) var(--ease-out);
}

.field-card:hover {
  box-shadow: var(--shadow-lift);
}

.field-copy {
  display: grid;
  gap: 1.15rem;
  justify-items: start;
}

.field-copy h3 {
  font-size: clamp(1.6rem, 1.1rem + 1.7vw, 2.6rem);
  line-height: 1.03;
}

.field-copy > p {
  color: var(--color-muted);
}

.field-evidence {
  display: grid;
  gap: 0.9rem;
  width: 100%;
  padding-top: 1.15rem;
  border-top: 1px solid var(--color-border);
}

.field-evidence dt {
  margin-bottom: 0.15rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.field-evidence dd {
  font-size: var(--text-sm);
  font-weight: 500;
  max-width: 52ch;
}

/* Orbit signature: every field gets its own ring geometry. */
.field-signature {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(100%, 22rem);
  justify-self: center;
}

.field-signature .ring {
  position: absolute;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  transition: transform var(--t-slow) var(--ease-spring);
}

.field-signature .ring:nth-child(2) {
  width: 34%;
  height: 34%;
  opacity: 0.85;
  animation: sig-spin 26s linear infinite;
}

.field-signature .ring:nth-child(3) {
  width: 56%;
  height: 56%;
  opacity: 0.6;
}

.field-signature .ring:nth-child(4) {
  width: 78%;
  height: 78%;
  opacity: 0.38;
  animation: sig-spin 44s linear infinite reverse;
}

.field-signature .ring:nth-child(5) {
  width: 100%;
  height: 100%;
  opacity: 0.2;
}

.field-signature .core {
  width: 11%;
  height: 11%;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  box-shadow: 0 0 0 12px var(--color-primary-wash);
}

.field-label {
  position: absolute;
  bottom: -0.25rem;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.field-signature[data-shape="performance"] .ring {
  transform: rotate(0deg) scaleY(0.42);
}

.field-signature[data-shape="composition"] .ring {
  transform: rotate(-28deg) scaleY(0.7);
}

.field-signature[data-shape="wellness"] .ring {
  transform: rotate(18deg) scaleY(1);
}

.field-signature[data-shape="research"] .ring {
  transform: rotate(-58deg) scaleY(0.3);
}

.field-signature[data-shape="research"] .ring:nth-child(odd) {
  transform: rotate(58deg) scaleY(0.3);
}

@keyframes sig-spin {
  to {
    rotate: 360deg;
  }
}

/* The pinned pan itself. Wide screens, scroll timelines, motion allowed. */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .pan-wrap {
      --panel-w: clamp(24rem, 68vw, 58rem);
      --pan-gap: 1.5rem;
      --pan-distance: calc(
        (4 * var(--panel-w)) + (3 * var(--pan-gap)) + (2 * var(--gutter)) - 100vw
      );
      height: calc(100dvh + var(--pan-distance));
      margin-inline: calc(var(--gutter) * -1);
      view-timeline-name: --pan;
      view-timeline-axis: block;
    }

    .pan-sticky {
      position: sticky;
      top: 0;
      display: flex;
      align-items: center;
      height: 100dvh;
      overflow: hidden;
    }

    .pan-track {
      flex-direction: row;
      width: max-content;
      gap: var(--pan-gap);
      animation: pan-x linear both;
      animation-timeline: --pan;
      animation-range: contain 0% contain 100%;
    }

    .field-card {
      width: var(--panel-w);
      max-height: 80dvh;
      overflow-y: auto;
      scrollbar-width: thin;
      overscroll-behavior: contain;
    }

    .pan-progress {
      position: absolute;
      z-index: 2;
      display: block;
      right: var(--gutter);
      bottom: 8dvh;
      left: var(--gutter);
      height: 2px;
      border-radius: var(--radius-pill);
      background: var(--color-border-strong);
    }

    .pan-progress span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: var(--color-primary);
      transform: scaleX(0);
      transform-origin: 0 50%;
      animation: fill-x linear both;
      animation-timeline: --pan;
      animation-range: contain 0% contain 100%;
    }
  }
}

@keyframes pan-x {
  to {
    transform: translate3d(calc(-1 * var(--pan-distance)), 0, 0);
  }
}

/* ---------------------------------------------------------------
   10. RESEARCH
   --------------------------------------------------------------- */

.research-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-block: var(--section-y);
}

.research-image {
  position: sticky;
  top: 7rem;
  margin: 0;
}

/* Fixed frame, oversized image inside: the photo drifts against the
   frame as the section passes. */
.research-frame {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1100ms var(--ease-out);
}

.research-image.is-visible .research-frame {
  clip-path: inset(0 0 0 0);
}

.research-frame img {
  width: 100%;
  height: 132%;
  object-fit: cover;
}

@supports (animation-timeline: view()) {
  .research-frame img {
    animation: img-drift linear both;
    animation-timeline: view(block);
  }
}

@keyframes img-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -22%, 0);
  }
}

.research-image figcaption {
  margin-top: 0.9rem;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.research-copy {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  padding-top: clamp(0rem, 4vh, 3rem);
}

.research-copy h2 {
  font-size: var(--text-2xl);
}

.research-copy > p {
  color: var(--color-muted);
}

.research-steps {
  display: grid;
  gap: 1.6rem;
  width: 100%;
  max-width: 40rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
  counter-reset: rstep;
}

.research-steps li {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding-left: 2.9rem;
  counter-increment: rstep;
}

.research-steps li::before {
  content: counter(rstep, decimal-leading-zero);
  position: absolute;
  top: 0.1rem;
  left: 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.research-steps strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.research-steps span {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.evidence-standard {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
  width: 100%;
  max-width: 40rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-inner);
  background: var(--color-surface);
}

.evidence-standard h3 {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.evidence-standard p {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ---------------------------------------------------------------
   11. JOIN - the one deliberate colour-block
   --------------------------------------------------------------- */

.join-section {
  position: relative;
  overflow: clip;
  padding-block: clamp(5rem, 13vh, 9rem);
  background: linear-gradient(140deg, var(--color-primary) 0%, var(--color-primary-deep) 100%);
  color: #fff;
  isolation: isolate;
}

[data-theme="dark"] .join-section {
  background: linear-gradient(140deg, var(--brand-blue) 0%, var(--brand-navy) 100%);
}

.join-canvas {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.join-watermark {
  position: absolute;
  z-index: -1;
  right: -6%;
  bottom: -22%;
  width: min(46rem, 62%);
  opacity: 0.09;
  pointer-events: none;
}

.join-copy {
  position: relative;
  display: grid;
  gap: 1.1rem;
  justify-items: start;
  max-width: var(--content-wide);
  margin-inline: auto;
}

.join-copy h2 {
  font-size: var(--text-2xl);
}

.join-copy > p {
  font-size: var(--text-lg);
  color: rgb(255 255 255 / 96%);
  max-width: 44ch;
}

.join-form {
  display: grid;
  gap: 0.55rem;
  width: min(100%, 34rem);
  margin-top: 0.75rem;
}

.join-form label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.join-form input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.9rem 1.3rem;
  color: #fff;
  background: rgb(4 34 56 / 46%);
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: var(--radius-pill);
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}

.join-form input::placeholder {
  color: rgb(255 255 255 / 72%);
}

.join-form input:hover {
  border-color: rgb(255 255 255 / 72%);
}

.join-form input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  background: rgb(4 34 56 / 62%);
}

.join-form input[aria-invalid="true"] {
  border-width: 2px;
  border-color: #fff;
  background: rgb(3 26 43 / 66%);
}

.join-form button {
  position: relative;
  overflow: hidden;
  padding: 0.9rem 1.7rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-primary-deep);
  background: #fff;
  border-radius: var(--radius-pill);
  isolation: isolate;
  transition: transform var(--t-fast) var(--ease-out);
}

[data-theme="dark"] .join-form button {
  color: var(--brand-navy);
}

.join-form button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #d9ecfa;
  transform: translateY(101%);
  transition: transform var(--t-med) var(--ease-out);
}

.join-form button:hover::before {
  transform: translateY(0);
}

.join-form button:active {
  transform: scale(0.97);
}

.join-form button[data-pending="true"] {
  cursor: progress;
  opacity: 0.75;
}

.join-form button[data-pending="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--color-primary);
  animation: sweep 900ms var(--ease-out) infinite;
}

@keyframes sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.form-status {
  min-height: 1.4rem;
  font-size: var(--text-sm);
  color: #fff;
}

.form-status[data-state="error"] {
  font-weight: 700;
}

/* ---------------------------------------------------------------
   12. FOOTER
   --------------------------------------------------------------- */

footer {
  display: grid;
  gap: 1.5rem;
  width: 100%;
  max-width: calc(var(--content-wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 4.5rem) var(--gutter);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-symbol {
  width: 2.6rem;
}

footer > p {
  font-size: var(--text-sm);
  color: var(--color-muted);
  max-width: 58ch;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.footer-meta a {
  position: relative;
  padding-bottom: 0.2rem;
  font-weight: 700;
  color: var(--color-text);
}

.footer-meta a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-med) var(--ease-out);
}

.footer-meta a:hover::after,
.footer-meta a:focus-visible::after {
  transform: scaleX(1);
}

/* ---------------------------------------------------------------
   13. REVEALS
   --------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ---------------------------------------------------------------
   14. RESPONSIVE
   --------------------------------------------------------------- */

@media (max-width: 1024px) {
  .research-section {
    grid-template-columns: 1fr;
  }

  .research-image {
    position: static;
  }

  .field-card {
    grid-template-columns: 1fr;
  }

  .field-signature {
    order: -1;
    width: min(100%, 15rem);
  }

  .field-label {
    bottom: -0.5rem;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 5.5rem;
    --logo-header-width: 7rem;
    --logo-footer-width: 9rem;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-actions {
    justify-self: end;
  }

  .hero {
    padding-top: calc(var(--header-height) + 1.5rem);
    padding-bottom: 2.5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: auto;
  }

  .hero-stage {
    order: -1;
    min-height: 0;
    padding-block: 1.25rem;
  }

  .hero-emblem {
    width: clamp(13rem, 64vw, 17.5rem);
    max-width: 88%;
  }

  .desktop-nav,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .stack-card {
    position: static;
    transform: none;
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .hero-intro {
    max-width: none;
  }

  .section-index {
    display: none;
  }

  .section-index span {
    letter-spacing: 0.16em;
  }

  .quote {
    min-height: 50vh;
  }

  .join-form button {
    flex: 1 1 100%;
  }

  .footer-meta {
    justify-content: flex-start;
  }
}

/* ---------------------------------------------------------------
   15. REDUCED MOTION - every timeline collapses to its end state
   --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .reveal,
  [data-hero-part],
  .hero-copy h1 .word > span,
  .mobile-menu a {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-rail,
  .pan-progress {
    display: none;
  }

  .hero-inner,
  .ticker-track,
  .ticker-shift,
  .pan-track,
  .research-frame img,
  .quote-line,
  .field-signature .ring {
    animation: none;
    transform: none;
  }

  .hero-inner {
    opacity: 1;
  }

  .hero-wash {
    display: none;
  }

  .trajectory-progress,
  .trajectory-dot {
    animation: none;
    stroke-dashoffset: 0;
  }

  .research-frame {
    clip-path: none;
  }

  .stack-card {
    position: static;
    transform: none;
  }

  [data-spotlight]::before {
    display: none;
  }
}
