/* ==========================================================================
   Golden Ratio Pancakes — styles.css
   Design tokens + all styles. Mobile-first. No build step.
   Palette and rules per GRP-Design-Spec (see CLAUDE.md).
   ========================================================================== */

:root {
  /* Brand palette — the only three colors, plus derived neutrals */
  --gold: #C9A24D;          /* accent: CTAs, price, spiral, active states */
  --gold-dark: #B08D3E;     /* hover state for gold buttons */
  --brown: #49352A;         /* primary text, headings */
  --bg: #FAF8F5;            /* page background — never pure white */
  --text-secondary: #7A6B5D;
  --border: #E8E3DC;
  --white: #FFFFFF;         /* cards/modules only */

  /* Type */
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing rhythm */
  --section-pad-mobile: 56px;
  --section-pad-desktop: 100px;

  --shadow: 0 1px 3px rgba(73, 53, 42, 0.08);
  --radius: 6px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--brown);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
}

h2 { font-size: 1.75rem; margin-bottom: 16px; }

p { margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

img, svg { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* Honeypot field for bots. A class, not an inline style, so the CSP in _headers can block inline styles. */
.hp { display: none !important; }

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container--narrow { max-width: 720px; }

.section {
  padding-top: var(--section-pad-mobile);
  padding-bottom: var(--section-pad-mobile);
}

.section--tint { background: #F3EFE8; }

.section__label { margin-bottom: 12px; }

.label-caps {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  padding: 14px 32px;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.btn--primary { background: var(--gold); color: var(--white); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--gold-dark); }

.btn--secondary {
  background: transparent;
  color: var(--brown);
  border: 1px solid var(--brown);
}
.btn--secondary:hover { background: rgba(73, 53, 42, 0.05); }

.btn--lg { padding: 16px 40px; font-size: 1.05rem; }
.btn--block { width: 100%; }

.btn:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand { text-decoration: none; }

.brand-lockup { display: flex; flex-direction: column; line-height: 1.1; }
.brand-lockup__name { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: var(--brown); }
.brand-lockup__sub { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }

.nav__cta { padding: 10px 22px; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 var(--section-pad-mobile);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero .container { position: relative; }

.hero__emblem {
  width: 72px;
  margin: 0 auto 24px;
  display: block;
}

.hero__motif {
  position: absolute;
  top: 50%;
  right: -160px;
  transform: translateY(-50%);
  width: 560px;
  opacity: 0.09;
  pointer-events: none;
}

.nav__emblem { width: 34px; margin-right: 10px; }
.nav__brand { display: flex; align-items: center; }

.hero__flavor { margin-bottom: 8px; }

.hero__title {
  font-size: 2.3rem;
  margin-bottom: 16px;
}

.hero__descriptor {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.hero__sub {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ---------- Ratio ---------- */
.ratio-figure {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

.ratio-figure__num {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--brown);
}

.ratio-figure__unit {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 4px;
}

.ratio-figure__divider {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--gold);
}

/* ---------- For / Not for ---------- */
.who-grid { display: grid; gap: 32px; }

.who-list { list-style: none; }

.who-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.who-list li:last-child { margin-bottom: 0; }

.who-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 9px;
  height: 1.5px;
  background: rgba(201, 162, 77, 0.45);
}

.who-grid__col--not .who-list li { color: var(--text-secondary); }
.who-grid__col--not .who-list li::before { background: var(--border); }

/* ---------- Nutrition ---------- */
.nutrition-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
}

.nutrition-card__hero {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 24px;
}

.nutrition-stat { text-align: center; }

.nutrition-stat__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 600;
}

.nutrition-stat__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nutrition-card__meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 8px;
}

.nutrition-card__details {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.nutrition-card__details summary {
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--brown);
}

.nutrition-card__details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
}

.nutrition-card__details + .nutrition-card__details { margin-top: 12px; }

/* Full nutrition facts panel */
.nfp { margin-top: 14px; font-variant-numeric: tabular-nums; }

.nfp__serving {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 8px;
}

.nfp__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.nfp__table th, .nfp__table td { padding: 5px 4px; }

.nfp__table td { text-align: right; white-space: nowrap; }

.nfp__table thead tr:first-child th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--brown);
}

.nfp__calories th, .nfp__calories td {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 3px solid var(--brown);
}

.nfp__table tbody tr { border-bottom: 1px solid var(--border); }

.nfp__table tbody th { font-weight: 600; color: var(--brown); }

.nfp__indent th { padding-left: 18px; font-weight: 400; color: var(--text-secondary); }
.nfp__indent2 th { padding-left: 32px; font-weight: 400; color: var(--text-secondary); }

.nfp__micro th { font-weight: 400; color: var(--text-secondary); }

.nfp__dv {
  display: inline-block;
  min-width: 38px;
  font-weight: 600;
  color: var(--brown);
}

.nfp__footnote {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---------- Buy module ---------- */
.section--buy {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.buy__name { font-size: 1.5rem; }

.buy__price {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--gold);
  margin: 12px 0 24px;
}

.buy__price-sub {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.buy__waitlist-copy { color: var(--text-secondary); margin-bottom: 20px; }

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.waitlist-form input {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--brown);
  width: 100%;
}

.waitlist-form input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: var(--gold);
}

.waitlist-form__success { color: var(--gold-dark); font-weight: 600; margin-top: 16px; }
.waitlist-form__error { color: #A04B35; font-size: 0.9rem; margin-top: 12px; }

/* Shop state */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  margin-bottom: 16px;
}

.qty-stepper__btn {
  font-size: 1.3rem;
  background: none;
  border: none;
  color: var(--brown);
  cursor: pointer;
  padding: 4px 10px;
}

.qty-stepper__num { font-weight: 600; min-width: 24px; }

.buy__shipping-note { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 20px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); }

.faq__item { border-bottom: 1px solid var(--border); }

.faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
  text-align: left;
  background: none;
  border: none;
  padding: 18px 4px;
  cursor: pointer;
}

.faq__chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 250ms ease;
}

.faq__q[aria-expanded="true"] .faq__chevron { transform: rotate(225deg); }

.faq__a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 250ms ease;
}

.faq__a p {
  padding: 0 4px 18px;
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer__inner { text-align: center; }

.footer__signup { max-width: 420px; margin: 0 auto 32px; }
.footer__signup-copy { color: var(--text-secondary); margin-bottom: 16px; }

.waitlist-form--footer { flex-direction: row; }
.waitlist-form--footer input { flex: 1; }

.footer__legal {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.footer__legal a { color: var(--text-secondary); text-decoration: none; }
.footer__legal a:hover { color: var(--brown); text-decoration: underline; }

.footer__copyright { font-size: 0.8rem; color: var(--text-secondary); }

/* ---------- Cart drawer (Shopify seam) ---------- */
.drawer[hidden] { display: none; }

.drawer__overlay {
  position: fixed;
  inset: 0;
  background: rgba(73, 53, 42, 0.4);
  z-index: 90;
}

.drawer__panel {
  position: fixed;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  /* Mobile: bottom sheet */
  left: 0; right: 0; bottom: 0;
  max-height: 80vh;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 24px rgba(73, 53, 42, 0.15);
}

.drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.drawer__close {
  font-size: 1.6rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--brown);
  cursor: pointer;
  padding: 0 4px;
}

.drawer__body { padding: 24px; overflow-y: auto; flex: 1; }
.drawer__empty { color: var(--text-secondary); }

.drawer__foot { padding: 20px 24px; border-top: 1px solid var(--border); }
.drawer__shipping { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 12px; }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  h2 { font-size: 2.1rem; }

  .container { padding-left: 48px; padding-right: 48px; }

  .section {
    padding-top: var(--section-pad-desktop);
    padding-bottom: var(--section-pad-desktop);
  }

  .hero { padding-top: 110px; }
  .hero__title { font-size: 3.4rem; }
  .hero__descriptor { font-size: 1.45rem; }
  .hero__motif { width: 760px; right: -180px; }

  .who-grid { grid-template-columns: 1fr 1fr; gap: 64px; }

  .nutrition-card { padding: 48px; }

  .waitlist-form { flex-direction: row; }
  .waitlist-form input { flex: 1; }

  /* Drawer: right slide-in on desktop */
  .drawer__panel {
    top: 0; right: 0; bottom: 0; left: auto;
    width: 400px;
    max-height: none;
    border-radius: 0;
    box-shadow: -4px 0 24px rgba(73, 53, 42, 0.15);
  }
}
