/* ===========================================================================
   Gram Dose — landing (warm editorial theme)
   Cream paper canvas, terracotta accent, Fraunces serif display over a
   Schibsted Grotesk body and Spline Sans Mono data labels. Restrained and
   premium — the brand layer. Same markup + JS as before; this is a re-skin.
   =========================================================================== */

:root {
  --bg: #f4efe6;          /* warm paper canvas */
  --surface: #ece3d5;     /* deeper cream band */
  --card: #fbf8f2;        /* near-white card */
  --ink: #241e17;
  --muted: #6f665a;
  --faint: #9a8f80;
  --line: #e2d8c8;
  --line-strong: #cdbfa9;
  --accent: #c9603d;      /* terracotta */
  --accent-deep: #a84e30;
  --sage: #7c8262;
  --danger: #b3402a;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: min(100% - 2.5rem, 38rem);
  margin-inline: auto;
}
.wrap.wide { width: min(100% - 2.5rem, 54rem); }

::selection { background: var(--accent); color: #fff; }

/* ---------- display type ---------- */
h1, h2, .statement, .tile-line {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 460;
  letter-spacing: -0.012em;
}

/* ---------- header ---------- */
header {
  padding: 1.3rem 0;
}
header .wrap {
  width: min(100% - 2.5rem, 54rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
}
.wordmark img {
  height: 1.25rem;
  width: auto;
  display: block;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}
.header-right small {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 33rem) { .header-right small { display: none; } }
.nav-reserve {
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out);
}
.nav-reserve:hover { background: var(--accent); transform: translateY(-1px); }
.nav-reserve:active { transform: translateY(0); }
.nav-reserve:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nav-reserve[disabled] { opacity: 0.6; cursor: default; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(3.25rem, 11vh, 6.5rem) 0 clamp(3rem, 8vh, 5rem);
  background: linear-gradient(180deg, var(--surface), var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.hero-eyebrow b { color: var(--accent-deep); font-weight: 600; }
.hero-shot { display: flex; flex-direction: column; align-items: center; }
.hero-shot img {
  width: 100%;
  height: auto;
  max-height: min(60vh, 30rem);
  object-fit: contain;
  display: block;
  border-radius: 16px;
}
.hero-shot figcaption {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  text-align: center;
  max-width: 26rem;
}
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .hero-shot figcaption { text-align: left; align-self: flex-start; }
}

h1 {
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 .line { display: block; }
h1 .line:last-child { color: var(--accent-deep); font-style: italic; }
.hero p {
  margin-top: 1.5rem;
  max-width: 32rem;
  font-size: clamp(1.0625rem, 2.5vw, 1.1875rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- trust bar ---------- */
.trustbar {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
  background: var(--bg);
}
.trustbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.6rem;
}
.trustbar span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (min-width: 52rem) {
  .trustbar .wrap { justify-content: space-between; }
}

/* ---------- form ---------- */
.capture { margin-top: 2.25rem; max-width: 26rem; }
.capture.mt-lg { margin-top: 1.75rem; }
.capture .row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.capture label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.capture input[type="email"] {
  font: inherit;
  padding: 0.85rem 1.05rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  width: 100%;
}
.capture input[type="email"]::placeholder { color: var(--faint); }
.capture input[type="email"]:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 1px;
  border-color: transparent;
}
.capture.bad input[type="email"] { border-color: var(--danger); }
.capture button {
  font: inherit;
  font-weight: 600;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.capture button:hover { background: var(--accent-deep); transform: translateY(-1px); }
.capture button:active { transform: translateY(0); }
.capture button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.capture button[disabled] { opacity: 0.6; cursor: default; transform: none; }
.capture .note {
  margin-top: 0.8rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.capture .note.tight { margin: 0 0 0.8rem; }
.capture .note strong { color: var(--ink); }
.capture .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.capture .ok {
  display: none;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--sage);
  border-radius: 14px;
  background: var(--card);
  font-weight: 400;
  color: var(--ink);
}
.capture .ok strong { display: block; margin-bottom: 0.15rem; }
.capture.done .row, .capture.done .note { display: none; }
.capture.done .ok { display: block; }
.capture .err {
  display: none;
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--danger);
}
.capture.bad .err { display: block; }

@media (min-width: 30rem) {
  .capture .row { flex-direction: row; }
  .capture input[type="email"] { flex: 1; }
  .capture button { flex-shrink: 0; }
}

/* ---------- deposit CTA (primary reserve action) ---------- */
.cta { margin-top: 2.25rem; max-width: 26rem; }
.deposit {
  font: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  width: 100%;
  padding: 1.02rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px -16px var(--accent-deep);
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.deposit:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 16px 32px -16px var(--accent-deep); }
.deposit:active { transform: translateY(0); }
.deposit:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.deposit[disabled] { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.deposit-note {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
.deposit-note strong { color: var(--ink); font-weight: 600; }
.deposit-err {
  display: none;
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--danger);
}
.cta.bad .deposit-err { display: block; }

/* email fallback — quieter ghost button beneath the deposit */
.capture.soft { margin-top: 1.5rem; }
.capture.soft button[type="submit"] {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
}
.capture.soft button[type="submit"]:hover { background: var(--card); border-color: var(--ink); }

/* ---------- reservation confirmation banner ---------- */
.reserved-banner {
  background: var(--sage);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.85rem 0;
  text-align: center;
}
.reserved-banner strong { color: #fff; font-weight: 700; }

/* ---------- dose comparison bars ---------- */
.doses {
  padding: clamp(2.75rem, 9vh, 5rem) 0;
  border-top: 1px solid var(--line);
}
.dosebars { margin-top: 2rem; }
.dosebar {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 1.6rem;
  background: var(--card);
}
.db-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.db-name { font-weight: 700; letter-spacing: -0.01em; }
.db-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: right;
}
.db-row {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  align-items: center;
  gap: 0.9rem;
}
.db-row + .db-row { margin-top: 0.75rem; }
.db-label { font-size: 0.875rem; color: var(--muted); }
.db-track {
  height: 1.15rem;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
}
.db-fill {
  height: 100%;
  width: var(--w);
  border-radius: 999px;
}
.db-them { background: var(--line-strong); }
.db-us { background: var(--accent); }
.db-val {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.db-val-us { color: var(--accent-deep); }
.db-note { margin-top: 1rem; }

/* fills grow from zero when the block scrolls into view */
.js .db-fill { transition: width 0.95s var(--ease-out); }
.js .dosebars.pre .db-fill { width: 0; }
@media (prefers-reduced-motion: reduce) {
  .js .db-fill { transition: none; }
}

/* ---------- bento fact-grid ---------- */
.bento-section { padding: clamp(2.5rem, 8vh, 4.5rem) 0; }
.bento { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.tile {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
  background: var(--card);
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -24px rgba(36, 30, 23, 0.5);
}
.tile p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; margin-top: 0.6rem; max-width: none; }
.tile-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(2.5rem, 9vw, 3.5rem);
  line-height: 1;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
}
.tile-num small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--faint);
  margin-left: 0.35rem;
  letter-spacing: 0.02em;
}
.tile-line {
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  max-width: none;
}
.tile-line span { color: var(--accent-deep); font-style: italic; }
@media (min-width: 40rem) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
  .tile-lg { grid-row: span 2; }
  .tile-wide { grid-column: 1 / -1; }
  .tile-lg .tile-num { font-size: clamp(3rem, 7vw, 4.25rem); }
}

/* ---------- objections thread ---------- */
.voices .thread { margin-top: 2rem; max-width: 36rem; display: flex; flex-direction: column; gap: 0.75rem; }
.post {
  display: flex;
  gap: 0.9rem;
  padding: 1.15rem 1.3rem;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.post:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 18px 34px -24px rgba(36, 30, 23, 0.5); }
.vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--faint);
}
.vote .arrow { color: var(--accent); font-size: 0.9rem; line-height: 1; }
.post-meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-bottom: 0.35rem;
}
.post-text { font-size: 1rem; line-height: 1.55; color: var(--ink); margin: 0; max-width: none; }
.post-text em { font-style: italic; color: var(--muted); }
.thread-note { margin-top: 1rem; font-size: 0.8rem; color: var(--faint); }

/* ---------- sections ---------- */
section { padding: clamp(2.75rem, 9vh, 5.5rem) 0; }
section + section { border-top: 1px solid var(--line); }

/* eyebrow / kicker label above section headings */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}
.kicker::before {
  content: "";
  width: 1.75rem;
  height: 1.5px;
  background: var(--accent-deep);
  flex-shrink: 0;
}
h2 {
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  text-wrap: balance;
  max-width: 30rem;
}
section > .wrap > p {
  margin-top: 1.2rem;
  max-width: 34rem;
  color: var(--muted);
  text-wrap: pretty;
}
.stat {
  margin-top: 1.6rem;
  font-size: 1.1875rem;
  max-width: 34rem;
  color: var(--ink);
}
.stat b { color: var(--accent-deep); font-family: var(--font-mono); font-weight: 600; }

/* ---------- formula panel ---------- */
.panel {
  margin-top: 2.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
}
.panel-head {
  padding: 1.15rem 1.3rem 1rem;
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.panel-head strong { font-weight: 700; letter-spacing: 0.01em; }
.panel-head span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
}
.panel-group {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.3rem;
  border-top: 1.5px solid var(--ink);
  background: var(--surface);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.panel-head + .panel-group { border-top: 0; }
.panel-group span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel ul { list-style: none; }
.panel li {
  padding: 1rem 1.3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  row-gap: 0.15rem;
  align-items: baseline;
  transition: background 0.2s var(--ease-out);
}
.panel li + li { border-top: 1px solid var(--line); }
@media (hover: hover) {
  .panel li:hover { background: var(--surface); }
}
.panel .name { font-weight: 600; }
.panel .form-note {
  grid-column: 1;
  font-size: 0.85rem;
  color: var(--muted);
}
.panel .why {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.panel .dose {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--accent-deep);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.panel-foot {
  padding: 1.1rem 1.3rem;
  border-top: 1.5px solid var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.panel-foot small {
  display: block;
  margin-top: 0.5rem;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- quote-ish blocks ---------- */
.plain { font-size: clamp(1.125rem, 3vw, 1.28rem); max-width: 32rem; color: var(--ink); }
.plain.mt { margin-top: 1.2rem; }

/* ---------- identity statement band ---------- */
.statement-band { background: var(--surface); }
.statement-band .statement {
  margin-top: 0;
  font-size: clamp(1.7rem, 5.5vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 42rem;
}
.statement span { color: var(--accent-deep); font-style: italic; }

/* ---------- founder note ---------- */
.founder .sig {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq { margin-top: 2rem; max-width: 36rem; }
.faq details {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  transition: border-color 0.25s var(--ease-out);
}
.faq details + details { margin-top: 0.6rem; }
.faq details[open] { border-color: var(--line-strong); }
@media (hover: hover) {
  .faq details:hover { border-color: var(--line-strong); }
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-deep);
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  padding: 0 1.3rem 1.15rem;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: none;
}
.faq-section .faq-note { font-size: 0.875rem; color: var(--muted); }
.faq-section .faq-note a { color: var(--accent-deep); }

/* ---------- final cta ---------- */
.final { background: var(--surface); }
.final .price-line {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--ink);
}
.final .price-line b {
  font-family: var(--font-mono);
  color: var(--accent-deep);
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 3rem;
  font-size: 0.8rem;
  color: var(--muted);
}
footer p { max-width: 60ch; }
footer p + p { margin-top: 0.9rem; }
footer a { color: var(--muted); }
footer .contact { font-size: 0.9rem; color: var(--ink); }
footer .contact a { color: var(--accent-deep); }

/* ---------- sticky mobile CTA bar ---------- */
.bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--card);
  border-top: 1px solid var(--line-strong);
  padding: 0.6rem 1.25rem calc(0.6rem + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.35s var(--ease-out);
}
.bar.show { transform: none; }
.bar .bar-price {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}
.bar .bar-price b {
  font-family: var(--font-mono);
  color: var(--accent-deep);
  font-weight: 600;
}
.bar button {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out);
}
.bar button:hover { background: var(--accent-deep); transform: translateY(-1px); }
.bar button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (min-width: 48rem) { .bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .bar { transition: none; } }

/* ---------- motion ---------- */
.js .reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js .reveal.pre {
  opacity: 0;
  transform: translateY(14px);
}
.js h1 .line {
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.js h1.pre .line { opacity: 0; transform: translateY(18px); }
.js h1 .line:nth-child(2) { transition-delay: 0.09s; }
.js h1 .line:nth-child(3) { transition-delay: 0.18s; }

/* staggered cascade for grouped cards */
.js .bento .reveal:nth-child(2) { transition-delay: 0.07s; }
.js .bento .reveal:nth-child(3) { transition-delay: 0.14s; }
.js .bento .reveal:nth-child(4) { transition-delay: 0.21s; }
.js .thread .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .thread .reveal:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .post, .deposit, .capture button, .bar button, .nav-reserve {
    transition: none;
  }
  .js .reveal, .js .reveal.pre, .js h1 .line, .js h1.pre .line {
    opacity: 1; transform: none; transition: none;
  }
}
