/* hybla.net — Hyblaean daylight. Limestone, honey, umber. */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Young Serif';
  src: url('/assets/fonts/youngserif.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Literata';
  src: url('/assets/fonts/literata.woff2') format('woff2');
  font-weight: 300 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Literata';
  src: url('/assets/fonts/literata-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --paper: #f7f2e7;
  --paper-deep: #efe6d3;
  --ink: #3a3126;
  --ink-soft: #6a5f4f;
  --amber: #dd9a26;
  --amber-deep: #a87018;
  --amber-text: #7f5410; /* AA for small text on paper, paper-deep and amber-wash */
  --amber-wash: #f0dcb0;
  --olive: #6a7a4a;
  --dusk: #322b22;
  --dusk-ink: #eee3cd;
  --on-media: #f9f4e9;

  --eo: cubic-bezier(0.22, 1, 0.36, 1);            /* ease-out-quint */
  --eo-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --rail: clamp(44px, 8vw, 120px);
  --gut: clamp(20px, 4vw, 56px);

  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.3rem, 1.1rem + 0.9vw, 1.65rem);
  --step-2: clamp(1.75rem, 1.4rem + 1.7vw, 2.5rem);
  --step-3: clamp(2.5rem, 1.8rem + 3.4vw, 4.4rem);
  --step-4: clamp(2.9rem, 1.6rem + 6.5vw, 6.6rem);
}
@supports (color: oklch(0.5 0.1 80)) {
  :root {
    --paper: oklch(0.965 0.014 85);
    --paper-deep: oklch(0.93 0.022 82);
    --ink: oklch(0.26 0.028 55);
    --ink-soft: oklch(0.42 0.025 60);
    --amber: oklch(0.72 0.145 72);
    --amber-deep: oklch(0.58 0.135 62);
    --amber-wash: oklch(0.9 0.06 80);
    --olive: oklch(0.52 0.07 125);
    --dusk: oklch(0.23 0.022 55);
    --dusk-ink: oklch(0.92 0.03 82);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
.hero, .chapter, .site-foot { scroll-snap-align: start; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.68 'Literata', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--amber-wash); color: var(--ink); }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: 'Young Serif', 'Iowan Old Style', Georgia, serif; font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--amber-deep); text-decoration: none; }
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 4px;
}
.skip:focus { left: 12px; }

/* underline that grows from the left */
.head-link, .foot-quote cite a, .body a {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size 0.35s var(--eo);
  padding-bottom: 2px;
}
.head-link:hover, .body a:hover { background-size: 100% 1px; }

/* ---------- golden thread ---------- */
#thread {
  position: absolute; top: 0; left: 0; z-index: 4;
  pointer-events: none;
  overflow: visible;
}
#thread path {
  fill: none; stroke: var(--amber); stroke-width: 2; stroke-linecap: round;
}
#thread path.glow { stroke-width: 7; opacity: 0.18; }
#thread .node { fill: none; stroke: var(--amber); stroke-width: 2; opacity: 0; transition: opacity 0.6s var(--eo), transform 0.6s var(--eo); transform: scale(0.4); transform-origin: center; transform-box: fill-box; }
#thread .node.lit { opacity: 1; transform: scale(1); }
#thread .node-fill { fill: var(--amber); stroke: none; }

/* ---------- header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gut);
  transition: background-color 0.4s var(--eo), box-shadow 0.4s var(--eo), color 0.4s var(--eo);
  color: var(--on-media);
}
.site-head:not(.scrolled) { text-shadow: 0 1px 8px rgba(20, 15, 8, 0.6); }
.site-head:not(.scrolled) :focus-visible { outline-color: var(--on-media); }
.site-head.scrolled {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 12%, transparent);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Young Serif', Georgia, serif; font-size: 1.35rem; color: inherit;
}
.wordmark .hex { width: 17px; height: 17px; }
.wordmark .hex path { fill: none; stroke: var(--amber); stroke-width: 2.4; transition: fill 0.35s var(--eo); }
.wordmark:hover .hex path { fill: var(--amber); }
.head-link { color: inherit; font-size: var(--step--1); letter-spacing: 0.02em; }

/* ---------- reveal choreography ---------- */
.reveal {
  transition: opacity 0.75s var(--eo), translate 0.75s var(--eo);
  transition-delay: calc(var(--i, 0) * 95ms);
}
/* hidden state only when JS is actually there to reveal it; no-JS renders everything */
.js .reveal:not(.in) { opacity: 0; translate: 0 26px; }
.in .reveal, .reveal.in { opacity: 1; translate: 0 0; }

/* headline word cascade: the container sits still, the words carry the motion */
.js .reveal.words { opacity: 1; translate: 0 0; }
.js .words .w {
  display: inline-block; opacity: 0; translate: 0 0.38em;
  transition: opacity 0.65s var(--eo), translate 0.65s var(--eo);
  transition-delay: calc(var(--wi, 0) * 55ms);
}
.js .words.in .w, .js .in .words .w { opacity: 1; translate: 0 0; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--on-media);
}
.hero-media, .hero-media img, .hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-video { opacity: 0; transition: opacity 1.2s var(--eo); }
.hero-video.playing { opacity: 1; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 24, 15, 0.6) 0%, rgba(30, 24, 15, 0.22) 12%, rgba(30, 24, 15, 0) 26%),
    linear-gradient(6deg, rgba(28, 22, 13, 0.84) 0%, rgba(28, 22, 13, 0.52) 46%, rgba(28, 22, 13, 0.06) 72%);
}
.hero-copy {
  position: relative; z-index: 2;
  padding: 0 var(--gut) clamp(72px, 13vh, 150px) var(--rail);
  max-width: 62rem;
}
.kicker {
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber);
  margin-bottom: clamp(14px, 2.5vh, 26px);
}
.hero .kicker { text-shadow: 0 1px 10px rgba(20, 15, 8, 0.75), 0 0 26px rgba(20, 15, 8, 0.5); }
.hero h1 { font-size: var(--step-4); max-width: 11ch; line-height: 1.02; letter-spacing: -0.012em; }
.hero .sub {
  font-size: var(--step-1); line-height: 1.5; max-width: 44ch;
  margin-top: clamp(18px, 3vh, 30px);
  color: color-mix(in srgb, var(--on-media) 88%, transparent);
}
.scroll-hint {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 26px var(--rail);
  color: color-mix(in srgb, var(--on-media) 75%, transparent);
  font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase;
}
.drop {
  width: 7px; height: 10px; border-radius: 50% 50% 60% 60%;
  background: var(--amber);
  animation: drip 2.6s var(--eo) infinite;
}
@keyframes drip {
  0%, 12% { transform: translateY(-7px) scaleY(0.85); opacity: 0; }
  35% { opacity: 1; }
  62%, 100% { transform: translateY(9px) scaleY(1.12); opacity: 0; }
}

/* ---------- chapters ---------- */
.chapter { position: relative; }
.ch-grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 66ch) minmax(0, 1fr);
  column-gap: var(--gut);
}
.ch-text { grid-column: 2; }
.label {
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 14px;
}
.chapter h2 { font-size: var(--step-3); margin-bottom: clamp(18px, 3vh, 30px); max-width: 16ch; line-height: 1.05; letter-spacing: -0.01em; }
h1 .hl, h2 .hl { color: var(--amber-deep); }
.hero h1 .hl, .hedge h2 .hl, .nocturne h2 .hl { color: var(--amber); }
.body { max-width: 62ch; color: var(--ink); }
.body + .body { margin-top: 1em; }

/* lore */
.lore { padding: clamp(110px, 20vh, 240px) 0 clamp(90px, 16vh, 200px); }
.lore .ch-grid { align-items: center; }
.lore-fig { grid-column: 3; margin: 0; justify-self: end; width: min(340px, 100%); }
.lore-fig img { border-radius: 3px; box-shadow: 0 24px 60px -28px rgba(58, 49, 38, 0.45); }
.lore-fig figcaption { font-size: var(--step--1); font-style: italic; color: var(--ink-soft); margin-top: 12px; max-width: 32ch; }

/* problem */
.problem { background: var(--paper-deep); padding: clamp(100px, 18vh, 220px) 0; }
.pull {
  margin: clamp(56px, 9vh, 110px) var(--gut) 0 var(--rail);
  font-family: 'Young Serif', Georgia, serif;
  font-size: var(--step-2); line-height: 1.25;
  color: var(--amber-deep);
  max-width: 26ch;
  will-change: transform;
}

/* hedge — full-bleed branch moment */
.hedge { min-height: 92svh; display: grid; align-content: center; color: var(--on-media); }
.hedge-media { position: absolute; inset: 0; margin: 0; overflow: clip; }
.hedge-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 1.6s var(--eo); }
.hedge.in .hedge-media img { transform: scale(1); }
.hedge-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(84deg, rgba(30, 23, 12, 0.92) 0%, rgba(30, 23, 12, 0.68) 52%, rgba(30, 23, 12, 0.12) 80%);
}
.on-media.body, .hedge .body, .hero .sub { text-shadow: 0 1px 14px rgba(20, 15, 8, 0.45); }
.hedge-copy {
  position: relative; z-index: 2;
  padding: clamp(120px, 18vh, 220px) var(--gut) clamp(120px, 18vh, 220px) var(--rail);
  max-width: 60rem;
}
.on-media { color: var(--on-media); }
.hedge .label { color: var(--amber); }
.hedge .body { color: color-mix(in srgb, var(--on-media) 88%, transparent); }
.pull-inline {
  font-family: 'Young Serif', Georgia, serif;
  font-size: var(--step-1); line-height: 1.3;
  color: var(--amber);
  max-width: 30ch;
  margin-top: clamp(24px, 4vh, 44px);
}

/* mechanism diagram */
.mechanism { padding: clamp(110px, 18vh, 220px) 0; }
.diagram { margin: clamp(48px, 8vh, 90px) auto 0; max-width: 720px; padding: 0 var(--gut) 0 var(--rail); text-align: center; }
.post-card { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; }
.post-card svg { width: 96px; height: auto; }
.post-card svg rect, .post-card svg line { fill: none; stroke: color-mix(in srgb, var(--ink) 55%, transparent); stroke-width: 2.5; stroke-linecap: round; }
.post-card svg rect.ph { fill: var(--amber-wash); stroke: none; }
.post-label { font-size: var(--step--1); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.fork { display: block; width: min(560px, 92%); margin: 8px auto 12px; height: auto; }
.fork path { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.mechanism.in .fork path { stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--eo) 0.25s; }
.mechanism.in .fork path.p2 { transition-delay: 0.45s; }
.dests { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 5vw, 56px); max-width: 560px; margin: 0 auto; }
.dest-hex { width: 30px; height: 30px; margin: 0 auto 10px; display: block; }
.dest-hex path { fill: none; stroke: var(--ink-soft); stroke-width: 2; }
.dest-hybla .dest-hex path { stroke: var(--amber-deep); }
.dest-hybla .dest-hex circle { fill: var(--amber-deep); }
.dest h3 { font-size: var(--step-1); }
.dest-tag { font-size: var(--step--1); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-text); margin: 4px 0 12px; }
.dest p:not(.dest-tag) { font-size: var(--step--1); color: var(--ink-soft); max-width: 26ch; margin: 0 auto 6px; }
.diagram-coda { margin: clamp(30px, 5vh, 48px) auto 0; font-style: italic; color: var(--ink-soft); max-width: 46ch; }
.js .diagram .dests, .js .diagram .diagram-coda {
  opacity: 0; translate: 0 14px;
  transition: opacity 0.7s var(--eo) 0.9s, translate 0.7s var(--eo) 0.9s;
}
.js .diagram .diagram-coda { transition-delay: 1.1s; }
.js .mechanism.in .dests, .js .mechanism.in .diagram-coda { opacity: 1; translate: 0 0; }

/* design ledger */
.design { background: var(--amber-wash); padding: clamp(110px, 18vh, 230px) 0 0; }
.design h2 { max-width: 20ch; }
.ledger {
  list-style: none; margin: clamp(48px, 8vh, 100px) 0 0; padding: 0;
  display: grid;
}
.ledger li {
  display: grid;
  grid-template-columns: var(--rail) minmax(72px, 130px) minmax(0, 58ch);
  column-gap: var(--gut);
  align-items: baseline;
  padding: clamp(26px, 4vh, 44px) 0;
  border-top: 1px solid color-mix(in srgb, var(--amber-deep) 30%, transparent);
}
.ledger li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--amber-deep) 30%, transparent); }
.ledger .n {
  grid-column: 2;
  font-family: 'Young Serif', Georgia, serif;
  font-size: var(--step-3); line-height: 1;
  color: var(--amber-deep);
}
.ledger h3 { font-size: var(--step-1); margin-bottom: 8px; }
.ledger p { color: color-mix(in srgb, var(--ink) 82%, transparent); max-width: 52ch; }
.comb-strip { margin: clamp(64px, 10vh, 130px) 0 0; height: clamp(180px, 32vh, 340px); overflow: clip; }
.comb-strip img { width: 100%; height: 100%; object-fit: cover; }

/* nocturne */
.nocturne { background: var(--dusk); color: var(--dusk-ink); padding: clamp(120px, 20vh, 250px) 0; overflow: clip; }
.nocturne-media, .nocturne-media img, .nocturne-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nocturne-media img, .nocturne-media video { opacity: 0.42; }
.nocturne-video { opacity: 0 !important; transition: opacity 1.2s var(--eo); }
.nocturne-video.playing { opacity: 0.42 !important; }
.nocturne-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, var(--dusk) 0%, transparent 22%, transparent 72%, var(--dusk) 100%); }
.nocturne .ch-grid { position: relative; z-index: 2; }
.nocturne .label { color: var(--amber); }
.nocturne h2 { color: var(--dusk-ink); }
.notlist { list-style: none; margin: clamp(30px, 5vh, 56px) 0 0; padding: 0; max-width: 54ch; }
.notlist li {
  font-size: var(--step-1); line-height: 1.4;
  font-family: 'Young Serif', Georgia, serif;
  padding: 16px 0 16px 34px; position: relative;
  border-top: 1px solid color-mix(in srgb, var(--dusk-ink) 16%, transparent);
}
.notlist li::before {
  content: ''; position: absolute; left: 2px; top: 1.55em;
  width: 14px; height: 1.5px; background: var(--amber);
}
.notlist li:first-child { border-top: 0; }
.nocturne .coda { margin-top: clamp(28px, 4vh, 44px); font-style: italic; font-size: var(--step-0); color: color-mix(in srgb, var(--dusk-ink) 92%, transparent); max-width: 50ch; }

/* success */
.success { padding: clamp(110px, 18vh, 230px) 0; }
.success .ch-grid { align-items: start; }
.success-fig { grid-column: 3; margin: clamp(30px, 6vh, 70px) 0 0; justify-self: stretch; }
.success-fig img { border-radius: 3px; box-shadow: 0 24px 60px -28px rgba(58, 49, 38, 0.35); }
.signs { list-style: none; margin: clamp(28px, 4vh, 48px) 0 0; padding: 0; max-width: 52ch; }
.signs li { padding: 11px 0 11px 30px; position: relative; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.signs li::before {
  content: ''; position: absolute; left: 0; top: 1.25em;
  width: 9px; height: 9px;
  background: var(--amber);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.signs li:first-child { border-top: 0; }

/* invitation — drenched */
.invitation { position: relative; color: var(--ink); overflow: clip; }
.invite-media, .invite-media img, .invite-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.invite-video { opacity: 0; transition: opacity 1.2s var(--eo); }
.invite-video.playing { opacity: 1; }
.invite-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(96deg, color-mix(in srgb, var(--amber-wash) 97%, transparent) 40%, color-mix(in srgb, var(--amber-wash) 80%, transparent) 68%, color-mix(in srgb, var(--amber-wash) 22%, transparent) 100%);
}
.invite-copy {
  position: relative; z-index: 2;
  padding: clamp(130px, 20vh, 250px) var(--gut) clamp(130px, 20vh, 250px) var(--rail);
  max-width: 64rem;
}
.on-amber { color: var(--ink); }
.invitation .label { color: var(--amber-text); }
.invitation .body { max-width: 56ch; }
.roles { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 12px; margin: clamp(26px, 4vh, 44px) 0 0; padding: 0; max-width: 46rem; }
.roles li {
  font-size: var(--step--1); font-weight: 500;
  padding: 7px 15px; border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: 999px;
}
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: clamp(34px, 5vh, 56px); }
.cta {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-weight: 500; letter-spacing: 0.01em;
  padding: 15px 30px; border-radius: 3px;
  transition: transform 0.25s var(--eo), box-shadow 0.25s var(--eo), background-color 0.25s var(--eo);
  box-shadow: 0 4px 14px -6px rgba(58, 49, 38, 0.5);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(58, 49, 38, 0.55); background: var(--amber-text); }
.cta:active { transform: translateY(0); transition-duration: 0.1s; }
.cta-alt {
  color: var(--ink); font-weight: 500; font-size: var(--step-0);
  background: linear-gradient(var(--amber-deep), var(--amber-deep)) no-repeat 0 100% / 100% 1.5px;
  padding-bottom: 3px;
  transition: color 0.3s var(--eo);
}
.cta-alt:hover { color: var(--amber-text); }
.cta-note { font-size: var(--step--1); color: var(--ink-soft); max-width: 44ch; margin-top: 14px; }

/* ---------- footer ---------- */
.site-foot {
  background: var(--dusk); color: var(--dusk-ink);
  padding: clamp(80px, 12vh, 140px) var(--gut) 56px var(--rail);
}
.foot-line { font-family: 'Young Serif', Georgia, serif; font-size: var(--step-2); max-width: 22ch; }
.foot-quote { margin: clamp(40px, 6vh, 70px) 0 0; }
.foot-quote p { font-style: italic; font-size: var(--step-1); line-height: 1.45; max-width: 38ch; color: color-mix(in srgb, var(--dusk-ink) 88%, transparent); }
.foot-quote cite { display: block; margin-top: 14px; font-style: normal; font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
.foot-meta {
  margin-top: clamp(56px, 8vh, 90px);
  display: flex; align-items: center; gap: 10px;
  font-size: var(--step--1); color: color-mix(in srgb, var(--dusk-ink) 62%, transparent);
}
.foot-meta .bee svg { width: 13px; height: 13px; display: block; }
.foot-meta .bee path { fill: none; stroke: var(--amber); stroke-width: 2.4; }
.foot-meta .bee { transition: transform 0.4s var(--eo); }
.foot-meta:hover .bee { transform: rotate(14deg); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .ch-grid { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .ch-text { grid-column: 2; padding-right: var(--gut); }
  .lore-fig { grid-column: 2; justify-self: start; margin-top: 40px; padding-right: var(--gut); }
  .success-fig { grid-column: 2; padding-right: var(--gut); }
  .ledger li { grid-template-columns: var(--rail) 56px minmax(0, 1fr); padding-right: var(--gut); }
}
@media (max-width: 640px) {
  :root { --rail: 26px; }
  #thread { opacity: 0.6; }
  .hedge-scrim { background: rgba(30, 23, 12, 0.78); }
  .invite-scrim { background: color-mix(in srgb, var(--amber-wash) 93%, transparent); }
  .hero h1 { max-width: 12ch; }
  .ledger li { grid-template-columns: var(--rail) 44px minmax(0, 1fr); }
  .ledger .n { font-size: var(--step-2); }
  .pull { margin-left: var(--rail); }
}

/* ---------- ambience toggle ---------- */
.ambience-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 15;
  font: 500 var(--step--1)/1 'Literata', Georgia, serif;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 32%, transparent);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--ink); cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--eo);
}
.ambience-toggle.show { opacity: 1; pointer-events: auto; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .reveal { opacity: 1; translate: 0 0; transition: none; }
  .js .words .w, .js .diagram .dests, .js .diagram .diagram-coda { opacity: 1 !important; translate: 0 0 !important; }
  .fork path { stroke-dashoffset: 0 !important; }
  .hedge-media img { transform: none !important; }
  .drop { animation: none; opacity: 1; transform: none; }
  .hero-video, .nocturne-video, .invite-video { display: none; }
  .pull { transform: none !important; }
  #thread .node { transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
