:root {
  --bg: #170608;
  --bg-2: #22090c;
  --surface: rgba(255, 236, 210, 0.05);
  --line: rgba(233, 200, 140, 0.18);
  --gold: #d9a852;
  --gold-soft: #e9c88c;
  --cream: #f4e7d2;
  --cream-muted: rgba(244, 231, 210, 0.7);
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --scenes: 8;
  --stage-h: 100vh;   /* height of the pinned stage */
  --scene-step: 88vh; /* scroll distance spent on each scene */
  --media-overscan: 0px;
}

/* svh ignores the mobile address bar, so the stage never resizes mid-scroll */
@supports (height: 100svh) {
  :root { --stage-h: 100svh; --scene-step: 88svh; }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
h1 em, h2 em { font-style: italic; color: var(--gold-soft); }

p { max-width: 42ch; }

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.lead { font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: var(--cream-muted); }

.link {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--gold-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color .3s;
}
.link:hover { border-color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  background: var(--gold);
  color: #1d0a0c;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform .3s, background .3s, box-shadow .3s;
  box-shadow: 0 10px 30px rgba(217, 168, 82, 0.25);
}
.btn:hover { background: var(--gold-soft); transform: translateY(-2px); }
.btn--small { padding: 0.6rem 1.3rem; font-size: 0.85rem; box-shadow: none; }
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--surface); border-color: var(--gold); }

/* ---------- loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition: opacity .8s ease, visibility .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { font-family: var(--display); font-size: 2.4rem; letter-spacing: 0.04em; }
.loader__bar {
  width: min(280px, 60vw);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .2s;
}
.loader__hint { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream-muted); }

/* ---------- header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.2rem, 4vw, 3rem);
  mix-blend-mode: normal;
  background: linear-gradient(to bottom, rgba(23, 6, 8, 0.7), transparent);
}
.header__logo {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header__logo span {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.header__nav { display: flex; gap: 2rem; font-size: 0.85rem; color: var(--cream-muted); }
.header__nav a { transition: color .3s; }
.header__nav a:hover { color: var(--cream); }

/* ---------- scroll stage ---------- */
.stage-wrap {
  height: calc(var(--stage-h) + var(--scenes) * var(--scene-step));
  position: relative;
}
.stage {
  position: sticky;
  top: 0;
  height: var(--stage-h);
  width: 100%;
}
/* Extends below the stage so a collapsing address bar can never expose a gap;
   the opaque sections that follow paint over the overscan. */
.stage__media {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: calc(-1 * var(--media-overscan));
  overflow: hidden;
}
#canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.stage__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(23, 6, 8, 0.6) 100%),
    linear-gradient(to top, rgba(23, 6, 8, 0.92) 0%, rgba(23, 6, 8, 0.55) 28%, transparent 55%);
}

.block {
  position: absolute;
  padding: clamp(1.2rem, 4vw, 3rem);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  max-width: 560px;
}
.block.is-active { pointer-events: auto; }
.block p { color: var(--cream-muted); text-shadow: 0 2px 24px rgba(0,0,0,.8), 0 1px 3px rgba(0,0,0,.6); }
.block h1, .block h2 { text-shadow: 0 4px 40px rgba(0,0,0,.85), 0 1px 4px rgba(0,0,0,.5); margin-bottom: 1.2rem; }
.block .eyebrow { text-shadow: 0 1px 12px rgba(0,0,0,.9); }

.block--hero {
  left: 0; right: 0; bottom: 8vh;
  margin: 0 auto;
  text-align: center;
  max-width: 820px;
}
.block--hero p { margin-inline: auto; }
.block--left { left: clamp(0rem, 4vw, 4rem); top: 50%; transform: translateY(-50%); }
.block--right { right: clamp(0rem, 4vw, 4rem); top: 50%; transform: translateY(-50%); text-align: right; }
.block--right p { margin-left: auto; }
.block--bottom { left: 0; right: 0; bottom: 8vh; margin: 0 auto; text-align: center; max-width: 720px; }
.block--bottom p { margin-inline: auto; }
.block--cta .btn { margin-top: 1.6rem; }

.scroll-hint {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-muted);
}
.scroll-hint span {
  width: 40px; height: 1px;
  background: var(--gold);
  animation: hint 2s ease-in-out infinite;
}
@keyframes hint {
  0%, 100% { transform: scaleX(0.4); opacity: .4; }
  50% { transform: scaleX(1); opacity: 1; }
}

/* ---------- sections ---------- */
.section {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 6vw, 6rem);
}
.section--alt { background: var(--bg-2); }
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 720px; }
.section__sub { margin-top: 1.2rem; color: var(--cream-muted); font-size: 1.05rem; }

.grid { display: grid; gap: 1.2rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); margin-top: 1.2rem; }

.card {
  position: relative;
  padding: 2.2rem 2rem 2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color .4s, transform .4s;
}
.card:hover { border-color: rgba(217, 168, 82, 0.5); transform: translateY(-4px); }
.card h3 { margin-bottom: 0.8rem; }
.card p { color: var(--cream-muted); font-size: 0.95rem; }
.card__num {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.card--accent {
  background: linear-gradient(135deg, rgba(217,168,82,0.12), rgba(217,168,82,0.03));
}
.card--accent .eyebrow { margin-bottom: 0.8rem; }

.note {
  margin-top: 2.5rem;
  padding-left: 1.2rem;
  border-left: 2px solid var(--gold);
  color: var(--cream-muted);
  font-size: 0.9rem;
  max-width: 60ch;
}

/* steps */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2rem;
  counter-reset: step;
}
.steps li { position: relative; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.steps__num {
  font-family: var(--display);
  font-size: 3rem;
  line-height: 1;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}
.steps h3 { margin-bottom: 0.6rem; font-size: 1.5rem; }
.steps p { color: var(--cream-muted); font-size: 0.95rem; }

.storage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
}
.storage__item {
  padding: 1.8rem 2rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.storage__item strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--gold-soft);
  line-height: 1;
}
.storage__item span { color: var(--cream-muted); font-size: 0.9rem; }

/* order */
.section--order {
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(217,168,82,0.18), transparent 60%),
    var(--bg);
}
.section--order .section__sub { margin-inline: auto; }
.order__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2.5rem;
}
.order__phone {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  transition: color .3s;
}
.order__phone:hover { color: var(--cream); }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem clamp(1.2rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-muted);
  background: var(--bg);
  position: relative;
  z-index: 2;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root {
    /* less scrolling per scene so the sequence advances at a natural pace on a phone */
    --scene-step: 62vh;
    --media-overscan: 140px;
  }
  .grid--3, .grid--2, .steps, .storage { grid-template-columns: 1fr; }
  .header__nav { display: none; }
  .block--left, .block--right {
    left: 0; right: 0; top: auto; bottom: 10vh;
    transform: none;
    text-align: center;
    max-width: none;
  }
  .block--hero, .block--bottom { bottom: 10vh; }
  .block--right p, .block--left p { margin-inline: auto; }
  .block { padding: 1.4rem; }
  .block h1, .block h2 { text-wrap: balance; }
  .block p { font-size: 0.98rem; max-width: 34ch; }
  .block--hero h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .block h2 { font-size: clamp(2rem, 9vw, 2.8rem); }

  /* stronger scrim: type sits over moving footage and has to stay readable */
  .stage__vignette {
    background:
      radial-gradient(ellipse at 50% 35%, transparent 25%, rgba(23, 6, 8, 0.45) 100%),
      linear-gradient(to top, rgba(23, 6, 8, 0.96) 0%, rgba(23, 6, 8, 0.8) 34%, rgba(23, 6, 8, 0.25) 62%, transparent 80%);
  }

  /* backdrop blur is the single most expensive thing to paint while scrolling */
  .card { backdrop-filter: none; }
  .scroll-hint { margin-top: 2rem; }
}

@supports (height: 100svh) {
  @media (max-width: 900px) {
    :root { --scene-step: 62svh; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint span { animation: none; }
}
