/* ============================================================
   Creatine — mobile-first informational site
   Base styles target phones; media queries scale up.
   Palette: warm paper + deep teal accent · Fraunces + Inter
   ============================================================ */

:root {
  --paper:      #f6f4ef;
  --paper-alt:  #eeeae1;
  --card:       #ffffff;
  --ink:        #141815;
  --ink-soft:   #4c534d;
  --line:       #ddd8cd;
  --accent:     #1f6f5c;
  --accent-2:   #2f9c82;
  --amber:      #a9700f;
  --dark:       #0f1512;
  --maxw:       1080px;
  --r:          16px;
  --hero-a:     rgba(47,156,130,.10);
  --hero-b:     rgba(31,111,92,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; max-width: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}
a { color: var(--accent); }
img { max-width: 100%; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: rgba(246,244,239,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: "Source Serif 4", serif; font-size: 20px; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -.02em;
  margin-right: 14px; flex: none;
}
.dot { color: var(--accent); }
.nav { display: none; }

/* Product switcher (multi-page nav) */
.switcher {
  display: flex; gap: 4px; margin-right: auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.switcher::-webkit-scrollbar { display: none; }
.switcher a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding: 7px 11px; border-radius: 999px;
  white-space: nowrap; transition: color .15s ease, background .15s ease;
}
.switcher a:hover { color: var(--accent); }
.switcher a[aria-current="page"] { background: var(--accent); color: #fff; }
.header-cta {
  display: none;
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: #fff; background: var(--accent);
  padding: 9px 16px; border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 56px 20px;
}
/* Full-bleed tinted band, but content stays in the same container as .section */
.section-alt { position: relative; z-index: 0; }
.section-alt::before {
  content: ""; position: absolute; z-index: -1;
  top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; background: var(--paper-alt);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

.kicker {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.section h2 { font-size: clamp(27px, 8vw, 40px); }
.section-sub { margin: 14px 0 0; color: var(--ink-soft); font-size: 16.5px; max-width: 640px; }

.prose { max-width: 640px; margin-top: 20px; }
.prose p { margin: 0 0 16px; color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 56px 0 40px;
  background:
    radial-gradient(120% 70% at 90% -10%, var(--hero-a, rgba(47,156,130,.20)), transparent 60%),
    radial-gradient(90% 70% at -10% 110%, var(--hero-b, rgba(31,111,92,.12)), transparent 55%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.hero-inner { max-width: 640px; }
.home-hero .hero-inner { margin: 0 auto; }
.trust-strip { position: relative; z-index: 1; }

/* Hero decorative art (placeholder for Gemini hero image) */
.hero-art {
  position: absolute; top: -14px; right: -34px; z-index: 0;
  width: min(52vw, 320px); color: var(--accent); opacity: .5;
  pointer-events: none;
}
.hero-art svg { width: 100%; height: auto; display: block; }
.hero-img {
  position: absolute; top: 0; right: 0; z-index: 0;
  width: min(50vw, 420px); height: 100%;
  object-fit: cover; opacity: .9; pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 40%, transparent);
          mask-image: linear-gradient(to left, #000 40%, transparent);
}
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(32px, 8vw, 82px); font-weight: 600;
  margin-bottom: 20px;
  overflow-wrap: break-word;
}
.hero h1 .hl { color: var(--accent); }
.lede {
  font-size: clamp(17px, 4.6vw, 22px); line-height: 1.5;
  color: var(--ink-soft); max-width: 600px; margin: 0 0 26px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-weight: 500; font-size: 16px;
  background: var(--accent); color: #fff;
  padding: 14px 26px; border-radius: 999px;
  min-height: 48px; line-height: 1.25;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-ghost:hover { background: rgba(31,111,92,.08); color: var(--accent); }

.trust-strip {
  display: flex; flex-wrap: wrap; gap: 10px;
  list-style: none; padding: 0; margin: 32px 0 0; max-width: 760px;
}
.trust-strip li {
  flex: 1 1 0; min-width: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 8px; text-align: center;
}
.trust-strip b {
  display: block; font-family: "Source Serif 4", serif;
  font-size: 24px; font-weight: 600; color: var(--accent); line-height: 1;
}
.trust-strip span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Flow (how it works) — numbered, editorial, no cards ---------- */
.flow {
  display: grid; grid-template-columns: 1fr;
  list-style: none; padding: 0; margin: 36px 0 0;
  counter-reset: flowc; border-top: 1px solid var(--line);
}
.flow > li:not(.flow-arrow) {
  counter-increment: flowc;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.flow > li:not(.flow-arrow)::before {
  content: counter(flowc, decimal-leading-zero);
  display: block; margin-bottom: 8px;
  font-family: "Source Serif 4", serif; font-size: 14px; font-weight: 600;
  letter-spacing: .06em; color: var(--accent);
}
.flow b { display: block; font-family: "Source Serif 4", serif; font-size: 21px; margin-bottom: 4px; }
.flow span:last-child { font-size: 15px; color: var(--ink-soft); }
.flow-arrow { display: none; }

/* ---------- Benefits ---------- */
.benefit-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
.benefit {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 24px 22px;
}
.benefit h3 { font-size: 22px; margin: 14px 0 10px; }
.benefit p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.evidence {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.evidence.strong   { background: #dcefe8; color: #14614f; }
.evidence.moderate { background: #e6eddc; color: #4d6a2e; }
.evidence.early    { background: #f5ebd6; color: #855611; }

/* ---------- Who it's for ---------- */
.who-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
.who {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px 22px;
}
.who b { display: block; font-family: "Source Serif 4", serif; font-size: 18px; margin-bottom: 5px; }
.who span:last-child { display: block; font-size: 14.5px; color: var(--ink-soft); }
.who em { font-style: italic; color: var(--ink); }

/* ---------- Safety ---------- */
.myth-chips { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 24px; }
.chip {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 12px; padding: 18px 20px;
}
.chip b { display: block; font-family: "Source Serif 4", serif; font-size: 18px; margin-bottom: 6px; color: var(--ink); }
.chip span { font-size: 15.5px; color: var(--ink-soft); }
.disclaimer-inline {
  margin-top: 24px; font-size: 14px; color: var(--ink-soft);
  background: var(--card); border: 1px dashed var(--line);
  border-radius: 12px; padding: 15px 18px;
}

/* ---------- How to take ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
.step {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 22px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: "Source Serif 4", serif; font-size: 19px; font-weight: 600;
  margin-bottom: 14px;
}
.step b { display: block; font-family: "Source Serif 4", serif; font-size: 20px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.step em { font-style: italic; color: var(--ink); }

/* ---------- Product spotlight ---------- */
.product-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 26px 22px; margin-top: 28px;
  box-shadow: 0 24px 60px -44px rgba(31,111,92,.55);
}
.product-head { margin-bottom: 22px; }
.product-brand { font-family: "Source Serif 4", serif; font-size: clamp(26px,7vw,34px); font-weight: 600; margin: 0 0 6px; }
.product-tag { margin: 0; color: var(--accent); font-weight: 500; font-size: 15px; }

.product-doses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.dose { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 8px; text-align: center; }
.dose-num { display: block; font-family: "Source Serif 4", serif; font-size: clamp(22px,6vw,32px); font-weight: 600; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.dose-label { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.dose-label em { font-style: italic; }

.why-plus {
  background: var(--paper); border-radius: 12px; padding: 16px 18px;
  margin: 0 0 22px; font-size: 15px; color: var(--ink-soft);
}
.why-plus b { color: var(--ink); }
.why-plus em { font-style: italic; color: var(--ink); }

.compare-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1.3fr .9fr .9fr; }
.compare-row > span { padding: 12px 12px; font-size: 14px; border-bottom: 1px solid var(--line); }
.compare-row:last-child > span { border-bottom: none; }
.compare-head > span { font-weight: 600; color: var(--ink); background: var(--paper-alt); font-size: 12.5px; }
.compare-row > span:first-child { color: var(--ink-soft); }
.col-us { background: rgba(47,156,130,.08); font-weight: 600; color: var(--accent) !important; }
.compare-head .col-us { color: var(--accent) !important; }
.compare-fine { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.btn-product { margin-top: 24px; width: 100%; }

/* ---------- Closing ---------- */
.closing { background: var(--dark); color: #eef1ee; padding: 64px 20px; }
.closing-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.closing h2 { font-size: clamp(28px,8vw,44px); color: #fff; margin-bottom: 18px; }
.closing p { font-size: 18px; line-height: 1.55; color: #c6ccc6; margin: 0 auto 24px; max-width: 560px; }
.btn-light { background: #fff; color: var(--dark); }
.btn-light:hover { background: var(--accent-2); color: #fff; }
.closing-soft { margin-top: 18px !important; }
.closing-soft a { color: var(--accent-2); font-size: 15px; text-decoration: none; }

/* ---------- Sources ---------- */
.source-list { list-style: none; counter-reset: src; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.source-list li {
  counter-increment: src; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px 18px 52px; position: relative;
}
.source-list li::before {
  content: counter(src); position: absolute; left: 18px; top: 18px;
  font-family: "Source Serif 4", serif; font-weight: 600; color: var(--accent); font-size: 17px;
}
.source-list a { font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--accent-2); }
.source-list a:hover { color: var(--accent); }
.source-meta { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-alt); border-top: 1px solid var(--line); padding: 40px 20px 96px; text-align: center; }
.foot-brand { font-family: "Source Serif 4", serif; font-size: 20px; font-weight: 600; margin: 0 0 12px; }
.foot-disc { max-width: 600px; margin: 0 auto; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  display: block; text-align: center; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
  padding: 15px 18px; border-radius: 999px;
  box-shadow: 0 12px 30px -8px rgba(15,21,18,.45);
}

/* ============================================================
   BREAKPOINTS — scale up from mobile
   ============================================================ */

/* Tablet */
@media (min-width: 620px) {
  .header-cta { display: inline-block; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .who-grid { grid-template-columns: repeat(2, 1fr); }
  .myth-chips { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .flow { grid-template-columns: repeat(3, 1fr); gap: 30px; border-top: none; }
  .flow > li:not(.flow-arrow) { border-bottom: none; border-top: 2px solid var(--accent); padding: 18px 0 0; }
}

/* Desktop */
@media (min-width: 900px) {
  body { font-size: 18px; }
  .section { padding: 96px 40px; }
  .hero { padding: 104px 0 72px; }
  .hero-wrap { padding: 0 40px; }
  .hero-art { width: min(38vw, 430px); top: -24px; right: -6px; opacity: .55; }
  .nav { display: flex; gap: 24px; margin-right: 22px; }
  .nav a { font-size: 15px; color: var(--ink-soft); text-decoration: none; transition: color .15s ease; }
  .nav a:hover { color: var(--accent); }
  .who-grid { grid-template-columns: repeat(3, 1fr); }
  .product-card { padding: 44px; }
  .product-doses { gap: 18px; }
  .btn-product { width: auto; }
  .mobile-cta { display: none; }
  .site-footer { padding-bottom: 48px; }
}

/* Fine-tune very small phones */
@media (max-width: 360px) {
  .trust-strip li { flex-basis: 100%; }
  .product-doses { grid-template-columns: 1fr; }
}

/* ============================================================
   THEME VARIANTS — per-product accent
   ============================================================ */
body.theme-creatine  { --accent:#1f6f5c; --accent-2:#2f9c82; --hero-a:rgba(47,156,130,.10); --hero-b:rgba(31,111,92,.06); }
body.theme-magnesium { --accent:#4a4d9e; --accent-2:#7275cf; --hero-a:rgba(114,117,207,.11); --hero-b:rgba(74,77,158,.06); }
body.theme-protein   { --accent:#b0561f; --accent-2:#d68142; --hero-a:rgba(214,129,66,.11); --hero-b:rgba(176,86,31,.06); }

/* ============================================================
   HOME / LANDING
   ============================================================ */
.home-hero { text-align: center; }
.home-hero .hero-inner { margin: 0 auto; }
.home-hero .eyebrow { text-transform: uppercase; }
.home-tagline {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  list-style: none; padding: 0; margin: 26px 0 0; font-size: 14px;
  color: var(--ink-soft); font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
}
.home-tagline li { display: flex; align-items: center; gap: 18px; }
.home-tagline li::after { content: "·"; color: var(--accent); }
.home-tagline li:last-child::after { content: ""; }

.home-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }
.home-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 28px 26px; text-decoration: none; color: inherit;
  border-top: 4px solid var(--accent);
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.home-card:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -34px rgba(20,24,21,.5); }
.home-card.c-creatine  { --accent:#1f6f5c; }
.home-card.c-magnesium { --accent:#4a4d9e; }
.home-card.c-protein   { --accent:#b0561f; }
.hc-ic { font-size: 34px; }
.home-card h3 { font-family: "Source Serif 4", serif; font-size: 25px; margin: 0 0 8px; color: var(--ink); }
.home-card p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15.5px; }
.hc-go { color: var(--accent); font-weight: 600; font-size: 15px; }

@media (min-width: 720px) {
  .home-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   DOSE TIERS (creatine "dialing your dose")
   ============================================================ */
.tiers-head { margin-top: 40px; }
.tiers-head b {
  display: block; font-family: "Source Serif 4", serif; font-size: 21px;
  color: var(--ink); margin-bottom: 4px;
}
.tiers-head span { font-size: 15px; color: var(--ink-soft); }
.dose-tiers { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
.tier {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--accent); border-radius: var(--r); padding: 24px 22px;
}
.tier-amt { font-family: "Source Serif 4", serif; font-size: 34px; font-weight: 600; color: var(--accent); line-height: 1; }
.tier b { font-family: "Source Serif 4", serif; font-size: 18px; margin: 12px 0 8px; color: var(--ink); }
.tier p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; }
.tier .evidence { margin-top: auto; align-self: flex-start; }
.tiers-fine { margin: 16px 0 0; font-size: 13px; color: var(--ink-soft); }
@media (min-width: 620px) { .dose-tiers { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   HOVER POLISH (desktop pointers only)
   ============================================================ */
@media (hover: hover) and (min-width: 720px) {
  .benefit, .who, .step, .tier, .flow > li:not(.flow-arrow) {
    transition: transform .16s ease, box-shadow .22s ease, border-color .16s ease;
  }
  .benefit:hover, .who:hover, .step:hover, .tier:hover, .flow > li:not(.flow-arrow):hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px -32px rgba(20, 24, 21, .55);
  }
}
