/* Alireza Alikhani, portfolio.
   Blue-charcoal ground, off-white ink, one coral used only for signal: spikes, the lit region, the actions.
   One typeface (Archivo).

   Structure below the first screen, the same everywhere:
     section  = a spike rule with its number, a title column (title, region, live brain), a body
     body     = a six-column grid of panels
     panel    = a bordered cell with a letter and a short title, like a panel of a figure
   On a phone the title column becomes a compact header, panels stack, and the sections
   move to a tab bar at the bottom of the screen. */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #111318;
  --surface: #181b21;
  --surface-2: #252932;
  --line: rgba(214, 217, 224, 0.13);
  --ink: #d6d9e0;
  --muted: #8e94a3;
  --accent: #d8695e;
  --accent-hi: #e58176;
  --spike: #ee8b7c;
  --accent-ink: #15171b;

  --m: clamp(16px, 2.2vw, 32px);
  --gut: clamp(10px, 1.4vw, 20px);
  --gap: clamp(88px, 11vw, 168px);
  --bar: 56px;
  --tabs: 58px;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 20px); }
html.intro-lock { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--spike); color: var(--accent-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: var(--step-body); line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color 0.18s, transform 0.18s var(--ease);
}
.btn:hover { background: var(--accent-hi); transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: var(--step-small); }

/* ---------- the guide: fixed bar with a spike train ---------- */
.guide {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--bar);
  display: flex; align-items: center; gap: var(--gut);
  padding: 0 var(--m) 8px;
  background: var(--bg);
  transform: translateY(-101%); visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0s 0.45s;
}
.guide.is-on { transform: none; visibility: visible; transition: transform 0.45s var(--ease); }
.guide__name { font-weight: 600; text-decoration: none; margin-right: auto; }
.guide__map { width: 50px; height: 38px; flex: none; margin-right: clamp(4px, 1vw, 16px); }
.guide__links { display: flex; gap: clamp(14px, 2vw, 30px); font-size: var(--step-small); }
.guide__links a { display: block; padding: 10px 0; text-decoration: none; color: var(--muted); transition: color 0.2s; }
.guide__links a:hover, .guide__links a.is-here { color: var(--ink); }
.guide__links a.is-here { font-weight: 600; }
.guide__train { position: absolute; left: var(--m); right: var(--m); bottom: 0; height: 12px; border-bottom: 1px solid var(--line); }
.guide__train i { position: absolute; bottom: 0; width: 2px; margin-left: -1px; height: 9px; background: var(--muted); transition: background-color 0.3s, height 0.3s var(--ease); }
.guide__train i.is-past { background: var(--spike); height: 12px; }
.guide__fill { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--spike); transform-origin: 0 50%; transform: scaleX(0); }

/* the phone's tab bar is off on wider screens */
.tabs { display: none; }

/* ---------- first screen ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto auto;
  padding: var(--m);
}
.hero::before { /* the spotlight of the intro */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(circle at 50% 47%, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 34%);
  opacity: 0; transition: opacity 0.9s;
}
.intro-on .hero::before { opacity: 1; }
.spot-off .hero::before { opacity: 0; }

.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__still {
  position: absolute; z-index: -1; left: 50%; bottom: 0;
  height: min(126svh, 230vw); width: auto; max-width: none;
  transform: translateX(-47%); opacity: 0.75;
}
.js .hero__still { display: none; }

.nav { display: flex; align-items: center; gap: var(--gut); grid-row: 1; }
.nav__name { font-weight: 600; text-decoration: none; margin-right: auto; }
.nav__links { display: flex; gap: clamp(14px, 2vw, 30px); font-size: var(--step-small); }
.nav__links a { text-decoration: none; padding: 12px 0; }
.nav__links a:hover { text-decoration: underline; }

.mark {
  grid-row: 3;
  font-size: var(--mark-size, 23.4vw);
  font-weight: 800; font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.86;
  display: flex; justify-content: center;
  transform-origin: 50% 50%;
  will-change: transform;
  user-select: none;
}
.mark__row { position: relative; display: flex; white-space: nowrap; perspective: 1100px; min-height: 0.86em; }
.mark__probe { position: absolute; visibility: hidden; font-size: 200px; }
.slot { display: inline-flex; justify-content: center; flex: none; transition: width 0.26s var(--ease); transform-style: preserve-3d; }
/* Each letter is two stacked copies: the extruded side underneath, the metal face on top. */
.ch { position: relative; display: inline-block; color: transparent; }
.ch::before, .ch::after { content: attr(data-c); position: absolute; left: 0; top: 0; }
.ch::before {
  color: #3e4148;
  text-shadow: 0 0.006em 0 #53565e, 0 0.012em 0 #4c4f57, 0 0.018em 0 #44474e, 0 0.024em 0 #3b3e45, 0 0.03em 0 #33353b;
}
.ch::after, .mark__row:not(:has(.slot)) {
  color: #cfd3d9;
  background: linear-gradient(180deg, #ffffff 4%, #d5d9df 40%, #868b95 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bang { position: absolute; left: 50%; bottom: 0.1em; width: 0; height: 0; transform-origin: 0 0; }
.bang__dot { position: absolute; left: -0.085em; bottom: 0; width: 0.17em; height: 0.17em; border-radius: 50%; background: #e9ebef; }
.bang__bar {
  position: absolute; left: -0.075em; bottom: 0.24em; width: 0.15em; height: 0.46em;
  background: linear-gradient(180deg, #ffffff, #b9bdc5);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
  transform-origin: 50% 100%;
}

/* the membrane trace that opens the intro */
.trace { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.trace path { fill: none; stroke: var(--spike); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.hero__foot {
  grid-row: 4; position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--gut);
  padding-top: clamp(16px, 2.4vh, 28px);
}
.hero__say { font-size: var(--step-lead); line-height: 1.25; max-width: 28em; text-wrap: balance; }

.skip {
  position: absolute; right: var(--m); bottom: var(--m); z-index: 3;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: var(--step-small);
  padding: 12px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em;
}
.skip:hover { color: var(--ink); }

/* While the intro runs, the rest of the first screen waits. */
.intro-on .nav, .intro-on .hero__foot { opacity: 0; pointer-events: none; }
.intro-done .nav, .intro-done .hero__foot { transition: opacity 0.8s 0.1s; }
.intro-wait .mark__row { visibility: hidden; animation: show 0s 4s forwards; }
.intro-wait .nav, .intro-wait .hero__foot { animation: fade 0.5s 4s forwards; }
@keyframes show { to { visibility: visible; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- the rule: a flat membrane line with one spike, and the section's number ---------- */
.rule { display: flex; align-items: flex-end; padding-inline: var(--m); }
.rule svg { flex: none; width: 64px; height: 36px; overflow: visible; }
.rule path { fill: none; stroke: var(--spike); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rule span { flex: 1; height: 1px; margin-bottom: 7.5px; background: var(--line); transform-origin: 0 50%; }
.rule b { flex: none; margin-left: 14px; font-size: var(--step-small); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
.js .rule path { stroke-dasharray: 150; stroke-dashoffset: 150; }
.js .rule span { transform: scaleX(0); }
.js .rule.in path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s var(--ease); }
.js .rule.in span { transform: none; transition: transform 1.1s var(--ease) 0.35s; }

/* ---------- the atlas: the contents, drawn on a brain ---------- */
.atlas { margin-top: clamp(56px, 7vw, 104px); }
.atlas__grid {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gut);
  padding-inline: var(--m); margin-top: clamp(24px, 3vw, 44px); align-items: center;
}
.atlas__say { grid-column: 1 / -1; display: grid; gap: 10px; margin-bottom: clamp(20px, 3vw, 40px); }
.atlas__say h2 { font-size: var(--step-head); font-weight: 800; font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.9; text-wrap: balance; }
.atlas__say p { color: var(--muted); max-width: 34em; }
.atlas__map { grid-column: 1 / span 5; width: 100%; aspect-ratio: 13 / 10; }
.atlas__list { grid-column: 7 / -1; }
.atlas__list a {
  display: grid; grid-template-columns: 2.6em minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.1fr); column-gap: 14px; align-items: baseline;
  min-height: 64px; padding: 16px 0; border-top: 1px solid var(--line);
  text-decoration: none; transition: padding-left 0.3s var(--ease), color 0.2s;
}
.atlas__list li:last-child a { border-bottom: 1px solid var(--line); }
.atlas__list .n { color: var(--spike); font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--step-small); }
.atlas__list .t { font-size: var(--step-lead); font-weight: 700; font-stretch: 75%; line-height: 1.1; }
.atlas__list .f { color: var(--muted); }
.atlas__list a:hover, .atlas__list a:focus-visible { padding-left: 10px; }
.atlas__list a:hover .t, .atlas__list a:focus-visible .t { color: var(--spike); }

/* ---------- a section ---------- */
.sec { margin-top: var(--gap); }
.sec__grid {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gut);
  padding-inline: var(--m); margin-top: clamp(24px, 3vw, 44px); align-items: start;
}
.sec__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--bar) + 24px); display: grid; gap: 10px; justify-items: start; }
.sec__head h2 { font-size: var(--step-head); font-weight: 800; font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.9; }
.sec__region { font-size: var(--step-small); color: var(--muted); }
.sec__region b { color: var(--spike); font-weight: 600; margin-right: 0.35em; }
.sec__desc { color: var(--muted); max-width: 18em; }
.sec__body { grid-column: 5 / -1; min-width: 0; }

/* the brain beside every section title: a live network, with that section's region lit */
.net__canvas { touch-action: pan-y; }
.locus { width: min(100%, 400px); aspect-ratio: 13 / 10; margin: 4px 0 0 -14px; }
@media (max-height: 760px) and (min-width: 1001px) { .locus { width: min(100%, 290px); } }

/* ---------- panels ---------- */
.panels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gut); }
.panel {
  grid-column: span 6; min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(16px, 1.7vw, 24px);
  border: 1px solid var(--line);
}
.panel.s2 { grid-column: span 2; }
.panel.s3 { grid-column: span 3; }
.panel.s4 { grid-column: span 4; }
.panel__t { display: flex; align-items: baseline; gap: 0.7em; font-size: var(--step-small); font-weight: 600; color: var(--muted); line-height: 1.2; }
.panel__t i { font-style: normal; font-weight: 700; color: var(--spike); }
.panel--go { justify-content: space-between; align-items: flex-start; }
.panel--go .btn { margin-top: 4px; }
a.panel--link { text-decoration: none; transition: border-color 0.2s, background-color 0.2s; }
a.panel--link b { font-size: var(--step-lead); font-weight: 700; font-stretch: 75%; line-height: 1.1; }
.panel__sub { color: var(--muted); font-size: var(--step-small); overflow-wrap: anywhere; }
a.panel--link:hover, a.panel--link:focus-visible { border-color: var(--spike); background: var(--surface); }
a.panel--link:hover b { color: var(--spike); }

.lead { font-size: var(--step-lead); line-height: 1.32; text-wrap: pretty; }
.cap, .note { font-size: var(--step-small); color: var(--muted); max-width: 64em; }
.note { margin-top: 20px; }

/* a labelled list: the label on the left, the value on the right */
.spec > div { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); column-gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.spec > div:first-child { border-top: 0; padding-top: 0; }
.spec > div:last-child { padding-bottom: 0; }
.spec dt { color: var(--muted); font-size: var(--step-small); padding-top: 0.18em; }
.spec--row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gut); }
.spec--row > div { grid-template-columns: 1fr; row-gap: 2px; border-top: 0; padding: 0; }

/* figures set large */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gut); row-gap: 18px; }
.stats b { display: block; font-size: var(--step-head); font-weight: 800; font-stretch: 62%; line-height: 1; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.stats span { display: block; margin-top: 6px; font-size: var(--step-small); color: var(--muted); line-height: 1.35; }
.stats .is-dim b { color: var(--muted); }
.stats--col { grid-template-columns: 1fr; }

/* research */
.study + .study { margin-top: clamp(40px, 5vw, 72px); }
.study__t { font-size: var(--step-lead); font-weight: 600; line-height: 1.2; text-wrap: balance; margin-bottom: 16px; }
.study__t span { display: block; font-size: var(--step-small); font-weight: 600; color: var(--spike); margin-bottom: 6px; }

.lif__canvas { width: 100%; height: clamp(150px, 18vw, 230px); background: var(--surface); }
.lif__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; }
.lif__read { color: var(--muted); }
.lif__num { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; min-width: 2.2ch; text-align: right; }
.lif__ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 28px; }
.lif__field label, .lif__seg legend { display: block; font-size: var(--step-small); color: var(--muted); margin-bottom: 6px; }
.lif__field input[type="range"] { width: min(220px, 62vw); height: 44px; margin: 0; accent-color: var(--accent-hi); background: transparent; cursor: pointer; }
.lif__seg { display: flex; flex-wrap: wrap; }
.lif__seg legend { float: left; width: 100%; }
.lif__seg label { position: relative; cursor: pointer; }
.lif__seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lif__seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; background: var(--surface-2); font-weight: 500; font-size: var(--step-small); transition: background-color 0.18s, color 0.18s; }
.lif__seg label:hover span { background: #313642; }
.lif__seg input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.lif__seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.bars { display: grid; row-gap: 16px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: baseline; }
.bar__val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bar__track { grid-column: 1 / -1; position: relative; height: 12px; background: var(--surface-2); }
.bar__track i {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--from) * 100%); width: calc((var(--to) - var(--from)) * 100%);
  background: var(--ink); transform-origin: 0 50%;
}
.bar__track i.is-accent { background: var(--spike); }
.bar__track i.is-range { background: var(--muted); }
.js .rv .bar__track i { transform: scaleX(0); }
.js .rv.in .bar__track i { transform: none; transition: transform 1s var(--ease) 0.25s; }

/* background: the curriculum as a spike raster */
.raster { --label: 46%; }
.raster__axis { margin-left: var(--label); display: grid; grid-template-columns: repeat(9, 1fr); font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; padding-bottom: 8px; }
.raster__row { display: grid; grid-template-columns: var(--label) 1fr; align-items: center; min-height: 56px; border-top: 1px solid var(--line); }
.raster__row p { padding: 8px 16px 8px 0; line-height: 1.3; }
.raster__row b { display: block; font-weight: 500; }
.raster__row p span { display: block; font-size: var(--step-small); color: var(--muted); margin-top: 2px; }
.raster__track {
  position: relative; height: 22px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 9));
}
.raster__track i { /* a burst of spikes for as long as the role lasted */
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--a) / 9 * 100%); width: max(4px, calc((var(--b) - var(--a)) / 9 * 100%));
  background: repeating-linear-gradient(90deg, var(--spike) 0 2px, transparent 2px 5px); opacity: 0.85;
  transition: opacity 0.2s;
}
.raster__row:hover .raster__track i { opacity: 1; }
.js .rv .raster__track i { clip-path: inset(0 100% 0 0); }
.js .rv.in .raster__track i { clip-path: inset(0 0 0 0); transition: clip-path 1.2s var(--ease) 0.25s; }

/* contact */
.reach { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
.reach img { width: clamp(52px, 6vw, 80px); height: clamp(52px, 6vw, 80px); border-radius: 50%; object-fit: cover; flex: none; }
.reach__mail {
  font-size: clamp(1.25rem, 4.6vw, 3.25rem); font-weight: 700; font-stretch: 62%; line-height: 1.05; letter-spacing: -0.01em;
  text-decoration: none; overflow-wrap: anywhere; min-width: 0; transition: color 0.2s;
}
.reach__mail:hover { color: var(--spike); }

/* footer */
.foot { margin-top: var(--gap); padding: 20px var(--m) 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--step-small); color: var(--muted); border-top: 1px solid var(--line); }
.foot a { padding: 6px 0; }

/* ---------- entrances ---------- */
.js .rv { opacity: 0; transform: translate3d(0, 18px, 0); }
.js .rv.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }

/* ---------- tablet: the title column becomes a header above the body ---------- */
@media (max-width: 1000px) {
  .sec__head, .sec__body { grid-column: 1 / -1; }
  .sec__head {
    position: static;
    grid-template-columns: minmax(0, 1fr) min(44%, 300px); column-gap: var(--gut); align-items: start;
  }
  .sec__head > * { grid-column: 1; }
  .sec__head .locus { grid-column: 2; grid-row: 1 / span 4; width: 100%; margin: -6px 0 0; justify-self: end; }
  .sec__body { margin-top: 24px; }
  .atlas__map { grid-column: 1 / span 6; }
  .atlas__list { grid-column: 7 / -1; }
  .atlas__list a { grid-template-columns: 2.4em minmax(0, 1fr); row-gap: 2px; }
  .atlas__list .r, .atlas__list .f { grid-column: 2; font-size: var(--step-small); }
  .raster { --label: 50%; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  :root { --gap: 72px; }
  html { scroll-padding-top: calc(var(--bar) + 12px); }
  body { padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom, 0px)); }

  .nav__links, .guide__links { display: none; }
  .guide { padding-left: max(var(--m), env(safe-area-inset-left)); padding-right: max(var(--m), env(safe-area-inset-right)); }

  /* sections in a bar at the bottom, where the thumb is */
  .tabs {
    position: fixed; inset: auto 0 0 0; z-index: 20;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--bg); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(101%); visibility: hidden;
    transition: transform 0.4s var(--ease), visibility 0s 0.4s;
  }
  .tabs.is-on { transform: none; visibility: visible; transition: transform 0.4s var(--ease); }
  .tabs a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    min-height: var(--tabs); padding: 0 2px;
    font-size: 0.8125rem; font-stretch: 76%; font-weight: 500; line-height: 1; color: var(--muted); text-decoration: none;
  }
  .tabs a::before { content: ""; width: 2px; height: 9px; background: var(--muted); transition: height 0.25s var(--ease), background-color 0.25s; }
  .tabs a.is-here { color: var(--ink); font-weight: 700; }
  .tabs a.is-here::before { height: 14px; background: var(--spike); }

  .hero__foot { flex-direction: column; align-items: stretch; gap: 16px; }
  .hero__say { font-size: 1.0625rem; line-height: 1.38; }
  .hero__foot .btn { width: 100%; min-height: 52px; }

  .atlas__say { margin-bottom: 8px; }
  .atlas__map { grid-column: 1 / -1; width: min(100%, 380px); justify-self: center; }
  .atlas__list { grid-column: 1 / -1; margin-top: 8px; }
  .atlas__list a { min-height: 68px; }

  .sec__head { grid-template-columns: minmax(0, 1fr) 42%; }
  .sec__desc { font-size: var(--step-small); }

  .panels { grid-template-columns: 1fr; gap: 10px; }
  .panel, .panel.s2, .panel.s3, .panel.s4 { grid-column: 1 / -1; padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats--col { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; }
  .stats--col b { font-size: 2rem; }
  .spec > div { grid-template-columns: 1fr; row-gap: 2px; }
  .spec--row { grid-template-columns: 1fr; row-gap: 12px; }
  .lif__row, .lif__ctl { flex-direction: column; align-items: stretch; }
  .lif__field input[type="range"] { width: 100%; }
  .lif__seg label { flex: 1; }
  .lif__seg span { width: 100%; justify-content: center; }
  .raster__axis { margin-left: 0; }
  .raster__row { grid-template-columns: 1fr; padding-bottom: 12px; }
  .raster__row p { padding-right: 0; }
  .panel--go .btn, .panel .btn { width: 100%; }
  .reach { align-items: flex-start; flex-direction: column; }
  .foot { padding-bottom: 20px; }
}

/* ---------- reduced motion: keep the content, drop the travel ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .rule path, .js .rule span, .js .rv .bar__track i, .js .rv .raster__track i {
    opacity: 1; transform: none; clip-path: none; stroke-dashoffset: 0; transition: none;
  }
  .btn, .guide, .tabs { transition: none; }
}
