/* R2B Agency · landing. Palette: Volcanic Slag #3D3D3D, Alpine Ice #EBECEE, Summit Stone #8A8C8F, Lichen Green #C4E326.
   No pure black or white; darker and lighter steps are mixed from the palette itself.
   Motion model: site.js writes scroll progress into CSS custom properties (--hp, --k, --m, --sp, --p, --fi, --tp) and adds
   html.motion only when the visitor has not asked for reduced motion. Every default below is the FINAL, static state,
   so the page is complete without JavaScript and with reduced motion. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../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("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --slag: #3D3D3D;
  --slag-deep: #333333;            /* slag, one step down, for depth */
  --slag-line: #4F4F50;
  --ice: #EBECEE;
  --ice-soft: #F3F4F5;             /* never #FFF */
  --ice-line: #D3D4D7;
  --stone: #8A8C8F;
  --stone-dark: #66686B;           /* Summit Stone darkened for text on Alpine Ice (contrast) */
  --stone-light: #A7A9AC;          /* Summit Stone lightened for small text on Volcanic Slag (contrast) */
  --lichen: #C4E326;
  --lichen-press: #B1CE1E;
  --danger: #E8A39A;               /* soft red for errors on dark */
  --radius: 16px;
  --wrap: 1160px;
  --head: 68px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--slag); color: var(--ice); font: 400 17px/1.6 var(--font); text-rendering: optimizeLegibility; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.7rem, 6.4vw, 5.6rem); font-weight: 760; line-height: .98; letter-spacing: -0.035em; }
h1 .line { display: block; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 720; line-height: 1.04; max-width: 20ch; margin-bottom: 1.2rem; }
h3 { font-size: 1.12rem; font-weight: 650; line-height: 1.2; margin-bottom: .5rem; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -64px; background: var(--lichen); color: var(--slag); padding: .5rem .9rem; border-radius: 8px; z-index: 60; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--lichen); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: var(--head); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.eyebrow { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--lichen); margin-bottom: 1.1rem; }
.eyebrow--dark { color: var(--stone-dark); }
.small { font-size: .9rem; color: var(--stone-light); }
.lead { font-size: clamp(1.06rem, 1.4vw, 1.2rem); max-width: 50ch; margin-top: 1.6rem; }

/* ---------- header: dark glass; light while it sits over the light hero (set by site.js) ---------- */
.top { position: sticky; top: 0; z-index: 30; margin-bottom: calc(var(--head) * -1); background: color-mix(in srgb, var(--slag) 96%, transparent); color: var(--ice); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--slag-line); transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
.top[data-light] { background: color-mix(in srgb, var(--ice) 96%, transparent); color: var(--slag); border-color: color-mix(in srgb, var(--stone) 30%, var(--ice)); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--head); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__name { font-weight: 720; letter-spacing: .01em; }
.brand__mark--dark { display: none; }
.top[data-light] .brand__mark--dark { display: block; }
.top[data-light] .brand__mark--light { display: none; }
.nav { display: flex; align-items: center; gap: 1.7rem; font-size: .95rem; }
.nav a:not(.btn) { text-decoration: none; padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px; transition: background-size .25s var(--ease); }
.nav a:not(.btn):hover, .nav a:not(.btn).is-current { background-size: 100% 1px; }
.top[data-light] .nav .btn { background: var(--slag); border-color: var(--slag); color: var(--ice); }
.top[data-light] .nav .btn:hover { background: var(--lichen); border-color: var(--lichen); color: var(--slag); }
.menu { display: none; background: none; color: inherit; border: 1px solid currentColor; border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.menu__bar, .menu__bar::before, .menu__bar::after { display: block; width: 18px; height: 2px; background: currentColor; margin: 0 auto; position: relative; content: ""; transition: transform .25s var(--ease), background-color .2s; }
.menu__bar::before { position: absolute; top: -6px; } .menu__bar::after { position: absolute; top: 6px; }
.menu[aria-expanded="true"] .menu__bar { background: transparent; }
.menu[aria-expanded="true"] .menu__bar::before { transform: translateY(6px) rotate(45deg); background: currentColor; }
.menu[aria-expanded="true"] .menu__bar::after { transform: translateY(-6px) rotate(-45deg); background: currentColor; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 50px; padding: 0 1.5rem; border-radius: 999px; background: var(--lichen); color: var(--slag); text-decoration: none; border: 1px solid var(--lichen); cursor: pointer; font: inherit; font-weight: 650; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease); }
.btn:hover { background: var(--lichen-press); border-color: var(--lichen-press); }
.btn:active { transform: translateY(1px); }
.btn--dark { background: var(--slag); border-color: var(--slag); color: var(--ice); }
.btn--dark:hover { background: var(--lichen); border-color: var(--lichen); color: var(--slag); }
.btn--line { background: transparent; border-color: color-mix(in srgb, var(--slag) 55%, transparent); color: var(--slag); }
.btn--line:hover { background: var(--slag); border-color: var(--slag); color: var(--ice); }
.btn--small { min-height: 40px; padding: 0 1.1rem; font-size: .92rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- scroll thread (desktop, decorative): one line that runs through every chapter ---------- */
.thread { display: none; }
@media (min-width: 1280px) {
  .js .thread { display: block; position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 25; width: 34px; padding: 12px 0; border-radius: 999px; background: color-mix(in srgb, var(--slag) 96%, transparent); border: 1px solid var(--slag-line); }
}
.thread__line { position: absolute; left: 50%; top: 18px; bottom: 18px; width: 1px; background: var(--slag-line); }
.thread__fill { position: absolute; inset: 0; background: var(--lichen); transform-origin: top; transform: scaleY(var(--tp, 0)); }
.thread__marks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; position: relative; }
.thread__marks li { text-align: center; font: 500 10px/1 var(--mono); color: var(--stone-light); }
.thread__marks span { display: inline-block; padding: 3px 0; background: var(--slag); transition: color .3s; }
.thread__marks li.is-active span { color: var(--lichen); }

/* ---------- 01 · hero ---------- */
.hero { --hp: 0; position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: max(660px, 100svh); padding: calc(var(--head) + 56px) 0 112px; background: var(--ice); color: var(--slag); }
.hero__media, .hero__signal { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; transform-origin: 68% 46%; transform: translate3d(0, calc(var(--hp) * 9%), 0) scale(calc(1.02 + var(--hp) * .1)); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(0deg, rgb(61 61 61 / calc(var(--hp) * .9)), rgb(61 61 61 / calc(var(--hp) * .9))), linear-gradient(90deg, rgb(235 236 238 / .95) 0%, rgb(235 236 238 / .82) 32%, rgb(235 236 238 / 0) 60%); }
.hero__signal { fill: none; }
.hero__threads path { stroke: var(--lichen); stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: .85; }
.hero__node { fill: var(--lichen); }
.hero__content { position: relative; transform: translate3d(0, calc(var(--hp) * -60px), 0); opacity: calc(1 - var(--hp) * .7); }
.hero__content .lead { color: color-mix(in srgb, var(--slag) 90%, var(--stone)); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.hero__strip { list-style: none; margin: 2.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 0; font: 500 .74rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--stone-dark); }
.hero__strip li { display: inline-flex; align-items: center; }
.hero__strip li + li::before { content: ""; width: 28px; height: 1px; margin: 0 .8rem; background: currentColor; }
.hero__cue { position: absolute; left: 50%; bottom: 28px; width: 30px; height: 48px; margin-left: -15px; border: 1px solid color-mix(in srgb, var(--slag) 45%, transparent); border-radius: 999px; }
.hero__cue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--slag); }

/* ---------- 02 + 03 · story: one sticky stage under the problem, the pivot and the system ---------- */
.story { --k: 0; --m: 0; position: relative; background: var(--slag); }
.story__stage { position: sticky; top: 0; height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; overflow: hidden; z-index: 0; }
.story__layer { position: absolute; inset: 0; }
.story__layer img, .story__static img { width: 100%; height: 100%; object-fit: cover; }
.story__layer--fragments img { transform: scale(calc(1.08 - var(--k) * .08)); }
.story__layer--system { display: none; }
.story__stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgb(51 51 51 / .35)); }
.story__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.story__segs .seg { stroke: var(--lichen); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center;
  transform: translate(calc(var(--dx) * (1 - var(--k))), calc(var(--dy) * (1 - var(--k)))) rotate(calc(var(--r) * (1 - var(--k)))); }
.story__nodes circle { fill: var(--lichen); stroke: var(--slag); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: var(--k); }
.story__step { position: relative; z-index: 1; }
.story__step--problem { min-height: 100vh; min-height: 100svh; padding: calc(var(--head) + 12vh) 0 14vh; display: flex; align-items: center; }
.story__step--pivot { min-height: 80vh; min-height: 80svh; display: grid; place-items: center; padding: 0 20px; }
.story__step--system { min-height: 125vh; min-height: 125svh; padding: 30vh 0 16vh; display: flex; align-items: flex-end; }
.story__step .wrap { display: flex; }
.story__step--system .wrap { justify-content: flex-end; }
/* without motion (no JS or reduced motion) the system chapter brings its own still image: a clean cut, nothing hidden */
.story__static { position: absolute; inset: 0; z-index: -1; }
.panel { max-width: 600px; padding: clamp(1.5rem, 3.2vw, 2.6rem); border-radius: 22px; box-shadow: 0 30px 80px -40px rgb(51 51 51 / .7); }
.panel--light { background: var(--ice-soft); color: var(--slag); border: 1px solid var(--ice-line); }
.panel--dark { background: var(--slag); color: var(--ice); border: 1px solid var(--slag-line); }
.panel--dark > p:not(.eyebrow):not(.small) { color: color-mix(in srgb, var(--ice) 88%, var(--stone)); }
.breaks { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 1.6rem; }
.breaks li { position: relative; padding-top: 1rem; border-top: 1px dashed var(--stone); }
.breaks li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--slag); }
.breaks .mono { display: block; margin-bottom: .4rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; }
.breaks p { margin: 0; font-size: .95rem; color: color-mix(in srgb, var(--slag) 90%, var(--stone)); }
.pivot { margin: 0; padding: .35em .8em; border-radius: 999px; background: color-mix(in srgb, var(--slag) 90%, transparent); color: var(--ice); font-size: clamp(1.6rem, 4.4vw, 3.6rem); font-weight: 720; letter-spacing: -0.02em; line-height: 1.1; text-align: center; }
.pivot em { font-style: normal; color: var(--lichen); }
.chain { list-style: none; margin: 1.6rem 0 1.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .55rem 0; }
.chain li { display: inline-flex; align-items: center; }
.chain li + li::before { content: ""; width: 14px; height: 1px; background: var(--lichen); }
.chain span { font: 500 .78rem/1 var(--mono); letter-spacing: .04em; padding: .5rem .75rem; border: 1px solid var(--slag-line); border-radius: 999px; transition: border-color .2s, color .2s; }
.chain li:hover span { border-color: var(--lichen); color: var(--lichen); }

/* ---------- 04 · services: a light sheet that opens from a mask as it rises over the dark stage ---------- */
.services { --sp: 1; position: relative; z-index: 2; background: var(--ice); color: var(--slag); padding: clamp(6rem, 11vw, 9rem) 0 clamp(4rem, 8vw, 6.5rem);
  clip-path: inset(0 calc((1 - var(--sp)) * 6%) 0 round calc((1 - var(--sp)) * 48px) calc((1 - var(--sp)) * 48px) 0 0); }
.services__seam { position: absolute; top: 28px; left: 0; width: 100%; height: 72px; fill: none; }
.services__seam path { stroke: var(--slag); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--sp)); opacity: .5; }
.services__head { margin-bottom: 2.4rem; }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 220px; padding: 1.5rem; border-radius: var(--radius); background: var(--ice-soft); border: 1px solid var(--ice-line); transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease); }
.tile:hover { transform: translateY(-4px); border-color: var(--stone); box-shadow: 0 24px 50px -30px rgb(61 61 61 / .45); }
.tile p { margin: 0; font-size: .95rem; color: color-mix(in srgb, var(--slag) 90%, var(--stone)); }
.tile__n { display: block; margin-bottom: auto; padding-bottom: 2.2rem; color: var(--stone-dark); }
.tile--feature { grid-column: span 2; grid-row: span 2; background: var(--slag); color: var(--ice); border-color: var(--slag); padding: clamp(1.6rem, 3vw, 2.4rem); }
.tile--feature h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 720; max-width: 12ch; }
.tile--feature p { font-size: 1.04rem; max-width: 40ch; color: color-mix(in srgb, var(--ice) 88%, var(--stone)); }
.tile--feature .tile__n, .tile--dark .tile__n { color: var(--stone-light); }
.tile--wide { grid-column: span 2; }
.tile--dark { background: var(--slag-deep); color: var(--ice); border-color: var(--slag-deep); }
.tile--dark p { color: color-mix(in srgb, var(--ice) 88%, var(--stone)); }
.tile__glyph { position: absolute; right: 1.2rem; top: 1.2rem; width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .7; transition: transform .6s var(--ease); }
.tile--feature .tile__glyph { width: 120px; height: 120px; right: 1.8rem; top: 1.8rem; }
.tile__glyph .g-accent { stroke: var(--lichen); stroke-width: 2.2; }
.tile__glyph circle.g-accent { fill: var(--lichen); }
.tile:hover .tile__glyph { transform: rotate(-8deg) scale(1.06); }
.note { margin: 2.4rem 0 0; max-width: 70ch; font-size: .95rem; border-left: 3px solid var(--slag); padding-left: 1rem; color: color-mix(in srgb, var(--slag) 90%, var(--stone)); }

/* ---------- 05 · how it works: a rail that fills and lights each stage ---------- */
.process { position: relative; z-index: 1; background: var(--slag-deep); padding: clamp(5rem, 10vw, 8rem) 0; overflow: hidden; }
.process::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--slag-line) 1px, transparent 1px), linear-gradient(90deg, var(--slag-line) 1px, transparent 1px); background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%); }
.process .wrap { position: relative; }
.flow-wrap { --p: 1; position: relative; margin-top: 3.2rem; }
.flow__rail { position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--slag-line); }
.flow__fill { position: absolute; inset: 0; background: var(--lichen); transform-origin: left; transform: scaleX(var(--p)); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.flow__step { position: relative; padding-top: 3rem; }
.flow__node { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--lichen); border: 2px solid var(--lichen); box-shadow: 0 0 0 6px rgb(196 227 38 / .14); transition: background-color .35s, border-color .35s, box-shadow .35s, transform .35s var(--ease); }
.motion .flow__step:not(.is-on) .flow__node { background: var(--slag-deep); border-color: var(--stone); box-shadow: none; transform: scale(.8); }
.flow__step .mono { display: block; margin-bottom: .8rem; color: var(--lichen); text-transform: uppercase; letter-spacing: .12em; }
.flow__step p { color: color-mix(in srgb, var(--ice) 84%, var(--stone)); font-size: .97rem; }

/* ---------- 06 · finale: the closing image opens from a mask, the form sits on solid ground ---------- */
.finale { --fi: 0; position: relative; z-index: 1; background: var(--slag); padding: 0 0 clamp(4rem, 8vw, 6rem); overflow: hidden; }
.finale__media { position: absolute; left: 0; right: 0; top: 0; height: min(92vh, 860px); overflow: hidden;
  clip-path: inset(calc(var(--fi) * 9%) calc(var(--fi) * 6%) 0 round calc(var(--fi) * 40px)); }
.finale__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; transform: scale(calc(1 + var(--fi) * .14)); transform-origin: 70% 40%;
  -webkit-mask-image: linear-gradient(180deg, #000 42%, transparent 82%); mask-image: linear-gradient(180deg, #000 42%, transparent 82%); }
.finale__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(61 61 61 / 0) 26%, rgb(61 61 61 / .7) 56%, rgb(61 61 61 / .7) 100%); }
.finale__grid { position: relative; display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; padding-top: calc(min(92vh, 860px) * .58); }
.finale__copy > p:not(.eyebrow):not(.small) { color: color-mix(in srgb, var(--ice) 88%, var(--stone)); max-width: 46ch; }
.fitlist { list-style: none; margin: 1.6rem 0; padding: 0; display: grid; gap: .7rem; }
.fitlist li { position: relative; padding-left: 1.6rem; font-size: .97rem; }
.fitlist li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; border-radius: 50%; background: var(--lichen); }
.fitlist li:last-child::before { background: transparent; border: 1px solid var(--stone-light); }

/* form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; background: var(--slag-deep); border: 1px solid var(--slag-line); border-radius: 22px; padding: clamp(1.3rem, 3vw, 2.2rem); box-shadow: 0 40px 90px -50px rgb(30 30 30 / .9); }
.form > .btn--block { grid-column: 1 / -1; white-space: nowrap; }
.field { grid-column: 1 / -1; display: grid; gap: .35rem; }
.field--half { grid-column: span 1; }
label { font-size: .92rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--stone-light); }
input, select, textarea { font: inherit; color: var(--ice); background: var(--slag); border: 1px solid var(--slag-line); border-radius: 10px; padding: .75rem .9rem; min-height: 48px; width: 100%; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 120px; }
input:hover, select:hover, textarea:hover { border-color: var(--stone); }
input:focus, select:focus, textarea:focus { border-color: var(--lichen); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lichen) 30%, transparent); }
[aria-invalid="true"] { border-color: var(--danger); }
.error { margin: 0; color: var(--danger); font-size: .85rem; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: .7rem; }
.field--check input { width: 22px; min-height: 22px; height: 22px; margin-top: .2rem; accent-color: var(--lichen); }
.field--check label { font-weight: 400; font-size: .9rem; }
.field--check .error { grid-column: 2; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { grid-column: 1 / -1; margin: 0; min-height: 1.4em; font-size: .92rem; }
.status[data-tone="ok"] { color: var(--lichen); }
.status[data-tone="warn"] { color: var(--ice); background: var(--slag); border: 1px dashed var(--stone); border-radius: 10px; padding: .7rem .9rem; }
.status[data-tone="error"] { color: var(--danger); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--slag-line); padding: 2.2rem 0 2.6rem; background: var(--slag-deep); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; }
.brand--foot { gap: .55rem; }
.foot__nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .92rem; }
.foot__nav a { text-decoration: none; color: var(--stone-light); transition: color .2s; }
.foot__nav a:hover { color: var(--ice); }
.foot__legal { margin: 0; color: var(--stone-light); font-size: .88rem; }

/* ---------- motion layer: only with html.motion (JS on, reduced motion off) ---------- */
.motion .hero__media, .motion .hero__signal { will-change: transform; }
.motion .story__layer--system { display: block; clip-path: circle(calc(var(--m) * 82%) at 50% 58%); }
.motion .story__layer--system img { transform: scale(calc(1.12 - var(--m) * .12)); }
.motion .story__static { display: none; }
.motion .story__stage::after { background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgb(51 51 51 / .35)), linear-gradient(180deg, transparent 70%, rgb(61 61 61 / calc(var(--m) * .8))); }
.motion .pivot { transform: scale(calc(.9 + var(--k) * .1)); }

.motion .hero__threads path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) .2s forwards; }
.motion .hero__threads path:nth-child(2) { animation-delay: .32s; }
.motion .hero__threads path:nth-child(3) { animation-delay: .44s; }
.motion .hero__threads path:nth-child(4) { animation-delay: .56s; }
.motion .hero__threads path:nth-child(5) { animation-delay: .68s; }
.motion .hero__node { transform-box: fill-box; transform-origin: center; animation: pulse 2.8s ease-in-out 1.6s infinite; }
.motion .hero__content > * { animation: rise .8s var(--ease) both; }
.motion .hero__content > :nth-child(2) { animation-delay: .08s; }
.motion .hero__content > :nth-child(3) { animation-delay: .16s; }
.motion .hero__content > :nth-child(4) { animation-delay: .24s; }
.motion .hero__content > :nth-child(5) { animation-delay: .32s; }
.motion .hero__media img { animation: settle 1.6s var(--ease) both; }
.motion .hero__cue span { animation: cue 1.8s ease-in-out infinite; }

.motion [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }
.motion .tile[data-reveal].is-in { transition: opacity .7s var(--ease) var(--d, 0s), transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease); }
.motion .tile[data-reveal].is-in:hover { transform: translateY(-4px); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.8); opacity: .55; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.08); filter: blur(6px); } to { transform: none; filter: none; } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(16px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

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

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--feature { grid-row: span 1; min-height: 300px; }
  .flow { grid-template-columns: 1fr 1fr; row-gap: 2.6rem; }
  .flow__rail { display: none; }
  .finale__grid { grid-template-columns: 1fr; }
  .breaks { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --head: 64px; }
  .menu { display: inline-grid; place-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: var(--head); flex-direction: column; align-items: stretch; gap: 0; background: var(--slag); color: var(--ice); border-bottom: 1px solid var(--slag-line); padding: .5rem 20px 1rem; display: none; }
  .nav[data-open="true"] { display: flex; }
  .nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--slag-line); background: none; }
  .nav .btn { margin-top: .9rem; }
  .top[data-light] .nav { background: var(--ice); color: var(--slag); border-color: var(--ice-line); }
  .top[data-light] .nav a:not(.btn) { border-color: var(--ice-line); }

  .hero { align-items: flex-end; padding: calc(var(--head) + 36svh) 0 72px; }
  .hero::before { background: linear-gradient(0deg, rgb(61 61 61 / calc(var(--hp) * .9)), rgb(61 61 61 / calc(var(--hp) * .9))), linear-gradient(180deg, rgb(235 236 238 / 0) 18%, rgb(235 236 238 / .9) 40%, var(--ice) 50%); }
  .hero__media, .hero__signal { bottom: auto; height: 62svh; }
  .hero__cue { display: none; }
  .actions .btn { flex: 1 1 100%; }

  .story__step--problem { padding: calc(var(--head) + 8vh) 0 10vh; }
  .story__step--system { padding: 24vh 0 10vh; }
  .panel { border-radius: 18px; }

  .bento { grid-template-columns: 1fr; }
  .tile--feature, .tile--wide { grid-column: auto; }
  .tile { min-height: 0; }
  .tile__n { padding-bottom: 1.4rem; }
  .tile__glyph { width: 48px; height: 48px; }
  .tile--feature .tile__glyph { width: 72px; height: 72px; right: 1.2rem; top: 1.2rem; }

  .flow { grid-template-columns: 1fr; row-gap: 2.2rem; }
  .flow__rail { display: block; left: 10px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .flow__fill { transform-origin: top; transform: scaleY(var(--p)); }
  .flow__step { padding: 0 0 0 2.6rem; }

  .finale__media { height: 64svh; }
  .finale__grid { padding-top: 40svh; }
  .form { grid-template-columns: 1fr; }
  .field--half { grid-column: 1 / -1; }
}
@media print {
  .top, .thread, .story__stage, .hero__media, .hero__signal, .finale__media, .story__static { display: none !important; }
}
