/* css/site.css — the site shell: header, hero, section frames, "What you’ll learn", "Your version", the workshop,
   footer. Unprefixed semantic classes (BRIEF §8). Tokens come from css/tokens.css (linked first).
   Mount points owned by other modules: #pals-cards (pals.css), #game + #xray (game.css), #studio-app (studio.css). */

/* ───────────────────────────────────────────── base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
  background: var(--paper);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--cobalt); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--cobalt-ink); }
b, strong { font-weight: 650; }
::selection { background: rgba(35, 64, 255, .18); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: fixed; left: 12px; top: 10px; z-index: 200; padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 600 14px/1 var(--display); text-decoration: none;
  transform: translateY(-160%); transition: transform .2s var(--ease-swift);
}
.skip:focus { transform: none; color: var(--paper); }

/* ───────────────────────────────────────────── buttons + chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font: 650 16px/1 var(--display); letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .22s var(--ease-swift), background-color .22s var(--ease-swift), border-color .22s, box-shadow .22s, color .22s;
}
.btn > span[aria-hidden] { font-size: .8em; }
.btn--primary { background: var(--cobalt); color: #FFFFFF; box-shadow: 0 12px 26px -14px rgba(35, 64, 255, .9); }
.btn--primary:hover { background: var(--cobalt-ink); color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(35, 64, 255, .95); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(18, 19, 24, .2); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink); background: rgba(255, 253, 248, .7); }
.btn--night { background: var(--paper); color: var(--ink); }
.btn--night:hover { background: #FFFFFF; color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: var(--r-pill);
  border: 1.5px solid var(--ink); color: var(--ink);
  font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}

/* ───────────────────────────────────────────── header */
.top {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
/* the frosted glass lives on a pseudo layer: a backdrop-filter on .top itself would become the containing block of
   the fixed menu sheet */
.top::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(244, 241, 234, .86);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
}
.top.is-scrolled { border-bottom-color: var(--line); }
html.menu-open .top::before { background: var(--paper); }
.top__in {
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  height: 64px; width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
}
.brand {
  display: inline-flex; align-items: baseline; flex: none;
  color: var(--ink); text-decoration: none;
  font: 860 23px/1 var(--display); letter-spacing: -.04em; font-variation-settings: 'opsz' 40;
  padding: 6px 2px;
}
.brand:hover { color: var(--ink); }
.brand__dot {
  display: inline-block; width: .25em; height: .25em; margin-left: .06em; border-radius: 50%; background: var(--cobalt);
  transition: transform .35s var(--ease-back);
}
.brand:hover .brand__dot { transform: translateY(-.28em); }

.nav { flex: 1; min-width: 0; display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2); text-decoration: none; cursor: pointer; white-space: nowrap;
  font: 540 14.5px/1 var(--display); letter-spacing: -.005em;
  transition: color .2s, background-color .2s;
}
.nav__link:hover { color: var(--ink); background: rgba(18, 19, 24, .055); }
.nav__link[aria-current] { color: var(--ink); }
.nav__link[aria-current]::after {
  content: ''; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--cobalt);
}
.nav__link[data-film-replay]::before {
  content: ''; width: 0; height: 0; margin-right: 7px;
  border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}

.top__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tog {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1.5px solid rgba(18, 19, 24, .16); border-radius: 50%; background: transparent; color: var(--ink);
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.tog[hidden] { display: none; }
.tog:hover { border-color: var(--ink); background: rgba(255, 253, 248, .8); }
.tog__i { grid-area: 1 / 1; width: 19px; height: 19px; fill: currentColor; }
.tog__i .s { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.tog__i--on { display: none; }
.tog[aria-pressed='true'] .tog__i--on { display: block; }
.tog[aria-pressed='true'] .tog__i--off { display: none; }
#tog-sound[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#tog-still[aria-pressed='true'] { background: var(--cobalt); border-color: var(--cobalt); color: #FFFFFF; }
.tog__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tog::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 10px); right: -6px; z-index: 5;
  padding: 7px 10px; border-radius: 8px; background: var(--ink); color: var(--paper);
  font: 500 10.5px/1.2 var(--mono); letter-spacing: .06em; white-space: nowrap;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s, transform .18s;
}
.tog:hover::after, .tog:focus-visible::after { opacity: 1; transform: none; }
.tog:not([data-tip])::after { display: none; }

.menu-btn {
  display: none; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 12px; border-radius: var(--r-pill);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer;
  font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.menu-btn__bars { position: relative; width: 14px; height: 10px; }
.menu-btn__bars i { position: absolute; left: 0; right: 0; height: 1.8px; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease-swift), top .25s var(--ease-swift); }
.menu-btn__bars i:first-child { top: 1px; }
.menu-btn__bars i:last-child { top: 7px; }
.menu-btn[aria-expanded='true'] .menu-btn__bars i:first-child { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded='true'] .menu-btn__bars i:last-child { top: 4px; transform: rotate(-45deg); }

.menu {
  position: fixed; left: 0; right: 0; top: 64px; bottom: 0; z-index: 59; overflow: auto; overscroll-behavior: contain;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 20px var(--gutter) 32px;
}
.menu[hidden] { display: none; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li { border-bottom: 1px solid var(--line); }
.menu__link {
  display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 16px 2px; border: 0; background: none; text-align: left;
  color: var(--ink); text-decoration: none; cursor: pointer;
  font: 880 clamp(28px, 8vw, 40px)/1.05 var(--display); letter-spacing: -.035em; font-variation-settings: 'opsz' 60;
}
.menu__link span { flex: none; width: 2.2em; color: var(--cobalt); font: 600 12px/1 var(--mono); letter-spacing: .1em; }
.menu__link:hover, .menu__link[aria-current] { color: var(--cobalt); }
.menu__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 0; color: var(--ink-2); font: 400 italic 17px/1.4 var(--human); }
html.menu-open { overflow: hidden; }

@media (max-width: 1179px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .top__tools { margin-left: auto; }
}
@media (min-width: 1180px) { .menu { display: none !important; } }
@media (max-width: 559px) {
  .top__in { height: 58px; }
  .top__tools > .chip { display: none; }
  .menu { top: 58px; }
  .brand { font-size: 21px; padding: 10px 2px; }
  /* the most-used controls on a phone: 44 px targets (the 58 px bar still fits them) */
  .tog { width: 44px; height: 44px; }
  .menu-btn { height: 44px; }
}
@media (max-width: 359px) {
  /* 320 px phones: tighter gaps keep the bar inside the screen */
  .top__in { gap: 8px; }
  .top__tools { gap: 4px; }
  .menu-btn { padding: 0 11px 0 10px; gap: 7px; }
}

/* ───────────────────────────────────────────── section frame */
.sec { position: relative; padding: clamp(96px, 11vw, 160px) 0 0; }
.sec__label { display: flex; align-items: center; gap: 16px; margin: 0 0 clamp(28px, 3.6vw, 44px); }
.label {
  margin: 0; color: var(--ink-2); white-space: nowrap;
  font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.label b { color: var(--cobalt); font-weight: 600; }
.label__rule { flex: 1; min-width: 24px; height: 1px; background: var(--line); }
.label__meta { margin: 0; color: var(--ink-3); font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }

.sec__intro {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 5vw, 88px); align-items: end;
  margin: 0 0 clamp(40px, 5vw, 72px);
}
h2 {
  margin: 0; max-width: 13ch;
  font: 900 clamp(44px, 6.6vw, 104px)/.92 var(--display); letter-spacing: -.044em; font-variation-settings: 'opsz' 144;
  text-wrap: balance;
}
h2 i, .yours__title i, .bring__big i {
  font-family: var(--human); font-style: italic; font-weight: 400; letter-spacing: -.03em; font-variation-settings: normal;
}
.lede { margin: 0; max-width: 46ch; color: var(--ink-2); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.52; text-wrap: pretty; }
.lede b { color: var(--ink); }

.note {
  display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 0; max-width: 52ch;
  color: var(--ink-2); font: 500 12px/1.55 var(--mono); letter-spacing: .02em;
}
.note__dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(127, 216, 184, .25); }

@media (max-width: 859px) {
  .sec__intro { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .label__meta { display: none; }
}

/* reveal on scroll (subtle; reduced motion = no movement) */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-swift), transform 1s var(--ease-swift); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js [data-reveal] { opacity: 1; transform: none; transition: none; } }
html.is-reduced [data-reveal] { opacity: 1; transform: none; transition: none; }
html.is-reduced main *, html.is-reduced main *::before, html.is-reduced main *::after { animation: none !important; }

/* mount points (other modules fill them) */
.mount { position: relative; }
.mount:has(> .mount__wait) { min-height: 420px; display: grid; place-items: center; border-radius: var(--r-card); background: rgba(236, 231, 220, .55); border: 1.5px dashed rgba(18, 19, 24, .12); }
.mount--game:has(> .mount__wait) { min-height: 640px; }
.mount--xray:has(> .mount__wait) { min-height: 640px; }
.mount--studio:has(> .mount__wait) { min-height: 720px; }
.mount--pals:has(> .mount__wait) { min-height: 620px; }
.mount__wait { margin: 0; padding: 24px; max-width: 34ch; text-align: center; color: var(--ink-3); font: 500 12px/1.6 var(--mono); letter-spacing: .06em; }
.mount__egg {
  display: block; width: 34px; height: 44px; margin: 0 auto 14px; border-radius: 50% 50% 48% 48% / 58% 58% 42% 42%;
  background: var(--cobalt); animation: egg-wobble 1.6s ease-in-out infinite; transform-origin: 50% 100%;
}
@keyframes egg-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.mount__fail { margin: 0; padding: 28px; max-width: 42ch; text-align: center; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.mount__fail .btn { margin-top: 16px; }

/* ───────────────────────────────────────────── 01 hero */
.hero { position: relative; padding: clamp(28px, 5.4vh, 64px) 0 clamp(8px, 2vh, 24px); overflow: clip; }
.hero__head { position: relative; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 clamp(18px, 2.6vw, 34px);
  color: var(--ink-2); font: 500 11.5px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); }
.hero__title {
  --h1: clamp(64px, 8.2vw, 128px);
  position: relative; z-index: 1; margin: 0; width: fit-content;
  font: 800 var(--h1)/.9 var(--display); letter-spacing: -.045em;
  font-variation-settings: 'opsz' 144;
  color: var(--ink);
}
.hero__title .ln { display: block; white-space: nowrap; }
.hero__title:focus { outline: none; }
.hero__title:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 10px; border-radius: 10px; }
.hero__dot {
  display: inline-block; width: .19em; height: .19em; margin-left: .045em; border-radius: 50%;
  background: var(--cobalt); vertical-align: baseline;
  transition: transform .5s var(--ease-back);
  will-change: transform;
}
/* the per-letter swell (js/site.mjs): every letter box is locked to its rest advance, so weight / grade / optical
   size change the ink, never the layout */
.h1-vis .w { white-space: nowrap; }
.h1-vis .ch { font-variation-settings: 'wght' var(--wg, var(--rest-w, 800)), 'wdth' var(--wd, 100), 'opsz' 144; }
.foot__mark { --rest-w: 900; }
.foot__mark .ln { white-space: nowrap; }
.foot__dot { transition: transform .5s var(--ease-back); }
.h1-vis.is-locked .ch { display: inline-flex; justify-content: center; }
.h1-probe { display: inline-block; width: 0; height: 0; vertical-align: baseline; }

/* the red thread: under "playable." and on to the pals (desktop); the canvas draws its own part */
.hero__thread {
  position: absolute; left: var(--th-l, 0px); top: var(--th-t, 0px); width: var(--th-w, 0px); height: 2px; border-radius: 2px;
  background: var(--thread); opacity: .95; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - var(--th-fade, 60px)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - var(--th-fade, 60px)), transparent 100%);
  display: none;
}
.hero__thread::after {
  /* running stitches, like the canvas thread */
  content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 4px;
  background: repeating-linear-gradient(90deg, transparent 0 16px, rgba(229, 53, 43, .5) 16px 22px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 120px);
  mask-image: linear-gradient(90deg, transparent, #000 120px);
  transform: skewY(-28deg); transform-origin: 0 0;
}
.hero__thread--r {
  left: var(--thr-l, 0px); width: var(--thr-w, 0px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--thr-in, 60px), #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--thr-in, 60px), #000 calc(100% - 48px), transparent 100%);
}
.hero__thread--r::after { -webkit-mask-image: none; mask-image: none; }
.hero__stage { position: relative; }
.hero__stage canvas { display: block; width: 100%; height: 100%; }
.hero__try {
  position: absolute; right: 0; bottom: 2px; margin: 0; pointer-events: none;
  color: var(--ink-3); font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
}
.hero--beside .hero__thread { display: block; }
.hero--beside .hero__stage {
  position: absolute; z-index: 2; left: var(--st-l, 55%); top: var(--st-t, 0px); width: var(--st-w, 45%); height: var(--st-h, 100%);
  margin: 0;
}
.hero--beside .hero__try { right: calc(var(--st-bleed, 0px) + 4px); bottom: 0; }
.hero:not(.hero--beside) .hero__stage {
  height: clamp(250px, 58vw, 380px); margin: clamp(4px, 2vw, 18px) calc(-1 * var(--gutter)) 0;
}
.hero:not(.hero--beside) .hero__try { right: var(--gutter); }

.hero__body {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: clamp(28px, 6vw, 112px); row-gap: clamp(36px, 4.4vw, 60px);
  align-items: start; margin-top: clamp(40px, 4.6vw, 64px);
}
.hero__lede {
  margin: 0; max-width: 25ch;
  font: 600 clamp(22px, 2vw, 30px)/1.24 var(--display); letter-spacing: -.022em; color: var(--ink);
  font-variation-settings: 'opsz' 40;
  text-wrap: balance;
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 2.4vw, 32px); }
.hero__side { padding-top: 4px; }
.hero__more { margin: 0; max-width: 50ch; color: var(--ink-2); font-size: clamp(16px, 1.15vw, 17.5px); line-height: 1.6; text-wrap: pretty; }
.kicker { margin: 16px 0 0; max-width: 34ch; font: italic 400 clamp(20px, 1.6vw, 24px)/1.32 var(--human); letter-spacing: -.01em; color: var(--ink); }

/* the workshop at a glance: an OPUS-style HUD strip */
.spec { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.spec > div { padding: 14px 18px 0 0; }
.spec > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.spec dt { margin: 0 0 6px; color: var(--ink-3); font: 500 10.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.spec dd { margin: 0; font: 620 16px/1.3 var(--display); letter-spacing: -.01em; }

@media (max-width: 1023px) {
  .hero__body { grid-template-columns: minmax(0, 1fr); }
  .hero__lede { max-width: 28ch; }
}
@media (max-width: 759px) {
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .spec > div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 1023px) {
  .hero__title { --h1: clamp(56px, 11.4vw, 112px); }
}
@media (max-width: 599px) {
  .hero__title { --h1: clamp(38px, 15.6vw, 72px); line-height: .92; }
  .eyebrow { font-size: 10.5px; letter-spacing: .12em; align-items: flex-start; }
  .eyebrow__dot { margin-top: 4px; }
  .cta .btn { flex: 1 1 100%; }
}

/* ───────────────────────────────────────────── 03 play */
.play { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(16px, 2.6vw, 40px); align-items: start; }
@media (max-width: 979px) { .play { grid-template-columns: minmax(0, 1fr); } }

/* ───────────────────────────────────────────── 04 learn (night glass) */
.sec--night {
  margin: clamp(96px, 12vw, 176px) clamp(6px, 1.1vw, 18px) 0;
  padding: clamp(80px, 10vw, 150px) 0 clamp(80px, 10vw, 140px);
  border-radius: clamp(26px, 3.6vw, 52px);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(35, 64, 255, .16), transparent 60%),
    var(--night);
  color: var(--paper);
  --night-2: rgba(244, 241, 234, .66);
  --night-3: rgba(244, 241, 234, .52); /* 5.1:1 on the night ground: small mono labels pass AA */
  --night-line: rgba(244, 241, 234, .12);
  --cobalt-lift: #7086FF;
}
.sec--night .label { color: var(--night-2); }
.sec--night .label b { color: var(--cobalt-lift); }
.sec--night .label__rule { background: var(--night-line); }
.sec--night .label__meta { color: var(--night-3); }
.sec--night .lede { color: var(--night-2); }
.sec--night a { color: #A9B6FF; }
.sec--night a:hover { color: #FFFFFF; }
.sec--night :focus-visible { outline-color: #A9B6FF; }

.steps-wrap { position: relative; }
.steps { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; }
.step {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) minmax(0, 340px); gap: clamp(20px, 3.2vw, 56px);
  align-items: start; padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--night-line);
}
.step:last-child { border-bottom: 1px solid var(--night-line); }
.step__mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 2px 0 0 24px; }
.step__mark span {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--night); color: var(--night-3);
  font: 600 13px/1 var(--mono); letter-spacing: .06em;
  transition: color .5s ease, background-color .5s ease;
}
.step.is-lit .step__mark span { color: var(--paper); background: #1A1C27; }
.step__kicker { margin: 0 0 12px; color: var(--cobalt-lift); font: 600 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.step__title {
  margin: 0 0 16px; max-width: 18ch;
  font: 860 clamp(28px, 3.1vw, 46px)/1.02 var(--display); letter-spacing: -.035em; font-variation-settings: 'opsz' 96;
  text-wrap: balance;
}
.step__main > p:not([class]) { margin: 0; max-width: 58ch; color: var(--night-2); font-size: clamp(16.5px, 1.2vw, 18.5px); line-height: 1.6; }
.step__main dfn { font-style: normal; font-weight: 650; color: var(--paper); border-bottom: 1.5px dotted rgba(244, 241, 234, .55); }
.gloss {
  display: inline-block; margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; max-width: 58ch;
  background: rgba(244, 241, 234, .06); color: var(--night-2); font-size: 15px; line-height: 1.5;
}
.gloss dfn { border: 0; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 24px; max-width: 720px; }
.pair__item { padding: 16px 18px 18px; border-radius: 16px; border: 1px solid var(--night-line); background: rgba(244, 241, 234, .03); }
.pair__item:first-child { border-color: rgba(112, 134, 255, .32); background: rgba(35, 64, 255, .08); }
.pair__item p { margin: 0; color: var(--night-2); font-size: 15px; line-height: 1.5; }
.pair__item .pair__k { margin: 0 0 8px; color: var(--paper); font: 600 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.pair__item:first-child .pair__k::before { content: '↑ '; color: var(--cobalt-lift); }
.pair__item:last-child .pair__k::before { content: '→ '; color: var(--mint); }
.lane { display: inline-block; padding: 1px 7px 2px; border-radius: 6px; font: 600 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; }
.lane--server { background: rgba(112, 134, 255, .2); color: #B9C3FF; }
.lane--db { background: rgba(127, 216, 184, .16); color: var(--mint); }
.lane--auto { background: rgba(244, 207, 93, .16); color: var(--usagi); }

.step__fig { margin: 0; padding-top: 6px; }
.dia { display: block; width: 100%; height: auto; overflow: visible; }
.dia-card { fill: rgba(244, 241, 234, .035); stroke: rgba(244, 241, 234, .42); stroke-width: 1.4; stroke-linejoin: round; }
.dia-bar { fill: rgba(244, 241, 234, .26); }
.dia-bar--hi { fill: var(--cobalt-lift); }
.dia-t { font: 500 9px var(--mono); letter-spacing: .14em; fill: var(--night-3); }
.dia-t--h { font-size: 8.5px; fill: var(--night-3); }
.dia-t--b { font-size: 11px; letter-spacing: .01em; fill: var(--paper); }
.dia-t--hi { fill: var(--mint); font-weight: 600; }
.dia-t--k { font-size: 10px; font-weight: 600; letter-spacing: .12em; fill: var(--cobalt-lift); }
.dia-t--c { font-size: 7.5px; letter-spacing: .1em; text-anchor: middle; fill: var(--paper); }
.dia-arrow, .dia-head { fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dia-screen { fill: rgba(244, 241, 234, .05); stroke: var(--paper); stroke-width: 1.6; }
.dia-notch { fill: rgba(244, 241, 234, .3); }
.dia-egg { fill: var(--cobalt); stroke: #A9B6FF; stroke-width: 1.4; }
.dia-shadow { fill: rgba(244, 241, 234, .1); }
.dia-btn { fill: var(--cobalt); }
.dia-slot { fill: rgba(244, 241, 234, .06); stroke: rgba(244, 241, 234, .3); stroke-width: 1.2; }
.dia-led { fill: var(--mint); }
.dia-flow { fill: none; stroke: rgba(244, 241, 234, .6); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 2 8; }
.dia-base { stroke: var(--paper); stroke-width: 2; stroke-linecap: round; }
.dia-rule { stroke: rgba(244, 241, 234, .2); stroke-width: 1; }
.dia-row { fill: rgba(127, 216, 184, .12); stroke: rgba(127, 216, 184, .55); stroke-width: 1.2; }
.dia-tick { fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dia-gear path, .dia-gear circle { fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linejoin: round; }
.dia-gear { transform-box: fill-box; transform-origin: center; }
.dia-ring { fill: none; stroke: rgba(244, 241, 234, .35); stroke-width: 1.6; stroke-dasharray: 3 6; }
.dia-node { fill: var(--night); stroke: var(--paper); stroke-width: 1.6; }
.dia-play, .dia-dot { fill: var(--cobalt-lift); }
@media (prefers-reduced-motion: no-preference) {
  .dia-flow { animation: dia-flow 1.1s linear infinite; }
  .dia-flow--2 { animation-delay: -.35s; }
  .dia-flow--3 { animation-delay: -.7s; }
  .dia-led { animation: dia-blink 1.8s ease-in-out infinite; }
  .dia-led--2 { animation-delay: -.6s; }
  .dia-led--3 { animation-delay: -1.2s; }
  .dia-gear { animation: dia-spin 9s linear infinite; }
  .dia-row { animation: dia-row 3.2s ease-in-out infinite; }
}
@keyframes dia-flow { to { stroke-dashoffset: -20; } }
@keyframes dia-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes dia-spin { to { transform: rotate(360deg); } }
@keyframes dia-row { 0%, 100% { fill: rgba(127, 216, 184, .08); } 50% { fill: rgba(127, 216, 184, .22); } }

/* the one red thread through the five steps (drawn with scroll by js/site.mjs; fully drawn when reduced) */
.steps__thread { position: absolute; left: 0; top: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.steps__thread path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.steps__thread-under { stroke: rgba(244, 241, 234, .13); stroke-width: 1.5; stroke-dasharray: 2 7; }
.steps__thread-line { stroke: var(--thread); stroke-width: 2.4; filter: drop-shadow(0 0 6px rgba(229, 53, 43, .45)); }
.steps__needle { fill: #FFB3AC; stroke: var(--thread); stroke-width: 2; opacity: 0; transition: opacity .3s; }
.steps__needle.is-on { opacity: 1; }
.steps.is-z .step__mark span { position: relative; z-index: 1; }

@media (max-width: 1099px) {
  .step { grid-template-columns: 88px minmax(0, 1fr); }
  .step__mark { margin-left: 12px; }
  .step__fig { grid-column: 2; max-width: 360px; }
}
@media (max-width: 679px) {
  .step { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
  .step__mark { width: 40px; height: 40px; margin: 0; }
  .step__mark span { width: 36px; height: 36px; font-size: 11px; }
  .step__fig { max-width: 100%; }
  .pair { grid-template-columns: minmax(0, 1fr); }
}

/* ───────────────────────────────────────────── 05 your version */
.yours__title {
  margin: 0 0 clamp(26px, 3vw, 40px); max-width: none;
  font: 900 clamp(48px, 8.4vw, 136px)/.9 var(--display); letter-spacing: -.048em; font-variation-settings: 'opsz' 144;
}
.yours__title span { display: inline-block; }
.yours__title span:nth-child(2) { color: var(--ink-2); }
.yours__title i { color: var(--cobalt); }
.yours__intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: clamp(36px, 4.5vw, 64px); }
.yours__intro .lede { max-width: 52ch; }
.yours__aside { margin: 0; white-space: nowrap; font: italic 400 19px/1.3 var(--human); color: var(--ink-2); }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); align-items: start; }
.idea {
  overflow: hidden; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease-swift), box-shadow .35s var(--ease-swift);
}
.idea:nth-child(even) { margin-top: clamp(0px, 4vw, 56px); }
.idea:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-2); }
.idea__art { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.idea__art svg { display: block; width: 100%; height: auto; }
.idea__body { padding: 18px 20px 22px; }
.idea__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; color: var(--ink-3); font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.idea__fmt { padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--paper); }
.idea h3 { margin: 0 0 8px; font: 820 23px/1.08 var(--display); letter-spacing: -.028em; }
.idea__body > p:last-child { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.yours__foot { margin: clamp(28px, 3vw, 44px) 0 0; max-width: 60ch; color: var(--ink-2); font: italic 400 19px/1.45 var(--human); }

.i-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-paper { fill: var(--card); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.i-soft { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.6; }
.i-fill-cobalt { fill: var(--cobalt); stroke: var(--ink); stroke-width: 2; }
.i-dash { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-dasharray: 1 7; stroke-linecap: round; }
.i-flame { fill: var(--card); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.i-stars path { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.i-stars circle { fill: var(--ink); }
.i-chip rect { fill: var(--card); stroke: var(--ink); stroke-width: 1.6; }
.i-chip text, .i-gauge text, .i-tag text, .i-caption, .i-ticket text { font-family: var(--mono); font-weight: 600; letter-spacing: .1em; }
.i-chip text { font-size: 9px; text-anchor: middle; fill: var(--ink); }
.i-chip--hi rect { fill: var(--cobalt); }
.i-chip--hi text { fill: #FFFFFF; }
.i-gauge text { font-size: 9px; fill: var(--ink); }
.i-gauge rect { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; }
.i-gauge rect.on { fill: var(--mint); }
.i-leaf { fill: var(--mint); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.i-drop { fill: var(--cobalt); }
.i-tag rect { fill: var(--card); stroke: var(--ink); stroke-width: 1.6; }
.i-tag text { font-size: 8px; fill: var(--ink-2); }
.i-tag text.b { font: 750 13px var(--display); letter-spacing: -.01em; fill: var(--ink); }
.i-tag--hi rect { fill: var(--mint); }
.i-tag--hi text { font-size: 8.5px; text-anchor: middle; fill: var(--ink); }
.i-caption { font-size: 8.5px; fill: var(--ink-3); }
.i-caption--c { text-anchor: middle; }
.i-frame { fill: var(--paper-2); stroke: var(--ink); stroke-width: 2; }
.i-frame--new { fill: rgba(255, 253, 248, .6); stroke-dasharray: 4 5; }
.i-q { font: 850 26px var(--display); fill: var(--stone); text-anchor: middle; }
.i-awning { fill: var(--card); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.i-slice { fill: var(--mint); }
.i-ticket path { fill: var(--card); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.i-ticket text { font-size: 8.5px; fill: var(--ink-2); }
.i-ticket text.big { font: 900 30px var(--display); letter-spacing: -.02em; fill: var(--cobalt); }

@media (max-width: 1099px) {
  .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .ideas { grid-template-columns: minmax(0, 1fr); }
  .idea:nth-child(even) { margin-top: 0; }
  .yours__intro { display: block; }
  .yours__aside { margin-top: 18px; }
}

/* ───────────────────────────────────────────── 07 workshop */
.plan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); counter-reset: plan; }
.plan__step { position: relative; padding: 24px 22px 28px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-1); }
.plan__n {
  display: block; margin: 0 0 18px;
  font: italic 300 clamp(58px, 5.4vw, 80px)/.85 var(--human); letter-spacing: -.04em;
  color: var(--ink);
}
.plan__step:first-child .plan__n { color: var(--cobalt); }
.plan__step h3 { margin: 0 0 10px; font: 820 22px/1.12 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.plan__step p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.52; }
.bring {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); align-items: center;
  margin-top: clamp(56px, 7vw, 104px); padding-top: clamp(36px, 4vw, 56px); border-top: 1.5px solid var(--ink);
}
.bring__list ul { list-style: none; margin: 20px 0 0; padding: 0; }
.bring__list li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.bring__list li b { display: block; color: var(--ink); font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.bring__list svg { flex: none; width: 36px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bring__list li:first-child svg rect { fill: var(--paper-2); }
.bring__list li:nth-child(2) svg path:first-child { fill: rgba(127, 216, 184, .45); }
.bring__list li:nth-child(3) svg path { fill: rgba(35, 64, 255, .16); }
.bring__big {
  margin: 0; font: 900 clamp(44px, 6.4vw, 104px)/.92 var(--display); letter-spacing: -.046em; font-variation-settings: 'opsz' 144;
  text-wrap: balance;
}
.bigdot { display: inline-block; width: .19em; height: .19em; margin-left: .045em; border-radius: 50%; background: var(--cobalt); vertical-align: baseline; }
@media (max-width: 1099px) { .plan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 859px) { .bring { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 559px) { .plan { grid-template-columns: minmax(0, 1fr); } .plan__n { margin-bottom: 14px; } }

/* ───────────────────────────────────────────── footer (night) */
.foot {
  margin-top: clamp(104px, 13vw, 184px); padding: clamp(56px, 7vw, 96px) 0 clamp(28px, 4vw, 44px);
  background: var(--night); color: var(--paper);
}
.foot__mark {
  margin: 0 0 clamp(28px, 4vw, 48px); line-height: .8;
  font: 900 clamp(76px, 17vw, 268px)/.8 var(--display); letter-spacing: -.055em; font-variation-settings: 'opsz' 144;
  color: var(--paper);
}
.foot__dot { display: inline-block; width: .19em; height: .19em; margin-left: .04em; border-radius: 50%; background: var(--cobalt); vertical-align: baseline; box-shadow: 0 0 36px 2px rgba(35, 64, 255, .5); }
.foot__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 24px 0; border-top: 1px solid rgba(244, 241, 234, .16); border-bottom: 1px solid rgba(244, 241, 234, .16); }
.foot__by { margin: 0; max-width: 62ch; color: rgba(244, 241, 234, .82); font-size: 16px; line-height: 1.5; }
.foot__credit { margin: 22px 0 0; max-width: 72ch; color: rgba(244, 241, 234, .5); font: 500 11px/1.7 var(--mono); letter-spacing: .04em; }
.foot :focus-visible { outline-color: #A9B6FF; }

/* ───────────────────────────────────────────── pause animation (header toggle) */
/* "Pause animation": finish every CSS animation at its end state (never freeze an entrance at opacity 0) */
html.is-still main *, html.is-still main *::before, html.is-still main *::after,
html.is-still .foot *, html.is-still .top * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
html.is-still [data-reveal] { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .brand__dot, .hero__dot, .idea, .btn { transition: none; }
  .mount__egg { animation: none; }
}

/* footer: download the film to share it (MP4 rendered from the same deterministic film) */
.foot__acts { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.foot__dl { color: var(--paper); font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-color: rgba(244, 241, 234, .35); text-underline-offset: 5px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.foot__dl span { display: inline-block; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(244, 241, 234, .6); text-decoration: none; }
.foot__dl:hover { text-decoration-color: var(--paper); }
.foot__dl:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 4px; border-radius: 4px; }
