/* Layout: cinematic full-bleed chapters, asymmetric editorial grid, oversized italic serif set against black lacquer */
:root {
  --noir: #0a0806;
  --noir-2: #120e0a;
  --noir-3: #1b1510;
  --ambre: #e0761c;
  --ambre-hi: #f6a14a;
  --or: #d8a35c;
  --or-hi: #f1cd94;
  --beige: #a68d6b;
  --sable: #e8d9bf;
  --fumee: #7d6f5d;
  --ligne: rgba(232, 217, 191, .13);
  --ligne-or: rgba(216, 163, 92, .38);
  --display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "Consolas", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--noir); }
body {
  background: var(--noir); color: var(--sable);
  font-family: var(--body); font-size: 16px; line-height: 1.65;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
::selection { background: var(--ambre); color: var(--noir); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 1px solid var(--or-hi); outline-offset: 4px; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: 400; margin: 0; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(1280px, 100%); margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--beige); display: inline-flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: linear-gradient(90deg, var(--or), transparent); }
.title-xl {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(44px, 6.6vw, 100px); line-height: .98; letter-spacing: -.025em; color: var(--sable);
}
.title-xl em, .gilt {
  font-style: italic;
  background: linear-gradient(100deg, var(--or-hi) 0%, var(--ambre-hi) 35%, var(--or-hi) 55%, var(--ambre) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }
.lead { color: var(--beige); max-width: 54ch; font-size: 17px; line-height: 1.75; }

/* Grain */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-4%)} 75%{transform:translate(-1%,3%)} 100%{transform:translate(0,0)} }

/* Cursor */
.cursor {
  position: fixed; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(241, 205, 148, .55); pointer-events: none; z-index: 120;
  transition: width .45s var(--ease), height .45s var(--ease), background .45s, border-color .45s;
  mix-blend-mode: screen; display: none;
}
.cursor.is-hover { width: 72px; height: 72px; background: rgba(224, 118, 28, .1); border-color: rgba(241, 205, 148, .3); }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }

/* Preloader */
.loader { position: fixed; inset: 0; z-index: 130; background: var(--noir); display: grid; place-items: center; transition: clip-path 1.4s var(--ease) .2s; clip-path: inset(0 0 0 0); }
.loader.done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader-word { font-family: var(--display); font-style: italic; font-size: clamp(38px, 8vw, 96px); letter-spacing: .04em; display: flex; overflow: hidden; }
.loader-word span { display: inline-block; transform: translateY(110%); animation: rise .9s var(--ease) forwards; }
.loader-bar { position: absolute; bottom: 12vh; left: 50%; width: min(220px, 60vw); height: 1px; background: var(--ligne); transform: translateX(-50%); overflow: hidden; }
.loader-bar i { position: absolute; inset: 0; background: var(--or); transform-origin: left; transform: scaleX(0); animation: fill 1.6s var(--ease) .3s forwards; }
@keyframes rise { to { transform: translateY(0); } }
@keyframes fill { to { transform: scaleX(1); } }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding-top: env(safe-area-inset-top, 0px); transition: background .5s, backdrop-filter .5s, border-color .5s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(10, 8, 6, .74); backdrop-filter: blur(16px) saturate(1.2); border-color: var(--ligne); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; }
.logo { font-family: var(--display); font-size: 21px; letter-spacing: .34em; font-weight: 500; }
.logo b { color: var(--or); font-weight: 500; }
.nav-links { display: flex; gap: 36px; font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.nav-links a { position: relative; color: var(--beige); transition: color .3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px; background: var(--or); transition: right .5s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--sable); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px 0 14px; border-radius: 999px; border: 1px solid var(--ligne); background: rgba(10, 8, 6, .4); font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; transition: border-color .4s; }
.cart-btn:hover { border-color: var(--ligne-or); }
.cart-btn svg { width: 17px; height: 17px; stroke: var(--sable); fill: none; stroke-width: 1.4; }
.cart-count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--noir-3); color: var(--beige); font: 500 10px/20px var(--mono); text-align: center; padding: 0 5px; letter-spacing: 0; transition: background .4s, color .4s; }
.cart-count.on { background: var(--ambre); color: var(--noir); }
.cart-btn.bump { animation: bump .7s var(--ease); }
@keyframes bump { 30% { transform: scale(1.12); } }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; overflow: hidden;
  padding: 17px 30px; border-radius: 999px; border: 1px solid var(--ambre);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
  background: var(--ambre); color: var(--noir); transition: color .5s var(--ease), transform .35s, border-color .4s;
  isolation: isolate; white-space: nowrap;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--noir); transform: translateY(101%); transition: transform .6s var(--ease); z-index: -1; border-radius: inherit; }
.btn:hover { color: var(--or-hi); }
.btn:hover::before { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--sable); border-color: var(--ligne); }
.btn.ghost::before { background: var(--sable); }
.btn.ghost:hover { color: var(--noir); border-color: var(--sable); }
.btn.sm { padding: 12px 20px; font-size: 10.5px; }
.btn.block { width: 100%; }
.btn .arr { transition: transform .5s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn:disabled { opacity: .45; pointer-events: none; }

/* Hero */
.hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; align-items: flex-end; background: radial-gradient(120% 80% at 50% 110%, #24130a 0%, var(--noir) 60%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.hero-word { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 0; font-family: var(--display); font-style: italic; font-size: clamp(90px, 22vw, 340px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(232, 217, 191, .1); white-space: nowrap; pointer-events: none; letter-spacing: -.03em; }
.hero-ui { position: relative; z-index: 2; width: 100%; padding-block: 120px 44px; pointer-events: none; }
.hero-ui a, .hero-ui button { pointer-events: auto; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; gap: 32px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 10vw, 150px); line-height: .88; letter-spacing: -.03em; }
.hero h1 .l { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .l > span { display: inline-block; transform: translateY(105%); }
.hero h1 .l:nth-child(2) > span { font-style: italic; color: var(--ambre-hi); }
body.ready .hero h1 .l > span { animation: rise 1.4s var(--ease) forwards; }
body.ready .hero h1 .l:nth-child(2) > span { animation-delay: .15s; }
.hero-sub { margin-top: 22px; color: var(--beige); max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-specs { justify-self: end; display: grid; gap: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--beige); text-align: right; }
.hero-specs b { display: block; font-family: var(--display); font-size: 28px; letter-spacing: 0; text-transform: none; color: var(--sable); font-weight: 400; }
.fade-up { opacity: 0; transform: translateY(24px); }
body.ready .fade-up { animation: fadeUp 1.2s var(--ease) forwards; animation-delay: var(--d, .5s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2; width: 1px; height: 54px; background: var(--ligne); overflow: hidden; }
.scroll-cue::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--or-hi); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 110%; } }

/* Marquee */
.marquee { border-block: 1px solid var(--ligne); overflow: hidden; padding-block: 24px; background: var(--noir-2); }
.marquee-track { display: flex; width: max-content; animation: slide 46s linear infinite; font-family: var(--display); font-style: italic; font-size: clamp(26px, 3.2vw, 42px); color: var(--fumee); white-space: nowrap; }
.marquee-track span { display: inline-flex; align-items: center; gap: 44px; padding-right: 44px; }
.marquee-track span::after { content: ""; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--or); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Chapters */
section.chapter { position: relative; padding-block: clamp(96px, 13vw, 180px); }
.chapter-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; margin-bottom: clamp(56px, 7vw, 100px); }
.chapter-head > * { min-width: 0; }
.chapter-head .title-xl { margin-top: 20px; }

/* Scroll-driven reveal; content stays visible where unsupported */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 50%; }
  @keyframes reveal { from { opacity: 0; translate: 0 56px; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: none; } }
}

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 140; transform: translate(-50%, calc(100% + 48px)); opacity: 0; transition: transform .7s var(--ease), opacity .4s; background: var(--sable); color: var(--noir); padding: 14px 22px; border-radius: 999px; font-size: 14px; display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast b { font-weight: 600; }

.nav-links a { white-space: nowrap; }
@media (max-width: 1120px) { .nav-links { display: none; } }
@media (max-width: 720px) {
  .hero-grid, .chapter-head { grid-template-columns: 1fr; }
  .hero-specs { justify-self: start; text-align: left; grid-auto-flow: column; gap: 22px; }
  .hero-specs b { font-size: 22px; }
  .nav .btn.sm { display: none; }
  .cart-btn .cart-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { animation: none !important; }
}
