/* Long Story, socle commun : After dark */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/serif.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/serif-italic.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(../fonts/sans.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(../fonts/sans-italic.woff2) format("woff2"); }

:root {
  --ink: #0e0d0c;
  --ink-2: #171513;
  --ink-3: #221f1c;
  --cream: #ede6da;
  --cream-2: #c9c1b4;
  --cream-dim: #a39c91;
  --line: rgba(237, 230, 218, .16);
  --line-strong: rgba(237, 230, 218, .34);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
  caret-color: var(--cream);
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
::selection { background: var(--cream); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; border-radius: 4px; }
html { scrollbar-color: var(--ink-3) var(--ink); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 10px; border: 2px solid var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* grain de pellicule, très discret */
.grain { position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* typographie */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; }
.serif em, .sans em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.sans-d { font-family: var(--sans); font-weight: 500; font-stretch: 86%; letter-spacing: -.035em; }
.dim { color: var(--cream-dim); }
.display { font-family: var(--serif); font-weight: 400; line-height: .98; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
.display em { font-style: italic; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* rature dessinée */
.strike { position: relative; display: inline-block; white-space: nowrap; }
.strike svg { position: absolute; left: -5%; width: 110%; top: 56%; height: .42em; transform: translateY(-50%); overflow: visible; pointer-events: none; }
.strike path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; }
.strike.drawn path { animation: draw 1.1s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* en-tête */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 var(--gutter); transition: background-color .5s var(--ease-out), border-color .5s var(--ease-out);
  border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(14, 13, 12, .94); border-color: var(--line); }
.wordmark { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1; text-decoration: none; letter-spacing: -.01em; }
.site-header nav { display: flex; align-items: center; gap: 28px; }
.site-header .where { font-size: 16px; color: var(--cream-dim); }

/* boutons */
.btn { --h: 58px; display: inline-flex; align-items: center; gap: 14px; height: var(--h); padding: 0 30px 0 32px; border-radius: 999px;
  border: 1px solid var(--cream); background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 17px; font-weight: 600;
  letter-spacing: -.005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.btn svg { width: 18px; height: 18px; transition: transform .45s var(--ease-out); }
.btn:hover { background: #fff; box-shadow: 0 10px 30px -12px rgba(237, 230, 218, .45); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--cream); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); box-shadow: none; }
.btn.small { --h: 42px; padding: 0 20px; font-size: 16px; font-weight: 500; gap: 10px; }
.btn.small svg { width: 15px; height: 15px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }

/* apparitions au défilement : visibles par défaut, animées seulement si le script tourne */
.js .reveal { opacity: 0; transform: translateY(26px); filter: blur(6px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* pied de page */
.site-footer { border-top: 1px solid var(--line); padding: 44px var(--gutter) 52px; display: flex; flex-wrap: wrap; gap: 18px 40px;
  align-items: baseline; justify-content: space-between; color: var(--cream-dim); font-size: 16px; }
.site-footer .wordmark { color: var(--cream); font-size: 30px; }
.site-footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--cream); text-decoration: underline; }

/* appel final commun */
.final { padding: clamp(110px, 18vw, 220px) var(--gutter) clamp(90px, 14vw, 170px); text-align: center; position: relative; }
.final h2 { font-size: clamp(48px, 8.4vw, 96px); max-width: 15ch; margin: 0 auto; }
.final p { max-width: 44ch; margin: 30px auto 46px; color: var(--cream-2); font-size: clamp(17px, 1.6vw, 20px); }
.final .fine { margin: 22px auto 0; font-size: 16px; color: var(--cream-dim); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  :root { --header-h: 60px; }
  .wordmark { font-size: 23px; }
  .site-header .where { display: none; }
  .btn { --h: 56px; padding: 0 26px 0 28px; }
  .btn.small { --h: 40px; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .grain { display: none; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .strike path { stroke-dashoffset: 0; }
}
