/* ELISIR BIOTECH — base styles */

/* Fonts are self-hosted — see css/fonts.css, linked from the document head
   before this file. No external font CDN is contacted at runtime. */

:root {
  --black: #0a0a0b;
  --white: #fafaf9;
  --teal: #4fd1c6;
  --teal-dark: #0f766e; /* AA-contrast (5.2:1) variant for teal text on light sections */
  --teal-dim: rgba(79, 209, 198, 0.28);
  --gray-500: #666666; /* muted text on LIGHT surfaces — ~5.6:1 on --white. Overridden in .theme-dark below (#666 is only ~3.4:1 on --black, failing 4.5:1). */
  --gray-300: #c7c7c4;
  --gray-700: #39393a;
  --line-dark: rgba(250, 250, 249, 0.14);
  --line-light: rgba(10, 10, 11, 0.12);

  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --section-pad-y: clamp(72px, 12vw, 160px);
  --edge: clamp(20px, 5vw, 64px);

  /* Shared panel height: the render frames' 16:9 ratio (1800 x 1004).
     height = 100vw * 1004 / 1800 = 55.78vw. Used to harmonize section sizes. */
  --render-ratio-h: 55.78vw;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0; /* reset UA heading margins when used as an <h2> section title */
}

/* ---------- Theming ---------- */

.theme-dark {
  background: var(--black);
  color: var(--white);
  /* #666 muted text is only ~3.4:1 on near-black; lift it to ~5.8:1 on dark. */
  --gray-500: #8b8b8b;
}

.theme-light {
  background: var(--white);
  color: var(--black);
}

.theme-dark .rule { border-color: var(--line-dark); }
.theme-light .rule { border-color: var(--line-light); }

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--edge);
  background: rgba(127, 127, 127, 0.06);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.site-nav .nav-logo img {
  height: 20px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

/* Center each link in its own box so the small (10.5px) text lands on the nav's
   center line, instead of baseline-aligning low inside the inherited 24px line
   box — which otherwise leaves the links sitting ~2px below the CTA. */
.nav-links li { display: flex; align-items: center; }

.nav-links a {
  position: relative;
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 0.85vw, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--white);
  opacity: 0.72;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a:hover { opacity: 1; }

/* Scroll-spy active section — a teal underline + full opacity so the
   visitor always knows which section they're reading. */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a.is-active {
  opacity: 1;
  color: var(--teal);
}

.nav-links a.is-active::after { transform: scaleX(1); }

.site-nav.on-light .nav-links a.is-active { color: var(--teal-dark); }
.site-nav.on-light .nav-links a::after { background: var(--teal-dark); }

@media (prefers-reduced-motion: reduce) {
  .nav-links a::after { transition: none; }
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 0.85vw, 12px); /* match the nav-link size at every width */
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--white);
  padding: 13px 16px;
  border-radius: 999px;
  opacity: 0.9;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-cta:hover {
  background: var(--white);
  color: var(--black);
  opacity: 1;
}

/* Explicit theme detection (JS-driven) — the nav itself stays transparent/blurred;
   only the text and logo swap between white and black depending on what's behind it. */
.site-nav.on-light .nav-links a {
  color: var(--black);
}

.site-nav.on-light .nav-cta {
  color: var(--black);
  border-color: var(--black);
}

.site-nav.on-light .nav-cta:hover {
  background: var(--black);
  color: var(--white);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex: none;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: background 0.2s ease, transform 0.25s ease, opacity 0.2s ease;
}

.site-nav.on-light .nav-toggle span { background: var(--black); }

/* ---------- Mobile nav (hamburger + full-screen menu) ---------- */
/* Scoped entirely to this breakpoint — desktop nav is untouched. */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  /* backdrop-filter on .site-nav creates a containing block for any
     position:fixed descendant, which would confine .nav-links' full-screen
     overlay to the nav bar's own box instead of the viewport. Drop it only
     while the menu is open (already covered by the solid overlay anyway). */
  .site-nav.menu-open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    position: fixed;
    inset: 0;
    max-width: none;
    justify-content: center;
    align-items: center;
    gap: 28px;
    row-gap: 28px;
    background: var(--black);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 99;
  }

  .site-nav.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links a,
  .site-nav.on-light .nav-links a {
    font-size: 18px;
    opacity: 1;
    color: var(--white);
  }

  .site-nav.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .site-nav.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-nav.menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
  .site-nav.menu-open .nav-toggle span,
  .site-nav.menu-open.on-light .nav-toggle span {
    background: var(--white);
  }
}

/* ---------- Section shell ---------- */

section {
  padding: var(--section-pad-y) var(--edge);
  position: relative;
  scroll-margin-top: 110px;
  /* Every section is at least one render-frame tall (16:9). Content-heavy
     sections grow past this floor as needed. */
  min-height: var(--render-ratio-h);
}

/* Soft parallax overlap between consecutive text panels (class added by JS,
   which excludes the full-bleed image sections). The negative margin reserves
   an overlap budget; a scroll-linked transform (main.js) moves within it so the
   incoming panel drifts up over the outgoing one's tail. Panels have opaque
   backgrounds (theme-dark / theme-light) so they cover cleanly, and paint in
   DOM order so the later panel sits on top. */
.overlap-panel + .overlap-panel {
  margin-top: calc(-1 * clamp(90px, 12vh, 160px));
}

/* Mobile: drop the overlap and stack sections flush, so the next section's
   render can't drift up and eat the black margin (e.g. under the formulation
   ring). Matches the 860px hamburger-nav / full-render-hero breakpoint. */
@media (max-width: 860px) {
  .overlap-panel + .overlap-panel { margin-top: 0; }
}

/* Reduced motion: no overlap drift. */
@media (prefers-reduced-motion: reduce) {
  .overlap-panel + .overlap-panel { margin-top: 0; }
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  scroll-margin-top: 110px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.eyebrow .index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
}

.theme-light .eyebrow .index { color: var(--teal-dark); }

.rule {
  border: none;
  border-top: 1px solid;
  margin: 0;
}

/* ---------- Intro splash (logo on black → fades out into the hero) ---------- */

.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--black);
  /* Purely visual — don't swallow clicks/taps during the ~5.5s reveal. */
  pointer-events: none;
  /* Black holds through the logo intro, then the ease-in curve keeps it dark
     over the hero for a long languid stretch and clears it only at the very
     end — the hero is fully illuminated at ~5.5s. */
  animation: intro-out 3.5s cubic-bezier(0.85, 0, 0.9, 0.2) 2s forwards;
}

.intro-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  /* reduced twice by 10%, then a further 15%, from the original clamp(90px, 12vw, 180px) */
  width: clamp(62px, 8.26vw, 124px);
  aspect-ratio: 535 / 322; /* icon-white.png intrinsic ratio */
  z-index: 1001; /* above the black overlay, so it stays crisp over the hero */
  opacity: 0;
  pointer-events: none;
  /* drawn as a mask; the fill stays white the whole time (no colour shift) */
  background-color: #fff;
  -webkit-mask: url(../assets/logo/icon-white.png) center / contain no-repeat;
          mask: url(../assets/logo/icon-white.png) center / contain no-repeat;
  /* Fades in on black, holds, then fades out IN LOCKSTEP with the black overlay
     (same 2s → 5.5s window + easing), so background and white logo dissolve
     together to reveal the hero render underneath. */
  animation: intro-logo 5.5s ease forwards;
}

@keyframes intro-logo {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
  11%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }   /* ~0.6s: faded in */
  36%  { opacity: 1; transform: translate(-50%, -50%) scale(1);     /* ~2.0s: black starts fading */
         animation-timing-function: cubic-bezier(0.85, 0, 0.9, 0.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }   /* 5.5s: gone with the black */
}

/* visibility flips to hidden at the end so the overlay stops capturing clicks */
@keyframes intro-out {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  /* no animated intro — show the hero immediately, drop the splash + logo */
  .intro-splash { animation: none; opacity: 0; visibility: hidden; }
  .intro-logo { animation: none; opacity: 0; visibility: hidden; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  padding: 0;
}

/* The ELISIR wordmark — brand lockup above the Why-Elisir headline. */
.hero-wordmark {
  display: block;
  width: min(357px, 100%);
  height: auto;
  margin: 0 auto 48px;
}

@media (max-width: 860px) {
  .hero-wordmark {
    width: min(238px, 80%);
    margin-bottom: 36px;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  background: var(--teal);
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--teal-dim);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* The hero sits here at full opacity from the start; the intro splash's
     black overlay is what holds it dark and then lifts to reveal it. */
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Keep the render clean — only darken the very top (nav legibility) and the
     bottom, so the image resolves smoothly into the black intro panel below. */
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0) 20%),
    linear-gradient(0deg, rgba(10,10,11,0.9) 0%, rgba(10,10,11,0) 24%);
}

@media (max-width: 860px) {
  /* On mobile the landscape render is heavily cropped/zoomed by the 100vh
     cover. Show the whole render instead: the hero sizes to the image at its
     natural aspect, full-width and smaller, so nothing is cut off. Matches the
     860px hamburger-nav breakpoint so there's no in-between zone where the hero
     is still cropped. The top padding clears the fixed nav (~90px) so the render
     starts below it rather than tucking under the translucent, blurred bar. */
  .hero {
    height: auto;
    min-height: 0;
    padding-top: 90px;
  }
  .hero-visual {
    position: relative;
  }
  .hero-visual img {
    height: auto;
    aspect-ratio: 2752 / 1536; /* HD hero render */
  }
  /* nav no longer overlaps the render, so drop the top-darkening; keep only the
     bottom fade into the black intro panel below. */
  .hero-visual::after {
    background: linear-gradient(0deg, rgba(10,10,11,0.9) 0%, rgba(10,10,11,0) 24%);
  }
  /* The intro splash logo is viewport-centred by default, which now lands on the
     ELISIR wordmark below the short hero. Re-centre it over the render band
     (nav 90px + half the render height ≈ 90px + 28vw) so it reveals the render,
     not the wordmark. */
  .intro-logo {
    top: calc(90px + 28vw);
  }
}

/* ---------- Vision & Mission ---------- */

.vm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 6vw, 100px);
  position: relative;
}

/* Extra breathing room below Vision & Mission before the next section */
#vision-mission {
  padding-bottom: clamp(140px, 20vw, 280px);
}

.vm-connector-wrap {
  position: absolute;
  top: 9px;
  left: 50%;
  width: clamp(16px, 2vw, 32px);
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
}

.vm-connector {
  width: 100%;
  height: 100%;
  background: var(--teal-dark);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.7s;
}

.vm-connector-wrap.is-visible .vm-connector {
  transform: scaleX(1);
}

.vm-grid h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark, var(--teal));
  margin: 0 0 20px;
}

.vm-grid p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 860px) {
  .vm-grid { grid-template-columns: 1fr; }
  .vm-connector-wrap { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vm-connector { transition: none; transform: scaleX(1); }
}

/* ---------- Process ---------- */

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
  margin-top: 48px;
}

.process-step {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}

.process-step .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-block;
  margin-bottom: 16px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s steps(20, end);
}

.process-step.is-visible .step-num { clip-path: inset(0 0 0 0); }

.process-steps .process-step:nth-child(1) .step-num { transition-delay: 0s; }
.process-steps .process-step:nth-child(2) .step-num { transition-delay: 1.4s; }
.process-steps .process-step:nth-child(3) .step-num { transition-delay: 2.8s; }

.process-step h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.process-step p {
  color: var(--gray-300);
  margin: 0;
  font-size: 15.5px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.process-step.is-visible h3,
.process-step.is-visible p {
  opacity: 1;
  transform: none;
}

.process-steps .process-step:nth-child(1) h3 { transition-delay: 0.5s; }
.process-steps .process-step:nth-child(1) p { transition-delay: 0.7s; }
.process-steps .process-step:nth-child(2) h3 { transition-delay: 1.9s; }
.process-steps .process-step:nth-child(2) p { transition-delay: 2.1s; }
.process-steps .process-step:nth-child(3) h3 { transition-delay: 3.3s; }
.process-steps .process-step:nth-child(3) p { transition-delay: 3.5s; }

@media (prefers-reduced-motion: reduce) {
  .process-step .step-num { clip-path: none; transition: none; }
  .process-step h3,
  .process-step p { opacity: 1; transform: none; transition: none; }
}

.process-closing {
  margin-top: 56px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--teal);
}

/* Hold the closing line until after the Read → Compute → Dispense cascade has
   finished, so it lands as the last thing to appear. (More specific than
   .reveal so its transition shorthand can't reset this delay to 0.) */
.process-closing.reveal { transition-delay: 4s; }

@media (max-width: 860px) {
  .process-steps { grid-template-columns: 1fr; }
}

/* ---------- Formulation ring (animated, below The Process) ---------- */

.formula-section {
  min-height: var(--render-ratio-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.formula-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 8vw, 120px);
}

.formula-ring {
  position: relative;
  width: clamp(280px, 38vw, 460px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  /* Glossy black disc: a diagonal specular highlight in the upper-left reads as
     a curved, reflective surface (matching the reference render). */
  background:
    radial-gradient(135% 120% at 32% 18%,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.05) 16%,
      rgba(255, 255, 255, 0.015) 32%,
      #070707 58%,
      #010101 100%);
  /* lift off the page (cast shadow), a soft cool halo, a top bevel highlight,
     and a lower inner shade — together they give the disc real depth. */
  box-shadow:
    0 26px 70px -24px rgba(0, 0, 0, 0.95),
    0 0 70px 4px rgba(190, 230, 240, 0.10),
    inset 0 1px 2px rgba(255, 255, 255, 0.14),
    inset 0 -26px 60px -18px rgba(0, 0, 0, 0.7);
}

/* crisp luminous rim-light around the edge of the disc (the bright ring in the
   reference) */
.formula-ring-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(230, 248, 255, 0.85);
  /* glow matched to the vertical scale rod (.formula-scale::before) */
  box-shadow:
    0 0 22px 2px rgba(190, 230, 245, 0.40),
    0 0 6px 1px rgba(255, 255, 255, 0.30),
    inset 0 0 30px 3px rgba(255, 255, 255, 0.06);
}

/* bright light travelling clockwise around the ring, like a download */
.formula-ring-comet {
  position: absolute;
  /* extend 4px past the rim so the thick band can straddle the circumference */
  inset: -4px;
  border-radius: 50%;
  /* a long, curved streak that follows the ring's curve — bright at its middle,
     fading to nothing at both ends over ~200° (elongated-ellipse taper). */
  background: conic-gradient(from 0deg,
    rgb(255, 255, 255) 0deg,
    rgba(230, 248, 255, 0.6) 40deg,
    rgba(190, 230, 245, 0) 100deg,
    rgba(190, 230, 245, 0) 260deg,
    rgba(230, 248, 255, 0.6) 320deg,
    rgb(255, 255, 255) 360deg);
  /* thin band centred on the rim (rim is at 100% - 4px in this enlarged box) */
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 6.5px), #000 calc(100% - 5.5px), #000 calc(100% - 2.5px), #0000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, #0000 calc(100% - 6.5px), #000 calc(100% - 5.5px), #000 calc(100% - 2.5px), #0000 calc(100% - 1.5px));
  filter: drop-shadow(0 0 12px rgba(190, 230, 245, 1));
  animation: formula-spin 2.6s linear infinite;
}

@keyframes formula-spin { to { transform: rotate(360deg); } }

/* centred nutraceutical names, cross-fading one after another */
.formula-names {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.formula-names span {
  position: absolute;
  max-width: 74%;
  text-align: center;
  font-family: var(--font-body);
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.25;
  color: #eef9ff;
  /* illuminated: a cool halo so the word glows like the disc rim */
  text-shadow:
    0 0 10px rgba(205, 238, 250, 0.55),
    0 0 26px rgba(160, 215, 235, 0.35);
  opacity: 0;
  animation: formula-item 15.6s linear infinite;
}

/* vertical scale line with a tick + the current value */
.formula-scale {
  position: relative;
  height: clamp(280px, 38vw, 460px);
  display: flex;
  align-items: center;
  padding-left: 24px;
  flex: none;
}

/* glossy, dimensional light-rod (same treatment as the disc): a bright cool
   highlight down the centre reads as a rounded reflective surface, a soft glow
   gives it depth, and the ends fade out so it doesn't hard-stop. */
.formula-scale::before {
  content: '';
  position: absolute;
  left: 0;
  margin-left: -2px; /* centre the 5px rod on the baseline */
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.04),
    rgba(220, 245, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.04)
  );
  box-shadow:
    0 0 22px 2px rgba(190, 230, 245, 0.40),
    0 0 6px 1px rgba(255, 255, 255, 0.30);
  -webkit-mask: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
          mask: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}

/* luminous light scanning up and down the rod */
.formula-scale::after {
  content: '';
  position: absolute;
  left: 0;
  margin-left: -2px; /* centre the 5px light on the rod */
  width: 5px;
  height: 64px;
  border-radius: 3px;
  background: linear-gradient(to bottom, transparent, rgba(230, 248, 255, 1) 50%, transparent);
  filter: drop-shadow(0 0 12px rgba(190, 230, 245, 1));
  pointer-events: none;
  animation: formula-scan 3.2s ease-in-out infinite alternate;
}

@keyframes formula-scan {
  from { top: 0; }
  to   { top: calc(100% - 64px); }
}

.formula-mark {
  width: 14px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  margin-right: 14px;
  flex: none;
}

.formula-values {
  position: relative;
  min-width: 8ch;
}

.formula-values span {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: clamp(18px, 1.9vw, 26px);
  color: #eef9ff;
  /* illuminated to match the rod + disc */
  text-shadow:
    0 0 10px rgba(205, 238, 250, 0.55),
    0 0 26px rgba(160, 215, 235, 0.35);
  opacity: 0;
  animation: formula-item 15.6s linear infinite;
}

/* one visible slot per item (6 items → 1/6 of the 15.6s loop each) */
@keyframes formula-item {
  0%      { opacity: 0; }
  2.2%    { opacity: 1; }
  14%     { opacity: 1; }
  16.67%  { opacity: 0; }
  100%    { opacity: 0; }
}

.formula-names span:nth-child(1), .formula-values span:nth-child(1) { animation-delay: 0s; }
.formula-names span:nth-child(2), .formula-values span:nth-child(2) { animation-delay: 2.6s; }
.formula-names span:nth-child(3), .formula-values span:nth-child(3) { animation-delay: 5.2s; }
.formula-names span:nth-child(4), .formula-values span:nth-child(4) { animation-delay: 7.8s; }
.formula-names span:nth-child(5), .formula-values span:nth-child(5) { animation-delay: 10.4s; }
.formula-names span:nth-child(6), .formula-values span:nth-child(6) { animation-delay: 13s; }

@media (max-width: 620px) {
  .formula-visual { gap: clamp(14px, 4vw, 32px); }
  .formula-ring { width: clamp(160px, 46vw, 280px); }
  .formula-scale { height: clamp(160px, 46vw, 280px); padding-left: 16px; }
  .formula-mark { margin-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .formula-ring-comet { animation: none; }
  .formula-scale::after { animation: none; opacity: 0; }
  .formula-names span,
  .formula-values span { animation: none; opacity: 0; }
  .formula-names span:first-child,
  .formula-values span:first-child { opacity: 1; }
}

/* Generic 3-column numbered steps (Process, Intelligence) */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
  margin-top: 48px;
}

@media (max-width: 860px) {
  .trio-grid { grid-template-columns: 1fr; }
}

.trio-grid .trio-item {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}

.theme-light .trio-grid .trio-item { border-top-color: var(--line-light); }

.trio-grid .trio-item .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-block;
  margin-bottom: 16px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s steps(20, end);
}

.trio-grid .trio-item.is-visible .step-num { clip-path: inset(0 0 0 0); }

.theme-light .trio-grid .trio-item .step-num { color: var(--teal-dark); }

.trio-grid .trio-item:nth-child(1) .step-num { transition-delay: 0s; }
.trio-grid .trio-item:nth-child(2) .step-num { transition-delay: 1.4s; }
.trio-grid .trio-item:nth-child(3) .step-num { transition-delay: 2.8s; }

.trio-grid .trio-item h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.trio-grid .trio-item p {
  color: var(--gray-300);
  margin: 0;
  font-size: 15.5px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.trio-grid .trio-item.is-visible h3,
.trio-grid .trio-item.is-visible p {
  opacity: 1;
  transform: none;
}

.trio-grid .trio-item:nth-child(1) h3 { transition-delay: 0.5s; }
.trio-grid .trio-item:nth-child(1) p { transition-delay: 0.7s; }
.trio-grid .trio-item:nth-child(2) h3 { transition-delay: 1.9s; }
.trio-grid .trio-item:nth-child(2) p { transition-delay: 2.1s; }
.trio-grid .trio-item:nth-child(3) h3 { transition-delay: 3.3s; }
.trio-grid .trio-item:nth-child(3) p { transition-delay: 3.5s; }

@media (prefers-reduced-motion: reduce) {
  .trio-grid .trio-item .step-num { clip-path: none; transition: none; }
  .trio-grid .trio-item h3,
  .trio-grid .trio-item p { opacity: 1; transform: none; transition: none; }
}

.theme-light .trio-grid .trio-item p { color: var(--gray-700); }

/* Generic lead paragraph + closing line, reused across text-only sections */
.lead-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 26px);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 0 24px;
}

/* The Anatomy intro lead spans wider — it introduces the whole section
   above the two-column grid, so it reads across, not in a narrow column —
   with extra breathing room before the two columns. */
#ecosystem .section-inner > .lead-text { max-width: 68ch; margin-bottom: clamp(48px, 6vw, 80px); }

.body-text {
  font-size: 15.5px;
  max-width: 62ch;
  margin: 0 0 32px;
}

.theme-dark .body-text { color: var(--gray-300); }
.theme-light .body-text { color: var(--gray-700); }

.closing-line {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--teal);
  margin: 40px 0 0;
}

.theme-light .closing-line { color: var(--teal-dark); }

/* Intelligence trio only: hold its closing line until after the
   Ingestion → Synthesis → Actuation cascade, so it lands last. Scoped to
   #intelligence so the shared .closing-line elsewhere is unaffected, and more
   specific than .reveal so its transition shorthand can't reset the delay. */
#intelligence .closing-line.reveal { transition-delay: 4s; }

/* A little more breathing room above the Intelligence closing line. */
#intelligence .closing-line { margin-top: 64px; }

/* ---------- Science visual (animated dispense icon) ---------- */

.science-visual {
  display: flex;
  justify-content: center;
  margin-top: clamp(72px, 10vw, 112px);
}

.science-icon {
  width: clamp(357px, 47.6vw, 612px); /* reduced 15% from 420 / 56vw / 720 */
  height: auto;
  overflow: visible;
  /* physical plastic device: layered contact + cast shadow grounds it */
  filter:
    drop-shadow(0 1px 1px rgba(15, 30, 40, 0.14))
    drop-shadow(0 9px 16px rgba(15, 30, 40, 0.14))
    drop-shadow(0 26px 44px rgba(15, 30, 40, 0.18));
}

.sci-outer-frame {
  fill: url(#sciFrameGrad);
  stroke: #fafaf9;
  stroke-width: 2;
  stroke-opacity: 1;
}

/* raised inner bevel — a light line just inside the frame edge */
.sci-frame-bevel {
  fill: none;
  stroke: var(--black);
  stroke-opacity: 1;
  stroke-width: 8;
}

/* glossy specular sheen across the top of the plastic shell */
.sci-frame-sheen {
  fill: url(#sciFrameSheen);
  pointer-events: none;
  display: none;
}

.sci-inner-panel {
  fill: url(#sciGlassGrad);
  stroke: #fafaf9;
  stroke-width: 2.5;
}

.sci-inner-panel-shine {
  fill: url(#sciGlassShine);
  pointer-events: none;
}

.sci-eq-bar {
  fill: var(--white);
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0); /* start empty; JS raises them in step with the drops */
}

/* ---- centre gauge: layered, sophisticated ---- */
.sci-g-ticks,
.sci-g-ring-outer,
.sci-g-sweep,
.sci-g-arc-in,
.sci-g-orbit {
  transform-box: view-box;
  transform-origin: 160px 90px; /* the gauge centre, in viewBox units */
}

.sci-g-ticks {
  fill: none;
  stroke: var(--white);
  stroke-opacity: 0.22;
  stroke-width: 1;
  stroke-dasharray: 0.6 4.2;                 /* fine dotted tick ring */
  animation: sci-gauge-spin 60s linear infinite;
}

.sci-g-ring-outer {
  fill: none;
  stroke: var(--white);
  stroke-opacity: 0.32;
  stroke-width: 1;
  stroke-dasharray: 3 5;
  animation: sci-gauge-spin 26s linear infinite;
}

.sci-g-sweep {
  fill: none;
  stroke: var(--white);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 16 116;                  /* one short, bright arc */
  animation: sci-gauge-spin 4.5s linear infinite;
  filter: drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.6));
}

.sci-g-arc-in {
  fill: none;
  stroke: var(--white);
  stroke-opacity: 0.5;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 20 68;
  animation: sci-gauge-spin-rev 8s linear infinite;
}

.sci-g-orbit { animation: sci-gauge-spin 4.5s linear infinite; }
.sci-g-orbit circle {
  fill: var(--white);
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
}

.sci-gauge-logo {
  transform-box: fill-box;
  transform-origin: center;
  animation: sci-g-breathe 3.6s ease-in-out infinite;
}

@keyframes sci-gauge-spin-rev { to { transform: rotate(-360deg); } }
@keyframes sci-g-breathe {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.06); opacity: 1; }
}

/* dispenser bay + station nozzles (fixed, lower centre) */
/* moulded slot seen through the glass: deep recess with a faint edge highlight,
   dimmed and sitting under the reflection so it reads as "behind the glass" */
.sci-dispenser {
  fill: #05080a;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 0.8;
  opacity: 0.7;
}

.sci-nozzle { fill: rgba(180, 210, 220, 0.22); }

/* small platform under the cup — same black as the bay, travels with the cup */
.sci-cup-platform {
  fill: #05080a;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 0.6;
}

/* drops + cup + liquid are driven by the Web Animations API (see main.js), so
   the station count lives in one array. These are just the base styles. */
.sci-drop {
  fill: var(--white);
  opacity: 0;
}

.sci-cup-outline {
  fill: none;
  stroke: #8b8b8b;
  stroke-width: 0.7; /* rendered ~1px after the cup's 1.45 scale */
}

.sci-cup-liquid {
  fill: var(--white);
  transform-box: fill-box;
  transform-origin: center bottom;
  transform: scaleY(0);
}

@keyframes sci-gauge-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sci-drop { opacity: 0; }
  .sci-cup-liquid { transform: scaleY(0.5); }
  .sci-g-ticks, .sci-g-ring-outer, .sci-g-sweep, .sci-g-arc-in,
  .sci-g-orbit, .sci-gauge-logo { animation: none; }
  .sci-eq-bar { animation: none; transform: scaleY(1); }
}

/* ---------- Intelligence visual (particle core) ---------- */

#intelligence {
  padding-bottom: clamp(32px, 4vw, 64px);
}

.intelligence-visual {
  position: relative;
  width: 100%;
  height: clamp(546px, 73vw, 858px);
  margin-top: clamp(16px, 2.5vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intelligence-visual canvas {
  width: 100%;
  height: 100%;
  max-width: 1690px;
  display: block;
}

.intelligence-core-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(30px, 4vw, 52px);
  height: auto;
  filter: drop-shadow(0 0 10px rgba(190, 250, 242, 0.8));
  pointer-events: none;
}

/* ---------- Node ---------- */

.node-visual-full {
  position: relative;
  overflow: hidden;
  /* Generous bottom gap so the top image can be read on its own before the
     heading crowds up beneath it. */
  margin: calc(-1 * var(--section-pad-y)) calc(-1 * var(--edge)) clamp(200px, 22vw, 340px);
  width: calc(100% + var(--edge) * 2);
}

/* Fade the render's top edge into the black section above, so the bright
   white-room image emerges out of the dark instead of cutting against it. */
.node-visual-full::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--black) 0%, rgba(10, 10, 11, 0) 28%);
}

.node-visual-full img {
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 1004;
  object-fit: cover;
  filter: brightness(0.32);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 1.4s ease-out;
  will-change: transform, filter;
}

.node-visual-full.is-visible img {
  filter: brightness(1);
}

.node-visual-full:hover img,
.node-visual-full:focus-within img {
  transform: scale(1.045);
}

.node-copy,
.centered-copy {
  max-width: 640px;
  margin-inline: auto;
}

/* Nutraceutical Science — section title + subsection kickers */
.science-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
}
.science-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 48px 0 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(10, 10, 11, 0.1);
}

/* Group 1 = single column, Group 2 = two columns (stacked) */
.science-copy {
  max-width: 1000px;
  margin-inline: auto;
}
.science-group--one {
  max-width: 900px;
  margin-bottom: 16px;
}
.science-group--one .lead-text,
.science-group--one .body-text { max-width: 100%; }
.science-group--two { max-width: 900px; }
.science-group--two .science-duo .body-text {
  max-width: 100%;
  margin: 0 0 24px;
}
.science-group--two .closing-line { margin-top: 36px; }

/* Harmonize every line to the shared column width so the right edge is even */
.node-copy > *,
.centered-copy > * {
  max-width: 100% !important;
}

.node-copy p.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 0 20px;
}

.node-copy p.sub {
  color: var(--gray-700);
  font-size: 15.5px;
  margin: 0 0 32px;
  max-width: 62ch;
}

.node-specs,
.spec-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.node-specs li,
.spec-list li {
  font-size: 14.5px;
  padding-left: 20px;
  position: relative;
  color: var(--gray-700);
}

.theme-dark .spec-list li { color: var(--gray-300); }

.node-specs li::before,
.spec-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.theme-light .spec-list li::before { background: var(--teal-dark); }

.node-closing {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--teal-dark);
  margin: 0 0 8px;
}

.section-render-full {
  position: relative;
  overflow: hidden;
  /* Generous top gap so the bottom render doesn't creep into view while the
     copy above it is still being read. */
  margin: clamp(200px, 22vw, 340px) calc(-1 * var(--edge)) calc(-1 * var(--section-pad-y));
  width: calc(100% + var(--edge) * 2);
  background: var(--white);
}

.section-render-full img {
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 1012;
  object-fit: cover;
  display: block;
  filter: brightness(0.32);
  transition: filter 1.4s ease-out;
  will-change: filter;
}

.section-render-full.is-visible img {
  filter: brightness(1);
}


/* ---------- Ecosystem (two-column detail cards) ---------- */

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 8vw, 160px);
  /* Spread the two columns across the full content width (one per half),
     rather than bunching them on the left. */
}

@media (max-width: 860px) {
  /* .ecosystem-col uses a negative margin to bleed its hover glow past its
     own padding; with no grid gap to absorb it in a single column, clip it
     here so it can't push the page wider than the viewport. */
  .ecosystem-grid { grid-template-columns: 1fr; overflow-x: hidden; }
}

.ecosystem-col {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 32px;
  margin: -32px;
  border-radius: 16px;
}


.ecosystem-col h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 20px;
}

.theme-light .ecosystem-col h3 { color: var(--teal-dark); }

.ecosystem-col p.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
  margin: 0 0 20px;
}

.ecosystem-col p.note {
  font-size: 14.5px;
  max-width: 52ch;
  margin: 20px 0 0;
}

.theme-dark .ecosystem-col p.note { color: var(--gray-300); }
.theme-light .ecosystem-col p.note { color: var(--gray-700); }

.ecosystem-col p.note + .spec-list { margin-top: 24px; }

.ecosystem-visual-full {
  position: relative;
  overflow: hidden;
  margin: clamp(56px, 8vw, 96px) calc(-1 * var(--edge)) calc(-1 * var(--section-pad-y));
  width: calc(100% + var(--edge) * 2);
}

.ecosystem-visual-full img {
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 1004;
  object-fit: cover;
  display: block;
}

/* ---------- CTA block (Journal, Partner, Press, Join Us, Contact, Closing) ---------- */

/* #partner's own box starts exactly at the Ecosystem/Partner image boundary,
   so aligning it with the nav (as other sections do) puts that boundary
   directly behind the translucent nav, letting the image bleed through its
   blur. Scroll a bit past the boundary instead, into Partner's own padding,
   so only its plain background sits behind the nav. */
#partner {
  scroll-margin-top: -40px;
}

.cta-block {
  max-width: 640px;
}

.cta-block .body-text { margin-bottom: 36px; }

.cta-block .fine-print {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 16px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--line-dark);
  padding: 14px 28px;
  border-radius: 999px;
  min-height: 44px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-light .btn-secondary {
  color: var(--black);
  border-color: var(--line-light);
}

.btn-secondary:hover {
  border-color: var(--teal);
  background: var(--teal-dim);
}

/* ---------- FAQ accordion ---------- */

.faq-list {
  display: grid;
  gap: 0;
  margin-top: 40px;
}

.faq-item {
  border-top: 1px solid var(--line-dark);
  padding: 22px 0;
}

.theme-light .faq-item { border-top-color: var(--line-light); }

.faq-item:last-child { border-bottom: 1px solid var(--line-dark); }
.theme-light .faq-item:last-child { border-bottom-color: var(--line-light); }

.faq-item summary {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 19px);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.theme-light .faq-item summary::after { color: var(--teal-dark); }

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  margin: 16px 0 0;
  font-size: 15px;
  max-width: 65ch;
}

.theme-dark .faq-item p { color: var(--gray-300); }
.theme-light .faq-item p { color: var(--gray-700); }

/* ---------- Forms (Waitlist, Investor Pitch) ---------- */

.form-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
  max-width: 480px;
}

.form-inline input[type="email"],
.form-inline input[type="text"] {
  flex: 1 1 220px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 15px;
}

.theme-light .form-inline input[type="email"],
.theme-light .form-inline input[type="text"] {
  border-color: var(--line-light);
}

.form-inline input::placeholder { color: var(--gray-500); }

.form-inline button {
  flex: none;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--teal);
  border: none;
  padding: 0 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.form-inline button:hover { transform: translateY(-1px); }
.form-inline button:disabled { opacity: 0.6; cursor: default; transform: none; }

.form-status {
  margin-top: 16px;
  max-width: 480px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}
.form-status.is-ok    { color: var(--teal); }
.form-status.is-error { color: #ef6f6f; }
.theme-light .form-status.is-ok { color: var(--teal-dark); }

/* ---------- Footer ---------- */

.site-footer {
  padding: 56px var(--edge) 32px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-dark);
}

.site-footer .footer-logo img {
  height: 18px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 10px 28px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-links a:hover { opacity: 1; }

.footer-links a.is-active {
  opacity: 1;
  color: var(--teal);
}

.site-footer .footer-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 24px;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.process-steps .reveal:nth-child(1) { transition-delay: 0s; }
.process-steps .reveal:nth-child(2) { transition-delay: 1.4s; }
.process-steps .reveal:nth-child(3) { transition-delay: 2.8s; }
/* Vision → connector → Mission appear in sequence */
.vm-grid .reveal:nth-child(1) { transition-delay: 0s; }
.vm-grid .reveal:nth-child(2) { transition-delay: 0.7s; }
.vm-grid .reveal:nth-child(3) { transition-delay: 1.4s; }
.trio-grid .reveal:nth-child(1) { transition-delay: 0s; }
.trio-grid .reveal:nth-child(2) { transition-delay: 1.4s; }
.trio-grid .reveal:nth-child(3) { transition-delay: 2.8s; }
/* The Cartridges → The Vessel appear in sequence */
.ecosystem-grid .reveal:nth-child(1) { transition-delay: 0s; }
.ecosystem-grid .reveal:nth-child(2) { transition-delay: 1.4s; }

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .node-visual-full img { transition: none; }
  .node-visual-full:hover img, .node-visual-full:focus-within img { transform: none; }
  .section-render-full img { transition: none; }
}

/* ---------- Keyboard focus & skip link ---------- */

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}

.theme-light :focus-visible,
.faq-item summary:focus-visible {
  outline-color: var(--teal-dark);
}

/* the skip-link target receives focus programmatically; no ring needed
   around the whole content region. */
#main:focus,
#main:focus-visible { outline: none; }

/* keep focus rings crisp on the teal-filled buttons */
.btn-primary:focus-visible,
.form-inline button:focus-visible {
  outline-color: var(--black);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  transform: translateY(-140%);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 2px;
}

/* ---------- Scroll progress bar ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--teal);
  z-index: 101;
  transform-origin: left;
  will-change: width;
  pointer-events: none;
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  bottom: clamp(20px, 4vw, 32px);
  right: clamp(20px, 4vw, 32px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--teal);
  color: var(--black);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  box-shadow: 0 8px 24px rgba(10, 10, 11, 0.28);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s, box-shadow 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 0.92;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--teal-dim);
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .back-to-top { transition: opacity 0.2s ease, visibility 0s; }
  .back-to-top:hover { transform: none; }
}

/* ============================================================
   Why Elisir — JSON-bound narrative (hero → ritual → node → close)
   Content: elisir-landing-copy.json, bound by js/why-elisir.js.
   ============================================================ */

/* hero lockup — centred brand + headline + first CTA */
.why-lockup {
  max-width: 760px;
  margin: 0 auto clamp(64px, 9vw, 112px);
  text-align: center;
}
.why-lockup .hero-wordmark { margin: 0 auto 44px; }
.why-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--white);
  margin: 0 0 24px;
  text-wrap: balance;
}
.why-subhead {
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.6;
  color: var(--gray-300);
  max-width: 56ch;
  margin: 0 auto 40px;
}

/* narrative blocks — single reading column */
.why-block {
  max-width: 680px;
  margin-inline: auto;
  padding-top: clamp(48px, 7vw, 88px);
}
.why-block .rule { margin-bottom: 32px; }
.why-body > .body-text + .body-text { margin-top: 20px; }

.why-anxiety { margin-top: 28px; }
.why-anxiety em {
  font-style: italic;
  color: var(--white);
}
/* .why-kicker also styles the future-tense frontier line (same two-line
   emphasis format); the frontier stays in its own removable <p>. */
.why-kicker { margin-top: 32px; }

/* Caption under the animated formulation ring. */
.formula-caption {
  margin: clamp(24px, 4vw, 40px) auto 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

/* close — centred payoff + final CTA */
.why-close { text-align: center; }
.why-close-lines {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.35;
  color: var(--white);
  margin: 0 0 32px;
}
.why-close .fine-print { margin-top: 20px; }
