/* Agent Forge landing — page layer. Brand book 1.0: Paper ground, Ink type, Forge Lime as signal. */

@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --lime: #ccff4d;
  --lime-hover: #c2f53f;
  --lime-press: #b5e838;
  --ink: #0b0d0a;
  --ink-2: #171a14;
  --ink-3: #20251d;
  --paper: #f6f7f2;
  --paper-2: #eceee5;
  --white: #fff;
  --text: #474f40;
  --muted: #5f6857;
  --subtle: #8a927f;
  --line: #e0e3d8;
  --line-2: #cfd3c5;
  --on-ink: #dfe4d6;
  --on-ink-muted: #a4ac98;

  --f-display: "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --hh: 72px;
  --gut: 32px;
  --max: 1320px;
  --r-card: 8px;
  --r-ctl: 6px;
  --r-panel: 12px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hh) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.55 var(--f-body);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--lime); color: var(--ink); }
img, svg { display: block; }
a { color: inherit; }
code, kbd, pre { font-family: var(--f-mono); }
code { font-size: 0.88em; color: var(--ink); background: var(--paper-2); padding: 0.08em 0.36em; border-radius: 4px; }
kbd { font-size: 0.8em; font-weight: 500; color: var(--ink); background: var(--white); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0.05em 0.4em; white-space: nowrap; }
h1, h2, h3 { font-family: var(--f-display); color: var(--ink); font-weight: 600; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.ico { width: 20px; height: 20px; flex: none; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--lime); padding: 10px 14px; border-radius: var(--r-ctl); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ buttons */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: var(--r-ctl);
  font: 600 15px/1 var(--f-body); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 160ms var(--ease-quart), transform 160ms var(--ease-quart), box-shadow 160ms var(--ease-quart), color 160ms;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .ico { width: 18px; height: 18px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 16px; border-radius: 8px; }
.btn-lime { background: var(--lime); color: var(--ink); box-shadow: 0 1px 4px 0 rgb(11 13 10 / 0.16); }
.btn-lime:hover { background: var(--lime-hover); box-shadow: 0 6px 16px -6px rgb(11 13 10 / 0.35); }
.btn-lime:active { background: var(--lime-press); }
.btn-lime:focus-visible { outline-color: var(--ink); }
.btn-ghost { color: var(--ink); background: transparent; border-color: var(--line-2); }
.btn-ghost:hover { background: var(--white); border-color: var(--subtle); }
.btn-ghost .ico { transition: transform 220ms var(--ease-out); }
.btn-ghost:hover .ico { transform: translateY(2px); }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 50; height: var(--hh);
  background: rgb(246 247 242 / 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head { transition: border-color 200ms, background-color 260ms, color 260ms; }
.site-head.ink { background: rgb(11 13 10 / 0.82); border-bottom-color: #22271f; }
.site-head.ink .lockup { color: #f6f7f2; }
.site-head.ink .lockup .mark { color: var(--lime); }
.site-head.ink .head-nav a { color: var(--on-ink-muted); }
.site-head.ink .head-nav a:hover, .site-head.ink .head-nav a[aria-current="true"] { color: #f6f7f2; background: #20251d; }
.site-head.ink :focus-visible { outline-color: var(--lime); }
.head-row { height: 100%; display: flex; align-items: center; gap: 32px; }
.lockup { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); min-height: 44px; }
.lockup .mark { width: 32px; height: 22px; color: var(--ink); }
.lockup span { font: 700 19px/1 var(--f-display); letter-spacing: -0.01em; }
.head-nav { display: flex; gap: 4px; margin-left: auto; }
.head-nav a { font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: var(--r-ctl); transition: color 160ms, background-color 160ms; }
.head-nav a:hover { color: var(--ink); background: var(--paper-2); }
.head-nav a[aria-current="true"] { color: var(--ink); background: var(--paper-2); }

/* ------------------------------------------------------------ hero */
.hero { position: relative; padding-top: 44px; }
.hero-grid {
  position: absolute; inset: 0 0 -60vh; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, #d6dacd 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 20%, transparent 75%);
  opacity: 0.9;
}
.hero-copy { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.02; letter-spacing: -0.04em; }
.h1-line { display: block; }
.tape {
  display: inline-block; margin-top: 0.16em;
  background: var(--ink); color: var(--lime);
  padding: 0.02em 0.22em 0.1em; border-radius: 0.14em;
  box-shadow: 0 0.12em 0.3em -0.08em rgb(11 13 10 / 0.35);
}
.lede { margin-top: 22px; max-width: 46em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.fine { margin-top: 16px; font: 400 14px/1.4 var(--f-mono); color: var(--muted); letter-spacing: 0.01em; }

/* ------------------------------------------------------------ tour: one window */
.tour { position: relative; margin-top: 40px; --cap: 320px; --capgap: 48px; }
.stage {
  position: sticky; top: var(--hh); z-index: 2;
  height: calc(100svh - var(--hh));
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gut);
  pointer-events: none;
}
.stage-box { position: relative; height: 100%; }
.win {
  position: absolute; left: 0; top: 0;
  width: var(--ww, 1200px); aspect-ratio: 16 / 10;
  transform-origin: 0 0;
  transform: translate3d(var(--wx, 0px), var(--wy, 0px), 0) scale(var(--ws, 1));
  pointer-events: auto;
  border-radius: 14px;
  background: var(--ink);
  box-shadow:
    0 0 0 1px rgb(11 13 10 / 0.9),
    0 1px 1px rgb(11 13 10 / 0.08),
    0 12px 24px -10px rgb(11 13 10 / 0.25),
    0 48px 96px -32px rgb(11 13 10 / 0.45);
}
.win::after { /* top highlight on the glass edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1);
}
.win-clip { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; contain: layout paint; }

.chapters { position: relative; z-index: 3; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); margin-top: calc(var(--hh) - 100svh); }
.ch-spacer { height: calc(var(--spacer, 40svh)); }
.ch {
  width: var(--cap); min-height: calc(100svh - var(--hh));
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 48px;
  opacity: 0.28; transition: opacity 420ms var(--ease-out);
}
.ch.on { opacity: 1; }
.ch[data-side="r"] { margin-left: auto; }
.ch[data-side="c"] { width: 100%; opacity: 0 !important; pointer-events: none; }
.stage-cap { position: absolute; left: 0; right: 0; top: 16px; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity 360ms var(--ease-out), transform 480ms var(--ease-out); pointer-events: none; }
.tour.side-c.settled .stage-cap.on { opacity: 1; transform: none; }
.sc-h { font: 600 clamp(30px, 2.8vw, 40px)/1.08 var(--f-display); letter-spacing: -0.035em; color: var(--ink); }
.sc-p { margin: 12px auto 0; max-width: 44em; font-size: 17px; color: var(--text); }
.sc-p code { font-size: 0.88em; }
.tour.settled.side-c .tour-rail { opacity: 0; pointer-events: none; }
.tour.settled .win { transition: transform 820ms var(--ease-out); }
.ch h2 { font-size: clamp(30px, 2.8vw, 40px); line-height: 1.08; letter-spacing: -0.035em; }
.ch h2 kbd { font-family: var(--f-mono); font-size: 0.5em; vertical-align: 0.35em; letter-spacing: 0; }
.ch p { margin-top: 18px; font-size: 17px; color: var(--text); }
.ch p a { text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--subtle); }
.ch p a:hover { text-decoration-color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 8px; }
.facts li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.facts li::before { content: ""; width: 12px; height: 8px; flex: none; background: var(--ink); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
:root { --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 4l3 3 7-6' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ch-rail { position: absolute; left: calc(var(--gut) - 22px); top: 0; }

/* chapter tabs: one fixed place at the top of the stage, whichever side the window is on */
.tour-rail {
  position: absolute; left: 50%; top: var(--rail-y, 24px); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 3px; border-radius: 9px;
  background: var(--white); box-shadow: 0 0 0 1px var(--line-2), 0 4px 12px -6px rgb(11 13 10 / 0.25);
  opacity: 0; pointer-events: none; transition: opacity 300ms;
}
.tour.settled .tour-rail { opacity: 1; pointer-events: auto; }
.tour-rail button {
  height: 28px; padding: 0 12px; border: 0; border-radius: var(--r-ctl); background: none; cursor: pointer;
  font: 500 13px/1 var(--f-body); color: var(--muted); transition: color 160ms, background-color 160ms;
}
.tour-rail button:hover { color: var(--ink); background: var(--paper-2); }
.tour-rail button[aria-current="true"] { color: var(--lime); background: var(--ink); }
.tour-rail button:focus-visible { outline-offset: 1px; }

/* says plainly what the window is */
.win-tag { position: absolute; right: 4px; bottom: 100%; margin: 0 0 10px; font: 400 12px/1 var(--f-mono); color: var(--muted); pointer-events: none; transition: opacity 300ms; }
.tour.settled .win-tag { opacity: 0; }

/* ------------------------------------------------------------ faces (lime) */
.faces { background: var(--lime); color: var(--ink); padding: 120px 0 88px; overflow: hidden; position: relative; }
.faces-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.faces h2 { font-size: clamp(44px, 6vw, 88px); line-height: 0.98; letter-spacing: -0.045em; }
.faces-head p { font-size: 19px; line-height: 1.5; color: #2a3313; max-width: 30em; }
.lineup {
  list-style: none; margin: 72px auto 0; padding: 0 var(--gut);
  max-width: var(--max);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
}
.lineup li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lineup .m.big { width: 100%; max-width: 200px; aspect-ratio: 1; height: auto; }
.lu-name { margin-top: 6px; font: 600 16px/1.2 var(--f-display); letter-spacing: -0.01em; }
.lu-role { margin-top: 4px; font-size: 13px; line-height: 1.35; color: #3b4520; max-width: 15em; }
.forge-steps { list-style: none; margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.forge-steps li { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 18px; align-items: center; padding: 20px 28px 20px 0; border-top: 2px solid var(--ink); }
.forge-steps li + li { padding-left: 28px; border-left: 1px solid rgb(11 13 10 / 0.18); }
.forge-steps b { font: 600 18px/1.25 var(--f-display); letter-spacing: -0.015em; color: var(--ink); grid-column: 2; }
.forge-steps li > span:last-child { grid-column: 2; font-size: 14px; line-height: 1.45; color: #34401a; margin-top: 4px; }
.forge-steps li > span:first-child { grid-row: 1 / span 2; }
.ph-stack { position: relative; width: 70px; height: 70px; }
.ph-stack i { position: absolute; inset: 8px 12px; background: var(--paper); border: 1px solid rgb(11 13 10 / 0.25); border-radius: 4px; box-shadow: 0 4px 10px -4px rgb(11 13 10 / 0.35); }
.ph-stack i::after { content: ""; position: absolute; inset: 5px 5px 14px; border-radius: 2px; background: radial-gradient(circle at 50% 38%, #b9c29a 0 22%, transparent 23%), radial-gradient(ellipse 60% 45% at 50% 100%, #b9c29a 0 98%, transparent 100%), #e3e8d0; }
.ph-stack i:nth-child(1) { transform: rotate(-9deg) translate(-8px, 2px); }
.ph-stack i:nth-child(2) { transform: rotate(6deg) translate(8px, -2px); }
.ph-stack i:nth-child(3) { transform: rotate(-1deg); }
.step-face { width: 76px; height: 76px; }
.step-costumes { position: relative; width: 76px; height: 76px; }
.step-costumes .m { position: absolute; width: 52px; height: 52px; }
.step-costumes .m:nth-child(1) { left: -6px; top: 0; } .step-costumes .m:nth-child(2) { left: 28px; top: 4px; } .step-costumes .m:nth-child(3) { left: 10px; top: 28px; }
.faces-note { margin-top: 56px; font: 400 15px/1.5 var(--f-body); color: #2a3313; text-align: center; }

/* ------------------------------------------------------------ open by design (ink) */
.open { background: var(--ink); color: var(--on-ink); padding: 112px 0 128px; }
.open h2 { color: #f6f7f2; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -0.04em; }
.open-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.open-art { position: sticky; top: calc(var(--hh) + 40px); display: flex; flex-direction: column; gap: 20px; }
.t-k { color: #e3e8d6; } .t-s { color: #b7d86a; }
.tree-file pre { font-size: 13px; line-height: 1.7; }
.open-copy > p { margin-top: 20px; font-size: 19px; color: var(--on-ink-muted); max-width: 26em; }
.open code { background: #20251d; color: var(--on-ink); }
.spec { margin: 48px 0 0; border-top: 1px solid #2b3126; }
.spec > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid #2b3126; }
.spec dt { font: 600 15px/1.45 var(--f-body); color: #f6f7f2; }
.spec dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--on-ink-muted); }
.spec kbd { background: #20251d; color: var(--on-ink); border-color: #3a4234; }
.tree {
  margin: 0;
  background: var(--ink-2); border: 1px solid #2b3126; border-radius: var(--r-panel);
  box-shadow: 0 24px 48px -24px rgb(0 0 0 / 0.6);
  overflow: hidden;
}
.tree figcaption { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid #2b3126; font: 500 14px/1 var(--f-mono); color: #f6f7f2; }
.tree figcaption .ico { color: var(--lime); width: 18px; height: 18px; }
.tree pre { margin: 0; padding: 20px 20px 24px; font-size: 14px; line-height: 1.75; color: var(--on-ink); overflow-x: auto; }
.tree code { background: none; padding: 0; color: inherit; font-size: inherit; }
.t-d { color: var(--lime); }
.tl { display: block; margin-inline: -20px; padding-inline: 20px; transition: background-color 200ms, opacity 200ms; }
.tree.focus .tl { opacity: 0.35; }
.tree.focus .tl.hit { opacity: 1; background: rgb(204 255 77 / 0.08); }
.spec > div { cursor: default; transition: background-color 200ms; outline-offset: -2px; }
.spec > div:hover, .spec > div:focus-visible { background: linear-gradient(90deg, rgb(204 255 77 / 0.06), transparent 70%); }
.spec > div:focus-visible { outline: 2px solid var(--lime); border-radius: 2px; }
.t-c { color: #6f7866; }

/* ------------------------------------------------------------ faq */
.faq { padding: 128px 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
.faq-side { position: sticky; top: calc(var(--hh) + 40px); }
.faq h2 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -0.04em; }
.faq-cta { margin-top: 32px; padding: 24px; border-radius: var(--r-panel); background: var(--white); border: 1px solid var(--line); box-shadow: 0 1px 2px rgb(11 13 10 / 0.05); max-width: 26rem; }
.faq-cta p { font-size: 15px; color: var(--text); margin-bottom: 18px; }
.faq-cta .btn { width: 100%; }
.faq-cta .btn + .btn { margin-top: 8px; }
.qa { border-top: 1px solid var(--line-2); }
.qa details { border-bottom: 1px solid var(--line-2); }
.qa summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; font: 600 18px/1.35 var(--f-body); color: var(--ink); letter-spacing: -0.01em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 1.6px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.6px 14px no-repeat;
  transition: transform 240ms var(--ease-out);
}
.qa details[open] summary::after { transform: rotate(45deg); }
.qa summary:hover { color: #000; }
.qa details p { padding: 0 48px 24px 0; font-size: 16px; color: var(--text); max-width: 40em; }
.qa details[open] p { animation: qa-in 280ms var(--ease-out); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-4px); } }

/* ------------------------------------------------------------ close */
.close { background: var(--ink); color: var(--on-ink); padding: 136px 0 232px; text-align: center; position: relative; overflow: hidden; }
.close::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, #242a20 1px, transparent 1.5px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 75%);
}
.close-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.close-mark { width: 96px; height: 66px; color: var(--lime); margin-bottom: 40px; }
.close h2 { color: #f6f7f2; font-size: clamp(40px, 5.6vw, 80px); line-height: 1; letter-spacing: -0.045em; }
.close-inner > p { margin-top: 22px; max-width: 32em; font-size: 19px; color: var(--on-ink-muted); }
.close-inner > p.fine { font-size: 13px; color: #8d9682; max-width: none; }
.close .btn-lime:focus-visible { outline-color: var(--lime); }

.close-team { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: clamp(0px, 1vw, 16px); pointer-events: auto; }
.close-team .m { width: clamp(64px, 9vw, 120px); height: clamp(64px, 9vw, 120px); margin-bottom: 0; cursor: pointer; transition: transform 400ms var(--ease-out); }
.close-team .m:hover { transform: translateY(-8px); }

/* ------------------------------------------------------------ footer */
.site-foot { background: var(--ink); color: var(--on-ink-muted); border-top: 1px solid #22271f; }
.foot-row { display: flex; align-items: center; gap: 24px; min-height: 96px; flex-wrap: wrap; }
.lockup-sm { color: #f6f7f2; }
.lockup-sm .mark { color: var(--lime); width: 28px; height: 19px; }
.lockup-sm span { font-size: 17px; }
.foot-line { font: 500 14px/1 var(--f-body); color: #8d9682; }
.foot-nav { display: flex; gap: 20px; margin-left: auto; }
.foot-nav a { font-size: 14px; text-decoration: none; color: var(--on-ink-muted); }
.foot-nav a:hover { color: #f6f7f2; }
.foot-copy { font-size: 13px; color: #8d9682; }
.site-foot :focus-visible { outline-color: var(--lime); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1199px) {
  :root { --gut: 24px; }
  .tour { --cap: 300px; --capgap: 40px; }
}

@media (max-width: 1023px) {
  .head-nav { display: none; }
  .head-row .btn { margin-left: auto; }
  .tour { margin-top: 40px; }
  .stage { height: auto; padding-block: 8px 12px; }
  .stage-box { height: auto; }
  .win { position: relative; left: 0; width: 100%; transform: none; border-radius: 10px; }
  .stage { padding-top: 28px; background: var(--paper); }
  .stage::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 36px; background: linear-gradient(var(--paper), rgb(246 247 242 / 0)); pointer-events: none; }
  .win-tag { right: 2px; margin-bottom: 8px; font-size: 11px; }
  .tour.settled .win-tag { opacity: 1; }
  .stage { z-index: 4; }
  .chapters { margin-top: 0; z-index: 1; }
  .ch-spacer { display: none; }
  .ch, .ch[data-side="r"], .ch[data-side="c"] { margin-left: 0; opacity: 1 !important; pointer-events: auto; }
  .stage-cap { display: none; }
  .ch { width: auto; max-width: 36rem; min-height: 64svh; justify-content: flex-start; padding-block: 64px 24px; opacity: 1; }
  .tour-rail { display: none; }
  .faces-head, .open-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lineup { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .open-art, .faq-side { position: static; }
  .works-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .forge-steps { grid-template-columns: minmax(0, 1fr); }
  .forge-steps li + li { padding-left: 0; border-left: 0; }
}

@media (max-width: 767px) {
  :root { --hh: 64px; --gut: 20px; }
  body { font-size: 16px; }
  .lockup .mark { width: 28px; height: 19px; }
  .lockup span { font-size: 17px; }
  .hero { padding-top: 48px; }
  h1 { font-size: clamp(34px, 10vw, 56px); letter-spacing: -0.042em; }
  .cta-row { width: 100%; }
  .cta-row .btn { width: 100%; }
  .ch { min-height: 42svh; padding-block: 28px 16px; }
  .ch h2 { font-size: 30px; }
  .faces { padding: 88px 0 64px; }
  .lineup { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 48px; gap: 4px; row-gap: 28px; }
  .lu-role { font-size: 12px; }
  .open, .faq { padding: 88px 0; }
  .spec > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .works-list li { font-size: 20px; }
  .works-list { gap: 10px 24px; }
  .tree pre { font-size: 12px; }
  .close { padding: 96px 0 140px; }
  .close-team .m:nth-child(1) { display: none; }
  .foot-row { padding-block: 28px; }
  .foot-nav { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
