/* KernWeb portfolio. Tokens follow kernweb.be (kw.css): indigo #6060F0, ink #1D1D2F, paper #F3F3F8,
   Schibsted Grotesk for display, DM Sans for text. The page background is themed per client by site.js. */

:root {
  --indigo: #6060F0;
  --indigo-deep: #3B3BB8;
  --ink: #1D1D2F;
  --ink-2: #5C5C78;
  --paper: #F3F3F8;

  /* Live theme, tweened by site.js as client chapters enter the viewport */
  --bg: #6060F0;
  --fg: #F3F3F8;
  --accent: #F3F3F8;
  --muted: color-mix(in oklab, var(--fg) 70%, var(--bg));
  --line: color-mix(in oklab, var(--fg) 18%, transparent);

  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.84rem, 0.81rem + 0.15vw, 0.93rem);
  --step-0: clamp(1rem, 0.96rem + 0.22vw, 1.13rem);
  --step-1: clamp(1.25rem, 1.17rem + 0.42vw, 1.5rem);
  --step-2: clamp(1.56rem, 1.42rem + 0.72vw, 2rem);
  --step-3: clamp(1.95rem, 1.72rem + 1.15vw, 2.66rem);
  --step-4: clamp(2.44rem, 2.07rem + 1.85vw, 3.55rem);
  --step-5: clamp(3.05rem, 2.4rem + 3.2vw, 5.2rem);

  --space-2xs: .5rem; --space-xs: .75rem; --space-s: 1rem; --space-m: 1.5rem;
  --space-l: 2.5rem; --space-xl: 4rem; --space-2xl: 6rem; --space-3xl: 9rem;

  --gutter: clamp(1rem, 4vw, 3rem);
  --wrap: 1320px;
  --measure: 60ch;
  --nav-h: 68px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: fixed; left: var(--gutter); top: -4rem; z-index: 100; background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: 8px; text-decoration: none; transition: top .2s var(--ease); }
.skip:focus { top: .75rem; }

/* Each themed section carries its own colours (no-JS and reduced-motion fallback). With JS, the body
   carries them and the sections become transparent so the colour change reads as one continuous surface. */
[data-bg] { background: var(--sbg); color: var(--sfg); }
html.theme [data-bg] { background: transparent; color: inherit; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.4rem; border-radius: 10px;
  font-family: var(--display); font-weight: 700; font-size: var(--step-0); letter-spacing: -.005em;
  text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-ghost { box-shadow: inset 0 0 0 2px currentColor; color: var(--paper); }
.btn-ghost:hover { background: color-mix(in oklab, var(--paper) 14%, transparent); }

/* ------------------------------------------------------------------ nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center;
  gap: var(--space-l); padding-inline: var(--gutter); color: var(--fg);
  background: color-mix(in oklab, var(--bg) 92%, transparent); transition: box-shadow .3s var(--ease); }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: inherit; }
.brand-sigle { width: 30px; height: 30px; flex: none; }
.brand-word { display: inline-block; width: 6.6rem; aspect-ratio: 838 / 138; background: currentColor;
  -webkit-mask: url("brand/kernweb-wordmark.png") center / contain no-repeat; mask: url("brand/kernweb-wordmark.png") center / contain no-repeat; }
.brand-tag { margin-left: .35rem; padding: .2rem .55rem; border-radius: 99px; box-shadow: inset 0 0 0 1.5px currentColor;
  font-family: var(--display); font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.nav-links { display: flex; gap: var(--space-m); margin-left: auto; font-family: var(--display); font-weight: 500; }
.nav-links a { text-decoration: none; position: relative; padding-block: .3rem; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }
.btn-nav { padding: .6rem 1rem; font-size: var(--step--1); background: var(--fg); color: var(--bg); }
.btn-nav:hover { background: var(--accent); color: var(--bg); }

/* Burger + full-screen menu (below 1080px). The panel lives outside the header on purpose. */
.btn-nav { white-space: nowrap; }
.burger { display: none; flex: none; position: relative; width: 44px; height: 44px; margin-left: .25rem; border-radius: 10px;
  align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px currentColor; z-index: 61; }
.burger i { position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .3s var(--ease); }
.burger i:first-child { transform: translateY(-4px); }
.burger i:last-child { transform: translateY(4px); }
.menu-open .burger i:first-child { transform: rotate(45deg); }
.menu-open .burger i:last-child { transform: rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 49; display: flex; flex-direction: column; justify-content: center; gap: var(--space-xl);
  padding: calc(var(--nav-h) + var(--space-l)) var(--gutter) var(--space-xl); background: var(--indigo); color: var(--paper);
  opacity: 0; transform: translateY(-2%); transition: opacity .25s ease-out, transform .35s var(--ease); }
.menu[hidden] { display: none; }
.menu-open .menu { opacity: 1; transform: none; }
.menu-links li + li { border-top: 1px solid rgba(255,255,255,.22); }
.menu-links a { display: flex; align-items: baseline; gap: 1rem; padding-block: .7rem; text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 1.4rem + 4vw, 4rem); letter-spacing: -.04em; line-height: 1; }
.menu-links span { font-size: var(--step--1); font-weight: 500; letter-spacing: 0; opacity: .75; }
.menu-cta { display: flex; flex-wrap: wrap; gap: var(--space-s); }
html.menu-open, html.menu-open body { overflow: hidden; }
.menu-open .nav { background: var(--indigo); color: var(--paper); box-shadow: none; }
.menu-open .btn-nav { visibility: hidden; }

/* ------------------------------------------------------------------ type helpers */
.eyebrow { font-family: var(--display); font-weight: 700; font-size: var(--step--1); letter-spacing: .04em; text-transform: uppercase; }
.sec-title { font-family: var(--display); font-weight: 800; font-size: var(--step-5); line-height: .98;
  letter-spacing: -.035em; text-wrap: balance; max-width: 14ch; }
.sec-lead { margin-top: var(--space-m); max-width: 52ch; color: var(--muted); font-size: var(--step-1); line-height: 1.45; text-wrap: pretty; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; isolation: isolate; }
/* The hero is sized on BOTH axes: on a short laptop window (about 660px high) it must still fit under the nav. */
.hero-in { position: relative; min-height: 100dvh; display: flex; align-items: center; overflow: hidden;
  padding-block: calc(var(--nav-h) + clamp(1rem, 4dvh, 4rem)) clamp(1rem, 4dvh, 5rem); }
.hero-copy { position: relative; z-index: 2; max-width: 46rem; }
.hero-title { margin-top: clamp(.5rem, 2dvh, 1.5rem); font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, min(1.2rem + 5vw, 10.5dvh), 6.2rem); line-height: .92; letter-spacing: -.045em; }
.hero-title .line { display: block; }
.hero-title .line + .line { font-weight: 400; letter-spacing: -.04em; }
.hero-lead { margin-top: clamp(1rem, 3.2dvh, 2.5rem); max-width: 44ch; font-size: clamp(1rem, 2.5dvh, 1.5rem); line-height: 1.45;
  color: color-mix(in oklab, var(--fg) 88%, var(--bg)); text-wrap: pretty; }
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--space-s) var(--space-xl); margin-top: clamp(1rem, 3.2dvh, 2.5rem);
  padding-top: clamp(.5rem, 1.6dvh, 1.5rem); border-top: 1px solid var(--line); }
.hero-facts dt { font-size: var(--step--1); color: color-mix(in oklab, var(--fg) 75%, var(--bg)); }
.hero-facts dd { font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 4.4dvh, 2.66rem); letter-spacing: -.03em;
  line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero-mark { position: absolute; z-index: 1; right: max(-6vw, -6rem); top: 50%; width: min(70vmin, 54rem);
  aspect-ratio: 1; transform: translateY(-46%); color: var(--paper); }
.hero-sigle { width: 100%; height: 100%; display: block; }
.hero-cue { position: absolute; right: var(--gutter); bottom: var(--space-m); z-index: 2; display: flex; align-items: center;
  gap: .75rem; font-size: var(--step--1); font-family: var(--display); font-weight: 500; }
.hero-cue i { width: 3rem; height: 1px; background: currentColor; transform-origin: left; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* Aperture: without motion it is a plain full-bleed block after the hero. */
.aperture { position: relative; height: 92dvh; overflow: hidden; background: var(--ink); color: #fff; }
.ap-slides, .ap-slide { position: absolute; inset: 0; }
.ap-slide img { width: 100%; height: 100%; object-fit: cover; }
.ap-slide { opacity: 0; }
.ap-slide:first-child { opacity: 1; }
.aperture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,25,0) 45%, rgba(10,10,25,.72)); }
.ap-copy { position: absolute; left: 0; right: 0; bottom: var(--space-xl); z-index: 2; }
.ap-line { font-family: var(--display); font-weight: 800; font-size: var(--step-5); line-height: .98; letter-spacing: -.035em; }
.ap-names { margin-top: var(--space-m); font-size: var(--step--1); letter-spacing: .02em; color: rgba(255,255,255,.82); }

html.motion .aperture { position: absolute; inset: 0; height: auto; z-index: 3; clip-path: circle(0px at 50% 50%); }
html.motion .hero { height: 100dvh; }
html.motion .hero-in { height: 100dvh; }

/* ------------------------------------------------------------------ marquee */
.marquee { overflow: hidden; padding-block: var(--space-xl); border-bottom: 1px solid var(--line); }
.mq-track { display: flex; width: max-content; animation: mq 60s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-row { display: flex; align-items: center; flex: none; }
.mq-row span { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 1.2rem + 5vw, 6rem);
  letter-spacing: -.04em; line-height: 1; padding-inline: .35em; white-space: nowrap; }
.mq-row span:nth-of-type(even) { font-weight: 400; color: var(--indigo); }
.mq-row b { width: .5em; height: .5em; border-radius: 50%; background: var(--indigo); flex: none; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ work intro */
.work-intro { padding-block: var(--space-3xl) var(--space-2xl); }

/* ------------------------------------------------------------------ chapter head (shared) */
.ch { position: relative; }
.ch-num { font-family: var(--display); font-weight: 500; font-size: var(--step--1); letter-spacing: .02em; color: var(--muted); }
.ch-num span { color: var(--accent); font-weight: 800; }
.ch-name { margin-top: var(--space-s); font-family: var(--display); font-weight: 900; font-size: var(--step-5);
  line-height: .92; letter-spacing: -.045em; text-wrap: balance; }
.ch-title { margin-top: var(--space-m); font-family: var(--display); font-weight: 500; font-size: var(--step-2);
  line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; max-width: 26ch; }
.ch-body { margin-top: var(--space-m); max-width: var(--measure); color: var(--muted); text-wrap: pretty; line-height: 1.62; }
.ch-meta { display: flex; gap: var(--space-l); margin-top: var(--space-l); }
.ch-meta dt { font-size: var(--step--1); color: var(--muted); }
.ch-meta dd { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-services { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: var(--space-m); }
.ch-services li { padding: .28rem .7rem; border-radius: 99px; font-size: var(--step--1);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fg) 30%, transparent); }
.ch-links { display: flex; gap: var(--space-m); margin-top: var(--space-l); }
.ch-link { font-family: var(--display); font-weight: 700; text-decoration: none; padding-bottom: .15rem;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 2px no-repeat; transition: background-size .25s var(--ease); }
.ch-link:hover { background-size: 0 2px; }
.ch-link-2 { background-image: linear-gradient(currentColor, currentColor); }

/* ------------------------------------------------------------------ layout A: rail (pinned horizontal gallery) */
/* The pinned rail is exactly one window high: head and images are sized on the window height so nothing
   slides under the nav or below the fold on a short laptop. */
.ch-rail { padding-block: var(--space-2xl); --rh: min(calc(100dvh - var(--nav-h) - 14dvh), 40rem); }
.rail-pin { display: grid; grid-template-columns: minmax(20rem, 30rem) 1fr; gap: var(--space-xl); align-items: center;
  padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  height: 100dvh; padding-top: calc(var(--nav-h) + 3dvh); padding-bottom: 3dvh; }
.ch-rail .ch-name { font-size: clamp(2rem, 7dvh, 3.55rem); margin-top: clamp(.3rem, 1.2dvh, 1rem); }
.ch-rail .ch-title { font-size: clamp(1rem, 2.8dvh, 1.5rem); }
.ch-rail .ch-body { font-size: clamp(.86rem, 2.1dvh, 1.05rem); line-height: 1.55; }
.ch-rail .ch-title, .ch-rail .ch-body, .ch-rail .ch-meta, .ch-rail .ch-services, .ch-rail .ch-links { margin-top: clamp(.5rem, 2.2dvh, 1.5rem); }
@media (max-height: 760px) and (min-width: 1081px) { .ch-rail .ch-services { display: none; } }
.rail-viewport { overflow: hidden; }
.rail-track { display: flex; align-items: center; gap: var(--space-m); width: max-content; padding-right: var(--gutter); }
.rail-item { height: var(--rh); flex: none; border-radius: var(--radius); overflow: hidden;
  background: color-mix(in oklab, var(--fg) 8%, var(--bg)); }
.rail-item img { height: 100%; width: auto; object-fit: cover; }
.rail-item:nth-child(3n+2) { height: calc(var(--rh) * .78); align-self: flex-end; }
.rail-item:nth-child(3n) { height: calc(var(--rh) * .86); align-self: flex-start; }
.rail-end { flex: none; align-self: center; padding-inline: var(--space-xl) var(--space-2xl); font-family: var(--display);
  font-weight: 900; font-size: clamp(4rem, 2rem + 8vw, 11rem); letter-spacing: -.05em; line-height: .9; color: var(--accent); white-space: nowrap; }

/* ------------------------------------------------------------------ layout B: brand board */
.ch-board { padding-block: var(--space-3xl); }
.board-wrap .ch-head { display: grid; grid-template-columns: 1.1fr 1fr; column-gap: var(--space-xl); align-items: end; }
.board-wrap .ch-head > * { grid-column: 1; }
.board-wrap .ch-name { font-size: clamp(3.2rem, 1.6rem + 6vw, 8rem); }
.board-wrap .ch-body, .board-wrap .ch-meta, .board-wrap .ch-services, .board-wrap .ch-links { grid-column: 2; }
.board-wrap .ch-body { grid-row: 1 / span 3; align-self: end; margin-top: 0; }
/* Masonry: every image keeps its own ratio, nothing is cropped. */
.board { columns: 3; column-gap: var(--space-s); margin-top: var(--space-2xl); }
.bt { position: relative; break-inside: avoid; margin-bottom: var(--space-s); border-radius: var(--radius); overflow: hidden;
  background: color-mix(in oklab, var(--fg) 7%, var(--bg)); }
.bt img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.bt:hover img { transform: scale(1.025); }
.bt-pal, .bt-type { padding: var(--space-m); display: flex; flex-direction: column; min-height: 12rem; }
.bt-label { font-size: var(--step--1); color: var(--muted); font-family: var(--display); font-weight: 500; }
.bt-hint { margin-top: auto; font-size: .75rem; color: var(--muted); }
.sw-row { display: flex; gap: .4rem; margin-top: .5rem; flex: 1; }
.sw { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; text-align: left; min-width: 0; }
.sw-chip { width: 100%; flex: 1; min-height: 2rem; border-radius: 8px; background: var(--c);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fg) 22%, transparent); transition: transform .2s var(--ease); }
.sw:hover .sw-chip { transform: translateY(-3px); }
.sw:active .sw-chip { transform: translateY(0) scale(.98); }
.sw-name { font-size: .72rem; color: var(--muted); }
.sw-hex { font-family: var(--display); font-weight: 700; font-size: .78rem; font-variant-numeric: tabular-nums; }
.ty-display { font-size: clamp(2.4rem, 1.4rem + 2.6vw, 4rem); line-height: .9; margin-top: auto; }
.ty-sample { font-size: var(--step-0); margin-top: .2rem; }
.ty-names { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); margin-top: .35rem; }
.ty-count { margin-top: auto; font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 2rem + 3vw, 5rem);
  line-height: .85; letter-spacing: -.05em; color: var(--accent); }

/* ------------------------------------------------------------------ layout C: split (sticky head + stacked media) */
.ch-split { padding-block: var(--space-3xl); }
.split-wrap { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-xl); align-items: start; }
.split-sticky { position: sticky; top: calc(var(--nav-h) + var(--space-l)); }
.is-flip .split-sticky { order: 2; }
.split-media { display: flex; flex-direction: column; gap: var(--space-l); }
.sp-item { border-radius: var(--radius); overflow: hidden; background: color-mix(in oklab, var(--fg) 7%, var(--bg)); }
.sp-item img { width: 100%; height: auto; }
.sp-1 { width: 74%; margin-left: auto; }
.sp-2 { width: 86%; }
.is-flip .sp-1 { margin-left: 0; margin-right: auto; }
.is-flip .sp-2 { margin-left: auto; }

/* ------------------------------------------------------------------ screens */
.screens { padding-block: var(--space-3xl); }
.screens-wrap { display: grid; grid-template-columns: minmax(18rem, 4fr) 8fr; gap: var(--space-xl); align-items: center; }
.screens .sec-title { font-size: var(--step-4); }
.scr-list { margin-top: var(--space-l); border-top: 1px solid var(--line); }
.scr-btn { width: 100%; display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: baseline; gap: .5rem;
  padding: .62rem 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted);
  transition: color .2s var(--ease), padding .25s var(--ease); }
.scr-btn:hover { color: var(--fg); }
.scr-btn.is-on { color: var(--fg); }
.scr-btn.is-on .scr-n { color: var(--indigo); }
.scr-n { font-family: var(--display); font-weight: 700; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.scr-label { font-family: var(--display); font-weight: 700; }
.scr-host { font-size: var(--step--1); }
.scr-stage { position: relative; padding-bottom: 6%; }
.laptop { width: 100%; }
.lt-lid { background: #0B0B12; border-radius: 18px 18px 6px 6px; padding: 1.1% 1.1% 1.6%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -30px rgba(0,0,0,.6); }
.lt-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding-inline: 10px; background: #1A1A26; border-radius: 10px 10px 0 0; }
.lt-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3A3A4E; }
.lt-url { margin-left: 10px; flex: 1; max-width: 22rem; padding: 3px 10px; border-radius: 6px; background: #0E0E18;
  color: #A9A9C6; font-size: .72rem; font-family: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-screen, .ph-screen { position: relative; overflow: hidden; background: #fff; }
.lt-screen { aspect-ratio: 16 / 9.6; border-radius: 0 0 4px 4px; }
.lt-screen img, .ph-screen img { width: 100%; height: auto; max-width: none; will-change: transform; }
.lt-base { height: 14px; margin: 0 -5%; background: linear-gradient(#D6D6E2, #9A9AAE); border-radius: 0 0 22px 22px; position: relative; }
.lt-base::before { content: ""; position: absolute; left: 42%; right: 42%; top: 0; height: 5px; border-radius: 0 0 8px 8px; background: #8A8A9E; }
.phone { position: absolute; right: -2%; bottom: 0; width: 23%; padding: 2.2% 1.6%; background: #0B0B12; border-radius: 34px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 30px 60px -20px rgba(0,0,0,.7); }
.ph-notch { position: absolute; top: 3.2%; left: 50%; width: 30%; height: 2.4%; transform: translateX(-50%); background: #0B0B12; border-radius: 99px; z-index: 2; }
.ph-screen { aspect-ratio: 9 / 19.5; border-radius: 24px; }
.scr-stage.is-swap .lt-screen img, .scr-stage.is-swap .ph-screen img { opacity: 0; transition: opacity .18s ease-out; }
/* Scrollbar drawn in each device: says "this page is scrolling" at a glance. */
.sb { position: absolute; z-index: 2; top: 6px; right: 5px; bottom: 6px; width: 5px; border-radius: 5px; background: rgba(20, 20, 40, .1); }
.sb i { display: block; width: 100%; height: var(--th, 20%); border-radius: 5px; background: rgba(20, 20, 40, .55); will-change: transform; }
.ph-screen .sb { width: 3px; right: 3px; top: 14px; bottom: 14px; }
.scr-live { position: absolute; z-index: 3; left: 0; bottom: -2.4rem; display: flex; align-items: center; gap: .5rem;
  font-size: var(--step--1); color: var(--muted); }
.scr-live b { width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ------------------------------------------------------------------ nuancier */
.nuancier { padding-block: var(--space-3xl) 0; }
.nu-head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: end; }
.nu-head .sec-lead { margin-top: 0; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 3.2rem), 1fr)); grid-auto-flow: column;
  grid-template-columns: none; grid-auto-columns: 1fr; height: min(70dvh, 40rem); margin-top: var(--space-2xl); }
.chip { position: relative; }
.chip button { position: absolute; inset: 0; width: 100%; display: block; text-align: left; transform-origin: bottom;
  transition: transform .45s var(--ease); }
html.motion .chips.is-armed:not(.in) .chip button { transform: scaleY(0); }
html.motion .chips.is-armed .chip button { transition: transform 1s var(--ease) calc(var(--i) * 28ms); }
html.motion .chips.in .chip button:hover, html.motion .chips.in .chip button:focus-visible { transition-delay: 0s; transition-duration: .45s; }
.chip-c { position: absolute; inset: 0; background: var(--c); }
.chip-t { position: absolute; left: .6rem; bottom: .8rem; writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; gap: .6rem; font-size: .78rem; white-space: nowrap; color: #fff; mix-blend-mode: difference; }
.chip-t b { font-family: var(--display); font-weight: 700; }
.chip-t code { font-family: var(--body); font-variant-numeric: tabular-nums; }
.chip button:hover, .chip button:focus-visible { transform: scaleY(1.08); z-index: 2; }

/* ------------------------------------------------------------------ index */
.index { padding-block: var(--space-3xl); }
.ix-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-l); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.flt { padding: .5rem .95rem; border-radius: 99px; font-family: var(--display); font-weight: 700; font-size: var(--step--1);
  box-shadow: inset 0 0 0 1.5px var(--line); transition: background-color .2s var(--ease), color .2s var(--ease); }
.flt sup { margin-left: .2rem; font-weight: 500; font-size: .7em; color: var(--muted); }
.flt:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.flt.is-on { background: var(--indigo); color: #fff; box-shadow: none; }
.flt.is-on sup { color: rgba(255,255,255,.75); }
.rows { margin-top: var(--space-xl); border-top: 1.5px solid var(--fg); }
.row a { display: grid; grid-template-columns: 2.6rem 1.15fr 2fr 1fr 1.25fr 3.2rem 1.4rem; gap: var(--space-s); align-items: baseline;
  padding: 1.05rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; position: relative;
  transition: color .2s var(--ease); }
.row a::before { content: ""; position: absolute; inset: 0; background: var(--indigo); transform: scaleY(0);
  transform-origin: bottom; transition: transform .3s var(--ease); z-index: -1; }
.row a:hover::before, .row a:focus-visible::before { transform: scaleY(1); }
.row a:hover, .row a:focus-visible { color: #fff; }
.row a:hover .r-sector, .row a:hover .r-tags, .row a:hover .r-n { color: rgba(255,255,255,.8); }
.rows { position: relative; z-index: 0; }
.r-n, .r-year { font-family: var(--display); font-weight: 500; font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.r-client { font-family: var(--display); font-weight: 800; font-size: var(--step-1); letter-spacing: -.02em; line-height: 1.1; }
.r-title { line-height: 1.35; }
.r-sector, .r-tags { font-size: var(--step--1); color: var(--muted); }
.r-go { justify-self: end; transition: transform .25s var(--ease); }
.row a:hover .r-go { transform: translate(2px, -2px); }
.row.is-out { display: none; }
.ix-peek { position: fixed; left: 0; top: 0; z-index: 40; width: min(24vw, 22rem); aspect-ratio: 4 / 3; pointer-events: none;
  border-radius: 12px; overflow: hidden; opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.9);
  transition: opacity .2s ease-out, scale .3s var(--ease); box-shadow: 0 30px 60px -25px rgba(20,20,60,.55); }
.ix-peek img { width: 100%; height: 100%; object-fit: cover; }
.ix-peek.is-on { opacity: 1; }

/* ------------------------------------------------------------------ quote + cta + footer */
.quote { padding-block: var(--space-3xl); }
.quote-wrap { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xl); align-items: start; }
.quote-sigle { width: clamp(4rem, 8vw, 7rem); height: auto; color: var(--fg); }
.quote blockquote p { font-family: var(--display); font-weight: 500; font-size: var(--step-3); line-height: 1.2;
  letter-spacing: -.02em; text-wrap: balance; max-width: 30ch; }
.quote footer { margin-top: var(--space-l); font-size: var(--step-0); }
.cta { padding-block: var(--space-2xl) var(--space-3xl); }
.cta-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-xl); align-items: end;
  border-top: 1px solid var(--line); padding-top: var(--space-2xl); }
.cta-title { font-family: var(--display); font-weight: 800; font-size: var(--step-5); line-height: .96; letter-spacing: -.04em; text-wrap: balance; }
.cta-side p:first-child { font-size: var(--step-1); line-height: 1.45; max-width: 40ch; }
.cta-btns { display: flex; flex-wrap: wrap; gap: var(--space-s); margin-top: var(--space-l); }
.foot { padding-block: var(--space-xl); font-size: var(--step--1); }
.foot-wrap { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-l); align-items: center; }
.foot-brand { display: flex; align-items: center; gap: .55rem; }
.foot-sigle { width: 30px; height: 30px; }
.foot-txt { color: var(--muted); line-height: 1.5; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-m); }
.foot a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 60; transform: translate(-50%, 1rem); padding: .6rem 1rem;
  border-radius: 10px; background: var(--ink); color: var(--paper); font-size: var(--step--1); opacity: 0; pointer-events: none;
  transition: opacity .2s ease-out, transform .3s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .btn-nav { margin-left: auto; }
  .burger { display: inline-flex; }
  .board { columns: 2; }
  .hero-mark { width: min(48vmin, 30rem); right: -3vw; top: auto; bottom: -6vw; transform: none; }
  .hero-copy { padding-bottom: 14vw; }
  .rail-pin { grid-template-columns: 1fr; height: auto; padding-block: 0; padding-inline: var(--gutter); gap: var(--space-l); }
  .rail-viewport { overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scrollbar-width: none; }
  .rail-viewport::-webkit-scrollbar { display: none; }
  .rail-item { scroll-snap-align: start; height: 52dvh; }
  .rail-item:nth-child(n) { height: 52dvh; align-self: auto; }
  .rail-end { display: none; }
  .board-wrap .ch-head { display: block; }
  .split-wrap { grid-template-columns: 1fr; }
  .split-sticky { position: static; }
  .is-flip .split-sticky { order: 0; }
  .screens-wrap { grid-template-columns: 1fr; }
  .scr-list { display: flex; overflow-x: auto; gap: .5rem; border: 0; scrollbar-width: none; padding-bottom: .25rem; }
  .scr-btn { display: flex; white-space: nowrap; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 99px; }
  .scr-host, .scr-n { display: none; }
  .nu-head, .cta-wrap { grid-template-columns: 1fr; }
  .row a { grid-template-columns: 2.2rem 1fr 1.4rem; row-gap: .2rem; }
  .r-title { grid-column: 2; }
  .r-sector, .r-tags, .r-year { display: none; }
  .r-go { grid-column: 3; grid-row: 1; }
  .ix-peek { display: none; }
  .foot-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  html.motion .hero, html.motion .hero-in { height: auto; min-height: 100dvh; }
  .hero-in { align-items: flex-start; padding-block: calc(var(--nav-h) + var(--space-l)) var(--space-l); }
  .hero-lead { font-size: var(--step-0); margin-top: var(--space-m); }
  .hero-facts { gap: var(--space-s) var(--space-l); }
  .hero-facts dd { font-size: var(--step-2); }
  .hero-mark { right: -14vw; width: 58vw; top: auto; bottom: -10vw; transform: none; }
  .hero-copy { padding-bottom: 46vw; }
  .brand-tag { display: none; }
  .board { columns: 1; }
  .bt-pal, .bt-type { min-height: 9rem; }
  .chips { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, 1fr); height: auto; }
  .chip { aspect-ratio: 1 / 1.4; }
  .phone { width: 30%; right: 0; }
  .quote-wrap { grid-template-columns: 1fr; }
  .sp-1, .sp-2 { width: 100%; }
  .ch-meta { gap: var(--space-m); }
}

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

/* Small phones: the demo button lives in the menu panel; burger pinned right. Kept last so it wins. */
@media (max-width: 560px) { .btn-nav { display: none; } .burger { margin-left: auto; } }
/* Grid children must be allowed to shrink, or the nowrap site list widens the devices column. */
.screens-wrap > * { min-width: 0; }
/* mk métal workshop slide: keep the artisan in frame on narrow screens */
.ap-slide:nth-child(4) img { object-position: 60% 40%; }
