/* Hallmark · shape: chambre noire, un magazine qui se développe · genre: editorial · theme: custom · job: join · idea: "le site se comporte comme un tirage qu'on développe : les images montent du noir, le texte mord sur l'image" · vibe: "brut, lent, souverain, argentique, silencieux"
 * paper: oklch(14.5% 0.006 60) · accent: none, ink oklch(93.5% 0.012 85) inverted for actions · display: Gloock · body: Hanken Grotesk · hero: bande 2,39:1 qui se pose lentement, titre qui mord sur le bas de l'image · nav: wordmark à gauche, quatre portes et Patreon à droite · footer: la lettre, puis le mot-symbole et les portes · imagery: photographs (médiathèque WordPress d'Adrien Jacquet) · signature: chaque photo monte du noir comme dans le bain de révélateur
 * axes: dark/high-contrast-serif/neutral · posture: dark · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R3 V4 · weakest: R, the chapter list is a numbered list by nature; kept as a real <ol> with counters, set big */
/* waive craft §5 duration: the develop reveal runs 1.6s, the darkroom pace is the idea; it is the page's only reveal */
@import url("./tokens.css");
@import url("./base.css");

:root { --frame-ratio: 2.39; --h1-size: clamp(3rem, 7.6vw, 8.75rem); }

body { background: var(--color-paper); }

/* ---------- liens et boutons ---------- */
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-lg);
  font-family: var(--font-body); font-size: var(--text-md); font-weight: 600; text-decoration: none; white-space: nowrap;
  background: var(--color-accent); color: var(--color-accent-ink); border: 1px solid var(--color-accent);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.btn:hover { background: var(--color-paper); color: var(--color-ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.link {
  color: var(--color-ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--color-muted);
  text-underline-offset: 0.28em; transition: text-decoration-color var(--dur-short) var(--ease-out);
}
.link:hover { text-decoration-color: var(--color-ink); }
.link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* ---------- navigation ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: var(--z-sticky-nav);
  background: linear-gradient(to bottom, color-mix(in oklab, var(--color-paper) 70%, transparent), transparent);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: 76px; }
.wordmark { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-ink); text-decoration: none; line-height: 1; }
.wordmark:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.nav__links { display: flex; align-items: center; gap: var(--space-lg); list-style: none; margin: 0; padding: 0; }
.nav__links a:not(.btn) { color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); }
.nav__links a:not(.btn):hover { color: var(--color-ink); }
.nav__links a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.nav__links .btn { min-height: 40px; font-size: var(--text-sm); padding: 0 var(--space-md); }
@media (max-width: 52rem) {
  .nav__links { display: none; }
}

/* ---------- héros : la bande de cinéma ---------- */
.hero { position: relative; }
.frame {
  position: relative; margin: 0; overflow: hidden; background: var(--color-paper-2);
  height: min(64vh, calc(100vw / var(--frame-ratio))); min-height: 300px;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, var(--color-paper) 0%, color-mix(in oklab, var(--color-paper) 75%, transparent) 18%, color-mix(in oklab, var(--color-paper) 25%, transparent) 42%, transparent 62%);
}
.hero__text {
  position: relative; z-index: 3; margin-top: calc(var(--h1-size) * -0.62);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--gap-columns); align-items: end;
}
.hero h1, .chapter-hero h1 {
  font-weight: 400; font-size: var(--h1-size); line-height: 0.92; letter-spacing: -0.02em; color: var(--color-ink);
}
.hero h1 span, .chapter-hero h1 span { display: block; }
.hero__side { display: grid; gap: var(--space-lg); padding-bottom: var(--space-xs); }
.hero__side p { color: var(--color-ink-2); font-size: var(--text-lead); max-width: 30ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-lg); }
@media (max-width: 52rem) {
  .hero__text { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .frame { height: auto; aspect-ratio: 4 / 3; }
}

/* entrée du héros : l'image se pose, le titre sort du flou */
@media (prefers-reduced-motion: no-preference) {
  .settle img { animation: settle var(--dur-settle) var(--ease-out) both; }
  .rise { animation: rise 1100ms var(--ease-out) var(--d, 0ms) both; }
  @keyframes settle { from { transform: scale(1.09); opacity: 0.2; } to { transform: none; opacity: 1; } }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
}

/* ---------- grain, sur les photos seulement ---------- */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--texture-opacity);
  background-size: 200px 200px; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 9 -4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- la signature : la photo monte du noir ---------- */
.develop { background: var(--color-paper); overflow: hidden; }
.develop img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .js .develop:not(.is-seen) img { opacity: 0; transform: scale(1.035); }
  .js .develop img { transition: opacity var(--dur-develop) var(--ease-out), transform var(--dur-settle) var(--ease-out); }
}

/* ---------- sections ---------- */
section { position: relative; }
.section { padding-block: var(--section-gap); }
h2 { font-weight: 400; font-size: var(--text-section); line-height: 1; letter-spacing: -0.015em; color: var(--color-ink); }
.lead { font-size: var(--text-lead); color: var(--color-ink-2); max-width: 46ch; }
.caption { font-size: var(--text-sm); color: var(--color-muted); }

/* démarche : le texte s'allume à la lecture */
.manifest { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: var(--gap-columns); align-items: end; }
.manifest__text {
  font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 3.6rem); line-height: 1.1; letter-spacing: -0.01em; color: var(--color-ink);
  max-width: 24ch;
}
.manifest__text .w { transition: opacity 200ms linear; }
.manifest figure { margin: 0; aspect-ratio: 2 / 3; }
.manifest figcaption { margin-top: var(--space-xs); }
@media (max-width: 52rem) { .manifest { grid-template-columns: minmax(0, 1fr); } .manifest figure { width: 60%; } }

/* chapitres : la liste reste, les images défilent */
.chapters { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-columns); }
.chapters__pin { position: sticky; top: var(--space-2xl); align-self: start; display: grid; gap: var(--space-xl); }
.chapters__list { list-style: none; margin: 0; padding: 0; counter-reset: ch; display: grid; gap: var(--space-sm); }
.chapters__list li { counter-increment: ch; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); align-items: baseline; }
.chapters__list li::before { content: counter(ch); color: var(--color-muted); font-size: var(--text-sm); }
.chapters__list a {
  font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.1; color: var(--color-ink-2); text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}
.chapters__list a:hover, .chapters__list a[aria-current="true"] { color: var(--color-ink); }
.chapters__list a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.chapters__scroll { display: grid; gap: var(--space-4xl); }
.chapter-card { margin: 0; display: grid; gap: var(--space-md); }
.chapter-card .develop { aspect-ratio: 4 / 5; }
.chapter-card--wide .develop { aspect-ratio: 3 / 2; }
.chapter-card h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-3xl); line-height: 1; margin: 0; }
.chapter-card h3 a { color: var(--color-ink); text-decoration: none; }
.chapter-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.chapter-card h3 a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.chapter-card p { color: var(--color-ink-2); max-width: 46ch; }
@media (max-width: 60rem) {
  .chapters { grid-template-columns: minmax(0, 1fr); }
  .chapters__pin { position: static; }
  .chapters__list { display: none; }
  .chapters__scroll { gap: var(--space-3xl); }
}

/* le tirage : on sort de la chambre noire */
.sheet { background: var(--color-sheet); color: var(--color-sheet-ink); }
.sheet h2, .sheet h3 { color: var(--color-sheet-ink); }
.sheet .lead { color: var(--color-sheet-muted); }
.sheet .caption { color: var(--color-sheet-muted); }
.sheet .btn { background: var(--color-sheet-ink); color: var(--color-sheet); border-color: var(--color-sheet-ink); }
.sheet .btn:hover { background: var(--color-sheet); color: var(--color-sheet-ink); }
.sheet .btn:focus-visible, .sheet a:focus-visible { outline-color: var(--color-sheet-ink); }
.sheet .link { color: var(--color-sheet-ink); text-decoration-color: var(--color-sheet-muted); }
.sheet .develop { background: var(--color-sheet-2); }
.print__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); align-items: end; }
.print__head h2 { font-size: clamp(2.5rem, 5.4vw, 5.5rem); line-height: 0.95; }
.print__head h2 span { display: block; }
.print__side { display: grid; gap: var(--space-lg); justify-items: start; }
.prints { list-style: none; margin: var(--space-3xl) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.prints li:nth-child(2) { margin-top: var(--space-3xl); }
.prints figure { margin: 0; display: grid; gap: var(--space-sm); }
.prints .develop { aspect-ratio: 4 / 5; }
.prints h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-xl); margin: 0; }
@media (max-width: 52rem) {
  .print__head { grid-template-columns: minmax(0, 1fr); }
  .prints { grid-template-columns: minmax(0, 1fr); }
  .prints li:nth-child(2) { margin-top: 0; }
}

/* la chambre noire : Patreon */
.darkroom { display: grid; grid-template-columns: minmax(0, 1fr); }
.darkroom .develop { aspect-ratio: 3 / 2; max-height: 78vh; width: 100%; }
.darkroom__text {
  position: relative; z-index: 3; margin-top: -0.6em; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); align-items: start;
}
.darkroom__text h2 { font-size: clamp(2.5rem, 5.6vw, 6rem); line-height: 0.95; }
.darkroom__text h2 span { display: block; }
.darkroom__side { display: grid; gap: var(--space-lg); justify-items: start; padding-top: 1.4em; }
@media (max-width: 52rem) { .darkroom__text { grid-template-columns: minmax(0, 1fr); } .darkroom__side { padding-top: 0; } }

/* deux portes */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: var(--rule-hair) solid var(--color-rule); }
.door { display: grid; gap: var(--space-lg); align-content: start; justify-items: start; padding: var(--space-2xl) var(--space-2xl) var(--space-2xl) 0; }
.door + .door { border-left: var(--rule-hair) solid var(--color-rule); padding-left: var(--space-2xl); }
.door h2 { font-size: clamp(2rem, 3.4vw, 3.4rem); }
.door p { color: var(--color-ink-2); max-width: 46ch; }
@media (max-width: 52rem) {
  .doors { grid-template-columns: minmax(0, 1fr); }
  .door, .door + .door { padding: var(--space-xl) 0; border-left: 0; }
  .door + .door { border-top: var(--rule-hair) solid var(--color-rule); }
}

/* pied de page : la lettre */
.footer { border-top: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-3xl) var(--space-xl); }
.letter { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap-columns); align-items: end; }
.letter h2 { font-size: clamp(2rem, 3.6vw, 3.5rem); }
.letter form { display: grid; gap: var(--space-xs); }
.letter label { font-size: var(--text-sm); color: var(--color-ink-2); }
.letter__row { display: flex; gap: var(--space-xs); }
.letter input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-md); background: transparent; color: var(--color-ink);
  border: 1px solid var(--color-rule); border-radius: 0; transition: border-color var(--dur-short) var(--ease-out);
}
.letter input:hover { border-color: var(--color-muted); }
.letter input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-color: var(--color-ink); }
.letter input::placeholder { color: var(--color-muted); }
.letter .btn { cursor: pointer; }
.letter__note { font-size: var(--text-sm); color: var(--color-muted); min-height: 1.5em; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-lg); margin-top: var(--space-3xl); align-items: baseline; }
.foot ul { display: flex; flex-wrap: wrap; gap: var(--space-lg); list-style: none; margin: 0; padding: 0; }
.foot a { color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); }
.foot a:hover { color: var(--color-ink); text-decoration: underline; }
.foot a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.foot .wordmark { font-size: var(--text-2xl); }
@media (max-width: 52rem) { .letter { grid-template-columns: minmax(0, 1fr); } }

/* ---------- page chapitre ---------- */
.chapter-hero .num { color: var(--color-muted); font-size: var(--text-sm); }
.intro { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr); gap: var(--gap-columns); }
.intro p.big { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.5rem); line-height: 1.15; color: var(--color-ink); max-width: 26ch; }
.slot-quote {
  border: 1px dashed var(--color-rule); padding: var(--space-lg); color: var(--color-muted); font-size: var(--text-sm); display: grid; gap: var(--space-xs);
}
.slot-quote strong { color: var(--color-ink-2); font-weight: 600; }
@media (max-width: 52rem) { .intro { grid-template-columns: minmax(0, 1fr); } }

.bleed { margin: 0; }
.bleed .develop { aspect-ratio: 3 / 2; max-height: 92vh; width: 100%; }
.pair { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: var(--gap-columns); align-items: start; }
.pair figure { margin: 0; display: grid; gap: var(--space-xs); }
.pair figure:last-child { margin-top: var(--space-4xl); }
.pair .develop { aspect-ratio: 2 / 3; }
.overlay-line {
  position: relative; z-index: 3; font-family: var(--font-display); font-size: clamp(2.6rem, 6.4vw, 7rem); line-height: 0.95;
  color: var(--color-ink); margin-top: -0.55em; max-width: 14ch; margin-inline-start: 18%;
}
@media (max-width: 52rem) { .pair { grid-template-columns: minmax(0, 1fr); } .pair figure:last-child { margin-top: 0; } .overlay-line { margin-inline-start: 0; } }

/* du négatif au papier : la seule animation liée au défilement */
.negative { min-height: 240vh; }
.negative__pin { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; padding-block: var(--space-xl); }
.negative__stage { position: relative; height: min(82vh, 980px); aspect-ratio: 2 / 3; max-width: 100%; }
.negative__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.negative__neg { opacity: 0; filter: invert(1) grayscale(1); }
.negative__caption { position: absolute; left: calc(100% + var(--space-xl)); bottom: 0; width: 18ch; display: grid; gap: var(--space-xs); }
.negative__caption p:first-child { font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.05; color: var(--color-ink); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 40rem) {
    .negative { view-timeline: --neg block; }
    .negative__neg { animation: unneg linear both; animation-timeline: --neg; animation-range: contain 10% contain 75%; }
    @keyframes unneg { from { opacity: 1; } to { opacity: 0; } }
  }
}
@media (max-width: 60rem) {
  .negative { min-height: auto; }
  .negative__pin { position: static; height: auto; }
  .negative__stage { height: auto; width: 100%; }
  .negative__caption { position: static; width: auto; margin-top: var(--space-md); }
}

.ends { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule-hair) solid var(--color-rule); }
.end { display: grid; gap: var(--space-md); align-content: start; justify-items: start; padding: var(--space-2xl) var(--space-xl) var(--space-2xl) 0; }
.end + .end { border-left: var(--rule-hair) solid var(--color-rule); padding-left: var(--space-xl); }
.end h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-3xl); line-height: 1; margin: 0; }
.end p { color: var(--color-ink-2); }
@media (max-width: 52rem) {
  .ends { grid-template-columns: minmax(0, 1fr); }
  .end, .end + .end { padding: var(--space-xl) 0; border-left: 0; }
  .end + .end { border-top: var(--rule-hair) solid var(--color-rule); }
}

.next { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); align-items: end; text-decoration: none; color: var(--color-ink); }
.next .develop { aspect-ratio: 3 / 2; }
.next span { color: var(--color-muted); font-size: var(--text-sm); }
.next strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 4.4rem); line-height: 1; }
.next:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.next:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 6px; }
@media (max-width: 52rem) { .next { grid-template-columns: minmax(0, 1fr); } }

/* le grain s'efface avec l'image, pour que la bande se fonde dans le noir */
.frame.grain::after, .darkroom .grain::after { -webkit-mask-image: linear-gradient(to top, transparent 0, black 50%); mask-image: linear-gradient(to top, transparent 0, black 50%); }
.darkroom .develop, .bleed .develop { position: relative; }
.darkroom .develop::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, var(--color-paper) 0%, color-mix(in oklab, var(--color-paper) 70%, transparent) 16%, transparent 45%);
}

/* =====================================================================
   Le mouvement au défilement (demandé par Adrien : "qu'il se passe quelque chose quand on navigue")
   waive F8 (one scroll pattern per page): the owner asked for motion while scrolling; every effect
   moves transform, translate, scale, opacity or clip-path only, and all of it is off under reduced motion.
   Each [data-scroll] element receives --p from js/site.js: 0 to 1 as it crosses the screen.
   Without script or under reduced motion, --p keeps its neutral value and the page is still.
   ===================================================================== */
[data-scroll] { --p: 0.5; }
[data-scroll="exit"] { --p: 0; }
[data-scroll="enter"] { --p: 1; }

@media (prefers-reduced-motion: no-preference) {
  /* le héros : l'image avance et descend, le titre remonte et s'efface */
  .hero[data-scroll] .frame img { scale: calc(1 + var(--p) * 0.16); translate: 0 calc(var(--p) * 12%); }
  .hero[data-scroll] h1 { translate: 0 calc(var(--p) * -45%); opacity: calc(1 - var(--p) * 1.3); }
  .hero[data-scroll] .hero__side { translate: 0 calc(var(--p) * -20%); opacity: calc(1 - var(--p) * 1.5); }

  /* travelling : chaque photo glisse lentement dans son cadre */
  .develop[data-scroll] img { scale: 1.16; translate: 0 calc((var(--p) - 0.5) * -14%); }
  .bleed .develop[data-scroll] img { scale: calc(1.28 - var(--p) * 0.2); translate: 0 calc((var(--p) - 0.5) * -10%); }
  .darkroom .develop[data-scroll] img { scale: calc(1.3 - var(--p) * 0.24); }

  /* les légendes de chapitre glissent à contre-sens */
  .chapter-card[data-scroll] h3 { translate: calc((0.5 - var(--p)) * 70px) 0; }

  /* la feuille de papier s'élargit en montant */
  .sheet[data-scroll] { clip-path: inset(0 calc((1 - var(--p)) * 7%) round calc((1 - var(--p)) * 28px)); }

  /* les tirages flottent à des vitesses différentes */
  .prints[data-scroll] li:nth-child(1) { translate: 0 calc((var(--p) - 0.5) * -90px); }
  .prints[data-scroll] li:nth-child(2) { translate: 0 calc((var(--p) - 0.5) * 140px); }
  .prints[data-scroll] li:nth-child(3) { translate: 0 calc((var(--p) - 0.5) * -50px); }

  /* page chapitre : les deux colonnes ne défilent pas à la même vitesse */
  .pair[data-scroll] figure:first-child { translate: 0 calc((var(--p) - 0.5) * 80px); }
  .pair[data-scroll] figure:last-child { translate: 0 calc((var(--p) - 0.5) * -160px); }
  .overlay-line[data-scroll] { translate: calc((0.5 - var(--p)) * 40%) 0; }

  /* la liste des chapitres : le titre actif avance */
  .chapters__list a { display: inline-block; transition: color var(--dur-short) var(--ease-out), translate var(--dur-long) var(--ease-out); }
  .chapters__list a[aria-current="true"] { translate: 14px 0; }
}

/* le ruban : deux lignes de très grand texte qui glissent en sens contraire */
.ribbon { overflow: hidden; padding-block: var(--space-2xl); display: grid; gap: 0; }
.ribbon p {
  font-family: var(--font-display); font-size: clamp(4rem, 13vw, 13rem); line-height: 1; white-space: nowrap; max-width: none;
  color: transparent; -webkit-text-stroke: 1px var(--color-muted);
}
.ribbon p + p { color: var(--color-ink); -webkit-text-stroke: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ribbon[data-scroll] p:first-child { translate: calc((0.5 - var(--p)) * 55%) 0; }
  .ribbon[data-scroll] p + p { translate: calc(-25% + (var(--p) - 0.5) * 55%) 0; }
}

/* les titres sortent d'une fente, ligne après ligne */
.mask { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.mask__in { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .split-ready .mask__in { translate: 0 110%; transition: translate 1100ms var(--ease-out) calc(var(--i, 0) * 130ms); }
  .split-ready.is-seen .mask__in { translate: 0 0; }
}

/* la navigation : fixe, elle s'efface quand on descend et revient quand on remonte */
.nav { position: fixed; transition: translate 500ms var(--ease-out), background-color 500ms var(--ease-out); }
.nav--solid { background: color-mix(in oklab, var(--color-paper) 88%, transparent); }
.nav--hidden { translate: 0 -100%; }
.nav:focus-within { translate: 0 0; }

/* passer d'une page à l'autre : un fondu au noir, comme un changement de plan */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: plan-out 450ms var(--ease-in) both; }
  ::view-transition-new(root) { animation: plan-in 900ms var(--ease-out) both; }
  @keyframes plan-out { to { opacity: 0; scale: 0.985; } }
  @keyframes plan-in { from { opacity: 0; scale: 1.02; } }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
