/* ===================================================================
   ai-1 — Design Tokens & Styles
   Deep forest green + warm cream + gold accents
   Typography: Cormorant (display) + Work Sans (body)
   =================================================================== */

/* --- Type Scale --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* --- Spacing (4px base) --- */
:root {
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* --- Fonts --- */
:root {
  --font-display: 'Cormorant', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
}

/* --- Color Palette: Deep Forest --- */
:root, [data-theme="light"] {
  --color-bg:             #f5f2eb;
  --color-surface:        #f9f7f2;
  --color-surface-2:      #faf9f5;
  --color-surface-offset: #eee9df;
  --color-surface-offset-2: #e6e1d6;
  --color-surface-dynamic: #ddd8cc;
  --color-divider:        #d4cfc4;
  --color-border:         #ccc7bb;

  --color-text:           #1a2420;
  --color-text-muted:     #5e6b62;
  --color-text-faint:     #98a39b;
  --color-text-inverse:   #f5f2eb;

  --color-primary:        #1a4a3a;
  --color-primary-hover:  #0f3528;
  --color-primary-active: #0a2219;
  --color-primary-highlight: #c8dad0;

  --color-gold-accent:    #b8963a;
  --color-gold-hover:     #9a7d2e;
  --color-gold-active:    #7a6223;

  --color-error:          #a12c4b;
  --color-success:        #2a6b3a;
  --color-warning:        #96621a;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 140 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 140 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 140 / 0.12);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --color-bg:             #0f1512;
  --color-surface:        #151c18;
  --color-surface-2:      #1a221e;
  --color-surface-offset: #172019;
  --color-surface-offset-2: #1e2822;
  --color-surface-dynamic: #2a352e;
  --color-divider:        #243028;
  --color-border:         #324238;

  --color-text:           #d4dbd6;
  --color-text-muted:     #7d8a80;
  --color-text-faint:     #4f5c52;
  --color-text-inverse:   #1a2420;

  --color-primary:        #5a9a7a;
  --color-primary-hover:  #3e7d5e;
  --color-primary-active: #2d6248;
  --color-primary-highlight: #253830;

  --color-gold-accent:    #d4ad4a;
  --color-gold-hover:     #c49a38;
  --color-gold-active:    #b08828;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0f1512;
    --color-surface:        #151c18;
    --color-surface-2:      #1a221e;
    --color-surface-offset: #172019;
    --color-surface-offset-2: #1e2822;
    --color-surface-dynamic: #2a352e;
    --color-divider:        #243028;
    --color-border:         #324238;
    --color-text:           #d4dbd6;
    --color-text-muted:     #7d8a80;
    --color-text-faint:     #4f5c52;
    --color-text-inverse:   #1a2420;
    --color-primary:        #5a9a7a;
    --color-primary-hover:  #3e7d5e;
    --color-primary-active: #2d6248;
    --color-primary-highlight: #253830;
    --color-gold-accent:    #d4ad4a;
    --color-gold-hover:     #c49a38;
    --color-gold-active:    #b08828;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}


/* ===========================================
   HEADER
   =========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
  transition: box-shadow 0.3s var(--ease-out);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
}
.logo {
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav a:hover {
  color: var(--color-text);
}
.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: var(--text-sm);
}
.nav-cta:hover {
  background: var(--color-primary-hover);
  color: #fff !important;
}
.theme-toggle {
  color: var(--color-text-muted);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav a:not(.nav-cta) { display: none; }
  .header-inner { padding: var(--space-3) var(--space-4); }
}


/* ===========================================
   HERO
   =========================================== */
.hero {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
  min-height: 70vh;
}
.hero-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-accent);
  margin-bottom: var(--space-4);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  background: var(--color-primary-active);
  transform: translateY(0);
}
.hero-image {
  display: flex;
  justify-content: center;
}
.hero-image img {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-xl);
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-4);
    min-height: auto;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-image { order: -1; }
  .hero-image img { max-width: 300px; }
}


/* ===========================================
   STATS BAR
   =========================================== */
.stats-bar {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-10) var(--space-6);
}
.stats-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.stat {
  text-align: center;
  flex: 1;
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1;
  color: #fff;
}
.stat-unit {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  opacity: 0.7;
  margin-left: var(--space-1);
}
.stat-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  opacity: 0.75;
  margin-top: var(--space-2);
  line-height: 1.4;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: oklch(1 0 0 / 0.15);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .stats-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .stat-divider { display: none; }
}


/* ===========================================
   SECTION TAG (reusable)
   =========================================== */
.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-accent);
  margin-bottom: var(--space-4);
}


/* ===========================================
   WHY POWDER
   =========================================== */
.why-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
}
.why-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.why-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.why-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.comparison {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  justify-content: center;
}
.comparison-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  min-width: 160px;
}
.comparison-us {
  background: var(--color-primary);
  border-color: transparent;
  color: #fff;
}
.comparison-us .comparison-icon { color: #fff; }
.comparison-icon {
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.comparison-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: var(--space-2);
}
.comparison-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
}
.comparison-note {
  font-size: var(--text-xs);
  opacity: 0.65;
  margin-top: var(--space-1);
}
.comparison-vs {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .why-inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .comparison-item { min-width: 130px; padding: var(--space-6) var(--space-4); }
}


/* ===========================================
   INGREDIENTS
   =========================================== */
.ingredients-section {
  background: var(--color-surface-offset);
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
}
.ingredients-header {
  max-width: var(--content-wide);
  margin: 0 auto var(--space-12);
}
.ingredients-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.ingredients-intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

.ingredients-grid {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.group-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gold-accent);
  margin-bottom: var(--space-4);
}
.ingredient-group {
  display: flex;
  flex-direction: column;
}
.ingredient-group > .ingredient-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}
.ingredient-top {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  flex: 1;
  min-width: 280px;
}
.ingredient-name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}
.ingredient-dose {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}
.ingredient-benefit {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  flex: 1;
  min-width: 250px;
}

/* B-Vitamin compact grid */
.b-vitamin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.b-vitamin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
}
.b-name {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}
.b-dose {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}
.b-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 68ch;
}


/* ===========================================
   IMAGE BREAK
   =========================================== */
.image-break {
  width: 100%;
  overflow: hidden;
  max-height: 500px;
}
.image-break img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center;
}


/* ===========================================
   SCIENCE / QUALITY
   =========================================== */
.science-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
}
.science-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.science-header {
  margin-bottom: var(--space-12);
}
.science-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
}
.science-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}
.science-card {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-lg);
}
.science-icon {
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.science-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.science-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .science-grid {
    grid-template-columns: 1fr;
  }
}


/* ===========================================
   FOUNDER
   =========================================== */
.founder-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
  background: var(--color-surface-offset);
}
.founder-inner {
  max-width: var(--content-default);
  margin: 0 auto;
}
.founder-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.founder-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.founder-sig {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text);
  margin-top: var(--space-6);
}


/* ===========================================
   WAITLIST
   =========================================== */
.waitlist-section {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-6);
  text-align: center;
}
.waitlist-inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
}
.waitlist-inner h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.waitlist-inner > p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 0 auto var(--space-8);
  line-height: 1.7;
  max-width: 50ch;
}
.waitlist-form {
  max-width: 480px;
  margin: 0 auto;
}
.form-row {
  display: flex;
  gap: var(--space-3);
}
.form-row input[type="email"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
}
.form-row input[type="email"]::placeholder {
  color: var(--color-text-faint);
}
.form-row input[type="email"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12);
}
.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}
.waitlist-success {
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-success, #2a6b3a);
}
.waitlist-success:not([hidden]) {
  display: flex;
}
.waitlist-success svg {
  color: var(--color-success, #2a6b3a);
}
.waitlist-success p {
  font-size: var(--text-base);
  font-weight: 500;
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
  }
  .form-row .btn-primary {
    justify-content: center;
  }
}


/* ===========================================
   FOOTER
   =========================================== */
.footer {
  background: var(--color-surface-offset);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  padding: var(--space-12) var(--space-6) var(--space-8);
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-10);
  gap: var(--space-8);
}
.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  line-height: 1.5;
}
.footer-links {
  display: flex;
  gap: var(--space-6);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-text);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-attribution {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
}
.footer-attribution:hover {
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .footer-top { flex-direction: column; gap: var(--space-6); }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}


/* ===========================================
   SCROLL ANIMATIONS
   =========================================== */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

.reveal-up {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .reveal-up {
    clip-path: inset(100% 0 0 0);
    animation: reveal-clip linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-clip {
  to { clip-path: inset(0 0 0 0); }
}