/* =========================================================
   Wells Mindset — Tao × Adam
   Palette: forest / cream / muted terracotta
   ========================================================= */
:root {
  --forest: #173e34;
  --forest-deep: #0f2b24;
  --forest-soft: #2a5a4c;
  --moss: #6f8f7f;
  --cream: #f5f0e5;
  --cream-2: #ede5d4;
  --paper-line: #dcd2bd;
  --ink: #1d2622;
  --ink-soft: #4b5751;
  --terracotta: #b86b4b;
  --terracotta-soft: #d79a7b;
  --sand: #c9a66b;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5.5rem, 12vw, 10rem);
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .06' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .25 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.1rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--terracotta); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 4px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem; transform: translateY(-200%); z-index: 100;
  background: var(--cream); color: var(--forest); padding: .7rem 1.1rem;
  border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap.narrow { max-width: 780px; }
.center { text-align: center; }

/* ---------- Paper texture ---------- */
.paper { position: relative; background-color: var(--cream); isolation: isolate; }
.paper::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain), var(--fibers),
    radial-gradient(1200px 600px at 10% 0%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(201,166,107,.12), transparent 60%);
  background-size: 220px, 600px, auto, auto;
  mix-blend-mode: multiply; opacity: .55;
}

/* ---------- Type ---------- */
.display, .display-sm, .hero-title, .closing-title, h3 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.05;
  margin: 0; text-wrap: balance;
}
.display { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4.4rem); max-width: 18ch; }
.display-sm { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); line-height: 1.12; }
em { font-style: italic; }
.display em, .display-sm em, .hero-title em, .closing-title em { color: var(--terracotta); }
.kicker {
  font-family: var(--sans); font-size: .76rem; letter-spacing: .24em; text-transform: uppercase;
  font-weight: 600; color: var(--terracotta); margin: 0 0 1.1rem;
}
.kicker.light { color: var(--terracotta-soft); }
.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--ink-soft); max-width: 58ch; margin: 1.6rem 0 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
  color: var(--cream);
  transition: background .4s var(--ease), color .4s var(--ease), padding .4s var(--ease), box-shadow .4s;
}
.site-header.scrolled {
  background: rgba(245, 240, 229, .82); color: var(--forest);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  padding-block: .7rem; box-shadow: 0 1px 0 rgba(23, 62, 52, .08);
}
.site-header.on-dark.scrolled { background: rgba(15, 43, 36, .78); color: var(--cream); box-shadow: 0 1px 0 rgba(245,240,229,.08); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; }
.brand em { color: var(--terracotta-soft); }
.site-header.scrolled:not(.on-dark) .brand em { color: var(--terracotta); }
.brand-mark { width: 28px; height: 28px; }
.brand-root { fill: var(--terracotta); }
.site-nav ul { display: flex; gap: clamp(.9rem, 2.4vw, 2.2rem); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  text-decoration: none; font-size: .84rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 500;
  position: relative; padding-block: .3rem; opacity: .85;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="true"] { opacity: 1; }
.site-nav a:hover::after, .site-nav a[aria-current="true"]::after { transform: scaleX(1); }
@media (max-width: 720px) {
  .site-header { gap: .5rem; padding-inline: 1rem; }
  .brand { font-size: 1rem; gap: .4rem; }
  .brand-mark { width: 24px; height: 24px; }
  .site-nav { display: block; }
  .site-nav ul { gap: .8rem; }
  .site-nav a { font-size: .64rem; letter-spacing: .05em; padding-block: .7rem; }
  .site-nav li:nth-child(1), .site-nav li:nth-child(4) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; min-height: 100vh; overflow: hidden;
  background:
    radial-gradient(120% 80% at 75% 20%, #24564a 0%, transparent 55%),
    radial-gradient(90% 70% at 10% 100%, #1d4a3e 0%, transparent 60%),
    linear-gradient(170deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--cream);
  display: grid; align-items: center;
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero-art { position: absolute; inset: 0; }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; }
.contours path { fill: none; stroke: rgba(245, 240, 229, .09); stroke-width: 1; vector-effect: non-scaling-stroke; }
.contours path.accent { stroke: rgba(215, 154, 123, .28); }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grain { position: absolute; inset: 0; background-image: var(--grain); background-size: 220px; opacity: .22; mix-blend-mode: overlay; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(15, 43, 36, .6)); pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  padding: clamp(7rem, 14vh, 10rem) 0 clamp(6rem, 12vh, 8rem);
}
.eyebrow {
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem);
  color: var(--terracotta-soft); margin: 0 0 1.6rem;
}
.eyebrow-rule { width: 48px; height: 1px; background: currentColor; }
.hero-title { font-size: clamp(3.2rem, 1.6rem + 7.4vw, 8.4rem); line-height: .95; letter-spacing: -.03em; }
.hero-title .line { display: block; }
.hero-title em { color: var(--terracotta-soft); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.6rem; margin-top: clamp(1.8rem, 4vw, 2.8rem); }
.duo { margin: 0; font-size: .82rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; }
.duo .times { color: var(--terracotta-soft); margin-inline: .3em; letter-spacing: 0; font-size: 1.1em; }
.tagline { margin: 0; font-family: var(--serif); font-size: clamp(1.2rem, 1rem + .9vw, 1.7rem); opacity: .92; }
.hero-prose { max-width: 46ch; margin: 1.4rem 0 0; font-size: clamp(1rem, .95rem + .3vw, 1.18rem); color: rgba(245, 240, 229, .72); }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 1rem; margin-top: clamp(2.8rem, 7vh, 4.5rem);
  text-decoration: none; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(245,240,229,.8);
}
.scroll-cue-icon svg { width: 24px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.scroll-cue-icon path { animation: nudge 2.2s var(--ease) infinite; }
.scroll-cue:hover { color: var(--cream); }
.scroll-cue:hover .scroll-cue-label { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--terracotta-soft); }
@keyframes nudge { 0%, 100% { transform: translateY(-2px); opacity: .5; } 50% { transform: translateY(4px); opacity: 1; } }

.hero-footnote {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 2rem; margin: 0;
  display: flex; gap: 1.6rem; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(245,240,229,.45);
}
@media (max-width: 720px) { .hero-footnote { display: none; } }

/* ---------- Story ---------- */
.story { padding: var(--section) 0 calc(var(--section) * .6); }
.story-cols { margin-top: 2.6rem; display: grid; gap: 1.4rem; color: var(--ink-soft); font-size: 1.08rem; }
.story-cols p { margin: 0; }
.dropcap::first-letter {
  font-family: var(--serif); float: left; font-size: 4.4em; line-height: .82; padding: .08em .12em 0 0; color: var(--forest);
}
.story-cols strong { color: var(--forest); font-weight: 600; }

/* ---------- Section head ---------- */
.section-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 4vw, 3.5rem); align-items: start; margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.numeral {
  font-family: var(--serif); font-style: italic; font-size: clamp(3rem, 2rem + 5vw, 6.5rem); line-height: .8; margin: 0;
  color: transparent; -webkit-text-stroke: 1px var(--terracotta); min-width: 1.4ch;
}
.section-head.light { color: var(--cream); }
.section-head.light .lede { color: rgba(245,240,229,.72); }
.section-head.light .display em { color: var(--terracotta-soft); }
@media (max-width: 640px) { .section-head { grid-template-columns: 1fr; } .numeral { font-size: 3rem; } }

/* ---------- Mindset ---------- */
.mindset { padding: calc(var(--section) * .6) 0 var(--section); }
.mind-cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line);
}
.mind-card {
  position: relative; padding: 2.4rem clamp(1.2rem, 2vw, 2rem) 2.8rem;
  border-left: 1px solid var(--paper-line);
  transition: background .5s var(--ease);
}
.mind-card:first-child { border-left: 0; }
.mind-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--terracotta);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease);
}
.mind-card:hover { background: rgba(255, 255, 255, .45); }
.mind-card:hover::before, .mind-card:focus-within::before { transform: scaleX(1); }
.mind-glyph svg { width: 64px; height: 64px; fill: none; stroke: var(--forest); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mind-glyph .fill { fill: var(--terracotta); stroke: none; }
.mind-glyph .dash { stroke-dasharray: 3 5; stroke: var(--terracotta); }
.mind-card:hover .mind-glyph svg { animation: breathe 3s var(--ease) infinite; }
@keyframes breathe { 50% { transform: scale(1.06) rotate(-2deg); } }
.mind-index { font-size: .72rem; letter-spacing: .24em; color: var(--moss); margin: 1.8rem 0 .5rem; font-weight: 600; }
.mind-card h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); color: var(--forest); }
.mind-sub { font-family: var(--serif); font-style: italic; color: var(--terracotta); margin: .4rem 0 1.1rem; font-size: 1.05rem; }
.mind-card p:last-child { color: var(--ink-soft); margin: 0; font-size: .98rem; }
@media (max-width: 1000px) {
  .mind-cards { grid-template-columns: repeat(2, 1fr); }
  .mind-card:nth-child(3) { border-left: 0; }
  .mind-card:nth-child(n+3) { border-top: 1px solid var(--paper-line); }
}
@media (max-width: 580px) {
  .mind-cards { grid-template-columns: 1fr; }
  .mind-card { border-left: 0; }
  .mind-card + .mind-card { border-top: 1px solid var(--paper-line); }
}
.pull { margin: clamp(4rem, 9vw, 7rem) auto 0; max-width: 24ch; text-align: center; }
.pull p { font-family: var(--serif); font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); line-height: 1.25; margin: 0; color: var(--forest); text-wrap: balance; }

/* ---------- Dream ---------- */
.dream { position: relative; padding: var(--section) 0; color: var(--cream); background: var(--forest-deep); overflow: hidden; isolation: isolate; }
.dream-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(184,107,75,.16), transparent 70%),
    radial-gradient(70% 60% at 0% 90%, rgba(42,90,76,.6), transparent 70%),
    repeating-radial-gradient(circle at 20% 120%, transparent 0 38px, rgba(245,240,229,.035) 38px 39px),
    linear-gradient(180deg, var(--forest) 0%, var(--forest-deep) 100%);
}
.dream-bg::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); background-size: 220px; opacity: .18; mix-blend-mode: overlay; }

.stage {
  border: 1px solid rgba(245,240,229,.12); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(245,240,229,.045), rgba(245,240,229,.015));
  padding: clamp(1rem, 3vw, 2.4rem);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.5), inset 0 1px 0 rgba(245,240,229,.06);
}
.stage-tabs { display: flex; flex-wrap: wrap; gap: .5rem; padding: .35rem; border-radius: 999px; background: rgba(0,0,0,.18); width: fit-content; max-width: 100%; }
.stage-tabs button {
  appearance: none; border: 0; background: transparent; color: rgba(245,240,229,.72);
  font: 500 .92rem/1 var(--sans); letter-spacing: .02em; padding: .85rem 1.25rem; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: .6rem; transition: background .35s var(--ease), color .35s var(--ease);
  min-height: 44px;
}
.stage-tabs button:hover { color: var(--cream); background: rgba(245,240,229,.06); }
.stage-tabs button[aria-selected="true"] { background: var(--cream); color: var(--forest); }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; }
.stage-tabs button[aria-selected="true"] .tab-dot { background: var(--terracotta); opacity: 1; box-shadow: 0 0 0 4px rgba(184,107,75,.2); }
@media (max-width: 560px) {
  .stage-tabs { border-radius: 16px; width: 100%; }
  .stage-tabs button { flex: 1 1 100%; justify-content: flex-start; border-radius: 12px; }
}

.stage-canvas { position: relative; margin-top: clamp(1.4rem, 3vw, 2.2rem); }
#tree { width: 100%; height: auto; overflow: visible; }
#tree .grid line { stroke: rgba(245,240,229,.08); stroke-dasharray: 2 6; }
#tree .branch { fill: none; stroke: rgba(245,240,229,.55); stroke-width: 1.4; stroke-linecap: round; transition: stroke .6s; }
#tree .branch.lead { stroke: var(--terracotta-soft); stroke-width: 2.2; }
#tree .node circle.halo { fill: rgba(215,154,123,.12); }
#tree .node circle.core { fill: var(--forest-deep); stroke: var(--cream); stroke-width: 1.4; }
#tree .node.lead circle.core { stroke: var(--terracotta-soft); }
#tree .node.root circle.core { fill: var(--terracotta); stroke: var(--cream); }
#tree .node text { fill: var(--cream); font-family: var(--sans); font-size: 15px; letter-spacing: .02em; }
#tree .node text.small-unused { font-size: 12px; fill: rgba(245,240,229,.6); letter-spacing: .14em; text-transform: uppercase; }
#tree .node.root text { font-family: var(--serif); font-style: italic; font-size: 20px; }
#tree .label-bg { fill: rgba(15,43,36,.85); }
#tree .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
#tree .pop { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .6s var(--ease) forwards; animation-delay: var(--d, 0s); }
#tree .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.8s ease-in-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.5); opacity: .15; } }

.gen-axis { list-style: none; margin: .6rem 0 0; padding: .8rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(245,240,229,.12); }
.gen-axis li { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(245,240,229,.5); }
.stage-canvas.vertical .gen-axis { display: none; }
.stage-canvas.vertical #tree { max-width: 460px; margin-inline: auto; }
.stage-canvas.vertical #tree .node text { font-size: 16px; }
#tree .gen-tag { fill: rgba(245,240,229,.45); font: 600 10px var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.gen-axis li:first-child { color: var(--terracotta-soft); }

.stage-story { margin-top: clamp(1.8rem, 4vw, 2.8rem); }
.stage-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.2rem; margin: 0 0 1.6rem; }
.stage-value-label { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(245,240,229,.55); }
#stage-value { font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); color: var(--terracotta-soft); }
.gen-stories { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.gen-stories li { border-top: 1px solid rgba(245,240,229,.18); padding-top: 1.1rem; animation: rise .7s var(--ease) both; animation-delay: var(--d, 0s); }
.gen-stories .gen-label { display: block; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(245,240,229,.5); margin-bottom: .5rem; }
.gen-stories h3 { font-size: 1.35rem; color: var(--cream); margin-bottom: .5rem; }
.gen-stories p { margin: 0; color: rgba(245,240,229,.72); font-size: .97rem; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) { .gen-stories { grid-template-columns: 1fr; } }
.note { margin: 1.8rem 0 0; font-size: .82rem; color: rgba(245,240,229,.5); font-style: italic; font-family: var(--serif); }

/* ---------- Sandbox ---------- */
.sandbox { padding: var(--section) 0; }
.sandbox-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
@media (max-width: 900px) { .sandbox-grid { grid-template-columns: 1fr; } }
.sliders fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 2.1rem; }
.slider-row { --c: var(--forest); --p: 25%; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .2rem; }
.slider-top label { font-family: var(--serif); font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); color: var(--forest); cursor: pointer; display: flex; align-items: center; gap: .7rem; }
.slider-top label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.slider-top output { font-family: var(--serif); font-size: 1.6rem; color: var(--c); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.slider-hint { margin: 0 0 .9rem; color: var(--ink-soft); font-size: .92rem; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--c) 0 var(--p), var(--paper-line) var(--p) 100%);
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--paper-line); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--c); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -11px;
  background: var(--cream); border: 2px solid var(--c); box-shadow: 0 4px 14px -4px rgba(23,62,52,.5);
  transition: transform .25s var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--cream); border: 2px solid var(--c);
  box-shadow: 0 4px 14px -4px rgba(23,62,52,.5);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(184,107,75,.25); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 6px rgba(184,107,75,.25); }

.sandbox-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--paper-line); }
.total { margin: 0; display: flex; align-items: baseline; gap: .5rem; font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.total strong { font-family: var(--serif); font-size: 1.8rem; letter-spacing: 0; color: var(--forest); font-weight: 400; font-variant-numeric: tabular-nums; }

.btn {
  appearance: none; display: inline-flex; align-items: center; gap: .6rem; min-height: 46px;
  padding: .8rem 1.4rem; border-radius: 999px; font: 600 .86rem/1 var(--sans); letter-spacing: .06em;
  text-decoration: none; cursor: pointer; transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn.solid { background: var(--forest); color: var(--cream); border: 1px solid var(--forest); }
.btn.solid:hover { background: var(--terracotta); border-color: var(--terracotta); }
.btn.ghost { background: transparent; color: var(--forest); border: 1px solid rgba(23,62,52,.3); }
.btn.ghost:hover { border-color: var(--forest); }
.btn.outline-light { color: var(--cream); border: 1px solid rgba(245,240,229,.4); background: transparent; margin-top: 2.2rem; }
.btn.outline-light:hover { background: var(--cream); color: var(--forest); }

.vision { margin: 0; position: sticky; top: 6rem; }
@media (max-width: 900px) { .vision { position: static; } }
.vision-art { position: relative; width: min(100%, 340px); margin: 0 auto; aspect-ratio: 1; }
#rings { width: 100%; height: 100%; }
#rings .track { fill: none; stroke: var(--paper-line); stroke-width: 1; }
#rings .arc { fill: none; stroke-width: 22; stroke-linecap: butt; transition: stroke-dasharray .6s var(--ease), stroke-dashoffset .6s var(--ease); }
#rings .tick { stroke: rgba(23,62,52,.25); stroke-width: 1; }
.vision-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.vision-lead { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--forest); line-height: 1.1; }
.vision-sub { font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); margin-top: .4rem; }
.vision-text { font-family: var(--serif); font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); line-height: 1.5; color: var(--ink); margin: 2rem 0 1.6rem; min-height: 4.5em; }
.share { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.share-status { font-size: .88rem; color: var(--terracotta); font-weight: 500; }
.prompt-label { display: block; margin: 1.8rem 0 .5rem; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.prompt-label span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.prompt {
  width: 100%; resize: vertical; border: 1px solid var(--paper-line); border-radius: 14px; padding: 1rem 1.1rem;
  font: .95rem/1.55 var(--sans); color: var(--ink); background: rgba(255,255,255,.55);
}
.prompt:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.disclaimer { margin: clamp(3rem, 6vw, 4.5rem) 0 0; max-width: 72ch; font-size: .84rem; color: var(--ink-soft); padding-left: 1rem; border-left: 2px solid var(--terracotta); }

/* ---------- Builders ---------- */
.builders { padding: calc(var(--section) * .5) 0 var(--section); }
.founders { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.founder { padding: clamp(1.8rem, 4vw, 3rem); border-radius: var(--radius); background: rgba(255,255,255,.4); border: 1px solid var(--paper-line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.founder:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -40px rgba(23,62,52,.45); }
.monogram { position: relative; width: 96px; height: 96px; margin-bottom: 1.6rem; }
.monogram svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--forest); stroke-width: 1; }
.monogram svg .inner { stroke: var(--terracotta); stroke-dasharray: 2 5; transform-origin: center; animation: spin 40s linear infinite; }
.monogram span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 2.6rem; font-style: italic; color: var(--forest); }
@keyframes spin { to { transform: rotate(360deg); } }
.founder h3 { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.8rem); color: var(--forest); }
.role { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--terracotta); font-weight: 600; margin: .6rem 0 1.2rem; }
.founder p:last-child { margin: 0; color: var(--ink-soft); }
.founders-join { align-self: center; font-family: var(--serif); font-size: 3rem; color: var(--terracotta); display: grid; place-items: center; }
.founders-join span { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--paper-line); display: grid; place-items: center; background: var(--cream); }
@media (max-width: 820px) {
  .founders { grid-template-columns: 1fr; }
  .founders-join { margin: -1rem 0; }
  .founders-join span { width: 56px; height: 56px; font-size: 2.2rem; }
}

/* ---------- Closing ---------- */
.closing { position: relative; padding: calc(var(--section) * 1.1) 0; background: var(--forest); color: var(--cream); overflow: hidden; isolation: isolate; }
.closing-art { position: absolute; inset: 0; z-index: -1; }
.closing-art svg { width: 100%; height: 100%; }
.closing-art path { fill: none; stroke: rgba(245,240,229,.08); }
.closing-art .sun { fill: url(#sunGrad); stroke: none; }
.closing-title { font-size: clamp(2.6rem, 1.6rem + 5vw, 6rem); line-height: 1; letter-spacing: -.025em; }
.closing-title em { color: var(--terracotta-soft); }
.closing-prose { max-width: 44ch; margin: 1.8rem auto 0; color: rgba(245,240,229,.72); font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: rgba(245,240,229,.62); padding: 3rem 0 2.6rem; font-size: .86rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 1.4rem 3rem; align-items: start; }
.footer-brand { font-family: var(--serif); font-size: 1.1rem; color: var(--cream); margin: 0; }
.footer-brand em { color: var(--terracotta-soft); }
.footer-fine, .footer-letter { margin: 0; max-width: 60ch; }
.footer-letter { font-family: var(--serif); font-style: italic; text-align: right; }
.footer-letter a { color: var(--terracotta-soft); text-underline-offset: 4px; font-style: normal; font-family: var(--sans); white-space: nowrap; margin-left: .4rem; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr; } .footer-letter { text-align: left; } }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Motion & contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  #tree .draw { stroke-dashoffset: 0; }
  #tree .pop { opacity: 1; }
}
@media (forced-colors: active) {
  .numeral { -webkit-text-stroke: 0; color: CanvasText; }
  .stage-tabs button[aria-selected="true"] { outline: 2px solid Highlight; }
}
@media print {
  .site-header, .hero-art, .scroll-cue, .sandbox-actions, .share { display: none; }
  .hero, .dream, .closing, .site-footer { background: #fff; color: #000; }
}

/* Keep anchored sections clear of the floating header. */
section[id] { scroll-margin-top: 5rem; }
input[type="range"]:focus-visible { outline: 2px solid var(--terracotta); outline-offset: .5rem; }
