/* ═══════════════════════════════════════════════════════════════════
   bubblesson.com — "The Wall" scroll-story.
   Style authority: the Bubblesson style guide (Bubblesson Style Sheet.html):
   cream desk, navy ink, Bubble Green (earned), brass (the climb),
   Fraunces / Inter / IBM Plex Mono, Caveat for teacher-marks ONLY.
   Fallback tokens used where the guide has none: graphite (pencil),
   sticky-yellow (founder-pending placeholders).
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --cream: #FBF8F4;
  --cream-cold: #F3F2EF;          /* beat 2 — the wall goes cold */
  --frame: #F6F1EA;               /* doorframe wood-cream */
  --frame-edge: rgba(15, 29, 46, 0.14);
  --paper: #FFFFFF;
  --ink: #0F1D2E;
  --slate: #5C6B7A;
  --slate-soft: #8A93A0;
  --hairline: rgba(15, 29, 46, 0.12);
  --green: #3E945E;
  --green-700: #2E6E47;
  --green-900: #1E4A33;
  --green-tint: #EDF6EF;
  --brass: #DAA337;
  --brass-deep: #B07F1F;
  --graphite: #3A4038;            /* the pencil */
  --graphite-soft: rgba(58, 64, 56, 0.55);
  --sticky: #F6D77A;              /* [PLACEHOLDER] highlight */
  --f-display: "Fraunces", Georgia, serif;
  --f-sans: "Inter", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --f-hand: "Caveat", cursive;
  --frame-w: clamp(84px, 10vw, 132px);
  --content-x: calc(var(--frame-w) + clamp(26px, 7vw, 96px));
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; overflow-x: clip; }
html, body { margin: 0; }
body {
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--green-700); }
a:hover { color: var(--green-900); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
template#__bundler_thumbnail { display: none; }

/* ─── the wall — fixed; the camera rises up it. Warm ⇄ cold by beat. ─── */
.wall {
  position: fixed; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(15,29,46,0.016), rgba(15,29,46,0) 30%),
    repeating-linear-gradient(90deg, rgba(15,29,46,0.011) 0 2.5px, transparent 2.5px 9px),
    var(--cream);
  transition: background-color 1.4s ease;
  background-color: var(--cream);
}
/* photographed plaster — a subtle real-wall texture behind the Beat-1 vignette,
   cream-veiled so it stays on-brand; fades out as beats 2+ take over the flat cream. */
.wall::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(251,248,244,0.66), rgba(251,248,244,0.74)),
    url("gen/wall-plaster.jpg") center / cover no-repeat;
  opacity: 0; transition: opacity 1.1s ease;
}
body[data-beat="b1"] .wall::after { opacity: 0.3; }
/* Beat 6 · the quiet parts — a bare, dim, contemplative wall */
body[data-beat="b6"] .wall::after {
  background:
    linear-gradient(180deg, rgba(251,248,244,0.74), rgba(251,248,244,0.8)),
    url("gen/wall-quiet.jpg") center / cover no-repeat;
  opacity: 0.22;
}
body[data-beat="b2"] .wall { background-color: var(--cream-cold); }
@media (prefers-reduced-motion: reduce) { .wall::after { transition: none; } }

/* the doorframe — left edge on desktop, a sliver on mobile */
.doorframe {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 0;
  width: var(--frame-w);
  background:
    linear-gradient(90deg, rgba(15,29,46,0.03), rgba(15,29,46,0) 26%),
    var(--frame);
  border-right: 1.5px solid var(--frame-edge);
  box-shadow: inset -7px 0 0 -6px rgba(15, 29, 46, 0.07);
  transition: background-color 1.4s ease;
}
body[data-beat="b2"] .doorframe { background-color: #F0EEE9; }

/* ─── the ruler — scroll progress climbing the page edge ─── */
.ruler {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 40;
  width: 24px;
  border-left: 0.5px solid var(--hairline);
  background:
    repeating-linear-gradient(180deg, rgba(15,29,46,0.16) 0 1px, transparent 1px 14px) right top / 8px 100% no-repeat,
    repeating-linear-gradient(180deg, rgba(15,29,46,0.24) 0 1px, transparent 1px 70px) right top / 15px 100% no-repeat;
}
.ruler__marker {
  position: absolute; right: 2px; width: 20px; height: 7px;
  background: var(--brass);
  border-radius: 2px;
  clip-path: polygon(0 50%, 18% 0, 100% 0, 100% 100%, 18% 100%);
  box-shadow: 0 1px 3px rgba(15, 29, 46, 0.25);
  top: calc(100% - 10px);
}

/* ─── THE EYE — the watcher, in the logo position ─── */
.brand {
  position: fixed; top: 14px; left: 16px; z-index: 60;
  display: flex; align-items: center; gap: 11px;
  cursor: default; user-select: none;
}
.brand__word {
  font-family: var(--f-display); font-weight: 600;
  font-size: 24px; letter-spacing: -0.02em; color: var(--ink);
}
.eye { display: inline-flex; width: 58px; height: 58px; }
.eye svg { width: 100%; height: 100%; overflow: visible; }
.eye__body { fill: var(--green); }
.eye__pupil { fill: var(--graphite); }
.eye__pupilg { transition: transform 1.1s ease; }
.eye__lid { fill: var(--green); transform: translateY(var(--lid, 16px)); transition: transform 0.55s ease; }

/* pupil watches the WORK — the content sits to the brand's RIGHT, so the
   watching gazes go right/down-right — never at the cursor */
.eye[data-eye="closed"] { --lid: 16px; }
.eye[data-eye="marks"]  { --lid: 0px; }
.eye[data-eye="marks"] .eye__pupilg  { transform: translate(2.4px, 2.2px); }
.eye[data-eye="write"]  { --lid: 0px; }
.eye[data-eye="write"] .eye__pupilg  { animation: eye-write 3.4s ease-in-out both; }
.eye[data-eye="follow"] { --lid: 0px; }
.eye[data-eye="follow"] .eye__pupilg { animation: eye-follow 5s ease-in-out both; }
.eye[data-eye="rest"]   { --lid: 4px; }
.eye[data-eye="rest"] .eye__pupilg   { transform: translate(1.2px, 1.8px); }
.eye[data-eye="today"]  { --lid: 0px; }
.eye[data-eye="today"] .eye__pupilg  { transform: translate(1.4px, 2.6px); }
.eye[data-eye="up"] { --lid: 0px; }
.eye[data-eye="up"] .eye__pupilg { transform: translate(1.6px, -2.4px); }
.eye[data-eye="visitor"] { --lid: 0px; }
.eye[data-eye="visitor"] .eye__pupilg { transform: translate(0, 0.6px); }
.eye[data-eye="static"] { --lid: 0px; }
.eye[data-eye="static"] .eye__pupilg { transform: translate(0, 0.9px); transition: none; }
.eye.blink .eye__lid { animation: eye-blink 0.9s ease both; }
@keyframes eye-blink { 0% { transform: translateY(var(--lid, 0px)); } 45% { transform: translateY(16px); } 100% { transform: translateY(var(--lid, 0px)); } }
@keyframes eye-write { 0% { transform: translate(1.2px, 2.4px); } 100% { transform: translate(2.8px, 1.8px); } }
@keyframes eye-follow {
  0% { transform: translate(2.2px, 0.6px); } 30% { transform: translate(2.2px, 1.4px); }
  55% { transform: translate(2.4px, 2.2px); } 100% { transform: translate(2.2px, 3px); }
}

/* scrolled: the wordmark + tag bow out; only the eye keeps watch */
.brand__word, .brand__tag { transition: opacity 0.45s ease; }
body.brand-min .brand__word, body.brand-min .brand__tag { opacity: 0; }

/* mobile Beat-1: the pencil itself draws the third mark */
.b1__pencil { position: absolute; width: 46px; height: 11px; left: 0; top: -4px; opacity: 0; pointer-events: none; z-index: 2; }
.brand.walking { transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1); }

/* ─── the healing wall — ghost marks return as the story turns ─── */
.wallheal { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.heal { position: absolute; opacity: 0; transition: opacity 1.3s ease; }
.heal svg { display: block; width: 72px; height: 9px; }
.heal svg path {
  fill: none; stroke: var(--graphite); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 90; stroke-dashoffset: 90;
}
.heal span {
  display: block; font-family: var(--f-hand); font-size: 15px;
  color: var(--graphite); margin-top: 3px;
}
.heal.heal-in { opacity: var(--heal-o, 0.14); }
.heal.heal-in svg path { transition: stroke-dashoffset 0.9s ease 0.2s; stroke-dashoffset: 0; }
@media (max-width: 767px) { .wallheal { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .heal svg path { transition: none; stroke-dashoffset: 0; }
  .heal { transition: none; }
}

/* ─── page & beats ─── */
.page { position: relative; z-index: 1; }
.beat {
  position: relative;
  padding: 8vh var(--content-x) 8vh;
  max-width: calc(680px + var(--content-x) * 2);
}
.h2 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12;
  letter-spacing: -0.02em; margin: 0 0 22px; max-width: 18ch;
  text-wrap: pretty;
}
.line {
  font-size: clamp(16px, 1.9vw, 19px); line-height: 1.6;
  color: var(--ink); max-width: 44ch; margin: 0 0 16px;
  text-wrap: pretty;
}
.line--big {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(26px, 3.8vw, 38px); line-height: 1.2; letter-spacing: -0.015em;
  max-width: 22ch;
}
.line--lead { margin-top: 4vh; }
.line--center { text-align: center; max-width: none; font-family: var(--f-display); font-style: italic; font-size: 19px; color: var(--slate); }
.aside {
  font-family: var(--f-display); font-style: italic;
  font-size: 16px; color: var(--slate); max-width: 44ch; margin: 18px 0 0;
}
.hand { font-family: var(--f-hand); color: var(--graphite); }

/* founder-pending placeholders — deliberately visible */
mark.ph {
  font: inherit; color: inherit;
  background: color-mix(in srgb, var(--sticky) 46%, transparent);
  border-bottom: 1.5px dashed var(--brass-deep);
  padding: 0 5px; border-radius: 4px; white-space: nowrap;
}

/* ─── pencil marks (SVG strokes that draw) ─── */
.wallmark { position: relative; }
.wallmark svg { display: block; width: 96px; height: 12px; overflow: visible; }
.wallmark svg path,
.tick path, .b3__strike path, .demo__underline path,
.rhythm__m svg path, .cta__stroke path {
  fill: none; stroke: var(--graphite); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.wallmark svg path { stroke-dasharray: 175; stroke-dashoffset: 175; transition: stroke-dashoffset 0.9s var(--ease); }
.wallmark__label {
  position: absolute; left: 106px; top: -7px; white-space: nowrap;
  font-family: var(--f-hand); font-size: 18px; line-height: 1.15; color: var(--graphite);
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
/* draw triggers: on load (hero) or in view (rest) — delay comes from --d */
.wallmark--load svg path { transition-delay: var(--d, 0s); }
.wallmark--load .wallmark__label { transition-delay: var(--d, 0s); }
body.loaded .wallmark--load svg path { stroke-dashoffset: 0; }
body.loaded .wallmark--load .wallmark__label { opacity: 1; transform: none; }
.in-view .wallmark--app svg path { stroke-dashoffset: 0; transition-delay: var(--d, 0s); }
.in-view .wallmark--app .wallmark__label { opacity: 1; transform: none; transition-delay: var(--d, 0s); }

/* the "she insisted" wobble — a beat later, like an afterthought */
body.loaded .wallmark__label--insisted { animation: insist 0.7s ease 3.5s both; }
@keyframes insist {
  0% { transform: translateY(5px) rotate(0deg); opacity: 0; }
  55% { transform: translateY(-1px) rotate(-2.2deg); opacity: 1; }
  80% { transform: translateY(0) rotate(1.3deg); }
  100% { transform: none; opacity: 1; }
}

/* ─── generic scroll reveal ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s var(--ease); }
.reveal.in-view, .in-view > .reveal { opacity: 1; transform: none; }

/* ═══ BEAT 1 · overture ═══ */
.b1 { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 14vh; padding-bottom: 10vh; }
/* hero marks: labels stack UNDER the pencil line, hugging the frame —
   they never reach into the headline's column */
.b1__marks { position: absolute; top: 0; bottom: 0; left: calc(var(--frame-w) - 66px); width: 0; }
.b1__marks .wallmark { position: absolute; }
.b1__marks .wallmark:nth-child(1) { bottom: 14%; }
.b1__marks .wallmark:nth-child(2) { bottom: 40%; }
.b1__marks .wallmark:nth-child(3) { bottom: 66%; }
.b1__marks .wallmark__label {
  left: 0; top: 13px; white-space: normal; width: 132px;
  font-size: 15.5px; line-height: 1.2;
}
.b1__h1 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(42px, 6.6vw, 78px); line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 0 26px; max-width: 13ch;
  padding-left: clamp(24px, 4.5vw, 60px);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease);
}
.b1__sub {
  font-size: clamp(16px, 2vw, 19.5px); line-height: 1.6; color: var(--slate);
  max-width: 42ch; margin: 0;
  padding-left: clamp(24px, 4.5vw, 60px);
  opacity: 0; transition: opacity 0.9s ease 0.35s;
}
body.h1-in .b1__h1 { opacity: 1; transform: none; }
body.h1-in .b1__sub { opacity: 1; }
.b1__cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-hand); font-size: 17px; color: var(--graphite-soft);
  opacity: 0; transition: opacity 0.8s ease 1.2s;
}
body.h1-in .b1__cue { opacity: 1; animation: cue-drift 3.4s ease-in-out 2s infinite; }
.tick { width: 15px; height: 13px; }
.tick path { stroke: var(--green-700); stroke-width: 2.4; }
@keyframes cue-drift { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }

/* ═══ BEAT 2 · the ache ═══ */
.b2 { padding-top: 0; }
.b2__silence { height: 45vh; }   /* deliberate empty wall — the silence is the point */
.b2 .line { margin-bottom: 10vh; color: var(--ink); }
.b2 .line--big { margin-bottom: 5vh; }

/* cold artifacts — stamped, not drawn */
.b2__stamps { display: flex; gap: clamp(16px, 4vw, 40px); align-items: center; margin: 0 0 10vh; }
.stamp {
  font-family: var(--f-mono); font-weight: 500;
  font-size: clamp(20px, 3vw, 30px); letter-spacing: 0.04em;
  color: rgba(15, 29, 46, 0.78);
  border: 2px solid rgba(15, 29, 46, 0.6);
  border-radius: 3px; padding: 10px 16px;
  transform: rotate(var(--rot, 0deg));
  opacity: 0;
}
.b2__stamps.in-view .stamp { animation: stamp-in 0.11s ease-out both; animation-delay: var(--d, 0s); }
@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(var(--rot)) scale(1.16); }
  100% { opacity: 1; transform: rotate(var(--rot)) scale(1); }
}
/* the jolt — 1–2px screen shake as each stamp lands */
.b2__stamps.in-view { animation: stamp-shake 1.45s linear 0.05s both; }
@keyframes stamp-shake {
  0%, 2.5%, 40.5%, 78.5% { transform: translate(0, 0); }
  1% { transform: translate(2px, -1px); } 2% { transform: translate(-1.5px, 1px); }
  39% { transform: translate(2px, 1px); } 40% { transform: translate(-1.5px, -1px); }
  77% { transform: translate(-2px, 1px); } 78% { transform: translate(1.5px, -1px); }
  100% { transform: translate(0, 0); }
}

/* ═══ BEAT 3 · the turn ═══ */
.b3__cross { position: relative; display: inline-flex; gap: 22px; margin-bottom: 8vh; }
.stamp--ghost { opacity: 0.4; font-size: 19px; padding: 7px 12px; border-width: 1.5px; animation: none !important; }
.b3__strike { position: absolute; inset: -6px -10px; width: calc(100% + 20px); height: calc(100% + 12px); }
.b3__strike path { stroke-width: 3; stroke-dasharray: 355; stroke-dashoffset: 355; transition: stroke-dashoffset 1s var(--ease) 0.2s; }
.b3__cross.in-view .b3__strike path { stroke-dashoffset: 0; }

.byline {
  display: flex; gap: 20px; align-items: center;
  background: var(--paper); border: 0.5px solid var(--hairline); border-radius: 16px;
  box-shadow: 0 16px 40px -32px rgba(15, 29, 46, 0.5);
  padding: 24px 28px; margin: 40px 0 0; max-width: 600px;
}
.byline.reveal { transform: translateX(30px) rotate(0deg); }
.byline.reveal.in-view { transform: rotate(-1.4deg); }
.byline__photo {
  flex: 0 0 128px; width: 128px; height: 128px; border-radius: 10px;
  border: 0.5px solid var(--hairline);
  background: repeating-linear-gradient(-45deg, rgba(15,29,46,0.05) 0 8px, transparent 8px 16px);
  display: grid; place-items: center;
}
.byline__photo span { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-soft); }
.byline__photo--ph { position: relative; overflow: hidden; }
.byline__photo--ph img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; grid-area: 1 / 1; }
.byline__phtag {
  position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%) rotate(-1.5deg);
  font-family: var(--f-mono); font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); background: var(--sticky); padding: 2px 6px; border-radius: 2px;
}
.byline__who { display: block; font-size: 16px; line-height: 1.5; color: var(--ink); }
.byline__sig { display: block; width: 190px; height: 40px; margin-top: 10px; }
.byline__sig path {
  fill: none; stroke: var(--green-700); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 560; stroke-dashoffset: 560;
  transition: stroke-dashoffset 1.7s ease 0.5s;   /* the ONLY ink animation on the page */
}
.byline.in-view .byline__sig path { stroke-dashoffset: 0; }

/* ═══ BEAT 4 · feel it ═══ */
.demo { margin: 26px 0 0; }
.demo__paper {
  background: var(--paper); border: 0.5px solid var(--hairline); border-radius: 14px;
  box-shadow: 0 16px 40px -32px rgba(15, 29, 46, 0.5);
  padding: 26px 30px; max-width: 540px;
}
.demo__problem { display: flex; flex-direction: column; gap: 10px; }
.demo__step { font-family: var(--f-mono); font-size: clamp(17px, 2.2vw, 20px); color: var(--ink); }
.demo__step--child { position: relative; display: inline-block; align-self: flex-start; }
.demo__underline { position: absolute; left: -4px; bottom: -7px; width: 80px; height: 8px; }
.demo__underline path { stroke-width: 2.4; stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset 0.8s var(--ease) 0.7s; }
.demo.in-view .demo__underline path { stroke-dashoffset: 0; }
.hand--margin, .hand--praise {
  font-size: clamp(19px, 2.4vw, 22px); line-height: 1.35; margin: 20px 0 0;
  clip-path: inset(-20% 102% -20% -2%);
  transition: clip-path 2.3s linear 1s;
}
.demo.in-view .hand--margin, .demo.in-view .hand--praise { clip-path: inset(-20% -2% -20% -2%); }
.hand--praise { color: var(--green-700); margin: 0; transition-delay: 0.4s; }
.demo--praise .demo__paper { background: var(--green-tint); border-color: rgba(46, 110, 71, 0.25); }
.demo__cap { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-soft); margin-top: 12px; }

.rhythm { margin-top: 11vh; }
.rhythm__line { font-size: 17px; line-height: 1.55; color: var(--ink); max-width: 46ch; margin: 0 0 20px; }
.rhythm__marks { display: flex; gap: clamp(18px, 4vw, 44px); }
.rhythm__m { display: flex; flex-direction: column; gap: 7px; }
.rhythm__m svg { width: 64px; height: 11px; }
.rhythm__m svg path { stroke-dasharray: 130; stroke-dashoffset: 130; transition: stroke-dashoffset 0.7s var(--ease); }
.rhythm.in-view .rhythm__m:nth-child(1) svg path { stroke-dashoffset: 0; transition-delay: 0.1s; }
.rhythm.in-view .rhythm__m:nth-child(2) svg path { stroke-dashoffset: 0; transition-delay: 0.45s; }
.rhythm.in-view .rhythm__m:nth-child(3) svg path { stroke-dashoffset: 0; transition-delay: 0.8s; }
.rhythm__m i { font-style: normal; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); line-height: 1.4; }

/* ─── Beat 4 — the playable coaching moment ─── */
.demo__choices { display: flex; gap: 14px; margin: 8px 0 2px; }
.demo__choice {
  font-family: var(--f-display); font-weight: 600; font-size: 24px; color: var(--ink);
  background: transparent; border: 1.5px solid rgba(15, 29, 46, 0.22); border-radius: 12px;
  min-height: 52px; min-width: 96px; padding: 8px 26px; cursor: pointer;
  transition: transform 0.14s var(--ease), background 0.18s ease, border-color 0.18s ease;
}
.demo__choice:hover { transform: translateY(-1px); }
.demo__choice:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.demo__choice:disabled { cursor: default; }
.demo__choice.is-picked { background: rgba(218, 163, 55, 0.14); border-color: rgba(218, 163, 55, 0.7); }
.demo__choice.is-right { background: rgba(62, 148, 94, 0.1); border-color: #3E945E; }
.demo__hmm { width: 34px; height: 12px; margin-left: 8px; vertical-align: middle; }
.demo__hmm path { fill: none; stroke: var(--graphite-soft); stroke-width: 2; stroke-linecap: round; }
#childSays[hidden], #margin1[hidden] { display: none; }
#margin1.say { animation: sayIn 0.6s var(--ease) both; }
@keyframes sayIn { from { opacity: 0; transform: translateY(5px) rotate(-1.2deg); } to { opacity: 1; transform: rotate(-1.2deg); } }

/* ═══ BEAT 5 · the wall reborn — a ZOOM of the wall itself, not a card:
   the new marks land on the same plaster, magnified, hugging the real
   doorframe. The polaroid flash lays a photo frame OVER the wall. ═══ */
.appwall {
  position: relative; margin: 34px 0 44px calc(var(--frame-w) - 66px - var(--content-x));
  max-width: 560px; padding: 26px 26px 26px 0; border-radius: 16px;
}
.appwall__frame { display: none; }
.appwall__marks { position: relative; display: flex; flex-direction: column; gap: 60px; }
.appwall__marks .wallmark svg { width: 132px; height: 16.5px; }
.appwall__marks .wallmark__label { white-space: normal; min-width: 240px; max-width: 340px; left: 146px; top: -6px; font-size: 21px; }
/* polaroid flash when the grandma line lands — a photo frame over the wall */
.appwall.flash { animation: polaroid 1s ease both; }
@keyframes polaroid {
  0% { box-shadow: none; }
  30% { box-shadow: 0 0 0 9px #FFFFFF, 0 0 0 9.5px var(--hairline), 0 22px 54px -26px rgba(15,29,46,.35); }
  100% { box-shadow: 0 0 0 9px #FFFFFF, 0 0 0 9.5px var(--hairline); }
}
/* eraser shavings — once, subtle, 2s */
.shavings { position: absolute; left: 60px; bottom: -10px; width: 120px; height: 0; pointer-events: none; }
.shavings i {
  position: absolute; width: 9px; height: 3.5px; border-radius: 3px;
  background: var(--graphite-soft); opacity: 0;
}
.shavings i:nth-child(2n) { background: #C9BBA4; width: 7px; }
.shavings.go i { animation: shave 2s ease-in both; }
.shavings i:nth-child(1) { left: 4px; animation-delay: 0s; }
.shavings i:nth-child(2) { left: 22px; animation-delay: 0.12s; }
.shavings i:nth-child(3) { left: 40px; animation-delay: 0.05s; }
.shavings i:nth-child(4) { left: 58px; animation-delay: 0.22s; }
.shavings i:nth-child(5) { left: 76px; animation-delay: 0.1s; }
.shavings i:nth-child(6) { left: 94px; animation-delay: 0.3s; }
@keyframes shave {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  12% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(44px) rotate(150deg); }
}

/* ═══ BEAT 6 · the quiet parts ═══ */
.b6 { padding-top: 10vh; padding-bottom: 10vh; }
.h2--quiet { font-size: clamp(24px, 3vw, 30px); }
.quiet { list-style: none; margin: 0 0 34px; padding: 0; max-width: 54ch; }
.quiet li {
  position: relative; padding: 0 0 0 32px; margin: 0 0 13px;
  font-size: 16.5px; line-height: 1.6; color: var(--ink);
}
.quiet li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 15px; height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 14' fill='none' stroke='%233A4038' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8 L 6 12 L 14 2'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.75;
}
.faq { max-width: 560px; border-top: 0.5px solid var(--hairline); }
.faq details { border-bottom: 0.5px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 2px; font-weight: 500; font-size: 15px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--f-mono); font-size: 15px; color: var(--slate-soft);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 2px 17px; font-size: 15.5px; line-height: 1.6; color: var(--slate); max-width: 58ch; }

/* ═══ BEAT 7 · the math ═══ */
.b7 { padding-top: 8vh; }
.math { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 700px; margin-bottom: 30px; }
.math > * { min-width: 0; }
.math__card {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 24px 24px 26px;
}
.math__card--us { border: 1.5px solid var(--brass); background: #FFFCF1; }
.math__eyebrow {
  display: block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate-soft); margin-bottom: 12px;
}
.math__card--us .math__eyebrow { color: var(--brass-deep); }
.math__card p { margin: 0; font-family: var(--f-display); font-size: clamp(17px, 2.2vw, 21px); line-height: 1.4; }
.b7 .line--center { max-width: 700px; }

/* ═══ BEAT 8 · finale ═══ */
.b8 { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 6vh; }
.b8__mark { margin-bottom: 40px; margin-left: calc(var(--frame-w) - 66px - var(--content-x)); position: relative; }
.wallmark--today svg { width: 118px; height: 13px; }
.wallmark--today svg path { stroke-dasharray: 175; stroke-dashoffset: 175; transition: stroke-dashoffset 1s var(--ease) 0.1s; }
.b8__mark.in-view .wallmark--today svg path { stroke-dashoffset: 0; }
.wallmark--today .wallmark__label { left: 132px; top: -8px; font-size: 20px; }
.wallmark--today .wallmark__label--first { top: 20px; font-size: 17px; color: var(--graphite-soft); }
.b8__mark.in-view .wallmark__label { opacity: 1; transform: none; transition-delay: var(--d, 0s); }
.b8__h2 { max-width: none; }
.b8__watchme { font-size: 27px; font-weight: 600; transform: rotate(-2deg); margin: 4px 0 34px; }
.b8__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.b8__consent {
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: rgba(15, 29, 46, 0.66); margin: 18px 0 0; max-width: none; width: 100%;
}
.b8__guarantee {
  font-family: var(--f-mono); font-size: 14px; letter-spacing: 0.01em; line-height: 1.7;
  color: rgba(15, 29, 46, 0.8); max-width: 58ch; margin: 16px 0 0;
}
.b8__guarantee a { color: inherit; }
.cta {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
  background: var(--ink); color: #FFFFFF; text-decoration: none;
  border-radius: 999px; padding: 16px 30px 18px;
  font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em;
  transition: transform 0.14s var(--ease), box-shadow 0.2s ease;
}
.cta > span { white-space: nowrap; }
.cta:hover { color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(15, 29, 46, 0.7); }
.cta:active { transform: translateY(0) scale(0.99); }
.cta__stroke { width: 82%; height: 7px; margin-top: 5px; }
.cta__stroke path { stroke: var(--brass); stroke-width: 2.4; stroke-dasharray: 310; stroke-dashoffset: 0; }
.cta:hover .cta__stroke path { animation: cta-redraw 0.55s var(--ease); }
@keyframes cta-redraw { from { stroke-dashoffset: 310; } to { stroke-dashoffset: 0; } }
.badges { display: flex; gap: 10px; }
.badge {
  display: inline-flex; align-items: center;
  border: 1px solid var(--ink); border-radius: 10px; padding: 11px 18px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.badge:hover { background: rgba(15, 29, 46, 0.05); color: var(--ink); }
.b8__close { font-family: var(--f-display); font-style: italic; font-size: 17.5px; color: var(--slate); margin: 30px 0 0; }

/* ─── the ceremony — on submit the pencil makes today's mark permanent ─── */
.cerpencil {
  position: absolute; width: 64px; height: 15px; left: 0; top: -6px;
  transform: rotate(-24deg); transform-origin: 4% 50%;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.wallmark--today.drawing .cerpencil { opacity: 1; }
.wallmark--today.done .cerpencil { opacity: 0; }
/* the climb to come — ghost marks rise above yours after the ceremony */
.b8__ghosts { position: absolute; left: 0; top: 0; pointer-events: none; }
.ghostmark {
  position: absolute; left: var(--gx); top: var(--gy);
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.5s ease var(--gd), transform 0.9s var(--ease) var(--gd);
}
.ghostmark svg { width: 104px; height: 12px; }
.ghostmark svg path {
  fill: none; stroke: var(--graphite); stroke-width: 2.4; stroke-linecap: round; opacity: 0.4;
  stroke-dasharray: 130; stroke-dashoffset: 130;
  transition: stroke-dashoffset 0.8s var(--ease) calc(var(--gd) + 0.22s);
}
/* the name writes itself only after its mark is drawn */
.ghostmark span {
  font-family: "Caveat", cursive; font-size: 17px; color: var(--graphite-soft);
  opacity: 0; white-space: nowrap; margin-left: 46px;
  transform: translateY(4px);
  transition: opacity 0.65s ease calc(var(--gd) + 0.9s), transform 0.65s var(--ease) calc(var(--gd) + 0.9s);
}
.b8__mark.climb .ghostmark { opacity: 1; transform: none; }
.b8__mark.climb .ghostmark svg path { stroke-dashoffset: 0; }
.b8__mark.climb .ghostmark span { opacity: 0.65; transform: none; }
.ceremony__answer {
  font-size: 23px; color: var(--graphite); transform: rotate(-1.2deg) translateY(4px);
  margin: 20px 0 0; opacity: 0; transition: opacity 0.8s ease, transform 0.8s ease;
}
.ceremony__answer.in { opacity: 1; transform: rotate(-1.2deg); }

/* the live name — the form's preview, written on today's mark */
.b8__livename { display: inline; }
.b8__blank {
  display: inline-block; width: 150px; height: 2px; vertical-align: baseline;
  border-bottom: 2px solid var(--graphite-soft); opacity: 0.55;
}
.b8__livename.filled .b8__blank { display: none; }

/* ═══ BEAT 9 · coda ═══ */
.b9 { padding-top: 7vh; padding-bottom: 10vh; border-top: 0.5px solid var(--hairline); max-width: none; }
.b9__family { font-size: 16px; color: var(--ink); margin: 0 0 14px; }
.b9__fork { font-size: 15.5px; color: var(--slate); margin: 0 0 22px; }
.b9__links { display: flex; gap: 12px; align-items: center; font-size: 15px; margin-bottom: 16px; }
.b9__links a { text-decoration: none; }
.b9__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.b9__links span { color: var(--slate-soft); }
.b9__line { font-family: var(--f-display); font-style: italic; font-size: 15.5px; color: var(--slate); margin: 0; }

/* ═══ Beat 8 · waitlist form ═══ */
.b8__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 0 0 18px; }
.b8__field { display: flex; flex-direction: column; gap: 6px; }
.b8__fieldlabel {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--slate);
}
.b8__input {
  font-family: var(--f-sans); font-size: 16px; color: var(--ink);
  background: var(--paper); border: 0.5px solid var(--hairline); border-radius: 10px;
  padding: 12px 14px; width: min(240px, 72vw);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.b8__input::placeholder { color: var(--slate-soft); }
.b8__input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.b8__submit { border: none; cursor: pointer; }
textarea.b8__input { min-height: 76px; resize: vertical; }
.b8__field--wide { width: 100%; max-width: 560px; }
.b8__field--wide .b8__input { width: 100%; }
.b8__fieldhelp { display: block; font-size: 14px; line-height: 1.5; color: rgba(15, 29, 46, 0.62); margin-top: 6px; }
.b8__fieldhelp--form { max-width: 560px; margin: 4px 0 6px; }
/* the founder's hand — one signed aside, never a testimonial block */
.b8__sig { max-width: 46ch; margin: 30px 0 0; font-size: 19px; line-height: 1.5; text-align: left; }
.b8__signame { display: block; margin-top: 6px; font-size: 21px; }
.b8__signame::before { content: "— "; }
/* the contract — numbered promises, the close of the teacher page */
ol.quiet--contract { counter-reset: promise; }
.quiet--contract li { padding-left: 34px; margin-bottom: 15px; }
.quiet--contract li::before {
  counter-increment: promise; content: counter(promise);
  background: none; left: 0; top: 0; width: 22px; height: auto;
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .06em;
  color: var(--brass); opacity: 1;
}
.quiet--contract strong { font-weight: 600; }
/* the promises land one at a time — read, not scanned */
.quiet--contract li { opacity: 0; transform: translateY(10px); transition: opacity 0.55s ease, transform 0.55s var(--ease); }
.quiet--contract.in-view li { opacity: 1; transform: none; }
.quiet--contract.in-view li:nth-child(1) { transition-delay: 0.05s; }
.quiet--contract.in-view li:nth-child(2) { transition-delay: 0.2s; }
.quiet--contract.in-view li:nth-child(3) { transition-delay: 0.35s; }
.quiet--contract.in-view li:nth-child(4) { transition-delay: 0.5s; }
.quiet--contract.in-view li:nth-child(5) { transition-delay: 0.65s; }
.quiet--contract.in-view li:nth-child(6) { transition-delay: 0.8s; }
/* the whisper — one handwritten line in the coda, never a banner */
.b9__whisper { font-size: 19px; margin: 0 0 22px; max-width: 46ch; }
.b9__whisper a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ═══ clarity lines ═══ */
.b1__eyebrow {
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate);
  margin: 0 0 18px; padding-left: clamp(24px, 4.5vw, 60px);
  opacity: 0; transition: opacity 0.9s ease 0.15s;
}
body.h1-in .b1__eyebrow { opacity: 1; }
.brand__tag {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-soft);
  margin-left: 4px; padding-left: 13px;
  border-left: 1px solid var(--hairline);
  align-self: center;
}
.b8__plain {
  font-family: var(--f-sans); font-size: 16.5px; line-height: 1.55;
  color: var(--ink); max-width: 40ch; margin: 0 0 24px;
}
.b8__micro {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--slate-soft); margin: 0;
}

/* ═══ responsive · 360 / 768 / 1200 ═══ */
@media (max-width: 768px) {
  :root { --frame-w: 38px; --content-x: clamp(22px, 7vw, 40px); }
  .beat { padding-left: calc(var(--frame-w) + 20px); padding-right: 22px; }
  .ruler { display: none; }
  .brand { top: 12px; left: 12px; gap: 9px; }
  .brand__word { font-size: 19px; }
  .brand__tag { display: none; }
  .b1__eyebrow { padding-left: 0; }
  .eye { width: 36px; height: 36px; }
  /* the wall is the BACKGROUND on mobile — hero marks join the flow above the H1,
     rising in age upward, so they never collide with the headline */
  .b1 { justify-content: flex-end; padding-bottom: 14vh; }
  .b1__marks {
    position: static; width: auto;
    display: flex; flex-direction: column-reverse; gap: 40px;
    margin: 0 0 52px; padding-top: 12vh;
  }
  .b1__marks .wallmark { position: relative; margin-left: -26px; }
  .b1__marks .wallmark svg { width: 76px; }
  .b1__marks .wallmark__label { left: 88px; top: -6px; width: min(52vw, 230px); font-size: 15.5px; }
  .b1__h1, .b1__sub { padding-left: 0; }
  .wallmark__label { left: 82px; font-size: 15.5px; white-space: normal; width: 46vw; }
  /* Beat 2 — the ache, tightened for a short viewport */
  .b2__silence { height: 38vh; }
  .b2 .line { margin-bottom: 8vh; }
  .b2__stamps { flex-wrap: wrap; margin-bottom: 8vh; }
  /* Beat 3 — the byline card breathes at phone width */
  .byline { gap: 14px; padding: 16px 18px; margin-top: 32px; }
  .byline__photo { flex-basis: 84px; width: 84px; height: 84px; }
  .byline__who { font-size: 14px; }
  .byline__sig { width: 150px; height: 32px; }
  /* Beat 4 — paper hugs the phone */
  .demo__paper { padding: 20px 18px; }
  .rhythm { margin-top: 8vh; }
  .rhythm__marks { flex-wrap: wrap; row-gap: 14px; }
  /* Beat 5 — the zoom keeps the real frame; labels flow UNDER their mark,
     so long captions can wrap without colliding with the next mark */
  .appwall { margin: 26px 0 36px -26px; max-width: none; padding: 20px 18px 20px 0; }
  .appwall__marks { gap: 30px; }
  .appwall__marks .wallmark svg { width: 104px; height: 13px; }
  .appwall__marks .wallmark__label {
    position: static; display: block; width: auto; min-width: 0; max-width: none;
    margin: 8px 0 0 26px; font-size: 17px;
  }
  .math { grid-template-columns: 1fr; }
  /* Beat 8 — today's mark flows its label under the line (room for the name) */
  .b8__mark { margin-left: -26px; margin-bottom: 34px; }
  .wallmark--today { display: flex; flex-direction: column; gap: 5px; }
  .wallmark--today .wallmark__label { position: static; width: auto; margin-left: 26px; font-size: 17px; }
  .wallmark--today .wallmark__label--first { font-size: 15.5px; }
  .b8__blank { width: 110px; }
  .ceremony__answer { margin-left: 26px; }
  /* the form goes single-column, full width, ≥44px targets */
  .b8__cta { width: 100%; }
  .b8__form { gap: 14px; }
  .b8__field { width: 100%; }
  .b8__input { width: 100%; padding: 13px 14px; }
  .b8__submit { width: 100%; }
}
@media (max-width: 420px) {
  .b1__h1 { font-size: clamp(34px, 10.5vw, 40px); }
  .h2 { font-size: clamp(27px, 7.6vw, 30px); }
  .badges { width: 100%; }
  .cta > span { white-space: normal; text-align: center; }
  .stamp { font-size: 18px; padding: 8px 12px; }
  .b3__cross { gap: 14px; }
}

/* ═══ reduced motion — everything pre-drawn, eye static, no shakes ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wallmark svg path, .b3__strike path, .byline__sig path, .demo__underline path,
  .rhythm__m svg path, .wallmark--today svg path, .cta__stroke path { stroke-dashoffset: 0 !important; }
  .reveal, .b1__h1, .b1__sub, .b1__eyebrow, .b1__cue, .wallmark__label, .quiet--contract li { opacity: 1 !important; transform: none !important; }
  .ghostmark svg path { stroke-dashoffset: 0 !important; }
  .b8__mark.climb .ghostmark span { transform: none !important; }
  .stamp { opacity: 1 !important; }
  .hand--margin, .hand--praise { clip-path: none !important; }
  .shavings { display: none; }
  .eye .eye__lid { transform: translateY(0) !important; }
  .eye .eye__pupilg { transform: translate(0, 0.9px) !important; }
}

/* ═══ THE MEASURING — the Beat-1 vignette layer ═══
   A transparent fixed scene over the site's own wall + doorframe: the child
   is measured, the marks are written, the parent departs, the child rises
   into the brand eye. measuring.js drives it; when it finishes it hands the
   ritual back (h1-in + eye awake). Desktop, motion-allowed only — mobile and
   reduced-motion keep the static ritual above. */
#measuring {
  position: fixed; inset: 0; z-index: 2;
  pointer-events: none;
  display: none;
}
body.measuring #measuring { display: block; }
#measuring svg { width: 100%; height: 100%; display: block; overflow: visible; }
#measuring .labelLn {
  font-family: var(--f-hand); font-weight: 500; font-size: 17px;
  fill: var(--graphite);
}
/* while the vignette plays: the static hero marks yield (layout kept),
   the brand waits in the wings */
body.measuring .b1__marks .wallmark { visibility: hidden; }
.brand { transition: opacity 0.55s ease; }
body.measuring-playing .brand { opacity: 0; }

/* ── launch integration: consent line (copy is legal-fixed), application receipt, honeypot, sr-only ── */
.b8__consent{
  margin: 12px 0 0;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate);
}
.b8__consent a{ color: var(--slate); text-decoration: underline; text-underline-offset: 2px; }
.b8__consent a:hover{ color: var(--ink); }
.b8__received{margin:10px 0 0}
.b8__received:focus{outline:none}
.b8__recline{margin:0 0 8px;font-size:27px;line-height:1.3;color:var(--ink)}
.b8__recquiet{margin:0;max-width:46ch;font-size:14px;line-height:1.6;color:var(--slate)}
.b8__recquiet a{color:var(--slate);text-decoration:underline;text-underline-offset:2px}
.bb-hp{position:absolute !important;left:-9999px !important;width:1px;height:1px;opacity:0;pointer-events:none}
.bb-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
