/* ============================================================
   Nodrithm Labs — v5.0 "Lilac Glass" (experiment/glass-3d)
   Light, glassy, dimensional. Near-white ground, aurora lilac
   atmosphere, plum reserved for action + accents.
   Glassmorphism here is a web frosted-glass approximation
   (backdrop-filter + layered borders), not Apple Liquid Glass.
   Shape rule: cards 20px, interactive pill, inputs 12px.
   ============================================================ */

/* --- Tokens -------------------------------------------------- */
:root {
  --bg: #FBFAFD;
  --ink: #17131A;
  --muted: #6E6470;
  --plum: #604566;
  --plum-rgb: 96, 69, 102;
  --plum-deep: #4E3853;
  --plum-soft: #7C657F;
  --lilac: #C9A9CF;
  --lilac-soft: rgba(201, 169, 207, 0.28);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-edge: rgba(var(--plum-rgb), 0.12);
  --shadow-tint: rgba(var(--plum-rgb), 0.14);

  --radius-card: 20px;
  --radius-input: 12px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 700ms;

  --max-width: 1160px;
  --page-pad: clamp(1.25rem, 4vw, 2.5rem);
  --section-rhythm: clamp(4rem, 8vw, 7rem);

  --fs-display: clamp(2.5rem, 5.2vw, 4.5rem);
  --fs-section: clamp(1.7rem, 2.9vw, 2.5rem);
}

/* --- Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* The sticky header pill floats over the content, so every anchor jump must
     stop short of it or the target heading lands underneath the glass. Mirrors
     the header's own offset: top inset + pill height + a breathing gap. */
  scroll-padding-top: calc(clamp(1rem, 2.5vw, 1.5rem) + 48px + 1rem);
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--plum); color: #fff; }

/* --- Aurora atmosphere (fixed, cheap: no filters) ------------ */
/* Fixed viewport atmosphere: lightweight multi-stop radial gradients provide
   ambient depth and act as the visual baseline/fallback when WebGL is disabled. */
.aurora {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at 78% 12%, var(--lilac-soft) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 12% 38%, rgba(124, 101, 127, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 60% 95%, rgba(201, 169, 207, 0.20) 0%, transparent 70%);
}

/* --- Utilities ----------------------------------------------- */
.skip-link {
  position: absolute; left: 1rem; top: 1rem;
  transform: translateY(calc(-100% - 2rem));
  background: #fff; color: var(--ink);
  padding: 0.5rem 1rem; border: 1px solid var(--glass-edge);
  border-radius: var(--radius-input); z-index: 100;
  transition: transform var(--duration-fast) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
  border-radius: 6px;
}
#top-sentinel { position: absolute; top: 0; height: 48px; width: 1px; }

/* --- Typography ---------------------------------------------- */
.display {
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: -0.032em;
  color: var(--ink);
}
.display__accent {
  display: inline-block;
  background: linear-gradient(100deg, var(--plum) 20%, var(--plum-soft) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
.display--section {
  font-size: var(--fs-section);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--plum-soft);
  margin-bottom: 1.25rem;
}
.eyebrow--pill {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4));
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 12px var(--shadow-tint);
}
.deck {
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.6;
  margin-top: calc(-1 * clamp(0.75rem, 2vw, 1.5rem));
  margin-bottom: clamp(2rem, 4.5vw, 3rem);
}

/* --- Header (floating glass pill) ---------------------------- */
.site-header {
  position: sticky; top: clamp(1rem, 2.5vw, 1.5rem); z-index: 50;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  pointer-events: none;
}
.site-header__glass {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.6rem 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.45)),
    rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 32px var(--shadow-tint);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.site-header.is-scrolled .site-header__glass {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 12px 40px rgba(var(--plum-rgb), 0.22);
}
.brand img { height: 26px; width: auto; }
.site-nav {
  /* Desktop overrides for the popover attribute */
  display: flex !important;
  position: static !important;
  align-items: center; gap: 0.25rem;
  margin: 0; padding: 0; border: none;
  background: transparent; overflow: visible;
}
.site-nav a {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: 999px;
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}
.site-nav a:hover { color: var(--ink); background: rgba(var(--plum-rgb), 0.07); }
.site-nav__cta {
  color: #fff !important;
  background: var(--plum) !important;
  font-weight: 600;
}
.site-nav__cta:hover { background: var(--plum-deep) !important; }
.menu-toggle {
  display: none;
  background: transparent;
  color: var(--ink);
  padding: 0.4rem;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-out);
}
.menu-toggle:hover {
  background: rgba(var(--plum-rgb), 0.07);
}
.menu-toggle .icon-close { display: none; }

/* Pure CSS icon toggle based on popover state via :has() */
html:has(.site-nav:popover-open) .menu-toggle .icon-menu,
html:has(.site-nav.is-open) .menu-toggle .icon-menu { display: none; }
html:has(.site-nav:popover-open) .menu-toggle .icon-close,
html:has(.site-nav.is-open) .menu-toggle .icon-close { display: block; }

@media (max-width: 640px) {
  .site-header__glass { 
    position: relative; 
    padding: 0.4rem 0.45rem 0.4rem 0.85rem; 
  }
  .menu-toggle {
    display: flex;
  }
  
  .site-nav {
    display: none !important;
  }
  
  .site-nav:popover-open,
  .site-nav.is-open {
    display: flex !important;
    position: fixed !important;
    top: calc(1.5rem + 48px);
    left: var(--page-pad);
    right: var(--page-pad);
    width: auto;
    max-width: var(--max-width);
    margin: 0 auto;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 12px 40px rgba(var(--plum-rgb), 0.22);
  }
  
  .site-nav a {
    text-align: center;
    padding: 0.75rem;
  }
  .site-nav__cta {
    margin-top: 0.25rem;
  }
}
@media (max-width: 380px) {
  .brand img { height: 24px; }
}

/* --- Hero (3D ribbon field) ---------------------------------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex; align-items: center;
  overflow: hidden;
  /* pull behind the floating header */
  margin-top: calc(-1 * (26px + 1.1rem + clamp(1rem, 2.5vw, 1.5rem) + 2px));
  padding: 6rem var(--page-pad) 4rem;
}
/* Hero canvas: absolute full-bleed layer at z-index 1 behind hero content (z-index 2). */
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
/* Section wave layers: full-bleed 100vw centered breakout (left: 50%, transform: translateX(-50%))
   hung below section content via negative bottom offsets (-17rem Shift, -21.5rem Change) to flow
   lines through inter-section whitespace without obscuring text. pointer-events: none prevents click blocking. */
.section-waves {
  position: absolute;
  left: 50%; bottom: -20rem;
  transform: translateX(-50%);
  width: 100vw;
  height: 50rem;
  z-index: 0;
  pointer-events: none;
}
.section--shift .section-waves { bottom: -17rem; }
.section--change .section-waves { bottom: -21.5rem; }
.section--shift > *:not(.section-waves),
.section--change > *:not(.section-waves),
.section--lab > *:not(.section-waves) {
  position: relative;
  z-index: 1;
}
/* Hero radial text scrim: stacked at z-index 1 above canvas to enhance heading legibility. */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 48% 52% at 25% 52%,
              rgba(251, 250, 253, 0.88) 0%,
              rgba(251, 250, 253, 0.5) 45%,
              transparent 72%);
}
.hero__inner {
  position: relative; z-index: 2;
  /* Match the sections' text column (max-width minus the page pad
     they carry inside it) so the hero aligns with the header pill */
  max-width: calc(var(--max-width) - 2 * var(--page-pad));
  width: 100%;
  margin: 0 auto;
}
.hero__inner > * { max-width: 44rem; }
.hero__inner .display { margin-bottom: 1.5rem; max-width: 56rem; }
.hero__text {
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 2.25rem;
  max-width: 42ch;
}
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* --- Buttons (pill) ------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.925rem; font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn svg { transition: transform var(--duration-fast) var(--ease-out); }
.btn:hover svg { transform: translateX(2px); }
.btn--primary {
  background: var(--plum);
  color: #fff;
  border-color: var(--plum);
  box-shadow: 0 4px 16px rgba(var(--plum-rgb), 0.22);
  padding-right: 0.45rem;
}
.btn--primary:hover {
  background: var(--plum-deep);
  border-color: var(--plum-deep);
  box-shadow: 0 8px 24px rgba(var(--plum-rgb), 0.28);
}
.btn__chip {
  /* button-in-button trailing icon island */
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 500ms cubic-bezier(0.32, 0.72, 0, 1),
              background var(--duration-fast) var(--ease-out);
}
.btn:hover .btn__chip {
  transform: translate(2px, -1px) scale(1.06);
  background: rgba(255, 255, 255, 0.24);
}
.btn--glass {
  color: var(--ink);
  border-color: var(--glass-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.45));
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 10px var(--shadow-tint);
}
.btn--glass:hover { border-color: var(--lilac); }

/* --- Sections ------------------------------------------------ */
main { position: relative; z-index: 1; }
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-rhythm) var(--page-pad);
  position: relative;
}
.section .display--section { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

/* --- Performance optimizations ------------------------------- */
/* Defer offscreen layout/rendering strictly on non-canvas sections (.lab-band, #access, .site-footer).
   CRITICAL CONSTRAINT: Do NOT place on .section--shift or .section--change; contain: paint would
   clip the 100vw breakout and negative bottom hanging offsets (-17rem/-21.5rem), and offscreen
   containment causes 0x0 canvas dimension measurement bugs during resize passes. */
.heavy-section-deferred {
  content-visibility: auto;
}
/* These track real rendered heights (measured at desktop viewport) and must be
   re-measured if the sections' content changes. */
.lab-band {
  contain-intrinsic-size: auto none auto 520px;
}
#access {
  contain-intrinsic-size: auto none auto 608px;
}
.site-footer {
  contain-intrinsic-size: auto none auto 240px;
}

/* --- What changes (asymmetric bento, single-layer tilt cards) - */
.change-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem;
  perspective: 1100px;
}
.change-card { grid-column: span 5; }
.change-card--wide { grid-column: span 7; }
.change-card {
  /* Clean single-layer frosted glass card */
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52));
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85), 0 8px 24px var(--shadow-tint);
  padding: 1.85rem;
  transition: box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}
.change-card__core {
  /* Inner core carries the 3D tilt transform */
  height: 100%;
  will-change: transform;
}
.change-card::after {
  /* subtle glare, driven by --gx/--gy from the tilt script */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%),
              rgba(255, 255, 255, 0.5), transparent 55%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
}
.change-card:hover::after { opacity: 1; }
.change-card:hover {
  border-color: rgba(var(--plum-rgb), 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 36px rgba(var(--plum-rgb), 0.16);
}
.change-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--plum);
  margin-bottom: 0.5rem;
}
.change-card p { color: var(--ink); font-size: 0.975rem; line-height: 1.65; }
@media (max-width: 720px) {
  .change-grid { grid-template-columns: 1fr; }
  .change-card, .change-card--wide { grid-column: span 1; }
}

/* --- The shift (thread-connected beats) ---------------------- */
.beats {
  --beats-pad: clamp(2rem, 5vw, 3rem);
  position: relative;
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  max-width: 44rem;
  padding-left: var(--beats-pad);
}
.beats__thread {
  position: absolute;
  left: 0.5rem; top: 0.4rem; bottom: 0.4rem;
  width: 2px; height: calc(100% - 0.8rem);
  color: var(--plum);
  opacity: 0.45;
}
/* The hero thread continues down the page: the line draws itself
   once, fully, when the section reveals (a timed animation rather
   than a scroll-scrubbed one, so it never sits half-drawn). */
.beats__thread path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1400ms var(--ease-out) 250ms;
}
.reveal-group.is-visible .beats__thread path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .beats__thread path { stroke-dashoffset: 0; transition: none; }
}
.beat { position: relative; }
.beat h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.beat::before {
  /* node on the thread, anchored to the beat itself */
  content: "";
  position: absolute;
  left: calc(-1 * var(--beats-pad) + 0.5rem - 3px);
  top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--plum);
}
.beat p { color: var(--muted); max-width: 52ch; line-height: 1.7; }

/* --- The lab (lilac band + principle chips) ------------------ */
.lab-band {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(201, 169, 207, 0.14) 18%,
    rgba(201, 169, 207, 0.14) 82%,
    transparent 100%);
}
.lab__lead {
  max-width: 52ch;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.principles {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.principle {
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.45));
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 4px 14px var(--shadow-tint);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--plum);
}

/* --- Access (single-layer glass card) ------------------------ */
.access-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55)),
    rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 12px 36px var(--shadow-tint);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.access__copy .display--section { margin-bottom: 1rem; }
.access__body { color: var(--muted); max-width: 40ch; font-size: 1.02rem; }
.access-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.field input {
  background: rgba(255, 255, 255, 0.85);
  /* --glass-edge, not --glass-border: an input needs a readable edge against the
     white access card. The b9bdcbc "lighten card borders" pass swapped this to
     the white --glass-border along with the cards, which made the Name/Email
     fields borderless. Card borders stay light on purpose; inputs do not. */
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-input);
  padding: 0.8rem 1rem;
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}
.field input::placeholder { color: var(--muted); opacity: 0.75; }
.field input:hover { background: #fff; }
.field input:focus { outline: none; border-color: var(--plum); background: #fff; }
.field input:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.access-form .btn { justify-self: start; }
.access-form__note { font-size: 0.8rem; color: var(--muted); }
.access-form__success {
  font-size: 0.875rem;
  color: #3A543E;
  padding: 0.7rem 1rem;
  background: #E6EBE7;
  border: 1px solid rgba(58, 84, 62, 0.2);
  border-radius: var(--radius-input);
}
@media (max-width: 800px) {
  .access-card { grid-template-columns: 1fr; }
}

/* --- Footer -------------------------------------------------- */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(var(--plum-rgb), 0.10);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--page-pad) 1.75rem;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2rem; flex-wrap: wrap;
}
.site-footer__brand { display: flex; align-items: center; gap: 0.875rem; }
.site-footer__brand img { height: 28px; width: auto; }
.site-footer__brand p { color: var(--muted); font-size: 0.9rem; max-width: 30ch; }
.site-footer__nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer__nav a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--duration-fast) var(--ease-out);
}
.site-footer__nav a:hover { color: var(--plum); }
.site-footer__strip {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.1rem var(--page-pad) 1.75rem;
  border-top: 1px solid rgba(var(--plum-rgb), 0.10);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Reveal primitives (snappy fade-up) ---------------------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 350ms var(--ease-out),
              transform 350ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Staggered cascade inside below-the-fold groups */
.reveal-group .stagger {
  opacity: 0; transform: translateY(12px);
  transition: opacity 350ms var(--ease-out),
              transform 350ms var(--ease-out);
}
.reveal-group.is-visible .stagger { opacity: 1; transform: translateY(0); }
.reveal-group.is-visible .stagger:nth-child(1) { transition-delay: 0ms; }
.reveal-group.is-visible .stagger:nth-child(2) { transition-delay: 60ms; }
.reveal-group.is-visible .stagger:nth-child(3) { transition-delay: 120ms; }
.reveal-group.is-visible .stagger:nth-child(4) { transition-delay: 180ms; }
.reveal-group.is-visible .stagger:nth-child(5) { transition-delay: 240ms; }

/* Immediate fallback: content is always visible if JS is disabled or prior to script initialization */
html:not(.js-ready) .reveal,
html:not(.js-ready) .reveal-group .stagger {
  opacity: 1;
  transform: none;
}
html:not(.js-ready) .beats__thread path { stroke-dashoffset: 0; }

/* --- Transparency / motion fallbacks ------------------------- */
@media (prefers-reduced-transparency: reduce) {
  .site-header__glass, .change-card, .access-card, .btn--glass {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
/* Reduced motion: collapses CSS transitions; JS matchMedia observer halts RAF and renders static t=0 frame. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .reveal-group .stagger { opacity: 1 !important; transform: none !important; filter: none !important; }
  .change-card, .change-card__core { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* Print: suppresses decorative WebGL canvases, fixed aurora, and header for clean high-contrast output. */
@media print {
  .site-header, .hero__canvas, .section-waves, .aurora { display: none !important; }
  body { background: white; color: black; }
  .hero { min-height: auto; padding: 2rem 0; margin-top: 0; }
}
