/* ================= Fonts (self-hosted, OFL) ================= */
@font-face { font-family: "Bricolage"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(fonts/instrument-sans-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "JBMono"; src: url(fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

/* ================= Tokens ================= */
:root {
  --paper: #F3F0E8;
  --paper-2: #EAE6DB;
  --card: #FBFAF6;
  --ink: #121211;
  --ink-2: #3B3A36;
  --mute: #66635B;
  --line: rgba(18, 18, 17, .11);
  --line-2: rgba(18, 18, 17, .2);
  --accent: #FF4A1C;          /* playhead */
  --accent-ink: #B3300B;      /* accent text on paper (contrast) */
  --deck: #161614;
  --deck-2: #22221F;
  --deck-line: rgba(243, 240, 232, .1);

  --f-display: "Bricolage", "Arial Narrow", system-ui, sans-serif;
  --f-text: "Instrument", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JBMono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.125rem, 1rem + .5vw, 1.3125rem);
  --t-h3: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --t-h2: clamp(2.125rem, 1.5rem + 3vw, 3.75rem);
  --t-hero: clamp(3.25rem, 1.6rem + 7.4vw, 7.25rem);

  --gutter: clamp(1rem, .5rem + 2.5vw, 2.5rem);
  --max: 1180px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-snap: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.3, 1.6, .5, 1); /* mascot only: character overshoot */
  --shadow: 0 1px 0 rgba(18,18,17,.06), 0 10px 30px -18px rgba(18,18,17,.35);
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; min-height: 100dvh;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 1; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ================= Background: cutting-room sheet ================= */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-grid {
  position: absolute; inset: -64px 0 0;
  background:
    linear-gradient(90deg, rgba(18,18,17,.075) 1px, transparent 1px) 0 0 / 96px 100%,
    linear-gradient(90deg, rgba(18,18,17,.035) 1px, transparent 1px) 0 0 / 12px 100%,
    linear-gradient(rgba(18,18,17,.05) 1px, transparent 1px) 0 0 / 100% 48px;
  -webkit-mask: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.25) 100%);
          mask: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.25) 100%);
}
/* drifting clip lanes: crisp blocks, never blurred */
.bg-track {
  position: absolute; left: -50%; width: 200%; height: 10px;
  background-repeat: repeat-x;
  animation: drift linear infinite;
}
.bg-track.t1 { top: 31%; opacity: .07; background-image: linear-gradient(90deg, var(--ink) 0 140px, transparent 140px 164px, var(--ink) 164px 236px, transparent 236px 300px, var(--ink) 300px 520px, transparent 520px 560px); background-size: 560px 10px; animation-duration: 120s; }
.bg-track.t2 { top: 33.2%; height: 4px; opacity: .1; background-image: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 7px, var(--ink) 7px 8px, transparent 8px 11px); background-size: 330px 4px; animation-duration: 160s; animation-direction: reverse; }
.bg-track.t3 { top: 78%; opacity: .06; background-image: linear-gradient(90deg, var(--ink) 0 90px, transparent 90px 120px, var(--ink) 120px 380px, transparent 380px 430px, var(--ink) 430px 470px, transparent 470px 640px); background-size: 640px 10px; animation-duration: 140s; }
@keyframes drift { to { transform: translate3d(-25%, 0, 0); } }

.bg-sprocket { display: none; }
@media (min-width: 1100px) {
  .bg-sprocket {
    display: block; position: absolute; top: 0; bottom: 0; left: 14px; width: 16px;
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    background: repeating-linear-gradient(180deg, transparent 0 6px, rgba(18,18,17,.13) 6px 16px, transparent 16px 24px) 3px 0 / 8px 100% no-repeat;
    animation: sprocket 3s linear infinite;
  }
}
@keyframes sprocket { to { background-position: 3px 24px; } }

.crop { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(18,18,17,.35); }
.crop.tl { top: 10px; left: 10px; border-top-width: 1.5px; border-left-width: 1.5px; }
.crop.tr { top: 10px; right: 10px; border-top-width: 1.5px; border-right-width: 1.5px; }
.crop.bl { bottom: 10px; left: 10px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.crop.br { bottom: 10px; right: 10px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.bg-grain {
  position: absolute; inset: -120px; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .07 0 0 0 0 .07 0 0 0 0 .06 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(1) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-37px, 21px); } 40% { transform: translate(19px, -44px); }
  60% { transform: translate(-12px, 58px); } 80% { transform: translate(41px, 9px); }
}

/* ================= Top bar ================= */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter); padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand-mark { width: 30px; height: 26px; border-radius: 6px; background: var(--ink); position: relative; overflow: hidden; }
.brand-mark::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(115deg, var(--accent) 0 5px, var(--ink) 5px 10px); transform-origin: 0 100%; transition: transform .35s var(--ease-snap); }
.brand:hover .brand-mark::before { transform: rotate(-14deg); }
.brand-mark i { position: absolute; left: 6px; right: 6px; bottom: 4px; top: 11px; border-radius: 3px; background: var(--paper); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font: 750 1.0625rem/1 var(--f-display); font-stretch: 88%; letter-spacing: -.02em; }
.brand-text small { font: 500 .6875rem/1.3 var(--f-mono); color: var(--mute); letter-spacing: .02em; }
.topnav { display: flex; align-items: center; gap: 4px; }
.navlink { display: none; padding: 10px 12px; font-size: var(--t-sm); font-weight: 500; text-decoration: none; color: var(--ink-2); border-radius: 999px; }
.navlink:hover { background: var(--paper-2); color: var(--ink); }
@media (min-width: 640px) { .navlink { display: inline-flex; } }

/* ================= Buttons ================= */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--h); padding: 0 1.25em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--f-text); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s, color .2s, box-shadow .25s var(--ease), border-color .2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sm { --h: 40px; padding: 0 1em; font-size: var(--t-sm); }
.btn-lg { --h: 54px; padding: 0 1.5em; font-size: 1.0625rem; }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 8px 20px -12px rgba(18,18,17,.7); }
.btn-ink:hover { background: #000; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 14px 26px -14px rgba(18,18,17,.8), 4px 4px 0 -1px var(--accent); transform: translate(-2px, -2px); }
.btn-ghost { border-color: var(--line-2); background: color-mix(in srgb, var(--card) 70%, transparent); }
.btn-ghost:hover { border-color: var(--ink); background: var(--card); }
.btn-ghost .ic { transition: transform .3s var(--ease); }
.btn-ghost:hover .ic { transform: translateX(3px); }
.btn-accent { background: var(--accent); color: var(--ink); box-shadow: 0 10px 24px -14px var(--accent); }
.btn-accent:hover { background: #f03d10; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 -1px var(--ink); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; color: var(--mute); cursor: pointer; font-size: var(--t-sm); min-height: 44px; }
.linkbtn:hover { color: var(--ink); }

/* ================= Hero ================= */
main { display: block; }
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 6vw, 72px) var(--gutter) 24px;
  display: grid; gap: 36px; align-items: center;
}
@media (min-width: 960px) { .hero { grid-template-columns: 1.1fr .9fr; gap: 56px; min-height: calc(100dvh - 140px); } }
.chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 12px 6px 10px; border: 1px solid var(--line-2); border-radius: 999px;
  font: 500 var(--t-xs)/1 var(--f-mono); letter-spacing: .02em; color: var(--ink-2); background: var(--card);
}
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); animation: rec 1.6s ease-in-out infinite; }
@keyframes rec { 50% { opacity: .35; } }
.display {
  margin: 0; font-family: var(--f-display); font-weight: 760; font-stretch: 80%;
  font-size: var(--t-hero); line-height: .92; letter-spacing: -.028em; font-variation-settings: "opsz" 96;
}
.display .cut { position: relative; display: inline-block; color: var(--ink); }
.display .cut { padding: 0 .14em; margin-left: -.14em; }
.display .cut::before, .display .cut::after { /* in/out marks bracketing the phrase */
  content: ""; position: absolute; top: .12em; bottom: .02em; width: .14em; border: .055em solid var(--accent);
}
.display .cut::before { left: 0; border-right: 0; }
.display .cut::after { right: 0; border-left: 0; }
.lede { max-width: 33em; margin: 22px 0 0; font-size: var(--t-lg); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
@media (max-width: 479px) { .cta .btn { flex: 1 1 100%; } }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; font-size: var(--t-xs); color: var(--mute); letter-spacing: .04em; text-transform: uppercase; }
.stats span { display: inline-flex; gap: 6px; align-items: baseline; }
.stats span + span::before { content: ""; width: 1px; height: 10px; background: var(--line-2); margin-right: 12px; align-self: center; }
.stats b { color: var(--ink); font-weight: 600; font-size: .8125rem; }
.members { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.members p { margin: 0; font-size: var(--t-sm); color: var(--mute); line-height: 1.35; max-width: 18em; }
.faces { display: flex; }
.faces span {
  width: 34px; height: 34px; margin-left: -9px; border-radius: 50%;
  display: grid; place-items: center; font: 600 .6875rem/1 var(--f-mono);
  color: var(--paper); background: var(--ink-2); border: 2px solid var(--paper);
}
.faces span:first-child { margin-left: 0; }
.faces span:nth-child(2) { background: #5B5850; }
.faces span:nth-child(3) { background: var(--ink); }
.faces span:nth-child(4) { background: #6B675E; }
.faces span:nth-child(5) { background: #2E2D2A; }
.faces span:last-child { background: var(--card); color: var(--ink); border-color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: .9rem; }

/* ===== Hero stage: mascot standing on the timeline deck ===== */
.hero-stage { position: relative; padding-top: 150px; }
.stage-mascot { position: absolute; top: 0; left: 50%; width: 170px; transform: translateX(-50%); z-index: 2; }
@media (min-width: 960px) { .hero-stage { padding-top: 190px; } .stage-mascot { width: 210px; } }
.deck {
  position: relative; background: var(--deck); color: var(--paper); border-radius: var(--r-lg);
  padding: 14px 14px 16px; box-shadow: 0 30px 60px -30px rgba(18,18,17,.6), 0 0 0 1px rgba(0,0,0,.4);
  overflow: hidden;
}
.deck::after { /* scanline sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
.deck-head { display: flex; justify-content: space-between; gap: 8px; font-size: .6875rem; letter-spacing: .05em; color: rgba(243,240,232,.74); padding: 2px 2px 12px; }
.deck-head .tc { color: var(--accent); font-variant-numeric: tabular-nums; }
.ruler {
  display: flex; justify-content: space-between; margin-left: 30px; padding-bottom: 8px;
  font-size: .625rem; color: rgba(243,240,232,.4);
  background: repeating-linear-gradient(90deg, rgba(243,240,232,.28) 0 1px, transparent 1px 10%) 0 100% / 100% 5px no-repeat,
              repeating-linear-gradient(90deg, rgba(243,240,232,.14) 0 1px, transparent 1px 2%) 0 100% / 100% 3px no-repeat;
}
.tracks { position: relative; display: grid; gap: 6px; padding-top: 8px; }
.track { display: grid; grid-template-columns: 24px 1fr; gap: 6px; align-items: center; height: 46px; }
.track.a { height: 34px; }
.track em { font: 600 .625rem/1 var(--f-mono); font-style: normal; color: rgba(243,240,232,.45); text-align: center; }
.clips { position: relative; height: 100%; }
.clips i {
  position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 1%); width: calc(var(--w) * 1% - 3px);
  border-radius: 6px; background: var(--deck-2);
  box-shadow: inset 0 0 0 1px rgba(243,240,232,.12);
  background-image: repeating-linear-gradient(90deg, rgba(243,240,232,.06) 0 22px, transparent 22px 24px);
}
.clips i.hot { background-color: #3a2a24; box-shadow: inset 0 0 0 1.5px var(--accent); background-image: repeating-linear-gradient(90deg, rgba(255,74,28,.18) 0 22px, transparent 22px 24px); }
.wave {
  height: 100%; border-radius: 6px; background: var(--deck-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='34'%3E%3Cg fill='%23000'%3E%3Crect x='1' y='14' width='2' height='6'/%3E%3Crect x='5' y='10' width='2' height='14'/%3E%3Crect x='9' y='6' width='2' height='22'/%3E%3Crect x='13' y='12' width='2' height='10'/%3E%3Crect x='17' y='3' width='2' height='28'/%3E%3Crect x='21' y='9' width='2' height='16'/%3E%3Crect x='25' y='13' width='2' height='8'/%3E%3Crect x='29' y='7' width='2' height='20'/%3E%3Crect x='33' y='11' width='2' height='12'/%3E%3Crect x='37' y='5' width='2' height='24'/%3E%3Crect x='41' y='14' width='2' height='6'/%3E%3Crect x='45' y='9' width='2' height='16'/%3E%3Crect x='49' y='2' width='2' height='30'/%3E%3Crect x='53' y='8' width='2' height='18'/%3E%3Crect x='57' y='12' width='2' height='10'/%3E%3Crect x='61' y='6' width='2' height='22'/%3E%3Crect x='65' y='15' width='2' height='4'/%3E%3Crect x='69' y='10' width='2' height='14'/%3E%3Crect x='73' y='4' width='2' height='26'/%3E%3Crect x='77' y='11' width='2' height='12'/%3E%3Crect x='81' y='8' width='2' height='18'/%3E%3Crect x='85' y='13' width='2' height='8'/%3E%3Crect x='89' y='5' width='2' height='24'/%3E%3Crect x='93' y='10' width='2' height='14'/%3E%3Crect x='97' y='14' width='2' height='6'/%3E%3Crect x='101' y='7' width='2' height='20'/%3E%3Crect x='105' y='11' width='2' height='12'/%3E%3Crect x='109' y='3' width='2' height='28'/%3E%3Crect x='113' y='9' width='2' height='16'/%3E%3Crect x='117' y='13' width='2' height='8'/%3E%3C/g%3E%3C/svg%3E") 0 50% / 120px 34px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='34'%3E%3Cg fill='%23000'%3E%3Crect x='1' y='14' width='2' height='6'/%3E%3Crect x='5' y='10' width='2' height='14'/%3E%3Crect x='9' y='6' width='2' height='22'/%3E%3Crect x='13' y='12' width='2' height='10'/%3E%3Crect x='17' y='3' width='2' height='28'/%3E%3Crect x='21' y='9' width='2' height='16'/%3E%3Crect x='25' y='13' width='2' height='8'/%3E%3Crect x='29' y='7' width='2' height='20'/%3E%3Crect x='33' y='11' width='2' height='12'/%3E%3Crect x='37' y='5' width='2' height='24'/%3E%3Crect x='41' y='14' width='2' height='6'/%3E%3Crect x='45' y='9' width='2' height='16'/%3E%3Crect x='49' y='2' width='2' height='30'/%3E%3Crect x='53' y='8' width='2' height='18'/%3E%3Crect x='57' y='12' width='2' height='10'/%3E%3Crect x='61' y='6' width='2' height='22'/%3E%3Crect x='65' y='15' width='2' height='4'/%3E%3Crect x='69' y='10' width='2' height='14'/%3E%3Crect x='73' y='4' width='2' height='26'/%3E%3Crect x='77' y='11' width='2' height='12'/%3E%3Crect x='81' y='8' width='2' height='18'/%3E%3Crect x='85' y='13' width='2' height='8'/%3E%3Crect x='89' y='5' width='2' height='24'/%3E%3Crect x='93' y='10' width='2' height='14'/%3E%3Crect x='97' y='14' width='2' height='6'/%3E%3Crect x='101' y='7' width='2' height='20'/%3E%3Crect x='105' y='11' width='2' height='12'/%3E%3Crect x='109' y='3' width='2' height='28'/%3E%3Crect x='113' y='9' width='2' height='16'/%3E%3Crect x='117' y='13' width='2' height='8'/%3E%3C/g%3E%3C/svg%3E") 0 50% / 120px 34px repeat-x;
  background: linear-gradient(90deg, rgba(243,240,232,.45) 0 23%, var(--accent) 23% 54%, rgba(243,240,232,.45) 54%);
  margin-left: 0;
}
.moment {
  position: absolute; top: 0; bottom: -4px;
  left: calc(30px + (100% - 30px) * var(--x) / 100); width: calc((100% - 30px) * var(--w) / 100 - 3px);
  border-top: 2px solid var(--accent); pointer-events: none;
}
.moment::before, .moment::after { content: ""; position: absolute; top: -2px; width: 8px; height: 10px; border: 2px solid var(--accent); border-bottom: 0; }
.moment::before { left: 0; border-right: 0; } .moment::after { right: 0; border-left: 0; }
.moment span { position: absolute; top: -22px; left: 0; font-size: .5625rem; letter-spacing: .12em; color: var(--accent); white-space: nowrap; }
.playhead {
  position: absolute; top: -18px; bottom: -6px; left: 30px; width: 2px; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  animation: playhead 9s linear infinite;
}
.playhead::before { content: ""; position: absolute; top: 0; left: -5px; width: 12px; height: 10px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
@keyframes playhead { from { transform: translateX(0); } to { transform: translateX(var(--run, 300px)); } }

/* ================= Sections ================= */
.block { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gutter) 0; }
.block-head { max-width: 40rem; margin-bottom: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow .ic { width: 16px; height: 16px; }
.h2 { margin: 0; font: 740 var(--t-h2)/.98 var(--f-display); font-stretch: 84%; letter-spacing: -.026em; font-variation-settings: "opsz" 72; text-wrap: balance; }
.h3 { margin: 0; font: 720 var(--t-h3)/1.02 var(--f-display); font-stretch: 86%; letter-spacing: -.03em; }
.sub { margin: 14px 0 0; color: var(--ink-2); font-size: var(--t-lg); line-height: 1.5; max-width: 34em; text-wrap: pretty; }

/* ===== Continue card ===== */
.continue { max-width: var(--max); margin: 24px auto 0; padding: 0 var(--gutter); }
.continue-card {
  display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none;
}
@media (min-width: 720px) { .continue-card { grid-template-columns: 1fr auto; align-items: center; padding: 22px 26px; } }
.continue-card .k { font-size: var(--t-xs); color: var(--mute); letter-spacing: .08em; text-transform: uppercase; }
.continue-card h3 { margin: 4px 0 12px; font: 700 1.375rem/1.1 var(--f-display); font-stretch: 88%; letter-spacing: -.02em; }

/* ===== Segmented progress (8 clips on a track) ===== */
.segs { display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); gap: 4px; position: relative; }
.segs i { height: 10px; border-radius: 3px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .4s var(--ease); }
.segs i.done { background: var(--ink); box-shadow: none; }
.segs i.now { background: repeating-linear-gradient(115deg, var(--ink) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1.5px var(--ink); }
.seg-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: var(--t-xs); color: var(--mute); letter-spacing: .05em; }
.seg-meta b { color: var(--ink); font-weight: 600; }

/* ===== Outline: lessons as clips on a timeline ===== */
.outline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 10px; }
@media (min-width: 900px) { .outline { grid-template-columns: 1fr 1fr; gap: 12px; } }
.lrow {
  position: relative; display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center;
  min-height: 84px; padding: 14px 16px 14px 14px; border-radius: var(--r-md); text-decoration: none;
  background: var(--card); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s;
}
.lrow:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.lrow .lic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); }
.lrow .lic .ic { width: 26px; height: 26px; }
.lrow .num { font: 500 var(--t-xs)/1 var(--f-mono); color: var(--mute); letter-spacing: .05em; }
.lrow h3 { margin: 5px 0 3px; font: 680 1.125rem/1.15 var(--f-display); font-stretch: 92%; letter-spacing: -.015em; }
.lrow p { margin: 0; font-size: var(--t-sm); color: var(--mute); line-height: 1.4; }
.lrow .state { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); color: var(--ink-2); transition: background-color .3s, color .3s, border-color .3s; }
.lrow .state .ic { width: 16px; height: 16px; }
.lrow:hover .state { border-color: var(--ink); color: var(--ink); }
.lrow.done .state { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lrow.done .lic { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lrow.finish { border-style: dashed; background: transparent; }
.lrow.finish.locked { color: var(--mute); }
.lrow.finish.locked h3 { color: var(--ink-2); }
.lrow.finish.open { border-style: solid; border-color: var(--accent); background: var(--card); }
.lrow.finish.open .lic { background: var(--accent); color: var(--ink); border-color: var(--accent); }
@media (min-width: 900px) { .lrow.finish { grid-column: 1 / -1; } }

/* ===== Honest card ===== */
.honest-card {
  position: relative; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-lg); background: var(--deck); color: var(--paper); overflow: hidden;
}
.honest-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(243,240,232,.06) 1px, transparent 1px) 0 0 / 24px 100%; pointer-events: none; }
.honest-card .eyebrow { color: var(--accent); }
.rules { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: r; }
@media (min-width: 860px) { .rules { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.rules li { position: relative; padding-top: 14px; border-top: 1px solid var(--deck-line); color: rgba(243,240,232,.72); font-size: var(--t-md); line-height: 1.5; }
.rules li b { display: block; color: var(--paper); font-weight: 600; margin-bottom: 4px; }

/* ===== FAQ ===== */
.faq { display: grid; border-top: 1px solid var(--line-2); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  list-style: none; display: grid; grid-template-columns: 1fr 28px; gap: 16px; align-items: center;
  padding: 18px 2px; min-height: 64px; cursor: pointer; font: 650 1.125rem/1.3 var(--f-display); font-stretch: 94%; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 22px; height: 22px; transition: transform .35s var(--ease); justify-self: end; }
.faq details[open] summary .ic { transform: rotate(45deg); color: var(--accent); }
.faq .ans { padding: 0 40px 20px 2px; color: var(--ink-2); }
.faq .ans p { margin: 0; }

/* ===== Final CTA ===== */
.final { text-align: left; padding-bottom: 20px; }
.final .btn { margin-top: 26px; }

/* ===== Footer ===== */
.foot { max-width: var(--max); margin: clamp(64px, 10vw, 120px) auto 0; padding: 22px var(--gutter) calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); color: var(--mute); font-size: var(--t-sm); display: grid; gap: 4px; }
.foot p { margin: 0; }
.foot .mono { font-size: var(--t-xs); letter-spacing: .08em; color: var(--ink-2); }
body.in-lesson .foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* ================= Lesson view ================= */
.lesson-bar {
  position: sticky; top: 64px; z-index: 20; padding: 10px var(--gutter) 12px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.lesson-bar-in { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.backlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 8px; margin-left: -8px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: var(--t-sm); }
.backlink:hover { background: var(--paper-2); }
.lesson-bar .segs a { display: block; padding: 8px 0; }
.lesson-bar .segs i { height: 8px; }
.lesson-bar .seg-meta { margin-top: 0; }

.lesson { max-width: 760px; margin: 0 auto; padding: 30px var(--gutter) 0; }
.lesson-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; }
.lesson-head .eyebrow { margin-bottom: 12px; }
.lesson-title { margin: 0; font: 760 clamp(2.25rem, 1.4rem + 4.4vw, 4rem)/.95 var(--f-display); font-stretch: 82%; letter-spacing: -.028em; font-variation-settings: "opsz" 96; text-wrap: balance; }
.lesson-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--ink); color: var(--paper); transform: rotate(-4deg); box-shadow: 4px 4px 0 var(--accent); }
.lesson-icon .ic { width: 34px; height: 34px; stroke-width: 1.6; }
.lesson-body { margin-top: 26px; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.lesson-body p { margin: 0 0 1em; max-width: 38em; }
.lesson-body strong { color: var(--ink); font-weight: 650; }
.lesson-body h3 { margin: 1.8em 0 .5em; color: var(--ink); font: 700 1.375rem/1.15 var(--f-display); font-stretch: 90%; letter-spacing: -.02em; }
.lesson-body ul { margin: 0 0 1.1em; padding: 0; list-style: none; display: grid; gap: 8px; }
.lesson-body li { position: relative; padding-left: 22px; }
.lesson-body li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 10px; height: 2px; background: var(--ink); }
.lesson-body .tcode { font: 500 .9em var(--f-mono); background: var(--paper-2); padding: 1px 6px; border-radius: 5px; color: var(--ink); white-space: nowrap; }
.callout { margin: 1.4em 0; padding: 16px 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-2); }
.callout .k { display: flex; align-items: center; gap: 8px; font: 600 var(--t-xs)/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

.checklist { margin-top: 34px; padding: 20px; border-radius: var(--r-lg); background: var(--deck); color: var(--paper); }
.checklist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.checklist-head h2 { margin: 0; font: 720 1.375rem/1.1 var(--f-display); font-stretch: 88%; letter-spacing: -.02em; }
.checklist-head .mono { font-size: var(--t-xs); color: rgba(243,240,232,.74); letter-spacing: .05em; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; }
.check {
  display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start;
  padding: 14px 4px; min-height: 56px; cursor: pointer; border-top: 1px solid var(--deck-line);
  -webkit-tap-highlight-color: transparent;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid rgba(243,240,232,.4);
  display: grid; place-items: center; transition: background-color .25s, border-color .25s, transform .3s var(--ease-snap);
}
.check .box .ic { width: 16px; height: 16px; stroke-width: 2.4; color: var(--deck); stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s var(--ease) .05s; }
.check .txt { color: rgba(243,240,232,.86); line-height: 1.45; padding-top: 2px; transition: color .25s; }
.check:hover .box { border-color: var(--paper); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 3px; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.check input:checked + .box .ic { stroke-dashoffset: 0; color: #fff; }
.check input:checked ~ .txt { color: rgba(243,240,232,.5); text-decoration: line-through; text-decoration-color: rgba(243,240,232,.35); }

.lesson-done-note { margin: 16px 0 0; display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: var(--ink-2); }
.lesson-done-note .ic { color: var(--accent); }

/* bottom action dock: thumb zone on phones */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.dock-in { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; align-items: center; }
.dock .btn { width: 100%; padding: 0 1em; }
.dock .sq { width: 52px; height: 52px; padding: 0; border-radius: 16px; }
.dock .sq .ic { width: 22px; height: 22px; }
.btn-done { background: var(--ink); color: var(--paper); }
.btn-done.is-done { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-done.is-done .ic { color: var(--accent); }

/* lesson mascot (corner) */
.lesson-mascot { position: fixed; right: max(10px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); width: 92px; z-index: 24; pointer-events: auto; }
@media (min-width: 1100px) { .lesson-mascot { width: 140px; right: 32px; bottom: 110px; } }

/* ================= Mascot ================= */
.mascot { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.snip { width: 100%; height: auto; overflow: visible; }
.snip .ink { fill: var(--ink); }
.snip .screen { fill: var(--paper); }
.snip .sprockets rect { fill: var(--paper); opacity: .92; }
.snip .stripe { fill: var(--paper); }
.snip .hinge { fill: var(--accent); }
.snip .recdot { fill: var(--accent); animation: rec 1.4s ease-in-out infinite; }
.snip .eye ellipse { fill: var(--ink); }
.snip .glint { fill: var(--paper); }
.snip .m-legs path, .snip .m-arm path { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.snip .m-arm circle { fill: var(--ink); }
.snip .mo { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .15s; }
.snip .mo-open { fill: var(--ink); }
.snip .mo-o { fill: var(--ink); stroke: none; }
.snip .cheek { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; opacity: 0; transition: opacity .3s; }
.snip .m-shadow { fill: rgba(18,18,17,.14); transform-box: fill-box; transform-origin: center; }
.snip .m-think { fill: var(--ink); opacity: 0; }
.snip .m-think circle { transform-box: fill-box; transform-origin: center; }

.snip .m-all { transform-box: view-box; transform-origin: 80px 166px; }
.snip .m-clap { transform-box: view-box; transform-origin: 34px 50px; transition: transform .3s var(--ease-spring); }
.snip .m-arm-l { transform-box: view-box; transform-origin: 31px 104px; transition: transform .45s var(--ease-spring); }
.snip .m-arm-r { transform-box: view-box; transform-origin: 129px 104px; transition: transform .45s var(--ease-spring); }
.snip .m-eyes { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease); }
.snip .eye { transform-box: fill-box; transform-origin: center; }

/* idle: breathing bob + blink + small clapper twitch */
.m-idle .m-all, .m-wave .m-all, .m-think .m-all { animation: bob 3.2s ease-in-out infinite; }
.m-idle .m-shadow, .m-wave .m-shadow, .m-think .m-shadow { animation: shadow 3.2s ease-in-out infinite; }
.mascot .eye { animation: blink 5.2s infinite; }
.mascot .eye + .eye { animation-delay: .02s; }
.m-idle .mo-idle, .m-wave .mo-idle { opacity: 1; }
.m-idle .m-clap { animation: clapIdle 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes shadow { 50% { transform: scaleX(.9); opacity: .75; } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.1); } }
@keyframes clapIdle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-12deg); } 80% { transform: rotate(0); } 84% { transform: rotate(-6deg); } 87% { transform: rotate(0); } }

/* wave */
.m-wave .m-arm-r { animation: wave 1.1s var(--ease) 1 both; }
.m-wave .cheek { opacity: 1; }
@keyframes wave { 0% { transform: rotate(0); } 22% { transform: rotate(-128deg); } 40% { transform: rotate(-104deg); } 58% { transform: rotate(-132deg); } 76% { transform: rotate(-106deg); } 100% { transform: rotate(-118deg); } }

/* think: hand up, eyes drift up-left, bubble dots */
.m-think .m-arm-r { transform: rotate(-150deg); }
.m-think .m-eyes { transform: translate(-3px, -4px); }
.m-think .mo-o { opacity: 1; }
.m-think .m-think { opacity: 1; }
.m-think .m-think circle { animation: dot 1.4s ease-in-out infinite; }
.m-think .m-think circle:nth-child(2) { animation-delay: .18s; }
.m-think .m-think circle:nth-child(3) { animation-delay: .36s; }
@keyframes dot { 0%, 100% { transform: scale(.6); opacity: .35; } 40% { transform: scale(1); opacity: 1; } }

/* cheer: jump, both arms up, clapper snaps */
.m-cheer .m-all { animation: jump .9s var(--ease) 2; }
.m-cheer .m-shadow { animation: shadowJump .9s var(--ease) 2; }
.m-cheer .m-arm-l { transform: rotate(118deg); }
.m-cheer .m-arm-r { transform: rotate(-118deg); }
.m-cheer .mo-open { opacity: 1; }
.m-cheer .cheek { opacity: 1; }
.m-cheer .m-clap { animation: snap .45s var(--ease) 4; }
.m-cheer .eye { animation: none; transform: scaleY(.55); }
@keyframes jump { 0% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(2px) scale(1.06, .92); } 45% { transform: translateY(-26px) scale(.97, 1.04); } 75% { transform: translateY(0) scale(1.04, .95); } 100% { transform: translateY(0) scale(1); } }
@keyframes shadowJump { 45% { transform: scaleX(.6); opacity: .4; } }
@keyframes snap { 0% { transform: rotate(0); } 35% { transform: rotate(-28deg); } 70%, 100% { transform: rotate(0); } }

/* nod: small acknowledgement on each checklist tick */
.m-nod .m-all { animation: nod .5s var(--ease); }
.m-nod .mo-idle { opacity: 1; }
.m-nod .cheek { opacity: 1; }
@keyframes nod { 30% { transform: translateY(3px) rotate(-3deg); } 65% { transform: translateY(-3px) rotate(2deg); } }

/* speech bubble: a caption card with a timecode */
.bubble {
  position: absolute; bottom: calc(100% - 14px); right: 40%; min-width: 150px; max-width: 220px;
  padding: 9px 12px 10px; border-radius: 12px 12px 4px 12px; background: var(--ink); color: var(--paper);
  font: 500 .8125rem/1.35 var(--f-text); text-align: left;
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: 100% 100%;
  transition: opacity .25s, transform .35s var(--ease-snap); pointer-events: none;
}
.bubble.show { opacity: 1; transform: none; }
.bubble .tc { display: block; font: 500 .6875rem/1 var(--f-mono); color: var(--accent); letter-spacing: .08em; margin-bottom: 4px; }
.stage-mascot .bubble { right: auto; left: 72%; bottom: 66%; border-radius: 12px 12px 12px 4px; transform-origin: 0 100%; }

/* confetti: cut markers */
.confetti { position: fixed; pointer-events: none; z-index: 60; width: 10px; height: 14px; }
.confetti.a { background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); }
.confetti.b { background: var(--ink); width: 4px; height: 16px; border-radius: 1px; }
.confetti.c { border: 2px solid var(--ink); border-right: 0; width: 7px; height: 14px; }

/* toast */
.toast {
  position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top)); z-index: 70;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: var(--t-sm); box-shadow: 0 14px 30px -14px rgba(0,0,0,.6);
  transform: translate(-50%, -16px); opacity: 0; transition: transform .45s var(--ease-snap), opacity .25s; pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .mono { color: var(--accent); font-size: var(--t-xs); }

/* ================= Entrances ================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
.view-lesson .lesson > * { animation: up .7s var(--ease) both; }
.view-lesson .lesson > *:nth-child(2) { animation-delay: .06s; }
.view-lesson .lesson > *:nth-child(3) { animation-delay: .12s; }
@keyframes up { from { opacity: 0; transform: translateY(16px); } }

/* ================= Reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .bg-track, .bg-grain, .bg-sprocket, .playhead, .rec, .snip .recdot { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
