/* ═══════════ AURUM & NOIR — Eclipse ═══════════ */

:root {
  --bg: #0a0806;
  --bg-2: #0e0b08;
  --ivory: #ece4d4;
  --ivory-dim: #9a917f;
  --gold: #c9a24b;
  --gold-bright: #e8cf8e;
  --gold-dim: rgba(201, 162, 75, 0.35);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
}

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

html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html { scrollbar-width: none; }
body::-webkit-scrollbar, html::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--bg); }

canvas { display: block; }

/* ─── Preloader ─── */
#preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity 1.1s cubic-bezier(.65,0,.35,1), visibility 1.1s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.pre-mark {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.45em; text-indent: 0.45em;
  color: var(--gold);
}
.pre-bar {
  width: min(280px, 60vw); height: 1px;
  background: rgba(236, 228, 212, 0.12);
  overflow: hidden;
}
#preBarFill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.35s ease-out;
}
.pre-label {
  font-size: 10px; letter-spacing: 0.4em; text-indent: 0.4em;
  text-transform: uppercase; color: var(--ivory-dim);
}

/* ─── Fixed chrome ─── */
#chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px clamp(24px, 4vw, 56px);
  mix-blend-mode: difference;
  opacity: 0; transition: opacity 1.4s ease 0.3s;
  pointer-events: none;
}
body.ready #chrome { opacity: 1; }
.wordmark {
  font-family: var(--serif); font-size: 17px; font-weight: 400;
  letter-spacing: 0.34em; color: var(--ivory);
}
.chrome-right {
  font-size: 9px; letter-spacing: 0.38em;
  color: var(--ivory-dim); text-transform: uppercase;
}
#scrollProgress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 51;
}
#scrollProgressFill {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0); transform-origin: left center;
}

/* ─── Shared ─── */
section { position: relative; }
.pin-stage {
  position: relative; height: 100vh; width: 100%;
  overflow: hidden; background: var(--bg);
}
.pin-stage canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(6,4,2,0.75) 100%),
    linear-gradient(180deg, rgba(10,8,6,0.55) 0%, transparent 18%, transparent 82%, rgba(10,8,6,0.65) 100%);
}
.eyebrow {
  font-family: var(--sans); font-size: 10px; font-weight: 400;
  letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--gold);
}
.corner-label {
  position: absolute; top: 96px; left: clamp(24px, 4vw, 56px); z-index: 5;
  opacity: 0;
}

/* ─── 1 · Hero ─── */
#hero .hero-copy {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; pointer-events: none;
  opacity: 0; /* revealed once by the entrance timeline */
}
.brand {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(38px, 7.2vw, 108px);
  color: var(--ivory);
  display: flex;
  text-shadow: 0 0 60px rgba(0,0,0,0.9);
}
.brand span { display: inline-block; }
.brand .amp { color: var(--gold); font-style: italic; }
.hero-sub {
  font-size: 10px; letter-spacing: 0.55em; text-indent: 0.55em;
  text-transform: uppercase; color: var(--ivory-dim);
}
.hero-eclipse {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; pointer-events: none;
  opacity: 0; visibility: hidden;
}
.eclipse-title {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(64px, 12vw, 190px);
  line-height: 0.9;
  color: var(--gold-bright);
  text-shadow: 0 0 90px rgba(201,162,75,0.25);
}
.scroll-cue {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.scroll-cue span {
  font-size: 9px; letter-spacing: 0.45em; text-indent: 0.45em;
  text-transform: uppercase; color: var(--ivory-dim);
}
.scroll-cue i {
  width: 1px; height: 44px; background: var(--gold-dim);
  position: relative; overflow: hidden;
}
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--gold-bright);
  animation: cueDrop 2.2s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes cueDrop { to { top: 110%; } }

/* ─── 2 · Story ─── */
.story-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; text-align: center;
  background:
    radial-gradient(ellipse 60% 45% at 50% 52%, rgba(201,162,75,0.05), transparent 70%),
    var(--bg-2);
}
.story-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(52px, 9vw, 150px);
  line-height: 1.02; color: var(--ivory);
}
.story-title .line { display: block; overflow: hidden; }
.story-title .line > span { display: inline-block; }
.story-title .line:last-child > span { color: var(--gold); font-style: italic; }
.story-body {
  font-family: var(--serif); font-size: clamp(17px, 1.8vw, 24px);
  font-weight: 300; line-height: 1.7; color: var(--ivory-dim);
}

/* ─── 3 · Macro ─── */
.macro-caption {
  position: absolute; z-index: 5;
  left: clamp(24px, 6vw, 96px); bottom: 14vh;
  max-width: 520px;
  opacity: 0; visibility: hidden;
}
.macro-caption p {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.25; color: var(--ivory);
  text-shadow: 0 2px 40px rgba(0,0,0,0.9);
}
.macro-caption[data-cap="1"] { left: auto; right: clamp(24px, 6vw, 96px); text-align: right; }

/* ─── 4 · Engineering ─── */
.spec {
  position: absolute; z-index: 5;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; visibility: hidden;
  max-width: 300px;
}
.spec[data-spec="0"] { left: clamp(24px, 7vw, 110px); top: 22vh; }
.spec[data-spec="1"] { right: clamp(24px, 7vw, 110px); top: 40vh; align-items: flex-end; text-align: right; }
.spec[data-spec="2"] { left: clamp(24px, 7vw, 110px); bottom: 16vh; }
.spec-rule { width: 56px; height: 1px; background: var(--gold); }
.spec-num {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 5.5vw, 84px); line-height: 1;
  color: var(--gold-bright);
}
.spec-num em { font-style: italic; font-size: 0.45em; color: var(--gold); margin-left: 4px; }
.spec-desc {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ivory-dim); line-height: 1.8;
}

/* ─── 5 · Edition ─── */
#edition {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 55% 40% at 50% 50%, rgba(201,162,75,0.06), transparent 70%),
    var(--bg-2);
}
.edition-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 30px; text-align: center; padding: 18vh 24px;
}
.edition-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(56px, 9vw, 140px); line-height: 1;
  color: var(--ivory);
}
.edition-divider { width: 1px; height: 72px; background: var(--gold); }
.edition-price {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(30px, 4vw, 54px); color: var(--gold-bright);
}
.edition-note {
  font-size: 10px; letter-spacing: 0.4em; text-indent: 0.4em;
  text-transform: uppercase; color: var(--ivory-dim);
}

/* ─── 6 · Waitlist ─── */
#waitlist {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg);
}
.waitlist-inner {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 54px; text-align: center; padding: 20vh 24px 10vh;
}
.waitlist-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 6.5vw, 96px); line-height: 1.15;
  color: var(--ivory);
}
.waitlist-title em { color: var(--gold); }
#waitlistForm {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--gold-dim);
  width: min(560px, 88vw);
  transition: border-color 0.5s ease;
}
#waitlistForm:focus-within { border-color: var(--gold); }
#wlEmail {
  flex: 1; background: transparent; border: 0; outline: 0;
  font-family: var(--serif); font-size: 22px; font-weight: 300;
  color: var(--ivory); padding: 18px 4px;
}
#wlEmail::placeholder { color: rgba(154,145,127,0.55); font-style: italic; }
#waitlistForm button {
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold); padding: 0 8px;
  transition: color 0.4s ease, letter-spacing 0.4s ease;
}
#waitlistForm button:hover { color: var(--gold-bright); letter-spacing: 0.48em; }
.waitlist-confirm {
  font-family: var(--serif); font-style: italic; font-size: 19px;
  color: var(--gold-bright); opacity: 0; visibility: hidden;
  transition: opacity 1s ease; margin-top: -34px;
}
.waitlist-confirm.show { opacity: 1; visibility: visible; }
footer {
  display: flex; justify-content: space-between;
  padding: 32px clamp(24px, 4vw, 56px);
  border-top: 1px solid rgba(236,228,212,0.07);
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ivory-dim);
}

/* ─── Reveal primitives ─── */
.reveal-line { opacity: 0; visibility: hidden; }

@media (max-width: 720px) {
  .spec { max-width: 200px; }
  .spec[data-spec="1"] { top: 30vh; }
  footer { flex-direction: column; gap: 10px; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue i::after { animation: none; }
}
