/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  /* Color */
  --cream: #faf6ef;
  --cream-alt: #f1e9d8;
  --ink: #201b15;
  --muted: #5c5346;
  --border: #e4d9c3;
  --forest-900: #12271f;
  --forest-700: #1e3f31;
  --forest-600: #2a5643;
  --terracotta: #c1592f;
  --terracotta-deep: #9c431e;
  --terracotta-darker: #7c3417;
  --success: #2f6b46;
  --danger: #b3261e;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-h1: clamp(2.25rem, 1.55rem + 3vw, 3.75rem);
  --fs-h2: clamp(1.65rem, 1.35rem + 1.5vw, 2.4rem);
  --fs-h3: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --fs-body: 1.0625rem;

  /* Layout */
  --section-pad: clamp(4rem, 3rem + 4vw, 7rem);
  --radius: 10px;
  --shadow: 0 20px 45px rgba(18, 39, 31, 0.14);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: auto; /* Lenis handles smoothing when active */
}

html, body { margin: 0; padding: 0; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--forest-900);
  line-height: 1.15;
  margin: 0;
}

h1 { font-size: var(--fs-h1); font-weight: 600; }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0; }

a { color: inherit; }

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility (keyboard nav) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest-900);
  color: #fff;
  padding: 12px 20px;
  z-index: 10000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

/* Scroll progress bar */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 9999;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(250, 246, 239, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(18, 39, 31, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  transition: padding 0.3s ease;
}

.site-header.is-scrolled .header-inner { padding: 12px 24px; }

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--forest-900);
  text-decoration: none;
}

.brand span { color: var(--terracotta); }

.btn-nav-cta {
  background: var(--forest-900);
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-nav-cta:hover { background: var(--terracotta-deep); transform: translateY(-1px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(2.5rem, 2rem + 3vw, 5rem) 0 clamp(3rem, 2rem + 4vw, 6rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 780px;
  max-height: 780px;
  background: radial-gradient(circle, rgba(193, 89, 47, 0.16) 0%, rgba(193, 89, 47, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.eyebrow, .section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--terracotta-deep);
  margin: 0 0 16px;
}

.hero-title { margin: 0 0 20px; max-width: 16ch; }

.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 0 26px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-points li {
  padding-left: 28px;
  position: relative;
  color: var(--forest-900);
  font-weight: 500;
}

.hero-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--terracotta);
  font-weight: 700;
}

.scroll-cue {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.scroll-cue span {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--muted), transparent);
  display: block;
  position: relative;
}

/* ==========================================================================
   Form card (shared: hero + elsewhere)
   ========================================================================== */
.hero-form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 30px 26px;
}

.hero-form-card h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.form-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label, .tobacco legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--forest-900);
}

.field input, .field select {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(193, 89, 47, 0.15);
}

.tobacco {
  border: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.tobacco legend { margin-bottom: 6px; width: 100%; }

.radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink);
}

.consent-block { margin: 6px 0 18px; }

.consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--forest-900);
  margin: 0 0 8px;
  cursor: pointer;
}

.consent-check input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--forest-700);
}

.consent-text {
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
  padding: 10px 12px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted);
}

.consent-text a { color: var(--terracotta-deep); font-weight: 600; }

.btn-submit {
  width: 100%;
  background: var(--terracotta-deep);
  color: #fff;
  border: none;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-submit:hover { background: var(--terracotta-darker); }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  min-height: 1.2em;
  font-size: 0.85rem;
  margin: 10px 0 0;
  text-align: center;
}

.form-status.error { color: var(--danger); }
.form-status.success { color: var(--success); }

.trust-badges {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee {
  background: var(--forest-900);
  color: var(--cream);
  overflow: hidden;
  padding: 16px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 32px;
  animation: marquee 32s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stats { padding: var(--section-pad) 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 1.5vw, 2.75rem);
  color: var(--terracotta-deep);
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   Benefits (editorial rows)
   ========================================================================== */
.benefits { padding: var(--section-pad) 0; background: var(--cream-alt); }

.section-title { max-width: 20ch; margin-bottom: 48px; }

.benefit-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.benefit-row:last-child { border-bottom: 1px solid var(--border); }

.benefit-index {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--border);
  font-weight: 600;
}

.benefit-copy h3 { margin-bottom: 10px; }
.benefit-copy p { color: var(--muted); max-width: 60ch; }

/* ==========================================================================
   How it works (pinned steps)
   ========================================================================== */
.steps-section { padding: var(--section-pad) 0; }

.steps-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.steps-copy .section-title { margin-bottom: 24px; }

.steps-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  max-width: 240px;
}

.steps-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--terracotta);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  opacity: 1;
}

.steps-pin.js-steps-enhanced .step {
  opacity: 0.4;
  transition: opacity 0.4s ease, border-color 0.4s ease;
}

.steps-pin.js-steps-enhanced .step.is-active {
  opacity: 1;
  border-color: var(--terracotta);
}

.step-number {
  display: inline-block;
  font-family: var(--font-display);
  color: var(--terracotta-deep);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: var(--forest-900);
  color: var(--cream);
  text-align: center;
  padding: var(--section-pad) 0;
}

.cta-band h2 { color: #fff; margin: 0 0 12px; }
.cta-band p { color: #cfd8d2; margin: 0 0 26px; max-width: 50ch; margin-inline: auto; }

.btn-outline {
  display: inline-block;
  background: var(--terracotta-deep);
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-outline:hover { background: var(--terracotta-darker); transform: translateY(-2px); }

/* ==========================================================================
   Testimonial
   ========================================================================== */
.testimonial {
  padding: var(--section-pad) 0;
  text-align: center;
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--terracotta);
  margin: 0;
  line-height: 1;
}

.quote-text {
  font-family: var(--font-display);
  max-width: 46ch;
  margin: 0 auto 18px;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  color: var(--forest-900);
  font-weight: 500;
  line-height: 1.4;
}

.stars { color: var(--terracotta-deep); margin: 0 0 8px; letter-spacing: 2px; }
.quote-author { font-weight: 700; color: var(--forest-900); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--forest-900);
  color: #a9b7ae;
  padding: 32px 0;
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #cfd8d2; text-decoration: none; }
.footer-links a:hover { color: #fff; }

.site-footer p { margin: 0 0 8px; }
.disclaimer { color: #7f8d84; font-size: 0.76rem; max-width: 90ch; }

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { margin-bottom: 4px; }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 32px; }
.legal h2 { font-size: 1.15rem; margin-top: 32px; margin-bottom: 10px; }
.legal p, .legal li { color: var(--ink); font-size: 0.95rem; }
.legal a.back { display: inline-block; margin-bottom: 24px; font-size: 0.9rem; color: var(--terracotta-deep); text-decoration: none; }
.legal a.back:hover { text-decoration: underline; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner, .steps-inner { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 40px; }
  .field-row { grid-template-columns: 1fr; }
  .benefit-row { grid-template-columns: 1fr; gap: 12px; }
  .benefit-index { font-size: 2rem; }
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  #progress-bar { display: none; }
  .marquee-track { animation: none; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
  }
}
