/* ═══════════════════════════════════════════════════════════
   NOCTURNE-V1 — feuille de style canonique
   NE PAS MODIFIER en dehors des tokens :root (écrits par bake.mjs).
   Crème sur noir — jamais gris 40 %.
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink-rgb: 244, 234, 214;
  --bg: #0a0908;
  --ink: #f4ead6;
  --muted: #c4b49a;
  --surface: #14110e;
  --line: rgba(var(--ink-rgb), 0.14);

  --accent: #f2b880;
  --accent-ink: #1a1915;

  --sans: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 4vw, 64px);
  --t-xl: clamp(44px, 8.2vw, 132px);
  --t-l: clamp(30px, 4.2vw, 64px);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
}
html[data-theme="light"] {
  --ink-rgb: 26, 20, 12;
  --bg: #f4ead6;
  --ink: #1a140c;
  --muted: #6e604c;
  --surface: #fffaf0;
  --line: rgba(var(--ink-rgb), 0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 19px; line-height: 1.35;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
h1, h2, h3 { font-weight: 400; }
mark { background: none; color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.45; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 999px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.nc-grain {
  position: fixed; inset: 0; z-index: 250; pointer-events: none; opacity: .18;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.nc-spot {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle 38vmax at var(--sx, 50%) var(--sy, 35%),
    color-mix(in srgb, var(--accent) 18%, transparent) 0%,
    transparent 62%);
  transition: opacity .6s;
  opacity: 0;
}
body.is-ready .nc-spot { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .nc-spot { background: radial-gradient(circle 50vmax at 50% 20%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%); }
}

.si-loader {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg);
  transition: clip-path .95s var(--ease-inout);
  clip-path: inset(0 0 0 0);
}
.si-loader p { font-size: 20px; font-weight: 500; color: var(--ink); }
.si-loader span { width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.si-loader i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .75s var(--ease-out); }
.si-loader.run i { transform: scaleX(1); }
.si-loader.out { clip-path: inset(0 0 100% 0); }

.scene { position: relative; height: calc(var(--len, 2) * 100vh); }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.rv { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; transform: none; }

.nc-lamp {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); opacity: 0; box-shadow: 0 0 40px 12px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: opacity .8s;
}
.sticky.is-lit .nc-lamp { opacity: 1; }
.nc-hero .nc-lamp { top: 18%; right: 14%; }
.nc-manifesto .nc-lamp { top: 22%; left: 12%; }
.nc-motto .nc-lamp { bottom: 22%; right: 18%; }
.nc-steps .nc-lamp { top: 16%; left: 50%; }
.nc-obj .nc-lamp { top: 20%; right: 20%; }

.nc-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px var(--gutter);
  transform: translateY(-100%); transition: transform .7s var(--ease-out), background .4s;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent);
}
body.is-ready .nc-bar { transform: none; }
.nc-wordmark {
  font-size: 20px; font-weight: 500; letter-spacing: -0.02em;
  color: #f7f1e6; text-shadow: 0 1px 16px rgba(0,0,0,.8);
}
body.is-scrolled .nc-bar { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nc-nav { display: flex; gap: 28px; }
.nc-nav a { color: color-mix(in srgb, #f7f1e6 78%, transparent); transition: color .3s; text-shadow: 0 1px 10px rgba(0,0,0,.55); }
.nc-nav a:hover { color: #f7f1e6; }
.nc-cta {
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent-ink); background: var(--accent);
  padding: 11px 18px; border-radius: 999px; white-space: nowrap;
}

.nc-hero .sticky { background: #000; }
.nc-hero-media { position: absolute; inset: 0; }
.nc-hero-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.38) contrast(1.05) saturate(0.75); transform: scale(1.08); will-change: transform; }
.nc-hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.62) 38%, rgba(0,0,0,.35) 100%),
    linear-gradient(180deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.2) 32%, rgba(0,0,0,.82) 100%);
}
.nc-hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 22vh var(--gutter) 10vh; max-width: min(22ch, 92vw);
}
.nc-kicker { margin-bottom: 18px; color: #f0e6d4; text-shadow: 0 1px 14px rgba(0,0,0,.75); }
.nc-title {
  font-size: clamp(40px, 6.4vw, 96px); line-height: 0.98; letter-spacing: -0.04em; color: #f7f1e6;
  text-shadow: 0 2px 28px rgba(0,0,0,.75), 0 0 1px rgba(0,0,0,.9);
}
.nc-title span { display: block; }
.nc-title em { font-style: normal; color: var(--accent); filter: drop-shadow(0 1px 10px rgba(0,0,0,.65)); }
body:not(.static) .nc-title span { opacity: 0; transform: translateY(40%); transition: opacity 1.15s var(--ease-out), transform 1.15s var(--ease-out); }
body.is-ready .nc-title span { opacity: 1; transform: none; }
body.is-ready .nc-l2 { transition-delay: .12s; }
.nc-pos {
  margin-top: 22px; font-size: 17px; max-width: 28ch;
  color: #d9d0c2; text-shadow: 0 1px 12px rgba(0,0,0,.7);
}

.nc-manifesto .sticky {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter); background: var(--bg);
}
.nc-chapter { margin-bottom: 28px; color: var(--accent); }
.nc-man-text {
  font-size: clamp(30px, 4.6vw, 58px); line-height: 1.18; letter-spacing: -0.03em;
  max-width: 18ch; color: var(--ink);
}
.nc-mark { box-shadow: inset 0 -0.32em 0 color-mix(in srgb, var(--accent) 45%, transparent); }

.nc-proof { padding: 18vh var(--gutter) 14vh; }
.nc-head { margin-bottom: 48px; max-width: 36rem; }
.nc-h2 { font-size: var(--t-l); letter-spacing: -0.03em; margin: 10px 0 12px; color: var(--ink); }
.nc-sub { color: var(--muted); max-width: 40ch; }
.nc-masonry {
  columns: 3; column-gap: 16px;
}
.nc-card { break-inside: avoid; margin-bottom: 16px; }
.nc-card-img { overflow: hidden; border-radius: 2px; }
.nc-card-img img { width: 100%; height: auto; filter: brightness(0.9) saturate(0.9); transition: transform 1.2s var(--ease-out), filter .5s; }
.nc-card:hover img { transform: scale(1.03); filter: brightness(1) saturate(1); }
.nc-card figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px 0; font-size: 15px; color: var(--ink); }
.nc-bento { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.35fr; gap: 14px; }
.nc-tile { background: var(--surface); }
.nc-big { grid-column: span 2; }
.nc-tall { grid-row: span 2; }
.nc-tile-img { aspect-ratio: 3/2; overflow: hidden; }
.nc-tall .nc-tile-img { aspect-ratio: 3/4; height: 100%; }
.nc-tile-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.88); }
.nc-tile figcaption { display: flex; flex-direction: column; gap: 6px; padding: 14px; color: var(--ink); }

.nc-motto .sticky {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter); background: #070605;
}
.nc-words { margin: 36px 0 28px; }
.nc-mw {
  position: relative; font-size: clamp(48px, 9vw, 120px); line-height: 0.95; letter-spacing: -0.045em;
  color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.nc-mw-fill {
  position: absolute; inset: 0; color: var(--ink);
  clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0);
}
.nc-hints { min-height: 1.6em; }
.nc-hints li { display: none; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 13px; }
.nc-hints li.on { display: block; }

.nc-intro { padding: 16vh var(--gutter) 6vh; }
.nc-intro-line { font-size: var(--t-l); letter-spacing: -0.03em; margin-bottom: 28px; color: var(--ink); }
.nc-accent { color: var(--accent); }
.nc-band { overflow: hidden; max-height: 44vh; border-radius: 2px; }
.nc-band img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.75) saturate(0.85); }

.nc-steps .sticky { background: var(--bg); padding: 12vh var(--gutter); }
.nc-step-list { position: relative; max-width: 28rem; min-height: 40vh; }
.nc-step { position: absolute; left: 0; right: 0; top: 0; opacity: 0; visibility: hidden; }
.nc-step h3 { font-size: clamp(36px, 5vw, 68px); letter-spacing: -0.035em; margin: 10px 0 14px; color: var(--ink); }
.nc-step p { color: var(--muted); max-width: 32ch; }
.nc-step-num {
  position: absolute; right: var(--gutter); top: 18vh;
  font-size: clamp(80px, 14vw, 180px); line-height: 1; color: color-mix(in srgb, var(--accent) 35%, transparent);
  overflow: hidden; height: 1em;
}
.nc-num-roll { display: block; }
.nc-num-roll i { display: block; font-style: normal; height: 1em; }
.nc-step-cta {
  position: absolute; left: var(--gutter); bottom: 12vh;
  border: 1px solid var(--line); padding: 12px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; color: var(--ink);
}
.nc-step-cta:hover { border-color: var(--accent); color: var(--accent); }

.nc-quote { padding: 18vh var(--gutter); border-top: 1px solid var(--line); }
.nc-glyph { display: block; font-size: 72px; line-height: 1; color: var(--accent); margin-bottom: 8px; }
.nc-q { font-size: clamp(28px, 3.8vw, 48px); letter-spacing: -0.03em; line-height: 1.2; max-width: 16ch; color: var(--ink); margin-bottom: 32px; }
.nc-sign { display: flex; flex-wrap: wrap; gap: 16px 36px; align-items: baseline; }
.nc-author { color: var(--ink); }
.nc-fig { font-size: clamp(48px, 7vw, 96px); letter-spacing: -0.04em; color: var(--accent); line-height: 1; }
.nc-fig-unit { font-size: .35em; margin-left: .12em; color: var(--muted); }

.nc-obj .sticky {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter); background: #070605;
}
.nc-obj-list { display: grid; gap: 14px; margin-bottom: 36px; }
.nc-obj-list li {
  font-size: clamp(24px, 3.2vw, 40px); letter-spacing: -0.025em; color: var(--ink);
  opacity: 0; transform: translateY(14px);
}
.nc-finale { font-size: clamp(30px, 4vw, 54px); color: var(--ink); opacity: 0; }
.nc-pill { display: inline-block; padding: .05em .35em; background: var(--accent); color: var(--accent-ink); border-radius: 999px; }

.nc-footer { padding: 16vh var(--gutter) 48px; border-top: 1px solid var(--line); }
.nc-mail {
  display: inline-block; margin: 16px 0;
  font-size: clamp(30px, 5vw, 68px); letter-spacing: -0.035em; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nc-mail:hover { border-color: var(--accent); color: var(--accent); }
.nc-book {
  display: inline-flex; margin: 22px 0 40px; padding: 12px 18px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}
.nc-giant {
  font-size: clamp(40px, 10vw, 140px); letter-spacing: -0.05em; line-height: 0.9;
  color: color-mix(in srgb, var(--ink) 16%, transparent);
  margin: 8vh 0 6vh; white-space: nowrap; overflow: hidden;
}
.nc-bottom {
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.nc-bottom a { margin-right: 14px; color: var(--muted); }
.nc-bottom a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .nc-nav { display: none; }
  .nc-masonry { columns: 2; }
  .nc-bento { grid-template-columns: 1fr 1fr; }
  .nc-big, .nc-tall { grid-column: span 1; grid-row: span 1; }
  .nc-step-num { display: none; }
}
@media (max-width: 520px) {
  .nc-masonry { columns: 1; }
  .nc-bento { grid-template-columns: 1fr; }
}

body.static .nc-obj-list li,
body.static .nc-finale,
body.static .nc-step-cta,
body.static .nc-mw-fill { opacity: 1; transform: none; clip-path: none; -webkit-clip-path: none; pointer-events: auto; }
body.static .nc-step { position: relative; opacity: 1; visibility: visible; margin-bottom: 28px; }
body.static .nc-lamp { opacity: .7; }
body.static .nc-spot { opacity: .55; }
