/* Emotional Support Rock
   One light theme on the packaging's sand ground. Tokens come straight from the brand brief. */

:root {
  /* color */
  --sand: #EFE9DF;
  --paper: #F8F5EF;
  --ink: #2F3336;
  --ink-muted: #5E5A55;
  --stone: #8C867E;   /* fills only, never text */
  --moss: #56664A;
  --blush: #E7B7A3;
  --river: #A9BDBF;
  --hairline: #D6CEC1;

  /* type */
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;

  /* shape */
  --r-sm: 6px;
  --r-md: 16px;
  --r-pill: 999px;

  /* space */
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px;
  --section: clamp(64px, 10vw, 128px);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--moss); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: var(--r-sm); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s3); top: -64px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: var(--s2) var(--s3);
  border-radius: var(--r-md); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: var(--s3); color: var(--paper); }

/* ---------- type scale ---------- */
.display {
  font: 500 clamp(44px, 9vw, 64px)/1 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.headline {
  font: 500 clamp(30px, 5vw, 36px)/1.12 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.title { font: 500 22px/28px var(--serif); }
.lede { font: 400 clamp(18px, 2.2vw, 22px)/1.4 var(--serif); color: var(--ink); text-wrap: pretty; }
.label {
  font: 600 12px/16px var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.fine { font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.prose { max-width: 60ch; }
.prose > * + * { margin-top: var(--s3); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.section--paper { background: var(--paper); }
.section--paper + .section, .section + .section--paper { padding-top: var(--section); }
.stack > * + * { margin-top: var(--s4); }
.center { text-align: center; }
.center .prose { margin-inline: auto; }
.split {
  display: grid; gap: var(--s6); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-right { grid-template-columns: 5fr 7fr; }
}

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3) var(--s4); flex-wrap: wrap;
  padding-block: var(--s3);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font: 500 20px/1 var(--serif); letter-spacing: -0.01em;
}
.brand svg { width: 40px; height: 30px; flex: none; }
.brand:hover { color: var(--ink); }
.nav ul { list-style: none; padding: 0; display: flex; gap: var(--s1) var(--s3); flex-wrap: wrap; }
.nav a {
  display: inline-block; padding: 10px var(--s2);
  font: 600 12px/16px var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-radius: var(--r-sm);
}
.nav a:hover { color: var(--moss); }
.nav a[aria-current="page"] { color: var(--moss); box-shadow: inset 0 -2px 0 var(--moss); border-radius: 0; }
@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .nav ul { margin-left: calc(var(--s2) * -1); }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding-block: var(--s6); margin-top: var(--section); }
.site-footer .wrap { display: grid; gap: var(--s5); }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer .tagline { font: 500 28px/1.1 var(--serif); display: flex; align-items: center; gap: var(--s3); }
.site-footer .tagline svg { width: 48px; height: 36px; color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.site-footer ul a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer ul a:hover { color: var(--moss); text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--hairline); padding-top: var(--s4); display: grid; gap: var(--s1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s4);
  border-radius: var(--r-md); border: 1px solid var(--moss);
  background: var(--moss); color: var(--paper);
  font: 600 15px/1 var(--sans); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: #4A5940; color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--moss); }
.btn--ghost:hover { background: var(--moss); color: var(--paper); }
.chip {
  font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  padding: 0 var(--s3); min-height: 40px; cursor: pointer;
}
.chip:hover { border-color: var(--ink-muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* ---------- cards, pills ---------- */
.card {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: var(--s4);
}
.tag {
  display: inline-block; padding: 4px 10px; border-radius: var(--r-sm);
  background: var(--sand); border: 1px solid var(--hairline);
  font: 600 12px/16px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted);
}
.seal {
  display: inline-grid; place-items: center; text-align: center;
  width: 96px; aspect-ratio: 1; border-radius: var(--r-pill);
  background: var(--moss); color: var(--paper);
  font: 600 11px/14px var(--sans); letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- 3D stage ---------- */
.stage {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--sand);
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s var(--ease); }
.stage.is-ready canvas { opacity: 1; }
.stage .poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .8s var(--ease);
}
.stage.is-ready .poster { opacity: 0; pointer-events: none; }
.stage[data-interactive] { touch-action: pan-y; cursor: grab; }
.stage[data-interactive]:active { cursor: grabbing; }
.stage-hint { margin-top: var(--s3); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.stage-hint p { font-size: 14px; color: var(--ink-muted); }
.text-btn {
  background: none; border: 0; padding: var(--s2) 0; cursor: pointer;
  font: 600 12px/16px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--moss);
  text-decoration: underline; text-underline-offset: 3px;
}
.text-btn:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(32px, 6vw, 72px) var(--section); overflow: hidden; }
.hero .split { gap: var(--s5); }
.hero-copy > * + * { margin-top: var(--s4); }
.hero-copy .display { max-width: 9ch; }
.hero-copy .lede { max-width: 26ch; }
.hero .stage { aspect-ratio: 1 / 1; background: transparent; }
@media (min-width: 880px) {
  .hero .split { grid-template-columns: 5fr 7fr; }
  .hero .stage { aspect-ratio: 6 / 5; }
}

/* ---------- manifesto / pillars ---------- */
.pillars { display: grid; gap: var(--s4); grid-template-columns: 1fr; margin-top: var(--s6); }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { border-top: 2px solid var(--ink); padding-top: var(--s3); }
.pillar h3 { font: 500 28px/1.1 var(--serif); margin-top: var(--s2); }
.pillar p { margin-top: var(--s2); color: var(--ink-muted); }

/* ---------- Support Facts label ---------- */
.facts {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-sm);
  padding: 10px 14px 12px; max-width: 380px; width: 100%;
  font-family: var(--sans); color: var(--ink);
  box-shadow: 0 1px 0 var(--hairline), 0 24px 48px -32px rgba(47, 51, 54, .35);
}
.facts h3 { font: 600 36px/1 var(--sans); letter-spacing: -0.02em; }
.facts .rule { height: 1px; background: var(--ink); transform-origin: left; }
.facts .rule--thick { height: 8px; }
.facts .rule--med { height: 4px; }
.facts .serving { font-size: 15px; line-height: 20px; padding: 4px 0 6px; }
.facts .serving strong { font-weight: 600; }
.facts .head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; padding: 4px 0; }
.facts dl { margin: 0; }
.facts .row { display: flex; justify-content: space-between; gap: var(--s3); padding: 5px 0; border-top: 1px solid var(--ink); font-size: 15px; line-height: 20px; }
.facts .row:first-child { border-top: 0; }
.facts dt { font-weight: 600; }
.facts dt span { font-weight: 400; margin-left: 6px; }
.facts .row--sub dt { font-weight: 400; padding-left: var(--s4); }
.facts dd { font-weight: 600; white-space: nowrap; }
.facts .totals { font-size: 14px; padding: 6px 0; display: flex; flex-wrap: wrap; gap: 0 10px; }
.facts .foot { font-size: 12px; line-height: 16px; padding-top: 6px; border-top: 1px solid var(--ink); }

/* ---------- How it works (scroll-linked box) ---------- */
.steps-scroll { position: relative; }
.steps-scroll .track { display: grid; gap: var(--s5); }
.steps-scroll .sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: center; }
.steps-scroll .stage { aspect-ratio: auto; height: min(78svh, 680px); background: transparent; }
.step-list { list-style: none; padding: 0; counter-reset: step; }
.step {
  min-height: 80svh; display: flex; flex-direction: column; justify-content: center;
  opacity: .35; transition: opacity .5s var(--ease);
}
.step.is-active { opacity: 1; }
.step .num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill);
  border: 1px solid var(--ink); font: 500 18px/1 var(--serif);
}
.step.is-active .num { background: var(--moss); border-color: var(--moss); color: var(--paper); }
.step h3 { font: 500 clamp(28px, 4vw, 40px)/1.1 var(--serif); margin-top: var(--s3); }
.step p { margin-top: var(--s3); max-width: 36ch; font-size: 18px; line-height: 28px; color: var(--ink-muted); }
.step img { display: none; }
@media (min-width: 880px) {
  .steps-scroll .track { grid-template-columns: 7fr 5fr; gap: var(--s6); }
  .step:first-child { margin-top: 10svh; }
  .step:last-child { margin-bottom: 10svh; }
}
@media (max-width: 879px) {
  .steps-scroll .sticky { height: 52svh; top: 0; z-index: 1; background: linear-gradient(var(--paper) 88%, rgba(248, 245, 239, 0)); }
  .steps-scroll .stage { height: 48svh; }
  .step { min-height: 60svh; justify-content: flex-start; padding-top: var(--s4); }
}
/* static version: no WebGL or reduced motion. Each step shows its own still. */
.steps-scroll.is-static .sticky { display: none; }
.steps-scroll.is-static .track { grid-template-columns: 1fr; }
.steps-scroll.is-static .step-list { display: grid; gap: var(--s5); }
@media (min-width: 880px) { .steps-scroll.is-static .step-list { grid-template-columns: repeat(3, 1fr); } }
.steps-scroll.is-static .step { min-height: 0; opacity: 1; margin: 0; justify-content: flex-start; padding: 0; }
.steps-scroll.is-static .step img { display: block; border-radius: var(--r-md); margin-bottom: var(--s4); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- Meet The Original ---------- */
.feature { position: relative; }
.feature-media { position: relative; }
.feature-media .backdrop {
  position: absolute; inset: 12% 4% 4% 4%; border-radius: var(--r-md); background: var(--river); opacity: .55;
}
.feature-media img { position: relative; width: 100%; will-change: transform; }

/* ---------- reviews ---------- */
.reviews-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.marquee { margin-top: var(--s5); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: var(--s4); width: max-content; animation: drift 60s linear infinite; }
.marquee.is-paused .marquee-track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(calc(-50% - var(--s4) / 2)); } }
.review {
  width: min(78vw, 340px); flex: none;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: var(--s4); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s4);
}
.review blockquote { margin: 0; font: 400 22px/28px var(--serif); text-wrap: pretty; }
.stars { display: flex; gap: 4px; color: var(--moss); }
.stars svg { width: 16px; height: 16px; }

/* ---------- product page ---------- */
.viewer-controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; margin-top: var(--s3); }
.viewer-controls .views { display: flex; flex-wrap: wrap; gap: var(--s2); }
.viewer-controls .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.viewer-note { margin-top: var(--s4); font: 400 20px/1.4 var(--serif); max-width: 52ch; min-height: 2.8em; }
@media (max-width: 560px) {
  .viewer-controls { flex-direction: column; align-items: stretch; }
  .viewer-controls .actions .btn { flex: 1; }
}
.product-stage { aspect-ratio: 16 / 10; }
@media (max-width: 560px) { .product-stage { aspect-ratio: 1 / 1; } }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: var(--s3) 0; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: 32px 1fr; gap: var(--s3); align-items: start; }
.check-list li:last-child { border-bottom: 1px solid var(--hairline); }
.check-list svg { width: 28px; height: 21px; color: var(--stone); margin-top: 2px; }
.gallery { display: grid; gap: var(--s3); grid-template-columns: repeat(2, 1fr); margin-top: var(--s5); }
@media (min-width: 880px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { background: var(--paper); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--hairline); }
.gallery img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; transition: transform 1.2s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { padding: var(--s2) var(--s3) var(--s3); }

/* ---------- lineup ---------- */
.lineup { display: grid; gap: var(--s4); grid-template-columns: 1fr; margin-top: var(--s6); }
@media (min-width: 760px) { .lineup { grid-template-columns: repeat(3, 1fr); } }
.rock-card { display: flex; flex-direction: column; gap: var(--s3); }
.rock-card .art {
  aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--sand);
  display: grid; place-items: center; overflow: hidden;
}
.rock-card .art svg { width: 45%; }
.rock-card .tag { align-self: flex-start; }
.rock-card p.soon { font: 400 18px/1.35 var(--serif); color: var(--ink-muted); }
.rock-card--feature { display: grid; gap: var(--s5); padding: var(--s4); }
@media (min-width: 880px) { .rock-card--feature { grid-template-columns: 7fr 5fr; align-items: center; padding: var(--s5); } }
.rock-card--feature .media { border-radius: var(--r-md); overflow: hidden; background: var(--sand); }
.rock-card--feature .stack { max-width: 44ch; }

/* ---------- video ---------- */
.video { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--sand); }
.video video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.video-toggle {
  position: absolute; right: var(--s3); bottom: var(--s3);
  min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-pill);
  border: 1px solid var(--hairline); background: rgba(248, 245, 239, .92); color: var(--ink);
  font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.video-toggle:hover { background: var(--paper); border-color: var(--ink-muted); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; padding: var(--s4) 0;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  font: 500 22px/28px var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--moss); border-bottom: 2px solid var(--moss);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .4s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details > div { padding-bottom: var(--s4); max-width: 60ch; color: var(--ink-muted); font-size: 18px; line-height: 28px; }
.care-grid { display: grid; gap: var(--s3); grid-template-columns: 1fr; margin-top: var(--s5); }
@media (min-width: 640px) { .care-grid { grid-template-columns: repeat(2, 1fr); } }
.care-grid .card p { font: 400 20px/1.35 var(--serif); }
.care-grid .card .label { display: block; margin-bottom: var(--s2); }
.callout {
  background: var(--moss); color: var(--paper); border-radius: var(--r-md);
  padding: var(--s5); display: grid; gap: var(--s3);
}
.callout .label { color: var(--paper); }
.callout p { font: 400 22px/1.35 var(--serif); max-width: 46ch; }

/* ---------- closing prompt ---------- */
.closing { text-align: center; }
.closing .mark { width: 120px; margin: 0 auto var(--s5); }
.closing .mark svg { animation: breathe 6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes breathe { 50% { transform: scale(1.035, .97); } }

/* ---------- page intro ---------- */
.page-intro { padding-block: clamp(48px, 8vw, 96px) var(--s6); }
.page-intro > * + * { margin-top: var(--s4); }
.page-intro .display { max-width: 14ch; }

/* ---------- motion: gentle reveals, only when JS runs and motion is welcome ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .facts .rule { transform: scaleX(0); transition: transform .9s var(--ease); }
.js .facts.is-in .rule { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .facts .rule { transform: none; }
  .marquee { mask-image: none; }
  .marquee-track { width: auto; flex-wrap: wrap; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .review { width: 100%; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 760px) {
  .marquee-track { display: grid; grid-template-columns: repeat(2, 1fr); }
}
