/* Yvotronics — "The well-kept board" (DIRECTION.md). One grid, one radius (0), flat tiles, one accent. */

:root {
  color-scheme: dark;
  --bg: #0a0d14;
  --deep: #06080d;
  --surface: #131824;
  --surface-2: #1a2132;
  --pale: #dfe6f2;
  --pale-ink: #0a0d14;
  --ink: #e9edf3;
  --muted: #98a2b3;
  --accent: #5a9bfc;
  --accent-ink: #0a0d14;
  --tint-1: #0c1a36;
  --tint-2: #11285a;
  --tint-3: #163572;
  --tint-4: #1d4694;
  --tint-5: #2659b5;

  --font: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;

  --step-small: 0.875rem;
  --step-body: 1.0625rem;
  --step-lead: 1.25rem;
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4rem, 2rem + 7.5vw, 8.25rem);

  --margin: 12px;
  --text-margin: 24px;
  --gap: 8px;
  --unit: 90px;
  --section: clamp(6rem, 8vw, 10rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 700ms;
  --t-open: 1100ms;
  --stagger-item: 70ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
html { scrollbar-color: var(--surface-2) var(--bg); }
input, textarea { caret-color: var(--accent); }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 700; text-wrap: balance; hyphens: none; }
.display { font-size: var(--step-display); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; }
.head { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 40ch; }
.small { font-size: var(--step-small); line-height: 1.45; }
.muted { color: var(--muted); }
p { max-width: 62ch; text-wrap: pretty; }
p + p { margin-top: 0.9em; }
.nums { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem; background: var(--accent); color: var(--accent-ink); font-weight: 500; border-radius: var(--radius); text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.button--ink { background: var(--ink); color: var(--bg); }
.button--pale { background: var(--pale); color: var(--pale-ink); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .link-plain:hover { color: var(--accent); }
  .button:hover { background: #7fb3ff; }
  .button--ink:hover { background: #ffffff; }
  .button--pale:hover { background: #ffffff; }
}
.skip { position: absolute; left: var(--text-margin); top: -6rem; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; }
.skip:focus { top: var(--margin); }

/* ---------- the board ---------- */
.wrap { padding-inline: var(--margin); }
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding-inline: var(--margin); }
.tile { position: relative; background: var(--surface); border-radius: var(--radius); overflow: clip; }
.tile--deep { background: var(--deep); }
.tile--pale { background: var(--pale); color: var(--pale-ink); }
.tile--accent { background: var(--accent); color: var(--accent-ink); }
.tile--ground { background: var(--bg); }
.tile > .pad { padding: 24px; }
.cover { width: 100%; height: 100%; object-fit: cover; }
.tile img.cover { position: absolute; inset: 0; height: 100%; filter: brightness(0.88) contrast(1.05); }
.section + .section { margin-top: var(--section); }

/* ---------- header (subpages) ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: 16px var(--text-margin); }
.bar__mark { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; text-transform: uppercase; text-decoration: none; }
.bar__links { display: flex; gap: 24px; align-items: center; }
.bar__links a { text-decoration: none; padding: 12px 0; }
.bar__links a[aria-current="page"] { color: var(--accent); }

/* ---------- hero: text panel and the exploded board ---------- */
@property --gap { syntax: '<length>'; inherits: true; initial-value: 3px; }
@property --lift { syntax: '<length>'; inherits: true; initial-value: 0px; }
.hero { padding: var(--margin) var(--margin) 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero { height: 300svh; }
  .js .hero__board { position: sticky; top: var(--margin); }
}
.hero__board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); height: calc(100svh - var(--margin)); min-height: 640px; }
.panel { grid-column: 1 / 5; background: var(--pale); color: var(--pale-ink); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.panel h1 { font-size: clamp(40px, 4.5vw, 76px); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; }
.panel .panel__what { font-size: var(--step-lead); font-weight: 500; line-height: 1.35; max-width: 24ch; }
.panel p { font-size: var(--step-lead); line-height: 1.35; max-width: 30ch; }
.panel__list { margin-top: auto; display: grid; gap: 4px; font-size: var(--step-body); font-weight: 500; }
.panel__list li { padding: 6px 0; }
.panel .panel__action { margin-top: 8px; }
.panel .panel__links { display: flex; gap: 20px; flex-wrap: wrap; font-size: var(--step-small); font-weight: 500; }
.panel .panel__links a { text-decoration: none; padding: 12px 0; }

.stack { grid-column: 5 / 13; position: relative; margin: 0; background: var(--deep); overflow: clip; perspective: 2400px; }
.stack__rig { position: absolute; left: 58%; top: 69%; width: min(36vw, 580px); aspect-ratio: 10 / 7; transform-style: preserve-3d; --gap: 46px; --extra: 0px;
  transform: translate(-50%, -50%) rotateX(57deg) rotateZ(calc(-34deg + var(--turn, 0deg))); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--z) * (var(--gap) + var(--extra)) / 2 + var(--lift))); transition: opacity var(--t-ui) ease, --lift 420ms var(--ease-out), filter var(--t-ui) ease; background: none; }
.layer--core { background: rgba(140, 170, 220, 0.07); border-radius: 22px / 31px; }
.stack[data-focus] .layer { opacity: 0.22; }
.stack[data-focus] .layer--core { opacity: 0.1; }
.stack[data-focus="silk"] .layer[data-l="silk"], .stack[data-focus="top"] .layer[data-l="top"], .stack[data-focus="gnd"] .layer[data-l="gnd"], .stack[data-focus="sig"] .layer[data-l="sig"], .stack[data-focus="pwr"] .layer[data-l="pwr"], .stack[data-focus="gnd2"] .layer[data-l="gnd2"], .stack[data-focus="bot"] .layer[data-l="bot"] { opacity: 1; --lift: 36px; }
.stack__legend { position: absolute; left: 24px; bottom: 24px; z-index: 2; max-width: 300px; }
.stack__now { position: absolute; right: 24px; bottom: 24px; z-index: 2; max-width: 30ch; text-align: right; font-size: var(--step-body); line-height: 1.45; color: var(--muted); }
.stack__now span { display: block; color: var(--ink); font-size: var(--step-lead); font-weight: 500; line-height: 1.3; }
.stack__title { font-size: var(--step-body); font-weight: 500; margin-bottom: 12px; }
.stack__layers { display: grid; gap: 2px; }
.stack__legend button { display: block; width: 100%; text-align: left; padding: 6px 10px; margin-left: -10px; font-size: var(--step-small); line-height: 1.35; color: var(--muted); transition: color var(--t-hover) ease, background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.stack__legend button span { color: var(--ink); font-weight: 500; display: block; }
.stack__legend button:active { transform: scale(0.98); }
.stack__legend button[aria-pressed="true"], .stack__legend button.is-current { background: var(--surface); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .stack__legend button:hover { background: var(--surface); color: var(--ink); } }

/* ---------- intro: statement tiles ---------- */
.intro { margin-top: var(--gap); }
.intro .board--tiles { grid-template-rows: 38svh 38svh; }
.intro__slogan { grid-column: 1 / 9; grid-row: 1 / 3; display: flex; align-items: flex-end; padding: 20px; }
.intro__slogan h2 { font-size: clamp(64px, 9vw, 132px); line-height: 0.86; letter-spacing: -0.03em; text-transform: uppercase; }
.intro__word { grid-column: 9 / 13; grid-row: 2; display: flex; align-items: flex-end; padding: 20px; }
.intro__word p { font-size: clamp(64px, 9vw, 132px); line-height: 0.86; letter-spacing: -0.03em; text-transform: uppercase; font-weight: 700; max-width: none; }
.intro__photo { grid-column: 9 / 13; grid-row: 1; min-height: 0; }
.intro__text { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 40px 0; margin-top: var(--gap); }
ul.intro__facts { grid-column: 1 / 6; padding: 0 24px; align-self: end; }
.intro__facts li { font-size: var(--step-body); padding: 6px 0; color: var(--muted); }
.intro__facts li strong { color: var(--ink); font-weight: 500; }
.intro__body { grid-column: 7 / 13; padding: 0 24px; }
.intro__body p { font-size: clamp(20px, 1.2vw + 12px, 24px); line-height: 1.35; max-width: 42ch; }

/* ---------- services: statement cell, dark rows ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--section); }
.services__cell { background: var(--pale); color: var(--pale-ink); min-height: 72svh; padding: 24px; display: flex; flex-direction: column; }
.services__cell h2 { font-size: clamp(48px, 5.6vw, 88px); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; display: grid; }
.services__cell h2 .r { text-align: right; }
.services__pic { margin: 32px 0 0; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.services__cell .services__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 48px; }
.services__cell .services__foot p { max-width: 30ch; }
.services__rows { background: var(--deep); display: grid; grid-auto-rows: 1fr; }
.row { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 24px; padding: 24px; align-items: start; }
.row:nth-child(even) { background: #090c12; }
.row:nth-child(odd) { background: var(--deep); }
.row h3 { font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
.row p { font-size: var(--step-body); line-height: 1.5; max-width: 34ch; }
.row ul { list-style: none; padding: 0; font-size: var(--step-small); line-height: 1.5; color: var(--muted); }

/* ---------- how it works: accordion ---------- */
.how { margin-top: var(--section); }
.how__intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding-inline: var(--text-margin); align-items: start; }
.how__intro h2 { grid-column: 1 / 6; font-size: clamp(36px, 4vw, 58px); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.how__intro p { grid-column: 7 / 12; font-size: var(--step-body); line-height: 1.5; }
.acc { display: flex; height: 520px; margin: 64px var(--margin) 0; }
.stage { position: relative; flex: 0 0 var(--w, 10.5%); min-width: 0; overflow: clip; color: var(--ink); text-align: left; transition: flex-basis 300ms var(--ease-in-out); display: block; }
.stage.is-open { --w: 58%; }
.stage:nth-child(1) { background: var(--tint-1); }
.stage:nth-child(2) { background: var(--tint-2); }
.stage:nth-child(3) { background: var(--tint-3); }
.stage:nth-child(4) { background: var(--tint-4); }
.stage:nth-child(5) { background: var(--tint-5); }
.stage__btn { position: absolute; inset: 0; z-index: 2; width: 100%; cursor: pointer; }
.stage.is-open .stage__btn { pointer-events: none; }
.stage__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.stage__label { position: absolute; left: 20px; bottom: 20px; transform-origin: left bottom; transform: rotate(-90deg) translateY(100%); white-space: nowrap; font-size: 20px; font-weight: 700; transition: opacity var(--t-ui) ease; }
.stage.is-open .stage__label { opacity: 0; }
.stage__body { position: absolute; inset: 0; padding: 24px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--t-ui) ease, visibility 0s linear var(--t-ui); width: 58vw; max-width: 100%; }
.stage.is-open .stage__body { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 120ms, 0s; }
.stage__body h3 { font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.stage__pic { position: absolute; top: 0; right: 0; bottom: 0; width: 42%; object-fit: contain; background: #070a10; height: 100%; filter: brightness(0.85) contrast(1.05); }
.stage__body > h3, .stage__body > .stage__text { position: relative; z-index: 1; width: 55%; }
.stage__body .stage__text { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.stage__body p { font-size: var(--step-body); line-height: 1.5; max-width: 36ch; }
.stage__body ul { list-style: none; padding: 0; font-size: var(--step-body); line-height: 1.5; color: var(--ink); }
.stage__body ul li::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--ink); margin-right: 10px; vertical-align: middle; }
.stage:focus-visible { outline-offset: -3px; }

/* ---------- what we build: giant title, uneven wall ---------- */
.build { background: var(--surface); padding: 56px 0 72px; }
.build__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-inline: var(--text-margin); }
.build__head h2 { font-size: clamp(72px, 9vw, 136px); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; }
.build__head a { font-size: var(--step-small); }
.wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 300px; gap: 16px var(--gap); margin: 32px var(--text-margin) 0; }
.wall .wall__wide { grid-row: span 2; }
.wall figure { grid-column: span var(--s, 4); position: relative; margin: 0; min-width: 0; display: flex; flex-direction: column; transition: opacity var(--t-ui) ease; }
.wall figure img, .wall figure video { width: 100%; height: auto; flex: 1 1 0; min-height: 0; object-fit: cover; filter: brightness(0.85) contrast(1.05); background: var(--surface-2); }
.wall figcaption { display: flex; justify-content: space-between; gap: 12px; height: 30px; line-height: 30px; font-size: var(--step-small); white-space: nowrap; overflow: hidden; }
.wall figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.wall figcaption span:last-child { color: var(--muted); }
.wall__row { display: contents; }
@media (hover: hover) and (pointer: fine) {
  .wall:hover figure:not(:hover) { opacity: 0.72; }
}

/* ---------- faq: a band per question ---------- */
.faq { margin-top: var(--section); }
.band { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 56px var(--text-margin); }
.band:nth-child(odd) { background: var(--surface); }
.band:nth-child(even) { background: var(--bg); }
.band--head { background: var(--accent) !important; color: var(--accent-ink); min-height: 32svh; align-items: end; padding-bottom: 24px; position: relative; }
.band--head p { position: absolute; top: 32px; left: var(--text-margin); font-size: var(--step-lead); line-height: 1.4; max-width: 36ch; color: #16305a; }
.band--head h2 { grid-column: 1 / -1; font-size: clamp(48px, 7vw, 120px); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; }
.band h3 { grid-column: 1 / 6; font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
.band p { grid-column: 7 / 13; font-size: var(--step-body); line-height: 1.5; max-width: 52ch; }

/* ---------- cta: the action tile ---------- */
.cta-wrap { overflow: clip; margin-top: var(--section); }
.cta { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; min-height: 400px; }
.cta__main { grid-column: 1 / 8; background: var(--accent); color: var(--accent-ink); padding: 40px; display: grid; grid-template-columns: 1fr; align-content: center; gap: 32px; }
.cta__main > div { display: flex; flex-direction: column; gap: 16px; }
.cta__main h2 { font-size: 48px; line-height: 1; letter-spacing: -0.02em; }
.cta__main p { font-size: var(--step-body); line-height: 1.5; max-width: 52ch; }
.cta__main .button { align-self: flex-start; margin-top: 8px; }
.cta__list { font-size: var(--step-body); line-height: 1.45; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; color: #16305a; }
.cta__list strong { color: var(--accent-ink); font-weight: 500; }
.cta__pic { grid-column: 8 / 13; position: relative; overflow: clip; background: var(--surface); }

/* ---------- brief: photo strip, three-cell bar ---------- */
.brief { margin-top: var(--section); background: var(--surface); padding: 48px 0 56px; }
.strip { display: flex; gap: var(--gap); overflow: hidden; }
.strip__track { display: flex; gap: var(--gap); flex: none; animation: drift 60s linear infinite; }
.strip img { height: 168px; width: auto; flex: none; filter: brightness(0.85) contrast(1.05); }
.strip img.s34 { aspect-ratio: 3 / 4; }
.strip img.s11 { aspect-ratio: 1; }
.strip img.s32 { aspect-ratio: 3 / 2; }
@keyframes drift { to { transform: translateX(calc(-100% - var(--gap))); } }
.strip:hover .strip__track, .strip:focus-within .strip__track { animation-play-state: paused; }
.brief--page { margin-top: var(--gap); padding-top: 56px; }
.brief--page .brief__head { margin-top: 0; }
.brief__head { margin: 72px var(--text-margin) 0; font-size: clamp(36px, 4vw, 58px); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.brief__lead { margin: 20px var(--text-margin) 0; font-size: var(--step-body); max-width: 56ch; }
.form { margin: 40px var(--text-margin) 0; display: grid; gap: var(--gap); }
.builder { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.builder__group { grid-column: span 6; display: grid; gap: var(--gap); align-content: start; border: 0; padding: 0; margin: 0; min-width: 0; }
.builder__note { font-size: var(--step-body); color: var(--muted); min-height: 1.5em; }
.builder__note strong { color: var(--ink); font-weight: 500; }
.builder__group h3 { font-size: var(--step-body); font-weight: 500; color: var(--muted); padding: 4px 0; max-width: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--gap); }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; font-size: var(--step-body); background: var(--surface-2); cursor: pointer; user-select: none; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.chip:active { transform: scale(0.97); }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip:has(input:checked) { background: var(--pale); color: var(--pale-ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.form textarea { width: 100%; min-height: 180px; padding: 20px; background: var(--surface-2); border: 0; border-radius: var(--radius); resize: vertical; line-height: 1.5; }
.form textarea:focus { background: #222a3d; outline: 2px solid var(--accent); outline-offset: 0; }
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.cell { height: 96px; background: var(--surface-2); border: 0; border-radius: var(--radius); text-align: center; font-size: var(--step-body); padding: 0 20px; width: 100%; transition: background-color var(--t-hover) ease; }
.cell::placeholder { color: var(--muted); opacity: 1; }
.cell:focus { background: #222a3d; outline: 2px solid var(--accent); outline-offset: 0; }
.cell--submit { background: var(--ink); color: var(--bg); font-weight: 500; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.cell--submit:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .cell--submit:hover { background: #ffffff; }
  .chip:hover { background: #222a3d; }
  .chip:has(input:checked):hover { background: #ffffff; }
}
.form__print { font-size: var(--step-small); color: var(--muted); max-width: none; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer: the mark, built large ---------- */
.foot { margin-top: 48px; background: var(--deep); padding: 48px var(--text-margin) 32px; }
.foot__line { font-size: var(--step-lead); line-height: 1.4; max-width: 40ch; margin-bottom: 32px; }
.mark { display: flex; align-items: flex-end; gap: 4px; height: 34svh; min-height: 180px; }
.mark span { flex: 1 1 0; height: var(--h, 80%); display: flex; align-items: flex-end; justify-content: center; font-weight: 700; font-size: clamp(32px, 8vw, 150px); line-height: 0.8; text-transform: uppercase; letter-spacing: -0.02em; color: var(--deep); padding-bottom: 0.08em; overflow: clip; }
.mark span:nth-child(odd) { background: var(--pale); }
.mark span:nth-child(even) { background: var(--accent); }
.mark span:nth-child(3n) { background: var(--surface-2); color: var(--ink); }
.foot__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: 56px; }
.foot__links { grid-column: 1 / 9; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--gap); }
.foot__links h3 { font-size: var(--step-body); font-weight: 500; margin-bottom: 10px; }
.foot__links a { display: block; font-size: var(--step-small); text-decoration: none; padding: 3px 0; }
.foot__contact { grid-column: 9 / 13; font-size: var(--step-small); display: grid; gap: 16px; align-content: start; }
.foot__contact p { max-width: 40ch; }
.foot__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; font-size: var(--step-small); color: var(--muted); flex-wrap: wrap; }
.foot__row .button { min-height: 2.5rem; padding: 0 1rem; font-size: var(--step-small); }
.credits { margin-top: 24px; font-size: var(--step-small); color: var(--muted); line-height: 1.5; max-width: 75ch; }
.credits a { color: var(--muted); }

/* ---------- subpages ---------- */
.page { margin-top: var(--gap); }
.page .board { grid-auto-rows: minmax(var(--unit), auto); }
.page__title { grid-column: 1 / 9; grid-row: span 3; display: flex; align-items: flex-end; padding: 20px; }
.page__title h1 { font-size: clamp(56px, 8vw, 120px); line-height: 0.88; letter-spacing: -0.03em; text-transform: uppercase; }
.page__lead { grid-column: 9 / 13; grid-row: span 3; padding: 24px; display: flex; align-items: flex-end; }
.page__lead p { font-size: clamp(18px, 1vw + 12px, 22px); line-height: 1.35; }
.page__photo { grid-column: span 4; grid-row: span 3; min-height: 270px; }
.page__text { grid-column: span 8; grid-row: span 3; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; }
.page__text h2 { width: fit-content; max-width: 100%; font-size: clamp(28px, 3vw, 44px); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; }
.page__text p { max-width: 52ch; }
.page__text ul { color: var(--muted); display: grid; gap: 6px; }
.page__text ul li strong { color: var(--ink); font-weight: 500; }
.page__text--6 { grid-column: span 6; }
.page__photo--6 { grid-column: span 6; }
.page__photo--8 { grid-column: span 8; }
.page__action { grid-column: span 4; grid-row: span 3; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; }
.page__action h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1; letter-spacing: -0.02em; }
.page__action .button { align-self: flex-start; }
.thanks { min-height: 70svh; }
.credits__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px var(--gap); padding: 40px var(--text-margin) 0; }
.credit { margin: 0; }
.credit img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; filter: brightness(0.88) contrast(1.05); }
.credit figcaption { margin-top: 10px; font-size: var(--step-small); line-height: 1.45; color: var(--muted); }
.credit figcaption a { color: var(--ink); }

/* ---------- motion (content is visible without JavaScript) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(14px); animation: rise 520ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 70ms + 160ms); }
  .js .stack__rig { animation: explode 1800ms var(--ease-expo) 300ms both; }
  .js .stack { clip-path: inset(0 0 100% 0); animation: open var(--t-open) var(--ease-in-out) 80ms forwards; }
  .js [data-reveal] > [data-part] { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in > [data-part] { opacity: 1; transform: none; }
  .js [data-reveal-rows] > * { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
  .js [data-reveal-rows].is-in > * { opacity: 1; transform: none; }
  .js [data-reveal-rows].is-in > :nth-child(1) { transition-delay: 0ms; }
  .js [data-reveal-rows].is-in > :nth-child(2) { transition-delay: 70ms; }
  .js [data-reveal-rows].is-in > :nth-child(3) { transition-delay: 140ms; }
  .js [data-reveal-rows].is-in > :nth-child(4) { transition-delay: 210ms; }
  .js [data-reveal-rows].is-in > :nth-child(5) { transition-delay: 280ms; }
  .js [data-reveal-rows].is-in > :nth-child(6) { transition-delay: 350ms; }
  .js [data-reveal-rows].is-in > :nth-child(7) { transition-delay: 420ms; }
  .js [data-reveal-rows].is-in > :nth-child(8) { transition-delay: 490ms; }
  .js [data-reveal-rows].is-in > :nth-child(n+9) { transition-delay: 560ms; }
  @supports (animation-timeline: view()) {
    .mark span { animation: mark-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; animation-delay: calc(var(--i, 0) * 0s); }
  }
  .intro__photo img { transition: transform 1200ms var(--ease-soft); }
  .wall figure img { transition: transform 600ms var(--ease-soft), filter var(--t-hover) ease; }
  .wall figure:hover img { transform: scale(1.03); filter: brightness(1) contrast(1.05); }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes open { to { clip-path: inset(0 0 0 0); } }
@keyframes explode { from { --gap: 3px; } }
@keyframes mark-rise { from { transform: translateY(40%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .strip__track { animation: none; }
  .stage { transition: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .panel { grid-column: 1 / 6; }
  .stack { grid-column: 6 / 13; }
  .stack__rig { width: 54vw; left: 54%; top: 42%; }
  .stack__layers { display: none; }
  .services__cell { min-height: 70svh; }
  .row { grid-template-columns: 1fr; gap: 10px; padding: 48px 24px; }
  .intro .board--tiles { grid-template-rows: 30svh 30svh; }
  .row ul { display: flex; flex-wrap: wrap; gap: 0 12px; }
  .stage__body { width: 70vw; }
  .stage__body .stage__text { grid-template-columns: 1fr; }
  .foot__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wall { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; }
  .wall figure { grid-column: span 1; }
  .wall .wall__wide { grid-column: 1 / -1; grid-row: span 2; }
  .wall figcaption span:last-child { display: none; }
  .band { grid-template-columns: 1fr; gap: 12px; }
  .band h3, .band p { grid-column: 1; }
  .band p { max-width: 60ch; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  :root { --margin: 16px; --gap: 6px; --section: 88px; }
  .bar__links { gap: 14px; font-size: 15px; }
  .bar__links .button { display: none; }

  .hero__board { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .panel { min-height: 40svh; padding: 20px; }
  .panel h1 { font-size: 13vw; }
  .panel .panel__what { font-size: 18px; }
  .panel p { font-size: 17px; }
  .panel .panel__action { width: 100%; }
  .stack { height: 62svh; min-height: 380px; }
  .stack__rig { width: 92vw; left: 50%; top: 58%; --gap: 30px; }
  .stack__legend { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .stack__layers { display: none; }
  .panel__list { margin-top: 8px; }
  .stack__now { left: 16px; right: 16px; top: 16px; bottom: auto; text-align: left; max-width: none; }
}
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .js .hero { height: auto; }
  .js .hero__board { position: relative; top: auto; display: block; }
  .js .hero__board::after { content: ""; display: block; height: 130svh; }
  .js .stack { position: sticky; top: 0; height: 100svh; margin-top: 8px; }
}
@media (max-width: 720px) {
  .panel .panel__links { gap: 14px; }

  .intro { margin-top: 8px; }
  .intro .board { grid-template-columns: 1fr 1fr; }
  .intro .board--tiles { grid-template-rows: 46svh auto; }
  .intro__slogan { grid-column: 1 / 3; grid-row: 1; padding: 16px; }
  .intro__slogan h2 { font-size: 14vw; }
  .intro__word { grid-column: 1; grid-row: 2; aspect-ratio: 1; padding: 12px; }
  .intro__word p { font-size: 11vw; white-space: normal; }
  .intro__photo { grid-column: 2; grid-row: 2; aspect-ratio: 1; }
  .intro__text { grid-template-columns: 1fr; padding: 20px 0; }
  .intro__facts { grid-column: 1; padding: 0 20px 20px; }
  .intro__body { grid-column: 1; padding: 0 20px; }
  .intro__body p { font-size: 18px; }

  .services { grid-template-columns: 1fr; }
  .services__cell { min-height: 0; padding: 20px 20px 28px; }
  .services__cell .services__foot { padding-top: 32px; }
  .services__cell h2 { font-size: 10vw; }
  .services__foot { flex-direction: column; align-items: flex-start !important; }
  .row { padding: 20px; }
  .row h3 { font-size: 24px; }

  .how__intro h2 { grid-column: 1 / -1; font-size: 10vw; }
  .how__intro p { grid-column: 1 / -1; font-size: 17px; }
  .acc { flex-direction: column; height: auto; margin-top: 32px; }
  .stage { flex: none; height: 64px; transition: height 300ms var(--ease-in-out); }
  .stage.is-open { height: auto; min-height: 320px; }
  .stage__label { position: static; transform: none; display: block; padding: 20px; font-size: 18px; line-height: 24px; }
  .stage__pic { position: static; width: 100%; height: 180px; }
  .stage.is-open .stage__label { display: none; }
  .stage__body { position: static; width: auto; padding: 20px; display: none; }
  .stage.is-open .stage__body { display: flex; gap: 20px; }
  .stage__body h3 { font-size: 28px; }
  .stage__pic { position: static; width: 100%; height: 160px; order: 2; }
  .stage__body > h3, .stage__body > .stage__text { width: auto; }
  .stage__body p { font-size: 17px; }

  .build { padding: 40px 0 48px; }
  .build__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .build__head h2 { font-size: 17vw; }
  .wall { margin: 24px 16px 0; }
  .wall { grid-auto-rows: 170px; gap: 12px 6px; }
  .wall figure:nth-child(3n+1) { grid-column: 1 / -1; }
  .wall .wall__wide { grid-row: span 1; }
  .wall figcaption span:last-child { display: none; }
  .wall figcaption { white-space: normal; height: auto; min-height: 22px; line-height: 1.3; padding: 4px 0 2px; }

  .band { grid-template-columns: 1fr; padding: 32px 20px; gap: 12px; }
  .band--head { min-height: 36svh; }
  .band--head p { position: static; margin-bottom: 24px; font-size: 17px; }
  .band--head { align-items: start; }
  .band--head h2 { align-self: end; }
  .band--head h2 { font-size: 13vw; }
  .band h3 { grid-column: 1; font-size: 22px; }
  .band p { grid-column: 1; font-size: 17px; }

  .cta { grid-template-columns: 1fr; min-height: 0; }
  .cta__main { grid-column: 1; padding: 24px 20px; }
  .cta__main h2 { font-size: 30px; }
  .cta__main .button { width: 100%; }
  .cta__list { grid-template-columns: 1fr; }
  .cta__pic { grid-column: 1; aspect-ratio: 10 / 7; }

  .brief { padding: 32px 0 48px; min-height: 0; }
  .strip { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .strip__track { animation: none; }
  .strip img { height: 110px; }
  .brief__head { font-size: 9vw; margin-top: 40px; }
  .builder__group { grid-column: 1 / -1; }
  .cells { grid-template-columns: 1fr; }
  .cell { height: 60px; text-align: left; }

  .foot { padding: 32px 16px 24px; }
  .mark { height: 22svh; min-height: 120px; }
  .mark span { font-size: 8vw; padding-bottom: 0.1em; }
  .foot__grid { margin-top: 40px; }
  .foot__links { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .foot__contact { grid-column: 1 / -1; }

  .credits__grid { grid-template-columns: 1fr 1fr; padding-inline: 16px; }
  .page__title { grid-column: 1 / -1; grid-row: auto; min-height: 40svh; padding: 16px; }
  .page__title h1 { font-size: 15vw; }
  .page__lead { grid-column: 1 / -1; grid-row: auto; }
  .page__photo, .page__photo--6, .page__photo--8 { grid-column: 1 / -1; grid-row: auto; min-height: 220px; }
  .page__text, .page__text--6, .page__action { grid-column: 1 / -1; grid-row: auto; padding: 20px; }
}
