/* Portfolio d'Abdellah Hailal · « Cause et effet ». Voir DESIGN.md.
   Mise en page : héros en deux zones (nom composé + graphe causal), puis études de cas en chaîne Question → Intervention → Effet. Mobile d'abord. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-standard-italic.woff2") format("woff2-variations"),
       url("../fonts/newsreader-latin-standard-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #EEF0F5;
  --surface: #FFFFFF;
  --ink: #151935;
  --muted: #4E5470;
  --line: #CDD2DE;
  --accent: #3437C9;
  --accent-hover: #2A2DAE;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1E2FB;
  --shadow: 0 1px 1px rgba(21, 25, 53, 0.04), 0 2px 6px rgba(21, 25, 53, 0.05), 0 12px 32px -12px rgba(21, 25, 53, 0.14);
  --outline: rgba(21, 25, 53, 0.1);

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Charter, Georgia, serif;

  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-25: 1.5625rem;
  --fs-32: clamp(1.75rem, 1.4rem + 1.4vw, 2rem);
  --fs-44: clamp(2.125rem, 1.5rem + 2.6vw, 2.75rem);
  --fs-hero: clamp(2.25rem, 0.25rem + 8.6vw, 6.5rem);

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-6: 1.5rem;
  --s-8: 2rem; --s-12: 3rem; --s-16: 4rem; --s-24: 6rem; --s-32: 8rem;

  --r-chip: 6px; --r-img: 8px; --r-panel: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-draw: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: 16px;
  --content: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0E1022;
    --surface: #171A33;
    --ink: #E7E9F4;
    --muted: #A2A8C3;
    --line: #2C3150;
    --accent: #9EA2FF;
    --accent-hover: #B8BBFF;
    --accent-ink: #0E1022;
    --accent-soft: #23264A;
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --outline: rgba(255, 255, 255, 0.08);
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0E1022;
    --surface: #171A33;
    --ink: #E7E9F4;
    --muted: #A2A8C3;
    --line: #2C3150;
    --accent: #9EA2FF;
    --accent-hover: #B8BBFF;
    --accent-ink: #0E1022;
    --accent-soft: #23264A;
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --outline: rgba(255, 255, 255, 0.08);
  }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 750; letter-spacing: -0.02em; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
p, li, dd { text-wrap: pretty; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 60;
  background: var(--accent); color: var(--accent-ink); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-chip); font-weight: 650; text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.wrap { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: var(--gutter); }
.note-serif { font-family: var(--serif); font-style: italic; font-weight: 420; }

/* Composant : bouton */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 2.875rem; padding: 0.7rem 1.2rem; border-radius: var(--r-chip);
  border: 1px solid transparent; font: 650 0.9688rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition-property: background-color, border-color, color, scale;
  transition-duration: 150ms; transition-timing-function: var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { scale: 0.97; }
.btn svg { flex: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

/* Composant : puce d'outil */
.tools { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; }
.tools li {
  font-size: var(--fs-14); line-height: 1.3; padding: 0.3rem 0.6rem; border-radius: var(--r-chip);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink);
}

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 750; text-decoration: none; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.brand .logo-bg { fill: var(--ink); }
.brand .logo-fg { stroke: var(--paper); }
.nav ul { display: flex; gap: var(--s-1) var(--s-4); list-style: none; padding: 0; margin: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: var(--s-1); text-decoration: none; color: var(--muted); font-size: 0.9688rem; font-weight: 550; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav .nav-extra { display: none; }

/* Héros */
.hero { padding-block: var(--s-12) var(--s-16); }
.hero-grid { display: grid; gap: var(--s-8) var(--s-12); grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "text" "graph"; }
.hero-name { grid-area: name; }
.hero-text { grid-area: text; }
.graph { grid-area: graph; }
.hero-text { display: grid; gap: var(--s-6); min-width: 0; align-content: start; }
.hero-name {
  font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95;
  display: grid; gap: 0.06em;
}
.hero-name .row { display: block; white-space: nowrap; }
.hero-name .op {
  font-family: var(--serif); font-style: italic; font-weight: 380; letter-spacing: -0.01em;
  color: var(--accent); font-size: 0.92em;
}
.hero-name .paren { margin-inline: 0.03em; font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--muted); }
.hero-lead { font-size: var(--fs-20); line-height: 1.5; max-width: 34rem; color: var(--ink); }
.hero-lead .note-serif { font-size: 1.06em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); color: var(--muted); font-size: var(--fs-16); }
.hero-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-meta svg { flex: none; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Graphe causal */
.graph { margin: 0; min-width: 0; display: grid; gap: var(--s-3); }
.graph-frame {
  background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--shadow);
  padding: var(--s-3); outline: 1px solid var(--outline); outline-offset: -1px;
}
.graph svg { display: block; width: 100%; height: auto; overflow: visible; }
.graph .graph-tall { display: block; }
.graph .graph-wide { display: none; }
.graph figcaption { font-size: var(--fs-14); color: var(--muted); max-width: 40rem; }
.g-col { font-family: var(--serif); font-style: italic; font-size: 16px; fill: var(--muted); }
.g-edge { fill: none; stroke: color-mix(in srgb, var(--muted) 45%, var(--line)); stroke-width: 1.6; transition: stroke 160ms var(--ease-out), opacity 160ms var(--ease-out); }
.g-edge--future { stroke-dasharray: 4 5; }
.g-head { fill: color-mix(in srgb, var(--muted) 60%, var(--line)); transition: fill 160ms var(--ease-out); }
.g-node rect { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; transition: fill 160ms var(--ease-out), stroke 160ms var(--ease-out); }
.g-node--cause rect { fill: var(--paper); stroke: var(--line); }
.g-node--goal rect { stroke-dasharray: 4 4; stroke: var(--accent); fill: var(--surface); }
.g-node text { fill: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 560; }
.g-node .g-title { font-size: 16.5px; font-weight: 720; }
.g-node .g-sub { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 15.5px; fill: var(--muted); }
.graph-tall .g-node text { font-size: 14px; }
.graph-tall .g-node .g-title { font-size: 14.5px; }
.graph-tall .g-node .g-sub { font-size: 14px; }
.g-node--goal .g-title { fill: var(--accent); }
.g-link { cursor: pointer; }
.g-link:focus { outline: none; }
.g-link:focus-visible rect { stroke: var(--accent); stroke-width: 3; }
.g-node, .g-edge, .g-head { transition-property: opacity, fill, stroke; transition-duration: 160ms; transition-timing-function: var(--ease-out); }
.graph.is-tracing .g-node:not(.is-lit), .graph.is-tracing .g-edge:not(.is-lit) { opacity: 0.28; }
.graph .g-edge.is-lit { stroke: var(--accent); stroke-width: 2.2; }
.graph .g-node.is-lit rect { stroke: var(--accent); }
.graph .g-node.is-lit.g-node--cause rect { fill: var(--accent-soft); }
.graph .g-node.is-focus rect { fill: var(--accent-soft); stroke-width: 2; }

/* Tracé initial : activé par main.js, qui mesure chaque arête (--len). Sans JS ou avec mouvement réduit, le graphe est complet d'emblée. */
.graph.draw-in .g-edge:not(.g-edge--future) { stroke-dasharray: var(--len); animation: draw 640ms var(--ease-draw) both; }
.graph.draw-in .g-edge--future { animation: fade 420ms var(--ease-out) both; }
.graph.draw-in .g-edge[data-step="1"] { animation-delay: 120ms; }
.graph.draw-in .g-edge[data-step="2"] { animation-delay: 220ms; }
.graph.draw-in .g-edge[data-step="3"] { animation-delay: 320ms; }
.graph.draw-in .g-edge[data-step="4"] { animation-delay: 760ms; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { padding-block: var(--s-16); scroll-margin-top: 4rem; }
.section + .section { box-shadow: 0 -1px 0 var(--line); }
.section-head { display: grid; gap: var(--s-3); max-width: 44rem; margin-bottom: var(--s-12); }
.section-head h2 { font-size: var(--fs-44); }
.section-head p { color: var(--muted); font-size: var(--fs-18); }

/* Étude de cas */
.cases { display: grid; gap: var(--s-24); }
.case { display: grid; gap: var(--s-8); grid-template-columns: minmax(0, 1fr); scroll-margin-top: 4.5rem; }
.case-head { display: grid; gap: var(--s-3); }
.case-head h3 { font-size: var(--fs-32); }
.case-summary { font-size: var(--fs-20); line-height: 1.5; max-width: 44rem; color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; border-radius: var(--r-panel); background: var(--surface); box-shadow: var(--shadow); padding: var(--s-2) var(--s-6); }
.facts div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-3); }
.facts div + div { box-shadow: 0 -1px 0 var(--line); }
.facts dt { color: var(--muted); font-size: var(--fs-16); }
.facts dd { font-weight: 560; min-width: 0; }

.chain { list-style: none; padding: 0; display: grid; gap: var(--s-6); counter-reset: none; }
.chain li { display: grid; gap: var(--s-2); position: relative; align-content: start; }
.chain .step { font-family: var(--serif); font-style: italic; font-size: var(--fs-25); line-height: 1.2; color: var(--accent); font-weight: 420; display: block; }
.chain .step svg { color: var(--muted); }
.chain p { max-width: 38rem; }
.chain .step-arrow { display: none; }

.case-body { display: grid; gap: var(--s-8); }
.case-side { display: grid; gap: var(--s-6); align-content: start; min-width: 0; }
.honest { font-size: var(--fs-16); color: var(--muted); max-width: 38rem; padding-left: var(--s-4); box-shadow: inset 2px 0 0 var(--line); }

/* Figures */
.figure { display: grid; gap: var(--s-3); min-width: 0; grid-template-columns: minmax(0, 1fr); }
.panel { background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--shadow); padding: var(--s-4); outline: 1px solid var(--outline); outline-offset: -1px; }
.figure figcaption { font-size: var(--fs-14); color: var(--muted); max-width: 40rem; }
.figure svg { display: block; width: 100%; height: auto; }
.chart text { font-family: var(--sans); font-size: 13px; fill: var(--muted); }
.chart .val { fill: var(--ink); font-weight: 700; }
.chart .grid { stroke: var(--line); }
.chart .bar { fill: var(--muted); opacity: 0.55; }
.chart .bar--best { fill: var(--accent); opacity: 1; }

.strip-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-img); }
.strip-scroll svg { min-width: 640px; }
.strip .gm { stroke: var(--line); stroke-width: 0.5; opacity: 0.7; }
.strip .gM { stroke: var(--line); stroke-width: 1; }
.strip .trace { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.strip .pvc { fill: var(--accent-soft); }
.strip text { font-family: var(--sans); font-size: 13px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.strip .lbl { fill: var(--accent); font-family: var(--serif); font-style: italic; font-size: 16px; }
.strip .rr line { stroke: var(--muted); stroke-width: 1; }

/* Galerie repliable */
.shots { display: grid; gap: var(--s-6); }
.shots > summary { list-style: none; width: fit-content; }
.shots > summary::-webkit-details-marker { display: none; }
.shots .chev { transition: rotate 200ms var(--ease-out); }
.shots[open] .chev { rotate: 180deg; }
.shots .when-open, .shots[open] .when-closed { display: none; }
.shots[open] .when-open { display: inline; }
.shot-grid { list-style: none; padding: 0; display: grid; gap: var(--s-6) var(--s-4); grid-template-columns: minmax(0, 1fr); }
.shot { display: grid; gap: var(--s-2); align-content: start; }
.shot a {
  display: block; overflow: hidden; border-radius: var(--r-img); background: var(--surface); cursor: zoom-in;
  outline: 1px solid var(--outline); outline-offset: -1px; box-shadow: var(--shadow);
}
.shot img { display: block; width: 100%; height: auto; transition: scale 320ms var(--ease-out); }
.shot-grid--phone .shot a { aspect-ratio: 3 / 4; max-width: 100%; background: #F5F6F4; }
.shot-grid--phone .shot img { height: 100%; object-fit: contain; }
.shot figcaption { font-size: var(--fs-14); color: var(--muted); }
@media (hover: hover) { .shot a:hover img { scale: 1.015; } }
@media (prefers-reduced-motion: no-preference) {
  .shots[open] .shot-grid { animation: rise 240ms var(--ease-out) both; }
}
@keyframes rise { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

/* Visionneuse */
.lightbox {
  width: min(100% - 32px, 1240px); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden;
  border: 0; border-radius: var(--r-panel); background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lightbox::backdrop { background: rgba(10, 12, 28, 0.78); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); margin: 0; box-shadow: 0 1px 0 var(--line); }
.lightbox-cap { font-size: var(--fs-16); color: var(--muted); }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--r-chip); background: transparent; color: var(--ink);
  transition-property: border-color, scale; transition-duration: 150ms; transition-timing-function: var(--ease-out);
}
.icon-btn:hover { border-color: var(--line); }
.icon-btn:active { scale: 0.95; }
.lightbox-media { min-height: 0; display: grid; }
.lightbox-img { display: block; width: 100%; height: 100%; max-height: calc(100dvh - 100px); object-fit: contain; background: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-in 220ms var(--ease-out); }
  .lightbox[open]::backdrop { animation: fade 220ms var(--ease-out); }
}
@keyframes lb-in { from { opacity: 0; scale: 0.97; } to { opacity: 1; scale: 1; } }

/* Lien vers GitHub en fin de projets */
.more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4) var(--s-8); margin-top: var(--s-16); padding: var(--s-6); border-radius: var(--r-panel); background: var(--surface); box-shadow: var(--shadow); }
.more p { font-size: var(--fs-20); font-weight: 650; }

/* Parcours */
.timeline { list-style: none; padding: 0; display: grid; position: relative; }
.timeline li { display: grid; gap: var(--s-1); padding: 0 0 var(--s-8) var(--s-8); position: relative; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 0.55rem; bottom: 0; width: 1.6px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 0.4rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.6px var(--ink); }
.timeline li.is-next::after { box-shadow: inset 0 0 0 1.6px var(--accent); background: var(--accent-soft); }
.timeline .when { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: var(--fs-18); font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: var(--fs-20); font-weight: 700; }
.timeline p { color: var(--muted); max-width: 40rem; }

/* Compétences */
.skills { display: grid; gap: var(--s-8) var(--s-12); grid-template-columns: minmax(0, 1fr); }
.skill { display: grid; gap: var(--s-3); align-content: start; }
.skill h3 { font-size: var(--fs-20); font-weight: 700; }
.skill p { color: var(--muted); font-size: var(--fs-16); max-width: 32rem; }

/* Contact */
.contact { display: grid; gap: var(--s-6); max-width: 46rem; }
.contact .contact-lead { font-size: var(--fs-44); font-weight: 760; letter-spacing: -0.03em; line-height: 1.1; }
.contact-lead .note-serif { font-weight: 380; letter-spacing: 0; }
.contact p { color: var(--muted); font-size: var(--fs-18); }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.email-line a { font-size: var(--fs-25); font-weight: 650; word-break: break-all; text-decoration-color: var(--accent); }
.text-btn { background: none; border: 0; padding: var(--s-2) 0; min-height: 2.75rem; cursor: pointer; font: 650 var(--fs-16) var(--sans); color: var(--accent); text-decoration: underline; text-underline-offset: 0.22em; }
.status { min-height: 1.5em; font-size: var(--fs-14); color: var(--muted); }

.footer { padding-block: var(--s-8) var(--s-12); color: var(--muted); font-size: var(--fs-14); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-6); padding-top: var(--s-6); position: relative; }
.footer .wrap::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }

/* 404 */
.not-found { min-height: 70vh; display: grid; align-content: center; gap: var(--s-6); max-width: 40rem; margin-inline: auto; padding: var(--s-16) var(--gutter); }
.not-found h1 { font-size: var(--fs-hero); letter-spacing: -0.04em; }
.not-found h1 .op { font-family: var(--serif); font-style: italic; font-weight: 380; color: var(--accent); }
.not-found p { color: var(--muted); font-size: var(--fs-18); }

/* Tablette */
@media (min-width: 40rem) {
  :root { --gutter: 32px; }
  .graph-frame { padding: var(--s-6); }
  .nav .nav-extra { display: list-item; }
  .graph .graph-tall { display: none; }
  .graph .graph-wide { display: block; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-8); }
  .facts div:nth-child(2) { box-shadow: none; }
  .shot-grid--desktop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-grid--phone { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline li { grid-template-columns: 11rem minmax(0, 1fr); column-gap: var(--s-6); }
  .timeline li > :not(.when) { grid-column: 2; }
  .timeline .when { grid-row: 1 / span 2; padding-top: 0.05rem; }
}

/* Bureau */
@media (min-width: 64rem) {
  .hero { padding-block: var(--s-16) var(--s-24); }
  .hero-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: "name name" "text graph"; gap: var(--s-12) var(--s-12); }
  .hero-name { display: block; }
  .hero-name .row { display: inline; }
  .hero-text { padding-top: var(--s-4); }
  .section { padding-block: var(--s-24); }
  .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8); }
  .chain li:not(:last-child) .step-arrow { display: block; position: absolute; right: calc(-1 * var(--s-8) + 4px); top: 0.55rem; color: var(--line); }
  .case-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-12); align-items: start; }
  .case-body--wide { grid-template-columns: minmax(0, 1fr); }
}

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

@media (max-width: 39.99rem) {
  .chart text { font-size: 17px; }
}
