:root {
  --ivory: #f4f1ea;
  --fog: #d8d4cc;
  --charcoal: #1a1c1b;
  --moss: #3a4338;
  --accent: #c8b99a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

html, body {
  background: #101412;
  color: var(--ivory);
  font-family: var(--sans);
  overscroll-behavior: none;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* WEBGL CANVAS */
#webgl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
  outline: none;
}

/* LOADER */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(1200px 800px at 50% 55%, #1c221d 0%, #0e1310 62%, #090d0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .9s ease, visibility .9s ease;
}
#loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  width: min(520px, 90vw);
  text-align: center;
}
.loader-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.loader-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  margin-bottom: 10px;
}
.loader-subtitle {
  color: #bdb8b0;
  font-weight: 300;
  font-size: 14.5px;
  margin-bottom: 34px;
}
.loader-bar-track {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,.16);
  position: relative;
  margin-bottom: 12px;
}
.loader-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--ivory);
  transition: width .15s linear;
  box-shadow: 0 0 18px rgba(244,241,234,.15);
}
.loader-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .08em;
  color: #9a958d;
}
.loader-note {
  margin-top: 42px;
  font-size: 11.5px;
  color: #7d7870;
  font-weight: 300;
}

/* UI CHROME */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 44px;
  font-size: 12px;
  color: #ddd8cf;
  mix-blend-mode: difference;
  pointer-events: none;
}
.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .01em;
}
.nav-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 300;
  letter-spacing: .04em;
  pointer-events: auto;
}
.ui-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  opacity: .82;
  transition: opacity .2s;
}
.ui-btn:hover { opacity: 1; }
.nav-divider { opacity: .5; }

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  right: 44px;
  bottom: 38px;
  z-index: 20;
  writing-mode: vertical-rl;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #d7d2ca;
  display: flex;
  align-items: center;
  gap: 14px;
  mix-blend-mode: difference;
}
.scroll-line {
  width: 1px;
  height: 54px;
  background: linear-gradient(to bottom, rgba(255,255,255,.65), rgba(255,255,255,0));
}

/* Progress rail */
.progress-rail {
  position: fixed;
  left: 44px;
  top: 120px;
  bottom: 120px;
  width: 1px;
  background: rgba(255,255,255,.16);
  z-index: 20;
  mix-blend-mode: difference;
}
.progress-fill {
  width: 100%;
  height: 0%;
  background: var(--ivory);
  transform-origin: top;
}

/* Vignette / grain - Awwwards polish */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 50%, transparent 58%, rgba(0,0,0,.32) 100%);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* STORY CHAPTERS */
#story {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.chapter {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 88vw);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease;
}
.chapter.is-visible {
  opacity: 1;
  visibility: visible;
}
.chapter-eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.chapter h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 6.6vw, 92px);
  line-height: .98;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.chapter p {
  font-size: 16.5px;
  line-height: 1.7;
  color: #d8d3ca;
  font-weight: 300;
  max-width: 470px;
  margin: 0 auto;
}

/* SCROLL TUNNEL - very long journey */
#scroll-tunnel {
  position: relative;
  z-index: 2;
  height: 2200vh; /* Aventure très longue */
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 15;
  padding: 48px 44px 36px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: #9b9590;
  letter-spacing: .03em;
  border-top: 1px solid rgba(255,255,255,.07);
  background: #0b0f0d;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .chapter { transition: none; }
}

/* Mobile */
@media (max-width: 720px) {
  .site-header { padding: 20px 20px; }
  .scroll-indicator, .progress-rail { display: none; }
  .chapter h2 { font-size: 44px; }
  .chapter p { font-size: 15px; }
  .site-footer { padding: 28px 20px; }
}