/* MOXIE — design system */

:root {
  /* Palette: warm spa (default) */
  --bg: #e9e3d3;
  --bg-2: #ddd5c1;
  --ink: #1d2418;
  --ink-soft: #4a4f3d;
  --deep: #2c3a25;
  --accent: #c9b888;
  --line: rgba(29, 36, 24, 0.18);

  /* Product accent colors */
  --c-sweet: #7eb4d4;
  --c-crea: #d36e94;
  --c-slim: #4a6238;
  --c-shot: #d9682a;

  --font-display: "DM Serif Display", "Playfair Display", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --ease: cubic-bezier(0.6, 0.05, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-palette="editorial"] {
  --bg: #2c3a25;
  --bg-2: #213018;
  --ink: #e8e4d8;
  --ink-soft: #b8b8a8;
  --deep: #d4dcc8;
  --accent: #c9b888;
  --line: rgba(232, 228, 216, 0.18);
}
[data-palette="dark"] {
  --bg: #0c100a;
  --bg-2: #161d12;
  --ink: #e8e4d8;
  --ink-soft: #95988c;
  --deep: #4a6238;
  --accent: #c9b888;
  --line: rgba(232, 228, 216, 0.14);
}
[data-palette="bone"] {
  --bg: #f3efe7;
  --bg-2: #e7e1d2;
  --ink: #16190f;
  --ink-soft: #4a4f3d;
  --deep: #2c3a25;
  --accent: #6c7a5c;
  --line: rgba(22, 25, 15, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* overflow-x: clip preserves position: sticky on descendants (unlike hidden) */
  overflow-x: clip;
}
body {
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}
img { display: block; max-width: 100%; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Subtle grain on bg */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ───── NAV ───── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  mix-blend-mode: difference;
  color: #fff;
}
.nav .mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-transform: none;
}
.nav .links {
  display: flex;
  gap: 32px;
}
.nav .links a { opacity: 0.85; transition: opacity 0.25s; }
.nav .links a:hover { opacity: 1; }
.nav .cart {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid currentColor;
  padding: 8px 14px;
  border-radius: 999px;
  opacity: 0.9;
}

/* ───── SCROLL INDICATOR ───── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.1);
  z-index: 60;
  mix-blend-mode: difference;
}
.scroll-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.08s linear;
}

/* ───── CHAPTER PRIMITIVE ───── */
.chapter { position: relative; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* ───── HERO ───── */
.hero { height: 220vh; }
.hero .stage {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px 36px 36px;
  background: var(--bg);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.hero-eyebrow .right { display: flex; gap: 24px; }
.hero-eyebrow .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--deep); margin-right: 8px; vertical-align: middle; animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(67px, 14vw, 240px);
  line-height: 0.88;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-align: left;
  position: relative;
  z-index: 3;
  pointer-events: none;
  margin-top: auto;
}
.hero-title .ln {
  display: block;
  will-change: transform;
  transform: translateX(calc(var(--shift, 0) * -1px));
}
.hero-title .ln:nth-child(2) { text-align: right; --shift: -40; padding-right: 6vw; }
.hero-title .ln:nth-child(3) { padding-left: 12vw; --shift: 60; }

.hero-can {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(220px, 28vw, 460px);
  aspect-ratio: 1 / 2;
  transform: translate(-50%, -50%) rotate(-6deg);
  z-index: 2;
  will-change: transform;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,0.25));
}
.hero-can img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 3;
}
.hero-foot .scroll-cue {
  display: flex; align-items: center; gap: 12px;
}
.hero-foot .scroll-cue .line {
  width: 36px; height: 1px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.hero-foot .scroll-cue .line::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: scrollLine 2.4s infinite var(--ease);
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* particles */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particles span {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.15;
  animation: float 12s linear infinite;
}
@keyframes float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

/* ───── MANIFESTO ───── */
.manifesto { height: 320vh; }
.manifesto .stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 36px;
}
@media (max-height: 760px) {
  .manifesto .stage { align-items: flex-start; padding-top: 100px; }
  .manifesto-title { font-size: clamp(40px, 5.6vw, 88px) !important; }
}
.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1400px;
  width: 100%;
  align-items: center;
}
.manifesto-lead {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.manifesto-lead::before {
  content: ""; width: 36px; height: 1px; background: var(--ink);
}
.manifesto-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(48px, 7vw, 116px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.manifesto-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.manifesto-title .word.in { opacity: 1; transform: none; }
.manifesto-title em { color: var(--accent); font-style: italic; }
.manifesto-body {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 480px;
}
.manifesto-body p + p { margin-top: 18px; }
.manifesto-stat {
  margin-top: 48px;
  display: flex;
  gap: 48px;
}
.manifesto-stat .n {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 56px;
  color: var(--ink);
  line-height: 1;
}
.manifesto-stat .l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
  display: block;
}

/* ───── PRODUCT CAROUSEL ───── */
.carousel { height: 700vh; }
.carousel .stage {
  background: var(--c-current, var(--deep));
  color: #fff;
  transition: background-color 0.7s var(--ease);
}
.carousel-head {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 100px 36px 0;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  z-index: 10;
  pointer-events: none;
}
.carousel-counter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
}
.track {
  display: flex;
  height: 100%;
  width: calc(100vw * 6);
  will-change: transform;
}
.product {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: center;
  padding: 100px 80px 80px;
  position: relative;
}
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}
.product-meta .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.product-meta .row .k { color: rgba(255,255,255,0.5); }
.product-meta .row .v {
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.45;
}
.product-image {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image img {
  height: 90%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 60px 80px rgba(0,0,0,0.4));
}
.product-image .badge {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 14px;
  border-radius: 999px;
}
.product-info {
  position: relative;
  z-index: 2;
}
.product-info .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
}
.product-info .name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(48px, 5.4vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 22px;
}
.product-info .name a {
  color: inherit;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s var(--ease);
  display: inline-block;
}
.product-info .name a:hover { border-color: currentColor; }
.product-info .blurb {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  max-width: 360px;
  margin-bottom: 36px;
}
.product-info .pricerow {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 32px;
}
.product-info .price {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
}
.product-info .pricesub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: #fff;
  color: #0c100a;
  padding: 18px 28px;
  border-radius: 999px;
  transition: transform 0.4s var(--ease);
}
.btn:hover { transform: translateX(6px); }
.btn .arr { font-size: 14px; }
.btn--ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

/* huge label backdrop word per product */
.product-bigword {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36vw;
  line-height: 1;
  color: rgba(255,255,255,0.06);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  overflow: hidden;
}

/* ───── INGREDIENTS ───── */
.science { padding: 160px 36px 200px; background: var(--bg); }
.science-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 100px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
}
.science-head .title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(48px, 6.5vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.science-head .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: right;
}
.science-head .meta .num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 56px;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 6px;
}
.ing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.ing {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background-color 0.4s, padding-left 0.4s var(--ease);
}
.ing:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 36px; }
.ing:nth-child(even) { padding-left: 36px; }
.ing:hover { padding-left: 20px; }
.ing:nth-child(even):hover { padding-left: 56px; }
.ing .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.16em;
}
.ing .name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.ing .desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ───── RITUAL ───── */
.ritual {
  padding: 200px 36px;
  background: var(--bg-2);
}
.ritual-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 100px;
}
.ritual-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(56px, 6vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.ritual-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ritual-step {
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.ritual-step:last-child { border-bottom: 1px solid var(--line); }
.ritual-step .step-n {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 48px;
  color: var(--accent);
  line-height: 0.9;
}
.ritual-step .step-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  color: var(--ink);
}
.ritual-step .step-name .when {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.ritual-step .step-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ───── CTA ───── */
.cta {
  padding: 240px 36px 100px;
  background: var(--deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-inner {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.cta .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 36px;
}
.cta-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(88px, 18vw, 280px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: #fff;
}
.cta-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  max-width: 420px;
  margin: 36px auto 56px;
  line-height: 1.55;
}
.cta-actions {
  display: inline-flex; gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ───── FOOTER ───── */
.footer {
  background: var(--deep);
  color: rgba(255,255,255,0.6);
  padding: 80px 36px 36px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer .mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
  color: #fff;
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer ul li.h { color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.footer-bottom {
  max-width: 1400px;
  margin: 80px auto 0;
  display: flex; justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* ───── CURSOR ───── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out);
}

/* ───── TWEAKS PANEL ───── */
.tweaks {
  position: fixed;
  bottom: 24px; right: 24px;
  background: rgba(20, 24, 16, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px 20px;
  color: #fff;
  z-index: 1000;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  min-width: 240px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks .close {
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer; opacity: 0.6;
}
.tweaks label { display: block; margin-bottom: 8px; opacity: 0.6; }
.tweaks .swatches { display: flex; gap: 10px; }
.tweaks .sw {
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  position: relative;
}
.tweaks .sw.on { border-color: #fff; }
.tweaks .sw::after {
  content: attr(data-name);
  position: absolute;
  bottom: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  color: rgba(255,255,255,0.5);
}
.tweaks .sw:hover::after { opacity: 1; }

/* responsive */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav .links { display: none; }
  .hero .stage { padding: 80px 20px 20px; }
  .hero-can { width: 60vw; aspect-ratio: 1 / 1.8; }
  .product { grid-template-columns: 1fr; padding: 90px 24px 60px; gap: 20px; }
  .product-meta { display: none; }
  .product-image { height: 50vh; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 40px; }
  .ritual-inner { grid-template-columns: 1fr; gap: 40px; }
  .ritual-step { grid-template-columns: 50px 1fr; gap: 20px; }
  .ritual-step .step-desc { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .science-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .ing-grid { grid-template-columns: 1fr; }
  .ing:nth-child(odd), .ing:nth-child(even) { padding: 28px 0; border-right: none; }
}
