@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   OUTMINDLABS — L'ARCHIVE
   A specimen archive. Black/white/grey base · mint signature ·
   pink used in exactly one place (redaction). Mono = data only.
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #00c49a;
  --accent-light: #99EFD1;
  --accent-ink:   #067a5c;   /* readable mint for labels on cream (AA) */
  --pink:         #ff0055;   /* redaction only */

  --cream:   #f4f4f5;
  --ink:     #111111;
  --muted:   #555555;
  --dim:     #9ca3af;

  --void:    #0a0a0a;
  --panel:   #111111;
  --panel-2: #161616;

  --line-light: rgba(0,0,0,0.12);
  --hair-light: rgba(0,0,0,0.08);
  --line-dark:  rgba(255,255,255,0.14);
  --hair-dark:  rgba(255,255,255,0.08);

  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-io: cubic-bezier(0.16, 1, 0.3, 1);
}

/* overflow-x: clip (not hidden) — hidden creates a scroll container that
   breaks position: sticky in the fiche section */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--font-body);
  background: var(--void);
  color: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Global grain */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9990; mix-blend-mode: overlay;
}

::selection { background: var(--accent); color: #000; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* Keyboard focus — visible everywhere; dark ink on light/mint, mint on dark */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
.section--light :focus-visible,
.section--mint :focus-visible,
.nav--light :focus-visible { outline-color: var(--ink); }

/* ── CUSTOM CURSOR ─────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, input, select, textarea, label, [role="button"] { cursor: none; }
}
#cur-dot, #cur-ring { position: fixed; top: 0; left: 0; pointer-events: none; border-radius: 50%; transform: translate(-50%, -50%); mix-blend-mode: difference; }
#cur-dot  { width: 8px;  height: 8px;  background: var(--accent); z-index: 10000; transition: width .3s, height .3s; }
#cur-ring { width: 34px; height: 34px; border: 1.5px solid var(--accent); opacity: .6; z-index: 9999; transition: width .3s, height .3s, opacity .3s; }
body.cur-hover #cur-dot  { width: 12px; height: 12px; }
body.cur-hover #cur-ring { width: 54px; height: 54px; opacity: .9; }
@media (hover: none), (pointer: coarse) { #cur-dot, #cur-ring { display: none; } }

/* ── TYPE PRIMITIVES ───────────────────────────────────── */
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.module {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 22px;
}
/* mint accent fails contrast on cream — darken mono labels on light */
.section--light .module,
.assay .code,
.protocole .ptitle { color: var(--accent-ink); }
.h-xl, .h-lg, .h-md {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 0.94;
}
.h-xl { font-size: clamp(44px, 7vw, 104px); line-height: 0.95; }
.h-lg { font-size: clamp(32px, 4.6vw, 60px); text-wrap: balance; }
.h-md { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; text-wrap: balance; }
.lead { font-family: var(--font-body); font-weight: 300; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.65; color: var(--muted); }
/* nicer body wrapping — avoids orphans and short last lines */
p, .lead, .spec-find, .fiche-note, .rap .quote, .cons-body p { text-wrap: pretty; }
.section--dark .lead { color: var(--dim); }
.tg {
  background: linear-gradient(120deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hp { color: var(--pink); }   /* highlight where mint would vanish (on mint bg) */

/* ── SECTION SHELL ─────────────────────────────────────── */
.section { position: relative; padding: 118px 40px; }
.section--dark  { background: var(--void);  color: #fff; }
.section--light { background: var(--cream); color: var(--ink); }
.section--mint  { background: linear-gradient(140deg, #aef2df 0%, #99EFD1 42%, #4fd6b2 100%); color: var(--ink); }
.section--mint::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 25%, transparent 82%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 25%, transparent 82%);
}
.section--mint > .wrap { position: relative; z-index: 1; }
.wrap { max-width: 1440px; margin: 0 auto; position: relative; }

/* blueprint grid behind dark sections */
.section--dark::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 82%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 82%);
}
.section--dark > .wrap { z-index: 1; }

/* registration corner marks */
.corner { position: relative; }
.corner::before, .corner::after {
  content: '+'; position: absolute; font-family: var(--font-mono);
  font-size: 13px; line-height: 1; color: var(--accent); opacity: .55; pointer-events: none;
}
.corner::before { top: 7px; left: 9px; }
.corner::after  { bottom: 7px; right: 9px; }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 15px 26px; border-radius: 2px; border: 1px solid transparent;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
  will-change: transform;
}
.btn-solid  { background: var(--accent); color: #04231c; }
.btn-solid:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #04231c; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: currentColor; border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.section--light .btn-ghost { border-color: var(--line-light); }
.link-ghost { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.link-ghost:hover { color: var(--accent); }

/* redaction — the ONLY pink */
.redact {
  display: inline-block; background: var(--pink); color: var(--pink);
  font-family: var(--font-mono); font-weight: 700; font-size: 0.78em;
  letter-spacing: 2px; padding: 1px 6px; border-radius: 2px;
  vertical-align: middle; user-select: none; overflow: hidden; white-space: nowrap;
}
.redact.glitch { color: #fff; }   /* scrambled glyphs surface only mid-glitch */

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 40px;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background .35s, color .35s, border-color .35s, padding .35s;
}
.nav--dark  { background: rgba(10,10,10,0.55); color: #fff;      border-bottom-color: var(--hair-dark); }
.nav--light { background: rgba(244,244,245,0.72); color: var(--ink); border-bottom-color: var(--hair-light); }
.nav-brand { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.04em; }
.nav-brand b { font-weight: 700; }
.nav-brand span { font-weight: 400; }
.nav-menu { display: flex; align-items: center; gap: 22px; }
.nav-menu a { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; transition: opacity .25s, color .25s; }
.nav-menu a:hover, .nav-menu a.active { opacity: 1; color: var(--accent); }
.nav--light .nav-menu a:hover, .nav--light .nav-menu a.active { color: var(--accent-ink); }
.nav-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.nav-status .led { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid currentColor; border-radius: 2px; padding: 7px 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: inherit; }

/* ═══════════════ 000 · LA PAILLASSE (design lab bench) ═══════════════ */
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  background: #f4f4f5; color: var(--ink);
  display: flex; align-items: center;
  padding: 130px 40px 90px;
}
/* the grey graph grid is drawn inside #mesh so it stays aligned with the dots */
#mesh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner { position: relative; z-index: 2; max-width: 1440px; margin: 0 auto; width: 100%; }
.hero h1 { color: var(--ink); margin-bottom: 26px; }
.hero h1 .line { display: block; white-space: nowrap; }
.hero .lead { color: var(--muted); }
.hero-sub { max-width: 560px; margin-bottom: 40px; }
.hero-cta { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-readout {
  position: absolute; right: 40px; bottom: 34px; z-index: 2; text-align: right;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); line-height: 1.9;
  font-variant-numeric: tabular-nums;
}
.hero-readout b { color: var(--accent-ink); font-weight: 700; }

/* ═══════════════ SCELLÉ · label tape ═══════════════ */
.scelle { background: #050505; border-top: 1px solid var(--hair-dark); border-bottom: 1px solid var(--hair-dark); overflow: hidden; padding: 13px 0; }
.scelle-track { display: flex; width: max-content; white-space: nowrap; animation: tape 42s linear infinite; }
.scelle-track span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding: 0 22px; }
.scelle-track .plus { color: #444; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ═══════════════ 001 · LE CONSERVATEUR ═══════════════ */
.cons-grid { display: grid; grid-template-columns: 300px 1fr; gap: 52px; align-items: center; }
.cons-photo { border: 1px solid var(--line-light); padding: 12px; background: #fff; max-width: 340px; }
.cons-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.cons-photo .cap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
.cons-photo .cap .mono { color: var(--muted); font-size: 10px; letter-spacing: .1em; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.status .led { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.cons-body p { margin-bottom: 20px; max-width: 680px; }
.field-list { list-style: none; border-top: 1px solid var(--line-light); margin-top: 8px; }
.field-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--hair-light); }
.field-list li span:first-child { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field-list li span:last-child { font-family: var(--font-body); font-size: 14.5px; color: var(--ink); text-align: right; }

/* ═══════════════ 002 · CLASSIFICATION (mint) ═══════════════ */
.section--mint .module { color: var(--ink); }
.class-head { max-width: none; margin-bottom: 36px; }
.class-head .h-lg { color: var(--ink); }
/* trim the section height (~25% shorter) */
#classification { padding-top: 82px; padding-bottom: 82px; }
#classification .discipline { padding: 30px; }
#classification .discipline h3 { margin-bottom: 16px; }
#classification .taxo { margin-bottom: 16px; }
#classification .taxo summary { padding: 8px 0; }
.class-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.discipline {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: 0 28px 56px -30px rgba(4,35,28,0.5);
  padding: 40px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.discipline:hover { transform: translateY(-5px); box-shadow: 0 36px 64px -30px rgba(4,35,28,0.6); }
.discipline .tag {
  display: inline-block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase;
  background: var(--ink); color: var(--accent);
  padding: 6px 12px; border-radius: 2px; margin-bottom: 18px;
}
.discipline h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.03em; text-transform: uppercase; color: var(--ink); margin-bottom: 22px; line-height: 1; }
.taxo { list-style: none; margin-bottom: 22px; }
.taxo li { border-bottom: 1px solid rgba(0,0,0,0.08); }
.taxo summary {
  list-style: none; cursor: pointer; user-select: none;
  font-family: var(--font-body); font-size: 15px; color: #333;
  padding: 10px 0; display: flex; align-items: baseline; gap: 9px;
  transition: color .2s var(--ease);
}
.taxo summary::-webkit-details-marker { display: none; }
.taxo summary::before {
  content: '+'; font-family: var(--font-mono); color: var(--accent-ink);
  font-weight: 700; width: 10px; flex: none;
}
.taxo details[open] summary::before { content: '\2212'; }
.taxo summary:hover { color: var(--accent-ink); }
.taxo details p {
  font-family: var(--font-body); font-size: 13.5px; color: var(--muted);
  line-height: 1.5; padding: 0 6px 12px 19px; margin: 0;
}
.discipline .one { font-size: 15px; color: var(--muted); font-style: italic; }

/* ═══════════════ 003 · LA COLLECTION ═══════════════ */
.coll-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.filters { display: flex; gap: 8px; }
.filter { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 9px 16px; border: 1px solid var(--line-light); background: transparent; color: var(--muted); border-radius: 2px; transition: all .25s; }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.spec { border: 1px solid var(--line-light); background: #fff; padding: 12px; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.spec.hide { display: none; }
.spec:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -20px rgba(0,0,0,0.25); }
.spec-img { position: relative; overflow: hidden; }
.spec-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: transform .6s var(--ease); }
.spec:hover .spec-img img { transform: scale(1.04); }
.spec-link { display: block; color: inherit; }
.spec-more { border-top: 1px solid var(--hair-light); padding-top: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); transition: gap .3s; }
.spec:hover .spec-more { color: var(--ink); }
.spec-idx { position: absolute; top: 10px; left: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: #fff; background: rgba(0,0,0,0.6); padding: 4px 8px; }
.spec-tag { position: absolute; top: 10px; right: 10px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #04231c; background: var(--accent); padding: 4px 8px; }
.spec-body { padding: 16px 6px 6px; }
.spec-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 8px; }
.spec-find { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.spec-client { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--hair-light); padding-top: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ═══════════════ 004 · FICHE TECHNIQUE + réaction ═══════════════ */
/* ── scroll-scrub shell ── */
.fiche { padding: 0; }
.fiche.section--dark::before { display: none; }         /* grid moves onto the pinned frame */
.fiche-scroll { position: relative; height: 240vh; }
.fiche-sticky { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; padding: 92px 40px; overflow: hidden; }
.fiche-sticky::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 82%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 82%);
}
.fiche-sticky .wrap { position: relative; z-index: 1; width: 100%; }
.fiche-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 54px; align-items: center; margin-top: 26px; }
.fiche-grid > * { min-width: 0; }   /* stop the big Syne word from widening its track */

/* ── reaction module ── */
.reaction-pin { display: contents; }   /* desktop: reaction is a direct grid child */
.reaction { position: relative; border: 1px solid var(--line-dark); background: #0d0d0d; padding: 34px; }
.rtop { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 22px; }
.rlabel, .rprog { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.rprog b { color: var(--accent); }

.reaction-stage { position: relative; height: 132px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.grid-underlay {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease);
  background-image: linear-gradient(rgba(0,196,154,0.22) 1px, transparent 1px), linear-gradient(90deg, rgba(0,196,154,0.22) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 55%, transparent 100%);
}
.r-word {
  position: relative; z-index: 1; white-space: nowrap;
  font-family: var(--font-body); font-weight: 300; text-transform: lowercase;
  letter-spacing: .3em; color: #6a6a6a; font-size: 24px;
  transition: color .5s var(--ease), letter-spacing .5s var(--ease), font-size .5s var(--ease);
}
.r-word .wb { transition: color .5s var(--ease); }
.r-stamp {
  position: absolute; right: 30px; top: 96px; z-index: 3;
  font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: .22em; color: var(--accent);
  border: 2px solid var(--accent); padding: 7px 14px; border-radius: 2px;
  transform: rotate(-8deg) scale(.5); opacity: 0;
  transition: opacity .4s, transform .5s var(--ease-io);
}

/* step states (data-step 0..4 on .fiche-grid drives BOTH columns) */
.fiche-grid[data-step="1"] .r-word,
.fiche-grid[data-step="2"] .r-word,
.fiche-grid[data-step="3"] .r-word,
.fiche-grid[data-step="4"] .r-word { text-transform: uppercase; }
.fiche-grid[data-step="1"] .r-word { letter-spacing: .14em; color: #9a9a9a; }
.fiche-grid[data-step="2"] .r-word,
.fiche-grid[data-step="3"] .r-word,
.fiche-grid[data-step="4"] .r-word { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(30px, 4vw, 46px); color: #fff; }
/* wordmark weights once formed: OUTMIND lighter than LABS */
.fiche-grid[data-step="2"] .wa, .fiche-grid[data-step="3"] .wa, .fiche-grid[data-step="4"] .wa { font-weight: 400; }
.fiche-grid[data-step="2"] .wb, .fiche-grid[data-step="3"] .wb, .fiche-grid[data-step="4"] .wb { font-weight: 700; }
.fiche-grid[data-step="1"] .grid-underlay,
.fiche-grid[data-step="2"] .grid-underlay,
.fiche-grid[data-step="3"] .grid-underlay { opacity: 1; }
.fiche-grid[data-step="4"] .grid-underlay { opacity: 0; }
.fiche-grid[data-step="3"] .wb,
.fiche-grid[data-step="4"] .wb { color: var(--accent); }
.fiche-grid[data-step="3"] .sw,
.fiche-grid[data-step="4"] .sw { background: var(--sw); }
.fiche-grid[data-step="3"] .sw:nth-child(2), .fiche-grid[data-step="4"] .sw:nth-child(2) { transition-delay: .07s; }
.fiche-grid[data-step="3"] .sw:nth-child(3), .fiche-grid[data-step="4"] .sw:nth-child(3) { transition-delay: .14s; }
.fiche-grid[data-step="3"] .sw:nth-child(4), .fiche-grid[data-step="4"] .sw:nth-child(4) { transition-delay: .21s; }
.fiche-grid[data-step="4"] .r-stamp { opacity: 1; transform: rotate(-8deg) scale(1.12); }

.rlogline { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 20px 0 22px; min-height: 14px; }
.swatches { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; }
.sw { width: 40px; height: 40px; border-radius: 2px; background: #2a2a2a; transition: background .5s var(--ease); }
.rfoot { display: flex; align-items: center; justify-content: center; min-height: 44px; }
.rhint { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.reaction .rhint, .reaction .btn { display: none; }
.reaction.mode-scrub .rhint { display: inline; }
.reaction.mode-auto .btn { display: inline-flex; }
.fiche-meta .metatable { list-style: none; border-top: 1px solid var(--line-dark); margin-bottom: 26px; }
.fiche-meta .metatable li { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--hair-dark); }
.fiche-meta .metatable li span:first-child { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.fiche-meta .metatable li span:last-child { font-family: var(--font-body); font-size: 14px; color: #fff; text-align: right; }
.fiche-note { font-size: 14px; color: var(--dim); line-height: 1.6; margin-bottom: 26px; font-style: italic; }
.typekit { border-top: 1px solid var(--hair-dark); padding-top: 20px; }
.typekit .row { display: flex; align-items: baseline; justify-content: space-between; padding: 7px 0; }
.typekit .name { color: #fff; }
.typekit .k1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; font-size: 20px; }
.typekit .k2 { font-family: var(--font-body); font-weight: 400; font-size: 17px; }
.typekit .k3 { font-family: var(--font-mono); font-size: 14px; }
.typekit .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.typekit .palette { display: flex; gap: 8px; margin-top: 16px; }
.typekit .chip { flex: 1; height: 30px; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; background: #262626; color: transparent; transition: background .5s var(--ease), color .4s; }

/* ── right column reveals in lockstep with the reaction steps ── */
.fiche-meta .metatable li,
.fiche-note,
.typekit .row { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
/* step >= 1: the spec sheet fills in, row by row */
.fiche-grid:not([data-step="0"]) .metatable li { opacity: 1; transform: none; }
.fiche-grid:not([data-step="0"]) .metatable li:nth-child(2) { transition-delay: .05s; }
.fiche-grid:not([data-step="0"]) .metatable li:nth-child(3) { transition-delay: .10s; }
.fiche-grid:not([data-step="0"]) .metatable li:nth-child(4) { transition-delay: .15s; }
.fiche-grid:not([data-step="0"]) .metatable li:nth-child(5) { transition-delay: .20s; }
/* step >= 2: the type kit appears (as the fonts form) */
.fiche-grid:not([data-step="0"]):not([data-step="1"]) .typekit .row { opacity: 1; transform: none; }
.fiche-grid:not([data-step="0"]):not([data-step="1"]) .typekit .row:nth-child(2) { transition-delay: .07s; }
.fiche-grid:not([data-step="0"]):not([data-step="1"]) .typekit .row:nth-child(3) { transition-delay: .14s; }
/* step >= 3: the palette colours in, synced with the swatches */
.fiche-grid:not([data-step="0"]):not([data-step="1"]):not([data-step="2"]) .chip { background: var(--cc); color: var(--ct); }
.fiche-grid:not([data-step="0"]):not([data-step="1"]):not([data-step="2"]) .chip:nth-child(2) { transition-delay: .07s; }
.fiche-grid:not([data-step="0"]):not([data-step="1"]):not([data-step="2"]) .chip:nth-child(3) { transition-delay: .14s; }
.fiche-grid:not([data-step="0"]):not([data-step="1"]):not([data-step="2"]) .chip:nth-child(4) { transition-delay: .21s; }
/* step 4: the closing note lands */
.fiche-grid[data-step="4"] .fiche-note { opacity: 1; transform: none; }

/* ═══════════════ 005 · PRÉLÈVEMENTS ═══════════════ */
.assay-intro { max-width: none; margin-bottom: 48px; }
.assay-intro .lead { max-width: 760px; }
.assay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.assay { border: 1px solid var(--line-light); background: #fff; padding: 30px; display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .3s; }
.assay:hover { transform: translateY(-5px); border-color: rgba(0,196,154,0.5); }
.assay .code { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.assay h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 18px; }
.assay ul { list-style: none; margin-bottom: 20px; flex: 1; }
.assay li { font-family: var(--font-body); font-size: 14px; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--hair-light); }
.assay li::before { content: '+ '; font-family: var(--font-mono); color: var(--accent-ink); font-weight: 700; }
.assay .delai { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }

/* ═══════════════ 006 · RAPPORTS ═══════════════ */
.rap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rap { border: 1px solid var(--line-dark); background: var(--panel); padding: 28px; transition: transform .4s var(--ease), border-color .3s; }
.rap:hover { transform: translateY(-5px); border-color: var(--accent); }
.rap .rhead { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--hair-dark); padding-bottom: 14px; margin-bottom: 18px; }
.rap .quote { font-size: 15px; line-height: 1.65; color: #e5e5e5; font-style: italic; font-weight: 300; margin-bottom: 20px; }
.rap .attrib { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.rap .reading { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* ═══════════════ 007 · CONTACT ═══════════════ */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.acc-info { display: flex; flex-direction: column; }
.acc-info .h-lg { margin-bottom: 14px; }
.acc-note { font-size: 15px; color: var(--muted); margin-bottom: 34px; }
.acc-steps { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line-light); margin-bottom: 34px; }
.acc-step { display: flex; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--hair-light); }
.acc-step .n { font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--accent-ink); flex-shrink: 0; }
.acc-step b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.acc-step span { font-size: 14px; color: var(--muted); }
.acc-direct { margin-top: auto; padding-top: 6px; }
.acc-direct p { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.acc-direct a { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); word-break: break-all; }
.acc-direct a:hover { color: var(--accent-ink); }
.acc-direct .mono { display: block; margin-top: 10px; font-family: var(--font-body); color: var(--muted); font-size: 13px; letter-spacing: 0; text-transform: none; }
.acc-form { background: #fff; border: 1px solid var(--line-light); padding: 40px; box-shadow: 0 30px 60px -40px rgba(0,0,0,0.4); }
.form-error { margin-top: 16px; font-size: 13.5px; color: #b3261e; }
.form-row { margin-bottom: 24px; }
.form-row label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: none; border-bottom: 1px solid var(--line-light); background: transparent;
  padding: 10px 2px; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  transition: border-color .3s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-bottom-color: var(--accent); }
.form-row textarea { resize: vertical; min-height: 90px; }
.acc-note { font-size: 13px; color: var(--muted); margin: 6px 0 26px; }
.protocole { border: 1px solid var(--line-light); padding: 28px; background: #fff; }
.protocole .ptitle { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.protocole ol { list-style: none; counter-reset: p; }
.protocole li { counter-increment: p; padding: 16px 0; border-top: 1px solid var(--hair-light); font-family: var(--font-body); font-size: 14.5px; color: var(--muted); display: flex; gap: 14px; align-items: baseline; }
.protocole li::before { content: '0' counter(p); font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); font-weight: 700; }
.acc-success { text-align: center; padding: 24px 6px; }
.acc-success .mark { width: 46px; height: 46px; border: 1.5px solid var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; color: var(--accent); font-family: var(--font-mono); }
.acc-success h3 { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 12px; }
.acc-success p { color: var(--muted); font-size: 14px; }

/* ═══════════════ 008 · CLÔTURE / footer ═══════════════ */
.cloture { position: relative; text-align: center; overflow: hidden; }
.cloture-glow { position: absolute; left: 50%; bottom: -120px; transform: translateX(-50%); width: 620px; height: 340px; background: radial-gradient(ellipse at center, rgba(0,196,154,0.5) 0%, transparent 68%); filter: blur(80px); pointer-events: none; }
.cloture .wrap { z-index: 1; }
.cloture .h-lg { color: #fff; max-width: 820px; margin: 0 auto 40px; }
.cloture .bigmark { font-family: var(--font-display); font-size: clamp(28px, 4vw, 54px); letter-spacing: -0.04em; margin-bottom: 30px; }
.cloture .bigmark span { font-weight: 400; color: #fff; }
.cloture .bigmark b { font-weight: 700; color: var(--accent); }
.cloture .colophon { font-family: var(--font-body); font-size: 12.5px; letter-spacing: .01em; color: var(--dim); line-height: 2; }
.cloture .colophon a { color: var(--accent); }
.cloture .foot-hair { width: 100%; max-width: 900px; height: 1px; background: var(--hair-dark); margin: 40px auto; }

/* ── scroll reveal ── */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease-io), transform .8s var(--ease-io); }
.reveal.in { opacity: 1; transform: none; }

/* ── floating contact CTA ── */
.cta-float {
  position: fixed; z-index: 950; right: 26px; bottom: 26px;
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: #111; padding: 14px 22px; border-radius: 100px;
  box-shadow: 0 0 0 1px rgba(0,196,154,0.55), 0 18px 38px -14px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(16px) scale(0.96); pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease), background .25s, color .25s;
}
.cta-float.show { opacity: 1; transform: none; pointer-events: auto; }
.cta-float:hover { background: var(--accent); color: var(--void); box-shadow: 0 0 0 1px var(--accent), 0 18px 38px -12px rgba(0,196,154,0.45); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 900px) {
  .section { padding: 90px 22px; }
  .nav { padding: 13px 22px; }
  .nav-menu a, .nav-status { display: none; }
  .nav-toggle { display: inline-block; }
  .nav.open .nav-menu { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(18,18,20,0.95); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--hair-dark); padding: 10px 22px 18px; }
  .nav--light.open .nav-menu { background: rgba(248,248,249,0.97); border-bottom-color: var(--hair-light); }
  .nav.open .nav-menu a { display: block; padding: 12px 0; opacity: .9; }
  .hero { padding: 120px 22px 80px; }
  .hero-readout { display: none; }
  .cons-grid, .fiche-grid, .acc-grid { grid-template-columns: 1fr; gap: 40px; }
  .cons-photo { max-width: none; }
  .fiche-scroll { height: auto; }
  .fiche-sticky { position: static; min-height: 0; padding: 90px 22px; overflow: visible; }
  /* pin the reaction inside its own spacer so it plays through its steps
     before the meta, without ever scrolling on top of it */
  .reaction-pin { display: block; min-height: 150vh; }
  .fiche-grid .reaction { position: sticky; top: 72px; }
  .class-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .assay-grid { grid-template-columns: repeat(2, 1fr); }
  .rap-grid { grid-template-columns: 1fr; }
  /* the fiche right column reveals with the desktop scrub; on mobile the
     scrub is off, so show it regardless of the animation state */
  .fiche-grid .metatable li, .fiche-grid .fiche-note, .fiche-grid .typekit .row { opacity: 1; transform: none; }
  .fiche-grid .chip { background: var(--cc); color: var(--ct); }
  .acc-form { padding: 28px 22px; }
  .proj-hero { padding-top: 130px; }
  .proj-meta { gap: 14px 26px; }
}
@media (max-width: 560px) {
  .section { padding: 76px 18px; }
  .spec-grid { grid-template-columns: 1fr; }
  .assay-grid { grid-template-columns: 1fr; }
  .hero { padding: 110px 18px 70px; }
  .hero .h-xl { font-size: clamp(28px, 11.5vw, 46px); }   /* smaller, with margin so 'ON MÉLANGE.' never clips */
  .cta-float { right: 16px; bottom: 16px; padding: 12px 18px; font-size: 11px; }
  .hero-cta { gap: 16px; flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .discipline, .reaction, .rap, .assay { padding: 24px; }
  .proj-flow, .proj-hero, .proj-cover, .proj-gallery { padding-left: 18px; padding-right: 18px; }
  .legal-wrap { padding: 120px 18px 70px; }
}

/* ═══════════════ REDUCED MOTION ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scelle-track { animation: none; transform: none; white-space: normal; flex-wrap: wrap; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .r-word, .sw, .grid-underlay, .r-stamp,
  .metatable li, .fiche-note, .typekit .row, .typekit .chip { transition: none; }
  .fiche-scroll { height: auto; }
  .fiche-sticky { position: static; min-height: 0; }
  * { scroll-behavior: auto !important; }
}

/* ═══════════════════════════════════════════════════════════
   PROJECT PAGES + LEGAL PAGES
   ═══════════════════════════════════════════════════════════ */
.subpage { background: var(--cream); color: var(--ink); }
.sub-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 40px; background: rgba(244,244,245,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair-light);
}
.sub-nav .nav-brand { color: var(--ink); }
.sub-nav .back { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.sub-nav .back:hover { color: var(--ink); }

/* ── project hero ── */
.proj-hero { max-width: 1440px; margin: 0 auto; padding: 150px 40px 30px; }
.proj-tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-light); padding: 6px 12px; border-radius: 2px; margin-bottom: 22px; }
.proj-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 7.5vw, 96px); letter-spacing: -0.04em; text-transform: uppercase; line-height: 0.92; margin-bottom: 26px; }
.proj-title .tg { display: inline; }
.proj-intro { font-family: var(--font-body); font-weight: 300; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; color: var(--muted); max-width: 760px; }
.proj-meta { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 30px; }
.proj-meta div { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.proj-meta div span { display: block; color: var(--muted); margin-bottom: 4px; }
.proj-meta div b { color: var(--ink); font-weight: 700; }

.proj-cover { max-width: 1440px; margin: 44px auto; padding: 0 40px; }
.proj-cover img { width: 100%; border: 1px solid var(--line-light); display: block; }

.proj-content { max-width: 1440px; margin: 0 auto; padding: 20px 40px; }
.proj-block { margin: 0 0 64px; }
.proj-block h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.2vw, 42px); letter-spacing: -0.03em; text-transform: uppercase; line-height: 1; margin-bottom: 22px; }
.proj-block h2 .tg { display: inline; }
.proj-block p { font-size: 16.5px; line-height: 1.75; color: var(--muted); max-width: 820px; margin-bottom: 16px; }
.proj-block p strong { color: var(--ink); font-weight: 600; }
.proj-note { font-size: 14px; color: var(--muted); font-style: italic; border-left: 2px solid var(--accent); padding-left: 18px; max-width: 760px; }
.proj-note a { color: var(--accent-ink); font-weight: 600; }

.proj-gallery { max-width: 1440px; margin: 10px auto 80px; padding: 0 40px; column-count: 2; column-gap: 16px; }
.proj-gallery img { width: 100%; border: 1px solid var(--line-light); display: block; margin-bottom: 16px; break-inside: avoid; }

.sub-foot { text-align: center; }
.sub-foot .h-lg { color: #fff; margin-bottom: 30px; }
.sub-foot .colophon { font-family: var(--font-body); font-size: 12.5px; color: var(--dim); line-height: 2; margin-top: 40px; }
.sub-foot .colophon a { color: var(--accent); }

/* ── legal pages ── */
.legal-wrap { max-width: 1440px; margin: 0 auto; padding: 140px 40px 90px; }
.legal-wrap p, .legal-wrap li, .legal-wrap h2, .legal-wrap .updated { max-width: 820px; }
.legal-wrap h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.04em; text-transform: uppercase; line-height: 0.95; margin-bottom: 12px; }
.legal-wrap .updated { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 44px; }
.legal-wrap h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin: 40px 0 14px; }
.legal-wrap p, .legal-wrap li { font-size: 15.5px; line-height: 1.75; color: var(--muted); }
.legal-wrap p { margin-bottom: 14px; }
.legal-wrap ul { padding-left: 20px; margin-bottom: 14px; }
.legal-wrap li { margin-bottom: 8px; }
.legal-wrap a { color: var(--accent-ink); font-weight: 600; }
.legal-wrap strong { color: var(--ink); }

/* footer legal links */
.foot-legal { margin-top: 18px; }
.foot-legal a { color: var(--dim); }
.foot-legal a:hover { color: var(--accent); }

@media (max-width: 700px) {
  .proj-gallery { column-count: 1; }
  .sub-nav { padding: 13px 22px; }
  .proj-hero, .proj-content { padding-left: 22px; padding-right: 22px; }
  .proj-cover, .proj-gallery { padding-left: 22px; padding-right: 22px; }
}

/* ── project flow: alternating text / image ── */
.proj-flow { max-width: 1440px; margin: 0 auto; padding: 20px 40px; }
.proj-split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; margin: 64px 0; }
.proj-split .proj-fig { margin: 0; }
.proj-split .proj-fig img, .proj-full img { width: 100%; border: 1px solid var(--line-light); display: block; }
.proj-split.reverse .proj-fig { order: -1; }
.proj-solo { max-width: 820px; margin: 64px 0; }
.proj-txt h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.8vw, 38px); letter-spacing: -0.03em; text-transform: uppercase; line-height: 1; margin-bottom: 18px; }
.proj-txt h2 .tg { display: inline; }
.proj-txt p { font-size: 16.5px; line-height: 1.75; color: var(--muted); margin-bottom: 14px; }
.proj-txt p strong { color: var(--ink); font-weight: 600; }
.proj-full { margin: 44px 0; }

/* ── shared footer nav (home · legal · socials) ── */
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 24px; }
.foot-nav a { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.foot-nav a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .proj-split { grid-template-columns: 1fr; gap: 28px; margin: 44px 0; }
  .proj-split.reverse .proj-fig { order: 0; }
}
