/* Maren. Brand settings live in :root; change these to restyle the template.
   The serum colour in 3D is uAmber in js/drop.js. */
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-latin-300-italic.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --cream: #f5f1eb;     /* the studio backdrop: page ground */
  --cream-2: #ece5da;
  --ink: #2a2118;       /* warm near-black: text */
  --ink-2: #5d5146;
  --muted: #8c7f72;
  --amber: #b56f1c;     /* the serum: labels, prices, one action colour */
  --line: rgba(42, 33, 24, 0.14);
  --line-2: rgba(42, 33, 24, 0.28);
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(20px, 4.5vw, 72px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--cream); color: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--cream); border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.label { font: 500 12px/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background 0.3s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: #3d3024; }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(42, 33, 24, 0.05); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; height: 74px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(rgba(245, 241, 235, 0.55), rgba(245, 241, 235, 0)); }
.nav-brand { font: 300 30px/1 var(--serif); letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; }
.nav-links { display: flex; gap: 30px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

/* ---------- The drop (sticky stage) ---------- */
.story { position: relative; height: 480vh; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); }
.drop-ready .stage canvas { opacity: 1; }
.chapters { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(560px, 44vw); }
.chapter { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); }
.chapter-still { display: none; }
.chapter-text { display: grid; gap: 18px; opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 1s var(--ease); pointer-events: none; }
.chapter.is-active .chapter-text { opacity: 1; transform: none; transition-delay: 0.1s; pointer-events: auto; }
.title { font: 300 clamp(50px, 6.4vw, 104px)/0.94 var(--serif); letter-spacing: -0.015em; }
.lede { color: var(--ink-2); max-width: 36ch; font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.progress { position: absolute; left: var(--gutter); bottom: 40px; width: 160px; height: 1px; background: var(--line-2); }
.progress span { position: absolute; inset: 0; background: var(--amber); transform-origin: left; transform: scaleX(0); }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 11vw, 160px) var(--gutter); }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 16px; max-width: 820px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-title { font: 300 clamp(40px, 4.8vw, 76px)/1 var(--serif); letter-spacing: -0.01em; }
.section-lede { color: var(--ink-2); max-width: 52ch; }

.ing-list { max-width: 960px; border-bottom: 1px solid var(--line); counter-reset: ing; }
.ing-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); counter-increment: ing; }
.ing-list li::before { content: counter(ing, decimal-leading-zero); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ing-name { font: 300 28px/1.15 var(--serif); }
.ing-what { color: var(--ink-2); text-align: right; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.steps li { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line-2); }
.step-n { font: italic 300 30px/1 var(--serif); color: var(--amber); }
.steps h3 { font: 300 30px/1.1 var(--serif); }
.steps p { color: var(--ink-2); }

.buy-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding: clamp(28px, 4vw, 56px); border-radius: 24px; background: #fffaf3; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(42, 33, 24, 0.07); }
.buy-card .section-title { margin: 16px 0 14px; }
.options { display: grid; gap: 14px; align-content: start; }
.option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 22px 24px; border-radius: 16px; border: 1px solid var(--line-2); text-decoration: none; transition: border-color 0.3s var(--ease), background 0.3s var(--ease); }
.option:hover { border-color: var(--ink); background: var(--cream); }
.option-name { font: 300 28px/1.1 var(--serif); }
.option-price { font: 300 34px/1 var(--serif); color: var(--amber); grid-row: span 2; align-self: center; }
.option-note { font-size: 14px; color: var(--muted); }
.buy-status { grid-column: 1 / -1; color: var(--ink-2); font-size: 15px; }
.buy-status:empty { display: none; }

.faq { max-width: 880px; border-bottom: 1px solid var(--line-2); }
.faq details { border-top: 1px solid var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font: 300 28px/1.2 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 300 28px/1 var(--sans); color: var(--amber); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 60ch; }

.footer { padding: 48px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 10px 36px; align-items: baseline; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.footer-brand { font: 300 26px/1 var(--serif); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.footer-small { margin-left: auto; }

/* ---------- Still version: reduced motion, no WebGL2, or opened from the folder ---------- */
:root:not(.live) .story { height: auto; }
:root:not(.live) .stage { position: static; height: auto; overflow: visible; }
:root:not(.live) .stage canvas, :root:not(.live) .progress { display: none; }
:root:not(.live) .chapters { position: static; transform: none; width: auto; }
:root:not(.live) .chapter { position: relative; top: auto; transform: none; min-height: 100svh; display: flex; align-items: center; padding: 100px var(--gutter); overflow: hidden; }
:root:not(.live) .chapter-still { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
:root:not(.live) .chapter-text { position: relative; opacity: 1; transform: none; pointer-events: auto; max-width: 560px; }

/* Screenshots (?t=, ?y=, ?poster=1): no fades. */
.instant .stage canvas, .instant .chapter-text { transition: none !important; }

.poster-mode .nav, .poster-mode .chapters, .poster-mode .progress, .poster-mode .skip { visibility: hidden; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .buy-card { grid-template-columns: minmax(0, 1fr); }
  .chapters { top: auto; bottom: 64px; transform: none; width: auto; right: var(--gutter); }
  .chapter { top: auto; bottom: 0; transform: none; }
  .stage::after { content: ''; position: absolute; inset: 50% 0 0 0; background: linear-gradient(to top, rgba(245, 241, 235, 0.96) 45%, rgba(245, 241, 235, 0)); pointer-events: none; }
  .chapters { z-index: 1; }
  :root:not(.live) .stage::after { display: none; }
  :root:not(.live) .chapter { align-items: flex-end; }
  :root:not(.live) .chapter::after { content: ''; position: absolute; inset: 45% 0 0 0; background: linear-gradient(to top, rgba(245, 241, 235, 0.96) 45%, rgba(245, 241, 235, 0)); }
  :root:not(.live) .chapter-text { z-index: 1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { height: 64px; }
  .nav-links { display: none; }
  .lede { font-size: 16px; }
  .ing-list li { grid-template-columns: 36px minmax(0, 1fr); }
  .ing-what { grid-column: 2; text-align: left; }
  .footer-small { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
