/* Tilt — home, v7 "the page leans". Brand: Tilt Brand & Story v6. Cream first. Ink second.
   Motion rule: the architecture stays level; objects lean. Every scroll effect reads a progress
   variable written by main.js (--p on pinned tracks, --v/--e on in-view elements, --lean globally).
   Without JS or with reduced motion, html never gets .has-motion and the page is a calm static read. */

@font-face { font-family: 'Knewave'; src: url('../fonts/Knewave-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'TiltBodyText'; src: url('../fonts/TiltBodyText-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TiltBodyText'; src: url('../fonts/TiltBodyText-Thin.otf') format('opentype'); font-weight: 100 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --cream: #FAF8F3;
  --paper: #FFFDF8;
  --stone: #E8DDCC;
  --ink: #0A0A0A;
  --ink-soft: #37332E;
  --line: rgba(10, 10, 10, .13);
  --sky: #C7EBFF;
  --meadow: #B9D6C7;
  --sun: #FFE6A8;
  --shadow-warm: 74, 54, 34;
  --display: 'Knewave', 'Marker Felt', 'Chalkboard SE', sans-serif;
  --text: 'TiltBodyText', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --max: 82.5rem;
  --header-h: 4.5rem;
  --radius: 1.375rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* written by main.js */
  --lean: 0;
  --lean-abs: 0;
  --scroll: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, calc(0.55vw + 7.7px), 24px); -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
html:not(.lenis) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:not(.lenis) { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }
h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0; text-wrap: balance; }
html.menu-open { overflow: hidden; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -80px; z-index: 100; background: var(--ink); color: var(--cream); padding: 0.75rem 1rem; border-radius: 0.625rem; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 0.75rem; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 0.1875rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

/* Buttons say exactly what they do. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.125rem; padding: 0 1.5rem; border-radius: 999px;
  font: 600 1rem/1 var(--text); letter-spacing: -.005em; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, translate .35s var(--ease-out), rotate .35s var(--ease-out);
}
.btn:hover { translate: 0 -2px; rotate: -1.5deg; }
.btn:active { translate: 0 1px; rotate: 0deg; }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #2b2824; }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: var(--stone); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.btn-line:hover { background: rgba(10, 10, 10, .06); }
.btn-line-light { box-shadow: inset 0 0 0 1.5px #FFFFFF; color: #FFFFFF; background: rgba(10, 10, 10, 0.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-line-light:hover { background: rgba(255, 255, 255, 0.18); }
.btn-small { min-height: 2.625rem; padding: 0 1.125rem; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (prefers-reduced-motion: reduce) { .btn:hover, .btn:active { translate: none; rotate: none; } }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 1.75rem; padding: 0 var(--pad);
  color: #FFFFFF;
  transition: background-color .35s ease, box-shadow .35s ease, color .35s ease, translate .5s var(--ease-out);
}
.site-header.is-scrolled, html.menu-open .site-header {
  background: rgba(250, 248, 243, .94);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}
.site-header:not(.is-scrolled) .header-cta { background: var(--cream); color: var(--ink); }
.site-header.is-hidden:not(:focus-within) { translate: 0 -100%; }
html.menu-open .site-header { translate: none; }
.brand { display: block; line-height: 0; padding: .4375rem 0; }
.brand img { height: 2.125rem; width: auto; filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0,0,0,.45)); transition: filter .35s ease; }
.site-header.is-scrolled .brand img, html.menu-open .brand img { filter: none; }
.site-nav { margin-left: auto; display: flex; gap: 1.875rem; }
.site-nav a { font-weight: 600; font-size: 0.9375rem; text-decoration: none; padding: 0.5rem 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .25s ease; }
.site-nav a:hover, .site-nav a[aria-current="true"] { background-size: 100% 1.5px; }
.menu-toggle { display: none; margin-left: auto; min-height: 2.75rem; padding: 0 1.125rem; border-radius: 999px; border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; color: inherit; font: 600 0.9375rem/1 var(--text); cursor: pointer; }

/* The spirit level: page progress, with a bubble that sloshes when you scroll fast. */
.level {
  position: relative; flex: none; width: 3.75rem; height: 1rem; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px currentColor; background: rgba(185, 214, 199, .55); overflow: hidden;
}
.level::before, .level::after { content: ""; position: absolute; top: 25%; bottom: 25%; width: 1.5px; background: currentColor; opacity: .55; }
.level::before { left: calc(50% - .5rem); }
.level::after { left: calc(50% + .5rem); }
.level-bubble {
  position: absolute; top: 3px; left: 3px; width: .875rem; height: calc(100% - 6px); border-radius: 999px;
  background: var(--paper); box-shadow: inset 0 0 0 1px rgba(10, 10, 10, .25), inset 0 -2px 3px rgba(var(--shadow-warm), .18);
  translate: calc(var(--scroll) * (3.75rem - .875rem - 6px) + var(--lean) * -1.5px) 0;
  scale: calc(1 + var(--lean-abs, 0) * .08) 1;
}

.menu-sheet {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--cream);
  padding: 0.75rem var(--pad) calc(1.75rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
}
.menu-sheet[hidden] { display: none; }
.menu-sheet nav a { display: block; font: 400 2.5rem/1.15 var(--display); text-decoration: none; padding: 0.875rem 0; border-bottom: 1px solid var(--line); }

/* Shared */
.label { font: 600 0.9375rem/1.4 var(--text); color: var(--ink); margin-bottom: 0.625rem; display: inline-flex; align-items: center; gap: 0.625rem; }
.label::before { content: ""; width: 1.625rem; height: 0.5rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 8' fill='none' stroke='%230A0A0A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 5.5c4-2.6 7.5-3 11-1.4 3.6 1.7 8 1.6 13-2'/%3E%3C/svg%3E") center / contain no-repeat; }
.copy h2 { margin-bottom: 1.5rem; }
.copy p { max-width: 40ch; margin-bottom: 1rem; font-size: clamp(1.0625rem, 1.22vw, 1.1875rem); color: var(--ink-soft); }
.copy p:last-child { margin-bottom: 0; }
.scene { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--stone); aspect-ratio: 3 / 2; margin: 0; }
.scene > img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; }
.split { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: clamp(2rem, 5.5vw, 5.5rem); align-items: center; }
.stamp {
  display: inline-block; transform: rotate(-2.5deg); margin: 0 0.1875rem;
  padding: 0.1875rem 0.5625rem 2px; border: 1.5px solid var(--ink); border-radius: 0.3125rem;
  font: 600 .8em/1.3 var(--text); letter-spacing: .05em; text-transform: uppercase; color: var(--ink);
  background: var(--paper);
}
.brush-title-art { display: block; width: 100%; height: auto; object-fit: contain; }

/* ───────── Hero ───────── */
.hero-track { position: relative; background: var(--cream); }
.hero {
  position: relative; overflow: hidden; min-height: 100svh;
  display: grid; place-items: center;
}
.hero-frame { position: absolute; inset: 0; overflow: hidden; background: var(--ink); transform-origin: 50% 46%; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; display: block; }
.hero-overlay { position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(10, 10, 10, .26) 0%, rgba(10, 10, 10, .64) 100%); pointer-events: none; }
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: 58rem;
  padding: calc(var(--header-h) + 2rem) var(--pad) 3rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.signature-draw { margin: 0 auto; line-height: 0; width: 100%; display: flex; justify-content: center; }
.signature-canvas-wrap { position: relative; width: min(100%, 42rem); aspect-ratio: 1672 / 941; }
.sig-svg-inline { width: 100%; height: 100%; display: block; pointer-events: none; filter: drop-shadow(0 4px 20px rgba(0, 0, 0, .7)); }
.hero .lede { color: #FFFFFF; text-shadow: 0 2px 10px rgba(0,0,0,.7); max-width: 36ch; margin: 1.5rem auto 2rem; font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; }
.hero .actions { justify-content: center; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: #FFFFFF; font: 600 .8125rem/1 var(--text); opacity: .85; }
.scroll-cue::after { content: ""; width: 1.5px; height: 2.25rem; background: linear-gradient(#FFFFFF, transparent); transform-origin: top; rotate: 8deg; }
.scroll-cue.is-tucked::after { height: 1rem; } /* set by main.js when the cue moves up under the buttons */

/* One orchestrated page-load: the signature brushes in, then the words, then the buttons. */
@media (prefers-reduced-motion: no-preference) {
  .signature-canvas-wrap { clip-path: polygon(-10% -15%, -10% -15%, -10% 125%, -10% 125%); animation: drawInSignature 2.4s var(--ease-out) forwards .3s; }
  .hero .lede { opacity: 0; animation: heroFadeUp 1s ease forwards 1.8s; }
  .hero .actions { opacity: 0; animation: heroFadeUp 1s ease forwards 2.1s; }
  .scroll-cue { opacity: 0; animation: heroFadeUp 1s ease forwards 2.8s; }
  .scroll-cue::after { animation: cueSway 2.6s ease-in-out infinite 3s; }
}
@keyframes drawInSignature {
  0% { clip-path: polygon(-10% -15%, -10% -15%, -10% 125%, -10% 125%); opacity: .2; transform: scale(.96) translateY(10px); }
  25% { opacity: 1; }
  100% { clip-path: polygon(-10% -15%, 125% -15%, 110% 125%, -10% 125%); opacity: 1; transform: none; }
}
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: .95; transform: none; } }
@keyframes cueSway { 0%, 100% { rotate: 8deg; scale: 1 .7; } 50% { rotate: -4deg; scale: 1 1; } }

/* Scroll: the trailer leans back into a frame on cream. */
.has-motion .hero-track { height: 185svh; }
.has-motion .hero { position: sticky; top: 0; height: 100svh; min-height: 0; }
.has-motion .hero-frame {
  scale: calc(1 - var(--p, 0) * .2);
  rotate: calc(var(--p, 0) * -3deg);
  translate: 0 calc(var(--p, 0) * -2vh);
  border-radius: calc(var(--p, 0) * 2.5rem);
  box-shadow: 0 2.5rem 5rem -2rem rgba(var(--shadow-warm), calc(var(--p, 0) * .5));
}
.has-motion .hero-overlay { opacity: calc(1 - var(--p, 0) * .55); }
.has-motion .hero-inner { opacity: calc(1 - var(--p, 0) * 2.4); translate: 0 calc(var(--p, 0) * -10vh); scale: calc(1 - var(--p, 0) * .06); }
.has-motion .scroll-cue { visibility: hidden; }
.has-motion.at-top .scroll-cue { visibility: visible; }

/* ───────── Premise: the words ink in as you read ───────── */
.premise { position: relative; overflow: clip; padding-block: clamp(7rem, 15vw, 13rem); }
.premise-text { max-width: 27ch; font: 400 clamp(1.875rem, 4.2vw, 4.125rem)/1.14 var(--text); letter-spacing: -.02em; color: var(--ink); text-wrap: pretty; }
.premise-peek { position: absolute; right: 0; bottom: clamp(2rem, 6vw, 5rem); width: clamp(8.5rem, 17vw, 16rem); pointer-events: none; filter: drop-shadow(0 1.25rem 1.25rem rgba(var(--shadow-warm), .16)); }
.has-motion .premise-text .w { opacity: clamp(.14, calc(var(--ink, 0) * (var(--n) + 8) - var(--i)), 1); transition: opacity .15s linear; }
.has-motion .premise-peek { translate: calc((1 - min(1, var(--e, 0) * 1.25)) * 70%) 0; rotate: calc((1 - min(1, var(--e, 0) * 1.25)) * 10deg + var(--lean) * 1deg); transform-origin: 100% 100%; }

/* ───────── Story: four chapters, a crooked pile of photographs ───────── */
.story { position: relative; background: var(--cream); }
.story-stage { padding-block: clamp(4rem, 8vw, 7rem); }
.story-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; width: 100%; }
.chapters { list-style: none; padding: 0; display: grid; gap: 3rem; }
.chapter p { max-width: 40ch; margin-top: 1rem; font-size: clamp(1.0625rem, 1.22vw, 1.1875rem); color: var(--ink-soft); }
.chapter-art { line-height: 0; }
.chapter-art img { width: min(100%, 28rem); }
.chapter-title { font-size: clamp(2.5rem, 4.4vw, 4rem); line-height: 1; }
.chapter-ticks { display: none; }
.pile { display: grid; gap: 1.5rem; }
.photo {
  margin: 0; background: var(--paper); padding: .75rem .75rem 0; border-radius: .5rem;
  box-shadow: 0 1.75rem 3rem -1.5rem rgba(var(--shadow-warm), .38), 0 .25rem .75rem rgba(var(--shadow-warm), .08);
  display: flex; flex-direction: column; rotate: var(--rest);
}
.photo img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; border-radius: .25rem; }
.photo figcaption { font: 400 clamp(1.125rem, 1.6vw, 1.5rem)/1 var(--display); padding: .9rem .25rem 1rem; color: var(--ink); }

.has-motion .story-track { height: 440svh; }
.has-motion .story-stage { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding-block: var(--header-h) 0; overflow: hidden; }
.has-motion .chapters { gap: 0; }
.has-motion .chapter { grid-area: 1 / 1; opacity: 0; translate: 0 1.5rem; visibility: hidden; transition: opacity .55s ease, translate .8s var(--ease-out), visibility 0s linear .55s; }
.has-motion .chapter.is-active { opacity: 1; translate: 0 0; visibility: visible; transition-delay: .12s, .12s, 0s; }
.has-motion .chapter.is-past { translate: 0 -1.5rem; }
.has-motion .chapter-ticks { display: flex; gap: .5rem; margin-top: 2.5rem; }
.chapter-ticks span { width: 1.75rem; height: 3px; border-radius: 3px; background: var(--line); transition: background-color .4s ease, width .5s var(--ease-out); }
.chapter-ticks span.is-on { background: var(--ink); width: 2.75rem; }
.has-motion .pile { display: block; position: relative; aspect-ratio: 1.36; }
.has-motion .photo {
  position: absolute; inset: 0;
  translate: var(--dx) calc((1 - var(--t, 0)) * 118svh);
  rotate: calc(var(--rest) + (1 - var(--t, 0)) * 16deg + var(--lean) * .6deg);
  scale: calc(1 - var(--under, 0) * .035);
  will-change: translate, rotate;
}
.has-motion .photo img { flex: 1; min-height: 0; aspect-ratio: auto; }

/* ───────── Character ───────── */
.character { background: var(--stone); padding-block: clamp(6rem, 11vw, 10rem); overflow: clip; }
.section-head { max-width: 48.75rem; }
.section-head h2 { margin-bottom: 1.375rem; }
.section-head p { font-size: clamp(1.125rem, 1.4vw, 1.25rem); max-width: 46ch; color: var(--ink-soft); }
#character-title { max-width: 43rem; }
.character-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; margin-top: clamp(2.5rem, 5vw, 4rem); }


.traits > div { padding: 1.375rem 0; border-top: 1px solid rgba(10, 10, 10, .16); }
.traits > div:last-child { border-bottom: 1px solid rgba(10, 10, 10, .16); }
.traits dt, .place-list h3 { line-height: 0; margin-bottom: .65rem; }
.traits dd { font-size: 1.0625rem; color: var(--ink-soft); max-width: 42ch; }
.brush-small { width: auto; height: 2.5rem; max-width: 100%; object-position: left center; }

.small-task { display: flex; align-items: center; justify-content: center; }
.small-task-words { width: 56%; }
.small-task-tilt { width: 50%; margin-left: -5%; rotate: 3deg; filter: drop-shadow(0 1.125rem 1.125rem rgba(var(--shadow-warm), .18)); }
.has-motion .small-task-words, .has-motion .small-task-tilt { will-change: transform; } /* own layers: the scroll drift and Tilt's shadow don't repaint each frame */
.has-motion .small-task-words { translate: 0 calc((.5 - var(--v, .5)) * 3rem); rotate: calc((.5 - var(--v, .5)) * -4deg); }
.has-motion .small-task-tilt { translate: 0 calc((.5 - var(--v, .5)) * -6rem); rotate: calc(3deg + (.5 - var(--v, .5)) * 10deg + var(--lean) * 1.4deg); }

/* ───────── Things come to him: the toast clip scrubs backwards; the table leans toward Tilt ───────── */
.toast-scroll { position: relative; background: #F1E9DD; }
.toast-track { position: relative; height: 330svh; }
.toast-sticky { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }
.toast-frame { position: absolute; inset: 0; transform-origin: 78% 72%; }
.toast-video, .toast-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: calc(72% + var(--p, 1) * 28%) 55%; display: block; }
.toast-still { display: none; }
.has-scrub .toast-frame { scale: calc(1.06 + var(--tip, 0) * .02); rotate: calc(var(--tip, 0) * 2.4deg); }
.toast-copy {
  position: absolute; z-index: 2; top: calc(var(--header-h) + clamp(1.5rem, 5vh, 3.5rem));
  left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); width: min(40vw, 30rem);
}
.beats { list-style: none; padding: 0; display: grid; }
.beat h3 { font-size: clamp(2.5rem, 4.6vw, 4.5rem); line-height: .98; }
.beat p { margin-top: 1rem; max-width: 34ch; font-size: clamp(1.0625rem, 1.25vw, 1.25rem); color: var(--ink-soft); }
.has-scrub .beat { grid-area: 1 / 1; opacity: 0; translate: 0 1.25rem; rotate: -1.5deg; transform-origin: left bottom; visibility: hidden; transition: opacity .5s ease, translate .8s var(--ease-out), rotate .8s var(--ease-out), visibility 0s linear .5s; }
.has-scrub .beat.is-active { opacity: 1; translate: none; rotate: 0deg; visibility: visible; transition-delay: .1s, .1s, .1s, 0s; }
.has-scrub .beat.is-past { translate: 0 -1.25rem; }
/* The level: the bubble drifts toward Tilt as the table tips. */
.slide-gauge { display: none; align-items: center; gap: .75rem; margin-top: 1.75rem; font: 600 .875rem/1 var(--text); color: var(--ink-soft); }
.has-scrub .slide-gauge { display: flex; }
.gauge-vial { position: relative; width: 6.5rem; height: 1.125rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink); background: rgba(185, 214, 199, .6); rotate: calc(var(--tip, 0) * 2.4deg); }
.gauge-vial::before, .gauge-vial::after { content: ""; position: absolute; top: 25%; bottom: 25%; width: 1.5px; background: var(--ink); opacity: .5; }
.gauge-vial::before { left: calc(50% - .7rem); }
.gauge-vial::after { left: calc(50% + .7rem); }
.gauge-bubble { position: absolute; top: 3px; bottom: 3px; left: calc(50% - .5rem); width: 1rem; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(10, 10, 10, .25); translate: calc(var(--tip, 0) * 2.3rem) 0; }
.gauge-read b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; display: inline-block; min-width: 2.6em; text-align: right; }

/* No scrub (reduced motion): a still, with the three beats read as a short list. */
html:not(.has-scrub) .toast-track { height: auto; }
html:not(.has-scrub) .toast-sticky { position: relative; height: auto; display: flex; flex-direction: column; }
html:not(.has-scrub) .toast-frame { position: relative; inset: auto; order: 2; }
html:not(.has-scrub) .toast-video { display: none; }
html:not(.has-scrub) .toast-still { display: block; position: relative; inset: auto; height: auto; aspect-ratio: 4 / 3; max-height: 80svh; }
html:not(.has-scrub) .toast-copy { position: static; width: auto; max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 8vw, 6rem) var(--pad) 2.5rem; }
html:not(.has-scrub) .beats { gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
html:not(.has-scrub) .beat h3 { font-size: clamp(2rem, 3vw, 2.75rem); }

/* ───────── World: a crooked window that opens all the way ───────── */
.world { background: var(--cream); }
.world-stage { position: relative; overflow: hidden; min-height: clamp(35rem, 92svh, 61.25rem); }
.world-window { position: absolute; inset: 0; background: var(--sky); overflow: hidden; }
.world-window video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.world-stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(250, 248, 243, .72) 0%, rgba(250, 248, 243, .42) 38%, rgba(250, 248, 243, 0) 66%); }
.world-copy { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: clamp(5.5rem, 11vw, 9.375rem) var(--pad) 0; display: flex; flex-direction: column; align-items: flex-end; }
.world-copy > * { width: min(100%, 38.75rem); }
#world-title { max-width: 36rem; margin-bottom: 1.375rem; }
.world-copy p { font-size: clamp(1.125rem, 1.4vw, 1.25rem); max-width: 40ch; color: var(--ink); }

.has-motion .world-track { height: 210svh; }
.has-motion .world-stage { position: sticky; top: 0; height: 100svh; min-height: 0; }
.has-motion .world-window {
  clip-path: inset(calc((1 - var(--o, 0)) * 19%) calc((1 - var(--o, 0)) * 30%) calc((1 - var(--o, 0)) * 17%) calc((1 - var(--o, 0)) * 7%) round calc((1 - var(--o, 0)) * 2.5rem));
  rotate: calc((1 - var(--o, 0)) * -4deg);
}
.has-motion .world-window video { scale: calc(1.18 - var(--o, 0) * .18); translate: calc((1 - var(--o, 0)) * 7%) 0; }
.has-motion .world-stage::before { opacity: var(--o, 0); }
.has-motion .world-copy { opacity: clamp(0, calc(var(--o, 0) * 3 - 2), 1); translate: 0 calc((1 - var(--o, 0)) * 3rem); }

.places { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(5rem, 9vw, 8.5rem); }
.places-scene { isolation: isolate; }
.leaf-shadow { position: absolute; z-index: 1; top: -12%; right: -18%; width: 95%; height: auto; mix-blend-mode: multiply; opacity: .5; pointer-events: none; }
.place-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2.125rem 2.5rem; }
.place-list p { font-size: 1.0312rem; color: var(--ink-soft); }

/* Inner parallax: photographs drift inside their frames. */
.has-motion .scene[data-view] > img:first-child { scale: 1.12; translate: 0 calc((var(--v, .5) - .5) * -7%); }
.has-motion .leaf-shadow { translate: calc((var(--v, .5) - .5) * -16%) calc((var(--v, .5) - .5) * 6%); }

/* ───────── Born online ───────── */
.online { padding-block: clamp(2rem, 4vw, 3rem) clamp(6.5rem, 11vw, 10.5rem); }
#online-title { max-width: 28rem; }
.has-motion .online .scene { rotate: calc((.5 - var(--v, .5)) * 3deg + var(--lean) * .4deg); }

/* ───────── Close ───────── */
.close { position: relative; overflow: hidden; min-height: clamp(38.75rem, 96svh, 63.75rem); display: grid; }
.close-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
.close::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(250, 248, 243, .55) 0%, rgba(250, 248, 243, .12) 34%, rgba(250, 248, 243, 0) 50%); }
.close-copy { position: relative; z-index: 2; align-self: start; justify-self: end; text-align: center; width: min(50vw, 42.5rem); margin-right: max(var(--pad), calc((100vw - var(--max)) / 2)); padding: clamp(5.5rem, 11vw, 9.375rem) 0 0; }
#follow-title { max-width: 39rem; margin-inline: auto; }
.tagline-close { max-width: 32rem; margin: .75rem auto 0; line-height: 0; }
.close .actions { justify-content: center; margin-top: 2.125rem; }
.close .btn-line { background: rgba(250, 248, 243, .92); } /* a cream backing keeps the outline button readable over the grass */
.has-motion .close-scene { scale: calc(1.12 - min(1, var(--e, 0)) * .12); }
.has-motion .close-words { transform-origin: 50% 100%; scale: calc(.9 + min(1, var(--e, 0)) * .1); rotate: calc((1 - min(1, var(--e, 0))) * -4deg); opacity: clamp(0, calc(var(--e, 0) * 2 - .6), 1); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.25rem 0 calc(2.25rem + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; align-items: center; gap: 2.25rem; }
.footer-brand { line-height: 0; padding: .4375rem 0; }
.footer-brand img { height: 1.875rem; width: auto; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { font-weight: 600; font-size: .9375rem; text-decoration: none; display: inline-block; padding: .625rem .125rem; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: .25rem; }
.footer-line { margin-left: auto; font-size: .9375rem; color: var(--ink-soft); }

/* Reveal: brush titles paint in left to right; text settles under them. Polish only. */
.has-motion [data-reveal] { opacity: 0; translate: 0 1.25rem; transition: opacity .9s ease, translate 1s var(--ease-out); }
.has-motion [data-reveal].is-in { opacity: 1; translate: none; }
.has-motion [data-reveal] .brush-title-art { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease-out) .15s; }
.has-motion [data-reveal].is-in .brush-title-art { clip-path: inset(0 -2% 0 0); }

/* Curiosity section: one quick sequence the eye can follow (title, line, art, Tilt, then each trait).
   main.js releases the pieces one at a time; each is a short fade + rise using only opacity and transform,
   which the GPU handles, so it stays smooth on slower machines. */
.has-motion .character [data-reveal] { opacity: 0; translate: none; transform: translateY(14px); transition: opacity .45s ease-out, transform .55s var(--ease-out); }
.has-motion .character [data-reveal].is-in { opacity: 1; transform: none; }
.has-motion .character [data-reveal]:not(.is-in) { will-change: opacity, transform; }
.has-motion .character [data-reveal] .brush-title-art { clip-path: none; transition: none; }
.has-motion .character .section-head p,
.has-motion .traits dd { opacity: 0; transform: translateY(8px); transition: opacity .45s ease-out .14s, transform .55s var(--ease-out) .14s; }
.has-motion .character .section-head.is-in p,
.has-motion .traits .is-in dd { opacity: 1; transform: none; }
.has-motion .character .small-task[data-reveal] { opacity: 1; transform: none; }
.has-motion .small-task .small-task-words,
.has-motion .small-task .small-task-tilt { opacity: 0; transform: translateY(16px); transition: opacity .45s ease-out, transform .55s var(--ease-out); }
.has-motion .small-task .small-task-tilt { transition-delay: .16s; }
.has-motion .small-task.is-in .small-task-words,
.has-motion .small-task.is-in .small-task-tilt { opacity: 1; transform: none; }

/* Match the visible ink height across independently painted labels. */
.brush-small[src*="trait-earnest"] { height: 39.28px; }
.brush-small[src*="trait-observant"] { height: 44.07px; }
.brush-small[src*="trait-stubborn"] { height: 44.59px; }
.brush-small[src*="trait-quietly-generous"] { height: 52.39px; }
.brush-small[src*="place-workshop"] { height: 43.61px; }
.brush-small[src*="place-feed"] { height: 41.44px; }
.brush-small[src*="place-shelf"] { height: 41.82px; }
.brush-small[src*="place-window"] { height: 43.18px; }

/* Tablet */
@media (max-width: 1100px) {
  .site-nav { gap: 1.375rem; }
  .place-list { grid-template-columns: 1fr; gap: 1.625rem; }
}

/* Phone and small tablet: designed, not squeezed. */
@media (max-width: 860px) {
  :root { --header-h: 4rem; --radius: 1.125rem; }
  .site-nav, .header-cta { display: none; }
  .level { margin-left: auto; }
  .menu-toggle { display: inline-flex; align-items: center; margin-left: 0; }
  .brand img { height: 1.875rem; }

  .hero-inner { padding: calc(var(--header-h) + 1.5rem) var(--pad) 4.5rem; }
  .signature-canvas-wrap { width: min(100%, 34rem); }
  .hero .lede { margin: 1.25rem auto 1.75rem; }
  .hero .actions { flex-direction: column; width: min(100%, 22rem); margin: 0 auto; }
  .hero .btn { width: 100%; }
  .has-motion .hero-frame { scale: calc(1 - var(--p, 0) * .14); rotate: calc(var(--p, 0) * -2.4deg); }

  .premise-text { font-size: clamp(1.625rem, 7.4vw, 2.5rem); }
  .premise-peek { width: 7.5rem; bottom: 1.25rem; }
  .premise { padding-block: 5.5rem 9.5rem; }

  .story-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .has-motion .story-grid { display: flex; flex-direction: column-reverse; justify-content: center; height: 100%; gap: 1.5rem; }
  .has-motion .pile { width: min(86vw, 30rem); margin-inline: auto; flex: none; }
  .has-motion .story-copy { min-height: 17.5rem; }
  .chapter-art img { width: min(78vw, 19rem); }
  .chapter-title { font-size: clamp(2rem, 9vw, 2.75rem); }
  .chapter p { font-size: 1rem; margin-top: .75rem; }
  .has-motion .chapter-ticks { margin-top: 1.25rem; }
  .story .label { display: none; }
  .photo { padding: .5rem .5rem 0; }
  .photo figcaption { padding: .6rem .2rem .7rem; }

  .character { padding-block: 4.5rem; }
  .character-grid, .places, .split { grid-template-columns: 1fr; gap: 1.75rem; }
  #character-title { max-width: 34rem; }
  .brush-small { height: 2.35rem; }

  .toast-copy { width: auto; right: var(--pad); top: calc(var(--header-h) + 1.25rem); }
  .beat h3 { font-size: clamp(2.125rem, 9.5vw, 3rem); }
  .beat p { font-size: 1rem; margin-top: .6rem; }
  .slide-gauge { margin-top: 1.1rem; }
  .toast-copy .label { display: none; }

  .places { padding-block: 4rem; }
  .places-scene, .online .scene { margin-inline: calc(var(--pad) * -1); border-radius: 0; }
  .has-motion .online .scene { rotate: none; }
  .online { padding-block: .5rem 5rem; }

  .tagline-close { max-width: 29rem; }
  .site-footer { padding: 2rem 0 calc(1.75rem + env(safe-area-inset-bottom)); }
  .footer-inner { flex-direction: column; gap: 1.125rem; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; gap: .625rem 1.375rem; }
  .footer-line { margin: 0; }
}

/* Portrait phones: keep the scene clear; type sits in the sky. */
@media (max-width: 860px) and (orientation: portrait) {
  /* Things come to him: words on the wall above, the whole table below, so the toast and Tilt share the frame. */
  .has-scrub .toast-sticky { display: flex; flex-direction: column; justify-content: center; padding-top: var(--header-h); height: 100svh; }
  .has-scrub .toast-copy { position: relative; top: auto; left: auto; right: auto; width: auto; padding: 1.25rem var(--pad) 0; }
  .has-scrub .toast-frame { position: relative; inset: auto; flex: none; aspect-ratio: 4 / 3.3; overflow: hidden; scale: none; rotate: none;
    -webkit-mask-image: linear-gradient(to top, transparent 0, #000 14%); mask-image: linear-gradient(to top, transparent 0, #000 14%); }
  .has-scrub .toast-video { object-position: 50% 62%; transform-origin: 78% 72%; scale: calc(1.06 + var(--tip, 0) * .02); rotate: calc(var(--tip, 0) * 2.4deg); }
  .world-window video { object-position: 7% 60%; }
  .world-stage::before { background: linear-gradient(to bottom, rgba(250, 248, 243, .85) 0%, rgba(250, 248, 243, .45) 38%, rgba(250, 248, 243, 0) 60%); }
  .world-copy { padding-top: calc(var(--header-h) + 1.5rem); align-items: stretch; }
  .world-copy p { font-size: 1rem; color: var(--ink-soft); }
  .has-motion .world-window { clip-path: inset(calc((1 - var(--o, 0)) * 16%) calc((1 - var(--o, 0)) * 12%) round calc((1 - var(--o, 0)) * 1.5rem)); }
  .close { min-height: 100svh; }
  /* The scene runs taller than the screen and anchors at the top, so Tilt sits below the tagline even on short phones. */
  .close-scene { height: 118%; object-position: 9% 50%; }
  .close-copy { justify-self: stretch; width: auto; margin: 0; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem var(--pad) calc(2.25rem + env(safe-area-inset-bottom)); }
  .close .actions { flex-direction: column; width: min(100%, 22.5rem); margin: 0 auto; }
  .close .btn-line { background: rgba(250, 248, 243, .92); }
  .tagline-close { width: 82%; margin-top: .5rem; }
}
/* Short phones (Safari with its toolbars showing): a smaller tagline keeps it clear of Tilt's head. */
@media (max-width: 860px) and (orientation: portrait) and (max-height: 760px) {
  .close-words { width: 84%; margin: 0 auto; }
}

/* Landscape phones: short screens drop the pinned chapters and read straight through. */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 520px) {
  .hero .actions { flex-direction: row; width: auto; }
  .hero .btn { width: auto; min-height: 2.75rem; }
  .signature-canvas-wrap { width: min(60vw, 24rem); }
  .menu-sheet nav a { font-size: 1.75rem; padding: .5rem 0; }
  .has-motion .story-track { height: auto; }
  .has-motion .story-stage { position: relative; height: auto; display: block; padding-block: 4rem; overflow: visible; }
  .has-motion .story-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .has-motion .chapters { gap: 2.5rem; }
  .has-motion .chapter { grid-area: auto; opacity: 1; translate: none; visibility: visible; }
  .has-motion .chapter-ticks { display: none; }
  .has-motion .pile { display: grid; aspect-ratio: auto; }
  .has-motion .photo { position: relative; translate: none; rotate: var(--rest); scale: none; }
  .has-motion .photo img { aspect-ratio: 3 / 2; }
}
