/* ============================================================
   CALMYUTI · Site stylesheet
   Balance Born of Science
   ============================================================ */

:root {
  /* Palette — Vibrant Luxe (olive + ink-black + coral) */
  --olive: #4d5d2a;
  --olive-deep: #3a4720;
  --olive-bright: #6b8030;
  --olive-soft: #b4c181;
  --navy: #060a30;        /* very deep royal-navy (matches --ink family) */
  --navy-soft: #131958;
  --bone: #fcfaf6;        /* near-white, faint warm tint */
  --bone-warm: #fcfaf6;   /* same — single unified light tone */
  --cream: #ffffff;
  --butter: #ff6f3c;      /* vibrant coral (was dull yellow) */
  --butter-deep: #d44d22;
  --rust: #d4582a;        /* CTA pop */
  --ink: #0d1340;         /* deeper royal navy */
  --ink-deep: #050a28;
  --ink-mid: #1c2778;
  --ink-shine: #344db5;   /* glossy highlight for gradients */
  --sage: #c7d39e;

  /* Mapped tokens */
  --bg: var(--bone);
  --bg-alt: var(--bone-warm);
  --bg-deep: var(--navy);
  --fg: var(--ink);
  --fg-muted: #404b78;
  --accent: var(--olive);
  --line: rgba(13, 19, 64, 0.18);
  --line-soft: rgba(13, 19, 64, 0.09);

  /* Type */
  --f-display: "Bricolage Grotesque", "PP Editorial", "Geist", system-ui, sans-serif;
  --f-serif: "Cormorant Garamond", "Cormorant", Garamond, serif;
  --f-sans: "Geist", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", "Geist Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Scale */
  --container: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --radius: 4px;

  /* Motion */
  --ease: cubic-bezier(.4, .04, .12, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; padding: 0; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--olive); color: var(--bone); }

/* ============================================================
   Type
   ============================================================ */
.display, h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.92;
  text-wrap: balance;
}
.h-xl { font-size: clamp(56px, 10vw, 168px); letter-spacing: -0.05em; line-height: 0.86; font-weight: 800; }
.h-lg { font-size: clamp(40px, 6.5vw, 96px); letter-spacing: -0.04em; line-height: 0.92; font-weight: 700; }
.h-md { font-size: clamp(32px, 4.2vw, 64px); letter-spacing: -0.03em; font-weight: 700; }
.h-sm { font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -0.02em; line-height: 1.1; font-weight: 600; }
em.italic, .italic { font-family: var(--f-serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }
.serif { font-family: var(--f-serif); font-weight: 500; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--olive);
}
.body-lg { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; max-width: 60ch; }
.body-sm { font-size: 14px; line-height: 1.55; color: var(--fg-muted); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.02em; }



/* ============================================================
   Layout
   ============================================================ */
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; padding: clamp(56px, 8vw, 120px) 0; }
section.flush-top { padding-top: 0; }
.divider { height: 1px; background: var(--line); width: 100%; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 16px var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 24px;
  background: rgba(252, 250, 246, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(252, 250, 246, 0.96);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
}
.nav-brand img.nav-logo {
  height: 30px; width: auto; display: block;
}
.nav-brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--olive);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(.7); }
}
.nav-links { display: flex; gap: 4px; justify-content: center; }
.nav-links a {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 999px;
  position: relative;
  color: var(--ink);
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; inset: auto 14px 6px;
  height: 1px; background: var(--olive);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--olive); }
.nav-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }

.nav-cart {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all .3s var(--ease);
}
.nav-cart:hover { background: var(--ink); color: var(--bone); }

.nav-menu-btn {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  align-items: center; justify-content: center;
}
.nav-menu-btn span { width: 16px; height: 1.5px; background: currentColor; position: relative; }
.nav-menu-btn span::before, .nav-menu-btn span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
}
.nav-menu-btn span::before { top: -5px; }
.nav-menu-btn span::after { top: 5px; }

@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links, .nav-cart { display: none; }
  .nav-menu-btn { display: inline-flex; }
}

/* Mobile overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--navy); color: var(--bone);
  padding: 120px var(--gutter) 60px;
  transform: translateY(-100%);
  transition: transform .6s var(--ease-out);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu .close {
  position: absolute; top: 28px; right: var(--gutter);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(244,239,230,.3);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 18px;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu nav a {
  font-family: var(--f-display);
  font-size: clamp(36px, 9vw, 56px);
  line-height: 1.1; letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid rgba(244,239,230,.12);
}
.mobile-menu nav a small {
  display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  opacity: .5; margin-top: 6px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 60%),
    var(--ink);
  color: var(--bone);
  box-shadow: 0 8px 22px -8px rgba(20,26,82,.55), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 60%),
    var(--ink-shine);
  transform: translateY(-2px);
}
.btn-olive { background: var(--olive); color: var(--bone); }
.btn-olive:hover { background: var(--olive-deep); transform: translateY(-2px); }
.btn-rust { background: var(--rust); color: var(--cream); }
.btn-rust:hover { background: #b8481d; transform: translateY(-2px); }
.btn-butter { background: var(--butter); color: var(--ink); }
.btn-butter:hover { background: #e3b755; transform: translateY(-2px); }
.btn-dark {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 60%),
    var(--ink);
  color: var(--bone);
  box-shadow: 0 8px 22px -8px rgba(20,26,82,.55), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-dark:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 60%),
    var(--ink-shine);
  transform: translateY(-2px);
}
.btn-ghost { border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bone); }
.btn-ghost-light { border: 1px solid rgba(244,239,230,.4); color: var(--bone); }
.btn-ghost-light:hover { background: var(--bone); color: var(--ink); }
.btn .arrow { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Amazon / Flipkart buy buttons — authentic brand styling
   ============================================================ */
.buy-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.buy-btn .brand-mark {
  height: 16px; width: auto; display: block;
}
.buy-btn .cta {
  display: inline-flex; align-items: center; gap: 4px;
}

/* Amazon — yellow CTA (matches their "Buy Now" button) */
.buy-amazon {
  background: linear-gradient(180deg, #ffd814 0%, #f7ca00 100%);
  color: #0f1111;
  border: 1px solid #d4a000;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 6px 14px -6px rgba(247,202,0,0.55);
}
.buy-amazon:hover {
  background: linear-gradient(180deg, #ffe247 0%, #ffd814 100%);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    0 10px 20px -6px rgba(247,202,0,0.65);
}

/* Flipkart — brand blue with the yellow "Plus" cart accent (their identity) */
.buy-flipkart {
  background: linear-gradient(180deg, #2874F0 0%, #1c5dd0 100%);
  color: #ffffff;
  border: 1px solid #1452ad;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 6px 14px -6px rgba(40,116,240,0.55);
}
.buy-flipkart:hover {
  background: linear-gradient(180deg, #3b87ff 0%, #2874F0 100%);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    0 10px 20px -6px rgba(40,116,240,0.65);
}

/* ============================================================
   Periodic / Mg motif (recurring)
   ============================================================ */
.mg-cell {
  display: inline-grid;
  grid-template-rows: auto auto auto;
  gap: 2px; padding: 8px 10px;
  border: 1.5px solid currentColor;
  font-family: var(--f-mono);
  text-align: left;
  min-width: 78px;
  line-height: 1;
}
.mg-cell .num { font-size: 10px; opacity: .7; }
.mg-cell .sym { font-family: var(--f-display); font-size: 32px; line-height: 0.9; letter-spacing: -0.02em; }
.mg-cell .mass { font-size: 9px; opacity: .7; }
.mg-cell.lg .sym { font-size: 56px; }
.mg-cell.lg { min-width: 120px; padding: 12px 14px; }
.mg-cell.xl .sym { font-size: 96px; }
.mg-cell.xl { min-width: 200px; padding: 18px 22px; }

/* ============================================================
   Hero (Home)
   ============================================================ */
.hero {
  min-height: 92svh;
  padding: 120px 0 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--gutter);
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 88% 24%, rgba(255,111,60,0.32), transparent 50%),
    radial-gradient(ellipse at 6% 92%, rgba(77,93,42,0.22), transparent 55%),
    linear-gradient(180deg, var(--bone) 0%, var(--bone-warm) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(12,18,9,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.hero-text { padding: 0 var(--gutter); position: relative; z-index: 2; }
.hero-text .eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.hero-text .eyebrow .line { width: 36px; height: 1px; background: var(--olive); }
.hero h1 {
  font-size: clamp(52px, 8.4vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin-bottom: 28px;
}
.hero h1 .row { display: block; }
.hero h1 .row > span {
  display: inline-block;
  animation: rise 0.9s var(--ease-out) both;
  will-change: transform, opacity;
}
.hero h1 .row:nth-child(2) > span { animation-delay: .1s; }
.hero h1 .row:nth-child(3) > span { animation-delay: .2s; }
@keyframes rise {
  from { transform: translateY(24%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.hero h1 .swap {
  font-family: var(--f-serif); font-weight: 500;
  font-style: italic; color: var(--olive); position: relative;
  letter-spacing: -0.02em;
}
.hero h1 mark {
  background: var(--butter); color: var(--ink);
  padding: 0 0.1em; border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55; max-width: 48ch;
  color: var(--fg-muted); margin-bottom: 40px;
  opacity: 0; animation: fade-in .9s .5s var(--ease-out) forwards;
}
@keyframes fade-in { to { opacity: 1; } }

.hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  opacity: 0; animation: fade-in .9s .7s var(--ease-out) forwards;
}

.hero-stats {
  display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap;
  opacity: 0; animation: fade-in .9s .9s var(--ease-out) forwards;
}
.hero-stat { display: flex; flex-direction: column; gap: 4px; }
.hero-stat .n { font-family: var(--f-display); font-size: clamp(28px, 3.5vw, 44px); line-height: 1; }
.hero-stat .l { font-family: var(--f-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-muted); }

.hero-visual {
  position: relative; height: 100%; min-height: 480px;
  display: flex; align-items: center; justify-content: center;
}
.hero-product {
  position: relative; z-index: 2;
  width: 76%; max-width: 440px; aspect-ratio: 3/4;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.55), transparent 55%),
    linear-gradient(168deg, var(--ink-mid) 0%, var(--ink) 50%, var(--ink-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -60px 100px rgba(8,12,40,.55),
    0 60px 80px -40px rgba(20,26,82,.55),
    0 10px 30px -10px rgba(20,26,82,.35);
  transform: rotate(-1.5deg);
  animation: bob 7s ease-in-out infinite;
  overflow: hidden;
}
.hero-product::after {
  content: ""; position: absolute;
  top: 0; left: 10%; right: 10%; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
  pointer-events: none; border-radius: 28px 28px 0 0;
}
.hero-product::before {
  content: "Mg"; position: absolute;
  top: -16px; right: 18px;
  font-family: var(--f-display); font-size: 280px; line-height: 1;
  color: rgba(255,255,255,0.07); font-weight: 800;
  pointer-events: none; letter-spacing: -0.05em;
}
.hero-product .periodic-corner {
  position: absolute; bottom: 18px; left: 18px;
  font-family: var(--f-mono); color: rgba(255,255,255,0.55);
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  line-height: 1.55; text-align: left;
}
.hero-product .periodic-corner strong {
  font-family: var(--f-display); font-size: 26px; letter-spacing: 0;
  color: var(--bone); display: block; font-weight: 800; line-height: .9;
}
.hero-product .formula-strip {
  position: absolute; bottom: 18px; right: 18px;
  font-family: var(--f-mono); color: var(--olive-soft);
  font-size: 11px; letter-spacing: .08em; font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 10px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
@keyframes bob { 50% { transform: rotate(-1.5deg) translateY(-12px); } }
.hero-product .label {
  position: absolute; top: 14%; left: 12%; right: 12%;
  background: var(--bone);
  border-radius: 8px;
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 16px 36px -12px rgba(0,0,0,.35);
  border-left: 4px solid var(--butter);
}
.hero-product .label .brand-mark {
  font-family: var(--f-display); color: var(--olive); font-size: 22px; letter-spacing: 0.06em;
}
.hero-product .label .sku {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted);
  border-top: 1px solid var(--line);
  padding-top: 8px; margin-top: auto;
  display: flex; justify-content: space-between;
}
.hero-product .label h4 {
  font-family: var(--f-display); font-size: 26px; line-height: 1; letter-spacing: -.02em;
  margin-top: 4px;
}
.hero-product .label .tagline {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--olive);
}
.hero-product .label .mg-mark {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--f-display); font-size: 38px; color: var(--olive); line-height: 1;
}
.hero-product .label .mg-mark small {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.15em;
  display: block; color: var(--fg-muted); margin-top: -4px;
}

/* particles */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particle {
  position: absolute; width: 4px; height: 4px;
  background: var(--olive); border-radius: 50%;
  opacity: 0.3;
  animation: drift linear infinite;
}
@keyframes drift {
  from { transform: translateY(0) rotate(0); opacity: 0; }
  10%, 90% { opacity: 0.5; }
  to { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* orbit ring */
.orbit {
  position: absolute; top: 50%; left: 50%;
  width: 105%; aspect-ratio: 1;
  border: 1px dashed var(--olive);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  animation: spin 60s linear infinite;
}
.orbit.r2 { width: 130%; opacity: 0.15; animation-duration: 90s; animation-direction: reverse; }
.orbit .ion {
  position: absolute; width: 12px; height: 12px;
  background: var(--olive); border-radius: 50%;
  top: -6px; left: 50%; transform: translateX(-50%);
  box-shadow: 0 0 0 8px rgba(77,93,42,.12);
}
.orbit .ion::before {
  content: "Mg"; position: absolute; font-family: var(--f-mono);
  color: var(--bone); font-size: 7px; font-weight: 600;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 110px; gap: 40px; }
  .hero-visual { min-height: 480px; }
  .hero-product { width: 68%; }
}

/* ============================================================
   Ticker / marquee
   ============================================================ */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 24px 0; overflow: hidden;
  background: var(--bg);
}
.ticker.dark { background: var(--ink); color: var(--bone); border-color: rgba(255,255,255,.1); }
.ticker-track {
  display: flex; gap: 60px; width: max-content;
  animation: scroll 50s linear infinite;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
}
.ticker-item { display: flex; align-items: center; gap: 60px; white-space: nowrap; }
.ticker-item .dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 400ms; }

/* ============================================================
   Section header
   ============================================================ */
.section-head {
  display: grid; grid-template-columns: 1fr 2fr; gap: var(--gutter);
  margin-bottom: clamp(32px, 4vw, 64px);
  align-items: end;
}
.section-head .meta { display: flex; flex-direction: column; gap: 14px; }
.section-head .meta .num {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--fg-muted);
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(36px, 4.8vw, 84px); font-weight: 700; letter-spacing: -0.035em; }

/* Promoted section kicker — "Why Magnesium", "How to use", "Our Story", etc. */
.section-head .meta .eyebrow,
.story-text > .eyebrow,
.about-hero .eyebrow,
.shop-hero .eyebrow {
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--olive);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.section-head .meta .eyebrow::before,
.story-text > .eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
  display: inline-block;
  border-radius: 1px;
}
.story-text > .eyebrow {
  margin-bottom: 4px;
}
.section-head h2 em { font-family: var(--f-serif); font-style: italic; font-weight: 500; color: var(--olive); letter-spacing: -0.02em; }
.section-head h2 mark { background: var(--butter); color: var(--ink); padding: 0 0.1em; border-radius: 4px; }
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ============================================================
   Science strip (Why magnesium)
   ============================================================ */
.science {
  background: var(--navy); color: var(--bone);
  position: relative; overflow: hidden;
}
.science .eyebrow { color: var(--sage); }
.science h2 { color: var(--bone); }
.science .lede { color: rgba(244,239,230,.7); max-width: 60ch; font-size: clamp(17px, 1.4vw, 21px); }
.science-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(244,239,230,.12);
  margin-top: 64px;
  border: 1px solid rgba(244,239,230,.12);
}
.science-card {
  background: var(--navy);
  padding: 40px 32px 56px;
  display: flex; flex-direction: column; gap: 18px;
  min-height: 320px;
  position: relative; overflow: hidden;
  transition: background .4s var(--ease);
}
.science-card:hover { background: var(--navy-soft); }
.science-card .num { font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; color: var(--sage); }
.science-card h3 { font-size: clamp(28px, 2.8vw, 44px); color: var(--bone); font-weight: 700; letter-spacing: -0.025em; }
.science-card p { color: rgba(244,239,230,.65); font-size: 14px; line-height: 1.55; }
.science-card .sym {
  position: absolute; right: -10px; bottom: -30px;
  font-family: var(--f-display); font-size: 180px; line-height: 1;
  color: rgba(169,182,142,.06); pointer-events: none;
}
@media (max-width: 1000px) {
  .science-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .science-grid { grid-template-columns: 1fr; }
}

/* glowing molecule */
.molecule {
  position: absolute; top: 50%; right: -120px; transform: translateY(-50%);
  width: 480px; height: 480px; pointer-events: none; opacity: .35;
}

/* ============================================================
   Product showcase
   ============================================================ */
.products {
  background: var(--bone-warm);
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.products .section-head h2 mark {
  background: var(--butter); color: var(--ink); padding: 0 0.1em; border-radius: 4px;
}
.product-card .visual {
  background: var(--bone);
  box-shadow: inset 0 0 0 1px var(--line);
}
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px);
}
@media (max-width: 800px) { .product-grid { grid-template-columns: 1fr; } }

.product-card { position: relative; }
.product-card .visual {
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  border-radius: 8px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: background .6s var(--ease);
}
.product-card .visual::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(77,93,42,.18), transparent 60%);
}
.product-card .pouch {
  width: 62%; aspect-ratio: 3/4;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.6) 0%, transparent 50%),
    linear-gradient(168deg, var(--ink-mid) 0%, var(--ink) 50%, var(--ink-deep) 100%);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -50px 80px rgba(8,12,40,.5),
    0 40px 60px -30px rgba(20,26,82,.55);
  transition: transform .9s var(--ease-out);
}
.product-card .pouch::before {
  content: "Mg"; position: absolute;
  top: -8px; right: 12px;
  font-family: var(--f-display); font-size: 240px; line-height: 1;
  color: rgba(255,255,255,0.06);
  font-weight: 800; pointer-events: none;
}
.product-card:hover .pouch { transform: translateY(-12px) rotate(-1.5deg); }
.product-card .pouch .pouch-label {
  position: absolute; top: 14%; left: 10%; right: 10%; bottom: 14%;
  background: var(--bone);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.3);
  border-radius: 6px;
  border-left: 4px solid var(--butter);
}
.product-card .pouch .pouch-label .mark {
  font-family: var(--f-mono); color: var(--ink);
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase; font-weight: 600;
}
.product-card .pouch .pouch-label .name {
  font-family: var(--f-display); font-size: 24px; line-height: 1.05; letter-spacing: -.02em;
  text-wrap: balance; color: var(--ink); margin-top: 4px;
}
.product-card .pouch .pouch-label .formula {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em;
  color: var(--butter); font-weight: 600;
  padding: 4px 0; margin-top: auto;
}
.product-card .pouch .pouch-label .meta {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--fg-muted); display: flex; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 6px;
}
.product-card .pouch .pouch-atom {
  position: absolute; bottom: 14px; left: 14px;
  font-family: var(--f-mono); color: rgba(255,255,255,0.5);
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  line-height: 1.5;
}
.product-card .pouch .pouch-atom strong {
  font-family: var(--f-display); font-size: 22px; letter-spacing: 0;
  color: var(--bone); display: block; font-weight: 800; line-height: .9;
}

.product-card .visual.lotion .pouch {
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.6) 0%, transparent 50%),
    linear-gradient(168deg, #4a3878 0%, #2e1e5e 50%, #1e1340 100%);
}
.product-card .visual.lotion .pouch::after {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 26%; height: 16px;
  background: linear-gradient(180deg, #ddd7c4, #b0a78f);
  border-radius: 4px 4px 2px 2px;
  box-shadow: 0 4px 8px rgba(0,0,0,.2);
}

.product-card .info { padding-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.product-card .info-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.product-card .info .name { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 2.6vw, 42px); line-height: 1; letter-spacing: -.03em; }
.product-card .info .price { font-family: var(--f-mono); font-size: 14px; letter-spacing: .04em; }
.product-card .info .price s { color: var(--fg-muted); margin-right: 6px; }
.product-card .info p { color: var(--fg-muted); font-size: 14px; line-height: 1.55; max-width: 42ch; }
.product-card .info .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.product-card .info .tag {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
}
.product-card .buy-row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* ============================================================
   Manifesto / large pull quote
   ============================================================ */
.manifesto {
  background: var(--olive);
  color: var(--cream);
  text-align: center;
  padding: clamp(80px, 11vw, 160px) 0;
  position: relative; overflow: hidden;
}
.manifesto blockquote, .manifesto cite { color: var(--cream); }
.manifesto blockquote em { color: var(--butter) !important; font-family: var(--f-serif); font-weight: 500; }
.manifesto .quote-mark { color: var(--cream) !important; opacity: .18 !important; }
.manifesto .quote-mark {
  font-family: var(--f-display); font-size: clamp(140px, 18vw, 240px);
  line-height: 0.7; color: var(--olive); opacity: .14;
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
}
.manifesto blockquote {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(40px, 6.5vw, 104px); line-height: 0.98;
  letter-spacing: -.035em; max-width: 22ch; margin: 0 auto;
  text-wrap: balance;
}
.manifesto blockquote em { font-style: italic; }
.manifesto cite {
  display: block; margin-top: 40px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  font-style: normal; color: rgba(252, 250, 246, 0.65);
}

/* ============================================================
   Rituals
   ============================================================ */
.rituals .ritual {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(32px, 4vw, 56px) 0;
  border-top: 1px solid var(--line);
}
.rituals .ritual:last-child { border-bottom: 1px solid var(--line); }
.rituals .ritual.flip { grid-template-columns: 1.2fr 1fr; }
.rituals .ritual.flip .ritual-visual { order: 2; }
.rituals .ritual-text { display: flex; flex-direction: column; gap: 20px; }
.rituals .ritual-text .num {
  font-family: var(--f-display); font-size: clamp(80px, 12vw, 180px);
  line-height: 0.8; color: var(--olive); opacity: .9; letter-spacing: -.04em;
}
.rituals .ritual-text h3 { font-size: clamp(32px, 4vw, 56px); }
.rituals .ritual-text p { max-width: 48ch; color: var(--fg-muted); font-size: 16px; }
.rituals .ritual-visual {
  aspect-ratio: 5/4;
  background: var(--bg-alt);
  border-radius: 8px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* ripple animation in ritual visuals */
.ripple-set { width: 70%; aspect-ratio: 1; position: relative; }
.ripple-set .ripple {
  position: absolute; inset: 0;
  border: 1px solid var(--olive);
  border-radius: 50%;
  opacity: 0;
  animation: ripple 4s var(--ease-out) infinite;
}
.ripple-set .ripple:nth-child(2) { animation-delay: 1.3s; }
.ripple-set .ripple:nth-child(3) { animation-delay: 2.6s; }
.ripple-set .core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--olive-soft), var(--olive));
  opacity: .85;
  box-shadow: 0 0 60px rgba(77,93,42,.4);
}
@keyframes ripple {
  0% { transform: scale(.4); opacity: .6; }
  100% { transform: scale(1.4); opacity: 0; }
}

@media (max-width: 800px) {
  .rituals .ritual, .rituals .ritual.flip { grid-template-columns: 1fr; gap: 32px; }
  .rituals .ritual.flip .ritual-visual { order: 0; }
}

/* ============================================================
   Story block
   ============================================================ */
.story {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 120px);
  align-items: stretch;
}
.story-visual {
  color: var(--bone);
  border-radius: 12px; aspect-ratio: 4/5;
  position: relative; overflow: hidden;
  padding: 44px 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  isolation: isolate;
  background: var(--ink-deep);
}

/* Layered radial gradient + grain backdrop */
.story-visual .story-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 22% 18%, rgba(199,211,158,0.32) 0%, transparent 38%),
    radial-gradient(ellipse at 80% 90%, rgba(52,77,181,0.35) 0%, transparent 55%),
    linear-gradient(150deg, var(--ink-mid) 0%, var(--ink) 45%, var(--ink-deep) 100%);
}
.story-visual .story-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .6;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* Concentric topographic rings, top-left origin */
.story-visual .story-rings {
  position: absolute; left: -10%; top: -8%;
  width: 90%; aspect-ratio: 1;
  z-index: 0; pointer-events: none;
}
.story-visual .story-rings span {
  position: absolute; inset: 0;
  border: 1px solid rgba(199,211,158,0.28);
  border-radius: 50%;
}
.story-visual .story-rings span:nth-child(2) { inset: 12%; border-color: rgba(199,211,158,0.22); }
.story-visual .story-rings span:nth-child(3) { inset: 24%; border-color: rgba(199,211,158,0.16); border-style: dashed; }
.story-visual .story-rings span:nth-child(4) { inset: 36%; border-color: rgba(199,211,158,0.12); }
.story-visual .story-rings span:nth-child(5) { inset: 48%; border-color: rgba(199,211,158,0.08); border-style: dashed; }

/* Animated Mg atom */
.story-visual .story-atom {
  position: absolute;
  top: 22%; left: 24%;
  width: 22%; aspect-ratio: 1;
  z-index: 1; pointer-events: none;
}
.story-visual .story-atom .atom-nucleus {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(199,211,158,0.95), rgba(77,93,42,0.85) 80%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow:
    0 0 40px rgba(199,211,158,0.45),
    inset 0 -8px 18px rgba(0,0,0,0.25),
    inset 0 6px 12px rgba(255,255,255,0.25);
  animation: nucleus-glow 3.6s ease-in-out infinite;
}
.story-visual .story-atom .atom-nucleus .sym {
  font-family: var(--f-display); font-weight: 800;
  font-size: 28px; line-height: 1;
  color: var(--ink-deep); letter-spacing: -0.02em;
}
.story-visual .story-atom .atom-nucleus .mass {
  font-family: var(--f-mono); font-size: 8px;
  color: rgba(13,19,64,0.7);
  letter-spacing: .14em; margin-top: 2px;
}
@keyframes nucleus-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(199,211,158,0.45), inset 0 -8px 18px rgba(0,0,0,0.25), inset 0 6px 12px rgba(255,255,255,0.25); }
  50%      { box-shadow: 0 0 60px rgba(199,211,158,0.7),  inset 0 -8px 18px rgba(0,0,0,0.25), inset 0 6px 12px rgba(255,255,255,0.35); }
}
.story-visual .story-atom .atom-ring {
  position: absolute; inset: 0;
  border: 1px solid rgba(199,211,158,0.4);
  border-radius: 50%;
  animation: ring-spin 16s linear infinite;
}
.story-visual .story-atom .atom-ring.r2 {
  inset: -22%;
  border-color: rgba(199,211,158,0.3);
  animation-duration: 22s; animation-direction: reverse;
}
.story-visual .story-atom .atom-ring.r3 {
  inset: -44%;
  border-color: rgba(199,211,158,0.2);
  border-style: dashed;
  animation-duration: 30s;
}
.story-visual .story-atom .atom-ring .electron {
  position: absolute; top: -4px; left: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--olive-soft);
  box-shadow: 0 0 12px var(--olive-soft);
  transform: translateX(-50%);
}
.story-visual .story-atom .atom-ring.r2 .electron { background: var(--bone); box-shadow: 0 0 12px rgba(252,250,246,0.7); }
.story-visual .story-atom .atom-ring.r3 .electron { background: var(--ink-shine); box-shadow: 0 0 12px var(--ink-shine); }
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* Real-HTML headline (Cormorant italic) */
.story-visual .story-words {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  gap: 4px;
  margin-top: auto;
  margin-bottom: 28px;
}
.story-visual .story-words .line {
  font-family: var(--f-serif);
  font-style: italic; font-weight: 500;
  font-size: clamp(44px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--bone);
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.story-visual .story-words .line.muted {
  color: var(--olive-soft);
  opacity: 0.78;
}
.story-visual .story-words .line.accent {
  color: var(--bone);
}

/* Mono spec strip */
.story-visual .story-spec {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(199,211,158,0.18);
}
.story-visual .story-spec li {
  display: flex; gap: 12px; align-items: baseline;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.story-visual .story-spec .k {
  color: rgba(199,211,158,0.6);
  min-width: 88px;
}
.story-visual .story-spec .v {
  color: var(--olive-soft);
  letter-spacing: .1em;
}

/* Tiny "founding visual" tag in corner */
.story-visual .story-tag {
  position: absolute;
  top: 24px; right: 24px;
  z-index: 2;
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: .24em; text-transform: uppercase;
  color: rgba(199,211,158,0.55);
  padding: 6px 10px;
  border: 1px solid rgba(199,211,158,0.25);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* Uploaded image overrides the whole composition */
.story-visual .uploaded-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 12px;
  z-index: 4;
}
.story-visual:has(.uploaded-img) .story-bg,
.story-visual:has(.uploaded-img) .story-rings,
.story-visual:has(.uploaded-img) .story-atom,
.story-visual:has(.uploaded-img) .story-spec,
.story-visual:has(.uploaded-img) .story-tag { display: none; }
.story-visual:has(.uploaded-img) .story-words {
  position: absolute; bottom: 40px; left: 40px; z-index: 5;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
}
.story-text { display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.story-text h2 { font-size: clamp(36px, 4.8vw, 72px); }
.story-text .lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; max-width: 48ch; color: var(--fg-muted); }
.story-text .principles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; }
.story-text .principle { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.story-text .principle .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--olive); }
.story-text .principle .v { font-family: var(--f-display); font-size: 22px; line-height: 1.1; }
@media (max-width: 800px) {
  .story { grid-template-columns: 1fr; }
  .story-visual { aspect-ratio: 4/3; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background:
    radial-gradient(ellipse at 50% -10%, var(--ink-shine) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(255,255,255,0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--ink-mid) 0%, var(--ink) 35%, var(--ink-deep) 100%);
  color: var(--bone);
  padding: 64px 0 28px;
  position: relative; overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 8%),
    linear-gradient(0deg, rgba(0,0,0,0.18) 0%, transparent 40%);
}
.footer-social {
  display: flex; gap: 10px; justify-content: center; align-items: center;
  padding: 20px 0 14px;
  border-top: 1px solid rgba(244,239,230,.12);
  margin-top: 28px;
  flex-wrap: wrap;
  position: relative;
}
.footer-social .social-icon {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform .25s var(--ease), filter .25s var(--ease);
  opacity: .9;
}
.footer-social .social-icon svg {
  width: 100%; height: 100%; display: block;
  border-radius: 8px;
}
.footer-social .social-icon.social-fb svg { border-radius: 50%; }
.footer-social .social-icon:hover {
  transform: translateY(-2px) scale(1.04);
  opacity: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-newsletter h3 { font-size: clamp(24px, 2.4vw, 34px); margin-bottom: 10px; color: var(--bone); }
.footer-newsletter p { color: rgba(244,239,230,.65); font-size: 13px; max-width: 36ch; margin-bottom: 18px; }
.footer-newsletter .field {
  display: flex; align-items: center; gap: 0;
  border-bottom: 1px solid rgba(244,239,230,.3);
  padding-bottom: 12px;
  max-width: 380px;
}
.footer-newsletter input {
  flex: 1; background: 0; border: 0; outline: 0; color: var(--bone);
  font-family: var(--f-mono); font-size: 14px;
}
.footer-newsletter input::placeholder { color: rgba(244,239,230,.4); }
.footer-newsletter button {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--bone); opacity: .8; transition: opacity .3s var(--ease);
}
.footer-newsletter button:hover { opacity: 1; }

.footer-col h4 {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 700;
  color: var(--olive-soft); margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 7px; }
.footer-col a { font-family: var(--f-sans); font-size: 13px; color: rgba(244,239,230,.7); transition: color .3s var(--ease); }
.footer-col a:hover { color: var(--bone); }

/* Compact Amazon / Flipkart buy chips inside footer Shop column */
.footer-buys {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 14px;
}
.footer-buy {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.footer-buy.buy-amazon {
  background: linear-gradient(180deg, #ffd814 0%, #f7ca00 100%);
  border: 1px solid #d4a000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.footer-buy.buy-flipkart {
  background: linear-gradient(180deg, #2874F0 0%, #1c5dd0 100%);
  border: 1px solid #1452ad;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}
.footer-buy:hover { transform: translateY(-2px); }
.footer-buy .brand-mark { height: 13px; width: auto; display: block; }

.footer-fine {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; margin-top: 0;
  border-top: 1px solid rgba(244,239,230,.12);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em;
  color: rgba(244,239,230,.5);
  flex-wrap: wrap; gap: 12px;
}

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-grid > div:nth-child(5) { grid-column: 2 / -1; }
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-newsletter { grid-column: 1 / -1; }
  .footer-grid > div:nth-child(5) { grid-column: 1 / -1; }
}

/* Legal disclaimer strip */
.footer-legal {
  position: relative; z-index: 1;
  margin-top: 32px; padding: 22px 24px;
  border: 1px solid rgba(244,239,230,.12);
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
  font-family: var(--f-sans);
  font-size: 11.5px;
  line-height: 1.65;
  color: rgba(244,239,230,.62);
  max-width: 100%;
}
.footer-legal strong {
  color: rgba(244,239,230,.85); font-weight: 600;
}

/* ============================================================
   Product detail page
   ============================================================ */
.product-hero {
  padding: 130px 0 80px;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px);
  align-items: center;
  min-height: 90svh;
}
.product-hero .ph-visual {
  aspect-ratio: 4/5; background: var(--bg-alt);
  border-radius: 8px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-hero .ph-info { display: flex; flex-direction: column; gap: 24px; padding: 0 var(--gutter); }
.product-hero .crumbs { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted); }
.product-hero h1 { font-size: clamp(48px, 6vw, 96px); }
.product-hero h1 em { color: var(--olive); font-style: italic; }
.product-hero .price-row { display: flex; align-items: baseline; gap: 14px; font-family: var(--f-mono); font-size: 16px; }
.product-hero .price-row .now { font-family: var(--f-display); font-size: 32px; letter-spacing: -.01em; }
.product-hero .lede { color: var(--fg-muted); font-size: 17px; line-height: 1.55; max-width: 48ch; }
.product-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.variant-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.variant {
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; transition: all .3s var(--ease);
  background: var(--bg);
}
.variant.active { border-color: var(--olive); background: var(--bone); box-shadow: 0 0 0 3px rgba(77,93,42,.12); }
.variant .v-name { font-family: var(--f-display); font-size: 18px; line-height: 1; }
.variant .v-meta { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }

.product-meta-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 12px;
}
.product-meta-grid .cell {
  padding: 18px 0;
  display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line);
}
.product-meta-grid .cell:last-child { border-right: 0; padding-left: 16px; }
.product-meta-grid .cell:not(:first-child) { padding-left: 16px; }
.product-meta-grid .cell .k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.product-meta-grid .cell .v { font-family: var(--f-display); font-size: 22px; line-height: 1; }

@media (max-width: 800px) {
  .product-hero { grid-template-columns: 1fr; padding-top: 100px; }
  .product-meta-grid { grid-template-columns: 1fr 1fr; }
  .product-meta-grid .cell:nth-child(2) { border-right: 0; }
  .product-meta-grid .cell:nth-child(3), .product-meta-grid .cell:nth-child(4) { border-top: 1px solid var(--line); }
}

/* ============================================================
   Ingredients grid (product detail)
   ============================================================ */
.ingredients {
  background: var(--bg-alt);
}
.ingredient-table {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.ingredient {
  background: var(--bg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .3s var(--ease);
}
.ingredient:hover { background: rgba(77,93,42,0.05); }
.ingredient .top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.ingredient .name { font-family: var(--f-display); font-size: 22px; line-height: 1.1; }
.ingredient .pct { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--olive); white-space: nowrap; }
.ingredient .role { font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted); }
.ingredient p { font-size: 14px; line-height: 1.5; color: var(--fg-muted); }
.ingredient .bar {
  height: 2px; background: var(--line); border-radius: 1px; overflow: hidden; margin-top: 6px;
}
.ingredient .bar > span {
  display: block; height: 100%;
  background: var(--olive); transform-origin: left;
  transition: transform 1s var(--ease-out);
}
@media (max-width: 700px) { .ingredient-table { grid-template-columns: 1fr; } }

/* ============================================================
   How to use (product page steps)
   ============================================================ */
.howto {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.howto-step {
  padding: 36px 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
}
.howto-step .step-num {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; color: var(--olive);
}
.howto-step .step-title { font-family: var(--f-display); font-size: 28px; line-height: 1.1; }
.howto-step p { color: var(--fg-muted); font-size: 14px; }
@media (max-width: 800px) { .howto { grid-template-columns: 1fr; } }

/* ============================================================
   Shop grid
   ============================================================ */
.shop-hero {
  padding: 130px 0 64px;
  text-align: center;
}
.shop-hero h1 { font-size: clamp(44px, 6.4vw, 104px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; }
.shop-hero .lede { max-width: 56ch; margin: 24px auto 0; color: var(--fg-muted); font-size: 17px; }
.shop-filters {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 40px;
}
.shop-filters .chip {
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; transition: all .3s var(--ease);
  background: transparent; color: var(--fg);
}
.shop-filters .chip:hover { border-color: var(--ink); color: var(--ink); }
.shop-filters .chip.active { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.shop-filters .chip.active:hover { background: var(--ink-deep); }

.shop-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px);
}
@media (max-width: 900px) { .shop-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .shop-grid { grid-template-columns: 1fr; } }

/* ============================================================
   About page
   ============================================================ */
.about-hero {
  padding: 140px var(--gutter) 100px;
  max-width: var(--container);
  margin: 0 auto;
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px);
  align-items: end;
  border-bottom: 1px solid var(--line);
}
.about-hero .eyebrow { margin-bottom: 24px; display: inline-flex; }
.about-hero h1 { font-size: clamp(44px, 6vw, 96px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.96; }
.about-hero h1 em { color: var(--olive); font-style: italic; font-family: var(--f-serif); font-weight: 500; }
.about-hero .lede { max-width: 50ch; font-size: clamp(17px, 1.4vw, 21px); color: var(--fg-muted); line-height: 1.5; }
@media (max-width: 800px) {
  .about-hero { grid-template-columns: 1fr; padding: 110px var(--gutter) 60px; }
  .about-hero h1 { font-size: clamp(36px, 8vw, 64px); }
}

.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.pillar {
  background: var(--bg); padding: 48px 36px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 320px;
  transition: background .4s var(--ease);
}
.pillar:hover { background: rgba(77,93,42,0.05); box-shadow: inset 3px 0 0 var(--olive); }
.pillar .pn { font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; color: var(--olive); }
.pillar h3 { font-size: 32px; line-height: 1.05; }
.pillar p { color: var(--fg-muted); font-size: 15px; }
@media (max-width: 800px) { .pillars { grid-template-columns: 1fr; } }

/* Timeline */
.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.timeline .t-cell {
  background: var(--bg); padding: 40px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 240px;
}
.timeline .t-cell .y { font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; color: var(--olive); }
.timeline .t-cell h3 { font-family: var(--f-display); font-size: 28px; line-height: 1.1; }
.timeline .t-cell p { color: var(--fg-muted); font-size: 14px; }
@media (max-width: 800px) { .timeline { grid-template-columns: 1fr; } }

/* ============================================================
   Science page extras
   ============================================================ */
.benefits-stack {
  display: grid; grid-template-columns: 1fr;
}
.benefit-row {
  display: grid; grid-template-columns: 60px 1fr 1fr 100px;
  align-items: center; gap: clamp(20px, 3vw, 48px);
  padding: 36px 0;
  border-top: 1px solid var(--line);
  transition: background .4s var(--ease);
}
.benefit-row:last-child { border-bottom: 1px solid var(--line); }
.benefit-row:hover { background: var(--bg-alt); }
/* Dark-context hover: keep contrast when benefit-row sits on a navy section */
.navy-bg .benefit-row,
.science .benefit-row { border-color: rgba(255,255,255,.12); }
.navy-bg .benefit-row:hover,
.science .benefit-row:hover { background: var(--navy-soft); }
.benefit-row .num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--olive); }
.benefit-row h3 { font-family: var(--f-display); font-size: clamp(24px, 2.4vw, 38px); line-height: 1.05; }
.benefit-row p { color: var(--fg-muted); font-size: 14px; line-height: 1.5; }
.benefit-row .stat { font-family: var(--f-display); font-size: clamp(28px, 3vw, 42px); text-align: right; color: var(--olive); }
@media (max-width: 800px) {
  .benefit-row { grid-template-columns: 1fr; padding: 24px 0; }
  .benefit-row .stat { text-align: left; }
}

/* periodic mini-table */
.periodic {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px;
  margin-top: 40px;
}
.periodic .cell {
  aspect-ratio: 1; border: 1px solid var(--line);
  padding: 6px; font-family: var(--f-mono);
  display: flex; flex-direction: column;
  font-size: 9px; color: var(--fg-muted);
  transition: all .3s var(--ease);
  position: relative; overflow: hidden;
}
.periodic .cell .n { font-size: 8px; opacity: .6; }
.periodic .cell .s { font-family: var(--f-display); font-size: 18px; color: var(--ink); line-height: 1; }
.periodic .cell.mg {
  background: var(--olive); color: var(--bone); border-color: var(--olive);
  transform: scale(1.04); box-shadow: 0 8px 28px -8px rgba(77,93,42,.5);
  grid-column: span 2; grid-row: span 2;
  z-index: 2; padding: 14px;
}
.periodic .cell.mg .n { opacity: .9; }
.periodic .cell.mg .s { font-size: clamp(36px, 5vw, 72px); color: var(--bone); }
.periodic .cell.mg .name { font-family: var(--f-display); font-size: 16px; margin-top: auto; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { display: grid; grid-template-columns: 1fr; gap: 0; }
.faq details {
  padding: 28px 0; border-top: 1px solid var(--line);
  cursor: pointer;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq details summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-family: var(--f-display); font-size: clamp(20px, 2.2vw, 30px); line-height: 1.1;
}
.faq details summary::-webkit-details-marker { display: none; }
.faq details summary .plus { font-family: var(--f-mono); font-size: 24px; transition: transform .3s var(--ease); }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq details .answer {
  margin-top: 18px; max-width: 70ch;
  color: var(--fg-muted); font-size: 15px; line-height: 1.6;
}

/* ============================================================
   Tweaks panel — visible only when toolbar tweaks toggle on
   ============================================================ */
.tweaks-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  width: 320px; max-height: 80vh; overflow: auto;
  background: var(--bone);
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 24px 60px -20px rgba(20,24,14,.4);
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks-panel .close-x { font-size: 18px; }
.tweaks-panel .group { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.tweaks-panel .group:last-child { border-bottom: 0; }
.tweaks-panel .group-label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 10px; display: block;
}
.tweaks-panel .swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tweaks-panel .swatch {
  aspect-ratio: 1.4/1; border-radius: 4px; cursor: pointer;
  border: 1.5px solid transparent;
  position: relative; overflow: hidden;
  transition: transform .2s var(--ease);
}
.tweaks-panel .swatch:hover { transform: scale(1.05); }
.tweaks-panel .swatch.active { border-color: var(--ink); }
.tweaks-panel .swatch::after {
  content: attr(data-label); position: absolute;
  bottom: 4px; left: 6px; font-size: 8px; color: rgba(255,255,255,.9);
  font-family: var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
}
.tweaks-panel .seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.tweaks-panel .seg button {
  padding: 8px 6px; font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase;
  background: var(--bone);
  border-right: 1px solid var(--line);
}
.tweaks-panel .seg button:last-child { border-right: 0; }
.tweaks-panel .seg button.active { background: var(--ink); color: var(--bone); }

/* Palette variants */
body[data-palette="playful"] {
  --olive: #6e7e3a;
  --olive-deep: #535f2a;
  --olive-soft: #b4c181;
  --navy: #2a3556;
  --bone: #fff5e6;
  --bone-warm: #f5e9d2;
  --cream: #ffd9a6;
  --ink: #2a2218;
  --sage: #f4b860;
  --rust: #d97757;
}
body[data-palette="clinical"] {
  --olive: #2f7a5a;
  --olive-deep: #1f5b41;
  --olive-soft: #8fb89d;
  --navy: #0d2538;
  --bone: #f5f7f4;
  --bone-warm: #e8ece6;
  --cream: #d6dccf;
  --ink: #0c1a16;
  --sage: #a3c2a8;
  --rust: #b9603f;
}
body[data-palette="dusk"] {
  --olive: #c8b683;
  --olive-deep: #a0935f;
  --olive-soft: #ddd2a6;
  --navy: #1e2a3a;
  --bone: #1a1f28;
  --bone-warm: #232a36;
  --cream: #2d3441;
  --ink: #ebe6da;
  --sage: #c8b683;
  --rust: #d99068;
  --bg: var(--bone);
  --bg-alt: var(--bone-warm);
  --fg: var(--ink);
  --fg-muted: rgba(235,230,218,.65);
  --line: rgba(235,230,218,.12);
  --line-soft: rgba(235,230,218,.06);
}
body[data-palette="dusk"] .nav { background: rgba(26,31,40,.78); }
body[data-palette="dusk"] .nav.scrolled { background: rgba(26,31,40,.95); }
body[data-palette="dusk"] .btn-ghost { border-color: var(--ink); }

/* Font variants */
body[data-font="modern"] {
  --f-display: "Cormorant Garamond", "Cormorant", serif;
}
body[data-font="grotesk"] {
  --f-display: "Geist", "DM Sans", system-ui, sans-serif;
  --f-sans: "Geist", "DM Sans", sans-serif;
}

/* Density */
body[data-density="airy"] section { padding: clamp(120px, 16vw, 240px) 0; }
body[data-density="tight"] section { padding: clamp(60px, 8vw, 120px) 0; }

/* ============================================================
   Utilities
   ============================================================ */
.center { text-align: center; }
.muted { color: var(--fg-muted); }
.olive { color: var(--olive); }
.navy-bg { background: var(--navy); color: var(--bone); }
.ink-bg { background: var(--ink); color: var(--bone); }
.mt-l { margin-top: clamp(48px, 6vw, 96px); }
.mt-m { margin-top: clamp(24px, 3vw, 48px); }
.mt-s { margin-top: 16px; }
.flex { display: flex; }
.gap-s { gap: 8px; } .gap-m { gap: 16px; } .gap-l { gap: 32px; }
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

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

/* ============================================================
   Vibrant accent palette (additive — used by new hero decor)
   ============================================================ */
:root {
  --magenta: #ff3d8b;
  --magenta-soft: #ffb1cf;
  --lime: #c8ff5b;
  --lime-soft: #e6ff9d;
  --aqua: #5be0ff;
  --aqua-soft: #b8efff;
  --coral-hot: #ff4d2d;
  --violet: #8a4dff;
}

/* ----- Uploaded product image (replaces CSS pouch when set) ----- */
.product-card .visual .uploaded-img,
.hero-product .uploaded-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 3;
}

/* ----- Product editor (image upload + Amazon/Flipkart URLs) ----- */
.editor-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  background: var(--ink); color: var(--bone);
  padding: 12px 18px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  box-shadow: 0 14px 32px -10px rgba(22,54,90,.4), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.editor-toggle:hover { transform: translateY(-2px); background: var(--ink-deep); }
.editor-toggle .gear { font-size: 14px; line-height: 1; }

.editor-panel {
  position: fixed; right: 20px; bottom: 76px; z-index: 75;
  width: 380px; max-width: calc(100vw - 40px);
  max-height: 78vh; overflow: auto;
  background: var(--bone); color: var(--fg);
  border: 1px solid var(--ink);
  border-radius: 14px;
  padding: 22px;
  display: none;
  box-shadow: 0 30px 70px -24px rgba(22,54,90,.45);
}
.editor-panel.open { display: block; }
.editor-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.editor-head h4 {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 600;
}
.editor-close {
  font-size: 22px; line-height: 1; padding: 0 4px;
  color: var(--fg-muted);
}
.editor-close:hover { color: var(--ink); }
.editor-hint {
  font-size: 12px; line-height: 1.5; color: var(--fg-muted); margin-bottom: 4px;
}
.editor-product { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.editor-product:first-of-type { border-top: 0; padding-top: 8px; }
.editor-pname {
  font-family: var(--f-display); font-weight: 700;
  font-size: 18px; letter-spacing: -0.02em; line-height: 1;
  margin-bottom: 12px;
}
.editor-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.editor-field span {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--fg-muted);
}
.editor-field input {
  font: inherit; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--fg);
  font-size: 13px; outline: 0;
  transition: border-color .2s var(--ease);
}
.editor-field input:focus { border-color: var(--ink); }
.editor-field input[type=file] { padding: 6px; font-size: 12px; cursor: pointer; }
.editor-thumb {
  width: 100%; height: 60px; margin-top: 6px;
  background: var(--bg-alt) center / cover no-repeat;
  border-radius: 4px; display: none;
}
.editor-thumb.show { display: block; }
.editor-actions {
  display: flex; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--line); margin-top: 8px;
}
.editor-actions button {
  flex: 1; padding: 11px 12px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; cursor: pointer;
  transition: all .25s var(--ease);
}
.editor-reset { background: transparent; border: 1px solid var(--line); color: var(--fg); }
.editor-reset:hover { border-color: var(--ink); }
.editor-export { background: var(--ink); color: var(--bone); border: 0; }
.editor-export:hover { background: var(--ink-deep); }
.editor-export-out {
  width: 100%; min-height: 110px; margin-top: 12px;
  border: 1px solid var(--line); border-radius: 6px; padding: 10px;
  font-family: var(--f-mono); font-size: 11px; line-height: 1.5;
  background: var(--bg); color: var(--fg-muted);
  resize: vertical; display: none;
}
.editor-export-out.show { display: block; }

/* ----- Inline content edit mode ----- */
.editor-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--fg-muted); line-height: 1.5;
  cursor: pointer;
}
.editor-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--ink);
}
body.is-editing [data-edit] {
  outline: 1px dashed rgba(52, 77, 181, 0.55);
  outline-offset: 6px;
  cursor: text;
  border-radius: 2px;
  transition: outline-color .2s var(--ease), background .2s var(--ease);
}
body.is-editing [data-edit]:hover {
  outline-color: var(--ink);
  background: rgba(52, 77, 181, 0.06);
}
body.is-editing [data-edit]:focus {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
  background: rgba(52, 77, 181, 0.08);
}

/* ----- Hero · giant chemical formula watermark (quiet) ----- */
.formula-watermark {
  position: absolute;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(140px, 22vw, 360px);
  letter-spacing: -0.04em; line-height: 1;
  color: rgba(13, 19, 64, 0.035);
  pointer-events: none; z-index: 0;
  white-space: nowrap;
}
.formula-watermark sub {
  font-size: 0.55em; line-height: 1;
  color: rgba(13, 19, 64, 0.03);
  vertical-align: baseline;
}

/* ----- Hero · chemical formula chips ----- */
.formula-chips {
  display: inline-flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.formula-chip {
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .06em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(30,43,111,0.06);
  color: var(--ink);
  border: 1px solid rgba(30,43,111,0.16);
  display: inline-flex; align-items: center; gap: 6px;
}
.formula-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--olive);
}
.formula-chip.alt { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.formula-chip.alt .dot { background: var(--butter); }

/* ----- Hero · video tile ----- */
.hero-video {
  position: absolute;
  top: 6%; right: -2%;
  width: 184px; height: 184px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 6;
  border: 3px solid var(--bone);
  box-shadow:
    0 20px 50px -16px rgba(20,24,80,.45),
    inset 0 0 0 1px rgba(255,255,255,.18);
  background: linear-gradient(160deg, var(--ink-mid) 0%, var(--ink) 60%, var(--ink-deep) 100%);
}
.hero-video video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hero-video .hv-poster {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background: linear-gradient(160deg, var(--ink-mid) 0%, var(--ink) 60%, var(--ink-deep) 100%);
}
.hero-video.has-src .hv-poster { display: none; }
.hero-video .hv-label {
  position: absolute; bottom: 12px; left: 0; right: 0;
  text-align: center;
  font-family: var(--f-mono); font-size: 8px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--bone);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  pointer-events: none;
}
.hero-video .hv-ripple,
.hero-video .hv-ripple::before,
.hero-video .hv-ripple::after {
  position: absolute;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  animation: hv-ripple 3s ease-out infinite;
}
.hero-video .hv-ripple {
  width: 30%; height: 30%;
  top: 35%; left: 35%;
}
.hero-video .hv-ripple::before {
  content: ""; inset: -8px;
  animation-delay: .9s;
}
.hero-video .hv-ripple::after {
  content: ""; inset: -16px;
  animation-delay: 1.8s;
}
@keyframes hv-ripple {
  0% { transform: scale(.6); opacity: .9; }
  100% { transform: scale(2.4); opacity: 0; }
}
.hero-video .hv-mg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 800;
  font-size: 48px; color: var(--bone);
  letter-spacing: -0.04em;
  text-shadow: 0 4px 16px rgba(0,0,0,.4);
  animation: hv-pulse 3s ease-in-out infinite;
}
.hero-video .hv-mg sup {
  font-size: 18px; vertical-align: super; font-weight: 600;
  color: var(--olive-soft);
}
@keyframes hv-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.hero-video .hv-bubbles span {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.5);
  bottom: -10px;
  animation: hv-bubble 5s ease-in infinite;
}
.hero-video .hv-bubbles span:nth-child(1) { left: 18%; animation-delay: 0s; }
.hero-video .hv-bubbles span:nth-child(2) { left: 38%; animation-delay: 1s; width: 4px; height: 4px; }
.hero-video .hv-bubbles span:nth-child(3) { left: 58%; animation-delay: 2s; }
.hero-video .hv-bubbles span:nth-child(4) { left: 78%; animation-delay: 3s; width: 5px; height: 5px; }
.hero-video .hv-bubbles span:nth-child(5) { left: 28%; animation-delay: 1.5s; width: 3px; height: 3px; }
@keyframes hv-bubble {
  0%   { transform: translateY(0)   scale(.5); opacity: 0; }
  20%  { opacity: .9; }
  100% { transform: translateY(-220px) scale(1.4); opacity: 0; }
}

@media (max-width: 900px) {
  .hero-video { width: 132px; height: 132px; top: 0; right: 4%; }
  .hero-video .hv-mg { font-size: 36px; }
}

/* ----- Hero · bottom wave divider ----- */
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; height: 70px;
  pointer-events: none;
  z-index: 3;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 100%; display: block; }
.hero-wave path { fill: var(--bone-warm); }

/* ----- Hero · sparkles (subtle, restrained) ----- */
.sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sparkles span {
  position: absolute; width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-shine);
  box-shadow: 0 0 8px rgba(52,77,181,0.5);
  filter: blur(.3px);
  animation: twinkle 4.5s ease-in-out infinite;
}
.sparkles span:nth-child(odd) { background: var(--butter); box-shadow: 0 0 8px rgba(255,111,60,0.4); }
.sparkles span:nth-child(2) { animation-delay: .6s; }
.sparkles span:nth-child(3) { animation-delay: 1.2s; }
.sparkles span:nth-child(4) { animation-delay: 1.8s; }
.sparkles span:nth-child(5) { animation-delay: 2.4s; }
.sparkles span:nth-child(6) { animation-delay: 3s; }
.sparkles span:nth-child(7) { animation-delay: 3.6s; }
.sparkles span:nth-child(8) { animation-delay: 4.2s; }
@keyframes twinkle {
  0%, 100% { transform: scale(.4); opacity: 0; }
  50%      { transform: scale(1.1); opacity: 0.65; }
}

/* ============================================================
   Mobile / Tablet / Touch optimizations
   ============================================================ */

/* iOS / touch niceties — apply universally */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
body {
  -webkit-tap-highlight-color: rgba(20,26,82,0.12);
  text-rendering: optimizeLegibility;
}
input, textarea, select, button {
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px;  /* prevent iOS zoom on focus */
}
.footer-newsletter input { font-size: 16px; }
.editor-field input { font-size: 16px; }
a, button { -webkit-touch-callout: none; }

/* Minimum touch target sizes (44×44 WCAG-recommended) */
@media (hover: none) and (pointer: coarse) {
  .nav-cart, .btn, .buy-btn, .footer-buy, .social-icon,
  .nav-menu-btn, .editor-toggle { min-height: 44px; }
}

/* ----- Tablet (iPad portrait ~768px) and below ----- */
@media (max-width: 900px) {
  /* Hero: stack columns, sensible heights */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 100px 0 56px;
    gap: 32px;
  }
  .hero-text { padding: 0 var(--gutter); }
  .hero h1 { font-size: clamp(44px, 9.5vw, 88px); margin-bottom: 22px; }
  .hero-sub { font-size: 15.5px; margin-bottom: 28px; max-width: 100%; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { padding: 14px 22px; font-size: 11px; }
  .hero-stats { gap: 24px; margin-top: 36px; }
  .hero-stat { min-width: 42%; }
  .hero-stat .n { font-size: clamp(24px, 6vw, 36px); }
  .formula-chips { gap: 6px; margin-bottom: 20px; }
  .formula-chip { font-size: 10px; padding: 5px 10px; }

  /* Hero visual: smaller pouch, move video tile to top corner away from pouch */
  .hero-visual {
    min-height: 420px;
    padding: 0 var(--gutter);
  }
  .hero-product {
    width: 64%; max-width: 320px;
    transform: rotate(-1deg);
  }
  .hero-product::before { font-size: 200px; }
  .hero-product .periodic-corner { bottom: 14px; left: 14px; font-size: 8px; }
  .hero-product .periodic-corner strong { font-size: 22px; }
  .hero-product .formula-strip { bottom: 14px; right: 14px; font-size: 10px; padding: 5px 8px; }

  /* Video tile: smaller and clearly offset from pouch */
  .hero-video {
    width: 110px; height: 110px;
    top: 4%; right: 6%;
    border-width: 2px;
  }
  .hero-video .hv-mg { font-size: 30px; }
  .hero-video .hv-mg sup { font-size: 12px; }
  .hero-video .hv-label { font-size: 7px; bottom: 8px; }

  /* Watermark: less dominant on mobile */
  .formula-watermark { font-size: clamp(96px, 30vw, 200px); opacity: .8; }

  /* Section heads stack already; reduce h2 size */
  .section-head h2 { font-size: clamp(30px, 7vw, 56px); }
  .section-head { margin-bottom: 28px; }

  /* Manifesto */
  .manifesto blockquote { font-size: clamp(32px, 8vw, 60px); }
  .manifesto cite { margin-top: 24px; font-size: 10px; }

  /* Rituals */
  .rituals .ritual { padding: 28px 0; gap: 24px; }
  .rituals .ritual-text .num { font-size: clamp(64px, 16vw, 120px); }
  .rituals .ritual-text h3 { font-size: clamp(26px, 6vw, 40px); }
  .rituals .ritual-visual { aspect-ratio: 5/3; }

  /* Story visual */
  .story-visual {
    padding: 32px 26px;
    aspect-ratio: 4/4.5;
  }
  .story-visual .story-words .line { font-size: clamp(36px, 10vw, 56px); }
  .story-visual .story-atom { top: 16%; left: 18%; width: 26%; }
  .story-visual .story-atom .atom-nucleus .sym { font-size: 22px; }
  .story-visual .story-atom .atom-nucleus .mass { font-size: 7px; }
  .story-visual .story-spec li { font-size: 9px; letter-spacing: .14em; }
  .story-visual .story-spec .k { min-width: 76px; }
  .story-visual .story-tag { top: 16px; right: 16px; font-size: 8px; padding: 5px 8px; }

  /* Product cards: bigger touch targets, full-width buys */
  .product-card .pouch { width: 58%; }
  .product-card .info-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .product-card .info .name { font-size: clamp(24px, 6vw, 34px); }
  .buy-btn { padding: 13px 18px; font-size: 11px; }
  .buy-btn .brand-mark { height: 15px; }

  /* Footer */
  .footer { padding: 48px 0 24px; }
  .footer-legal { padding: 16px 18px; font-size: 11px; line-height: 1.55; }
  .footer-newsletter h3 { font-size: 22px; }
  .footer-newsletter p { font-size: 12.5px; }
  .footer-col h4 { margin-bottom: 10px; }
  .footer-buys { gap: 6px; }
  .footer-buy { padding: 6px 12px; }

  /* Editor toggle: collapse to icon-only circle */
  .editor-toggle {
    width: 44px; height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    bottom: 14px; right: 14px;
  }
  .editor-toggle span:not(.gear) { display: none; }
  .editor-toggle .gear { font-size: 18px; }

  /* Editor panel: bottom sheet style */
  .editor-panel {
    bottom: 70px;
    right: 14px; left: 14px;
    width: auto;
    max-height: 70vh;
  }
}

/* ----- Small phones (≤480) ----- */
@media (max-width: 480px) {
  :root { --gutter: 18px; }
  .hero { padding: 92px 0 40px; }
  .hero h1 { font-size: clamp(40px, 11vw, 64px); }
  .hero-visual { min-height: 340px; }
  .hero-product { width: 78%; max-width: 280px; }
  .hero-product .label { top: 12%; left: 10%; right: 10%; padding: 16px 14px; }
  .hero-product .label .brand-mark { font-size: 16px; }
  .hero-product .label h4 { font-size: 18px; }
  .hero-video { width: 86px; height: 86px; top: 0; right: 4%; border-width: 2px; }
  .hero-video .hv-mg { font-size: 22px; }
  .hero-video .hv-mg sup { font-size: 10px; }
  .hero-video .hv-label { display: none; }
  .hero-stats { gap: 18px; margin-top: 28px; }
  .hero-stat .n { font-size: clamp(22px, 7vw, 30px); }
  .hero-stat .l { font-size: 9px; }
  .formula-watermark { display: none; }
  .sparkles span:nth-child(n+5) { display: none; }

  .section-head h2 { font-size: clamp(26px, 8vw, 42px); }
  .manifesto blockquote { font-size: clamp(28px, 9vw, 48px); }
  .ticker-track { font-size: 10px; gap: 36px; }
  .ticker-item { gap: 36px; }

  /* Story visual: hide animated atom on tiny screens to keep focus on text */
  .story-visual .story-atom { display: none; }
  .story-visual .story-rings span:nth-child(n+4) { display: none; }
  .story-visual { aspect-ratio: 5/6; padding: 28px 22px; }

  /* Product cards */
  .product-card .pouch { width: 70%; }
  .product-card .pouch .pouch-label { top: 16%; left: 12%; right: 12%; padding: 16px 14px; }
  .product-card .pouch .pouch-label .name { font-size: 19px; }
  .product-card .pouch .pouch-label .formula { font-size: 11px; }
  .buy-row { width: 100%; }
  .buy-btn { flex: 1; justify-content: center; }

  /* Footer: tighter */
  .footer-newsletter input, .footer-newsletter button { font-size: 14px; }
  .footer-legal { padding: 14px 16px; font-size: 10.5px; }
  .footer-fine { font-size: 9px; gap: 8px; }
  .footer-social { padding: 16px 0 12px; margin-top: 22px; }

  /* Editor toggle */
  .editor-toggle { width: 42px; height: 42px; bottom: 12px; right: 12px; }
}

/* ----- Tablet landscape / desktop split (iPad landscape ~1024) ----- */
@media (min-width: 901px) and (max-width: 1100px) {
  .hero h1 { font-size: clamp(56px, 8vw, 100px); }
  .hero-product { width: 70%; }
  .hero-video { width: 144px; height: 144px; }
  .section-head h2 { font-size: clamp(34px, 5.6vw, 68px); }
}

/* ----- Landscape orientation tweaks (short viewports) ----- */
@media (max-height: 600px) and (orientation: landscape) {
  .hero { min-height: auto; padding-top: 90px; padding-bottom: 40px; }
  .hero-visual { min-height: 320px; }
}

/* Prevent horizontal scrollbar from any decorative overflow */
html, body { overflow-x: hidden; }

