/* ========================================
   Heart Tracker — Design System V2
   Brand Guide: Forest Green system,
   Outfit + Inter typography
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ── Brand Colors ───────────────────────── */
  --forest-green:   #0B5A31;
  --vitality-green: #28A745;
  --lime-highlight: #82C91E;
  --mint-tint:      #EEF9F3;

  /* ── Neutrals ───────────────────────────── */
  --deep-slate:   #0F172A;
  --muted-slate:  #475569;
  --off-white:    #FAFAFA;
  --pure-white:   #FFFFFF;
  --border-subtle: #E2E8F0;

  /* ── Data Visualization ─────────────────── */
  --data-stable:    #28A745;
  --data-positive:  #82C91E;
  --data-attention: #D97706;

  /* ── Semantic aliases (used by components) ─ */
  --text-primary:   var(--deep-slate);
  --text-secondary: var(--muted-slate);
  --text-tertiary:  #64748B;
  --bg-primary:     var(--pure-white);
  --bg-secondary:   var(--off-white);
  --border-color:   var(--border-subtle);

  /* ── Legacy aliases (backwards compat only) ─ */
  --brand-primary:       var(--vitality-green);
  --brand-primary-dark:  var(--forest-green);
  --brand-primary-light: var(--mint-tint);
  --brand-green:         var(--vitality-green);
  --brand-green-dark:    var(--forest-green);
  --brand-green-light:   var(--mint-tint);
  --brand-purple:        var(--forest-green);
  --brand-blue:          var(--vitality-green);
  --brand-accent:        var(--lime-highlight);
  --bg-white:            var(--pure-white);
  --bg-gray-light:       var(--off-white);
  --text-light:          var(--text-tertiary);
  --gray-50:   #FAFAFA;
  --gray-100:  #F5F5F5;
  --gray-200:  #E2E8F0;
  --gray-300:  #CBD5E1;
  --gray-400:  #94A3B8;
  --gray-500:  #64748B;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1E293B;
  --gray-900:  #0F172A;

  /* ── Shadows (light — no heavy drops) ────── */
  --shadow-sm:  0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md:  0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow-lg:  0 4px 12px 0 rgb(0 0 0 / 0.08);
  --shadow-xl:  0 8px 24px 0 rgb(0 0 0 / 0.10);
  --shadow-2xl: 0 16px 40px 0 rgb(0 0 0 / 0.12);

  /* ── Spacing Scale (8px base) ─────────────── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  2rem;      /* 32px — kept as rem for legacy rem-based rules */
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ── Border Radius ────────────────────────── */
  --radius-sm:   4px;
  --radius-md:   8px;     /* --radius-btn */
  --radius-lg:   12px;
  --radius-xl:   16px;    /* --radius-card */
  --radius-2xl:  24px;    /* --radius-social */
  --radius-full: 9999px;
  --radius-btn:  8px;
  --radius-card: 16px;

  /* ── Typography ───────────────────────────── */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* ── Transitions ──────────────────────────── */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition:      all 200ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Layout ───────────────────────────────── */
  --max-width:        1280px;
  --max-width-narrow: 768px;
}

/* ========================================
   Base Styles
   ======================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}

ul {
  list-style: none;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--deep-slate);
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

h3 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
}

p {
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-large {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
}

.text-balance {
  text-wrap: balance;
}

/* Eyebrow / section label */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--forest-green);
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--deep-slate);
}

.nav-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest-green);
  width: 28px;
  height: 28px;
}

.nav-logo-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--forest-green);
  stroke: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-family: var(--font-body);
  color: var(--muted-slate);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  transition: color var(--transition-base);
}

.nav-link:hover {
  color: var(--deep-slate);
}

.nav-link.active {
  color: var(--forest-green);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--vitality-green);
  border-radius: var(--radius-full);
}

.nav-cta {
  background: var(--forest-green);
  color: white;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
}

.nav-cta:hover {
  background: #0a4d2a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--deep-slate);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  position: relative;
  padding: clamp(8rem, 15vh, 12rem) var(--space-8) var(--space-24);
  background: var(--off-white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(40, 167, 69, 0.07) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content {
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: var(--mint-tint);
  color: var(--forest-green);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-6);
}

.hero h1 {
  margin-bottom: var(--space-6);
  color: var(--deep-slate);
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--muted-slate);
  margin-bottom: var(--space-8);
  text-wrap: balance;
}

.hero-cta-group {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

/* ========================================
   Hero Split — entrance animations
   ======================================== */

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroSlideRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes heroPop {
  from { opacity: 0; transform: scale(0.75); }
  to   { opacity: 1; transform: scale(1); }
}

.hero--split .hero-badge,
.hero--split h1,
.hero--split .hero-subtitle,
.hero--split .btn,
.hero--split .hero-media-img,
.hero--split .hero-media-icon {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
}

.hero--split .hero-badge       { animation-name: heroFadeUp;    animation-delay: 0.05s; }
.hero--split h1                { animation-name: heroFadeUp;    animation-delay: 0.18s; }
.hero--split .hero-subtitle    { animation-name: heroFadeUp;    animation-delay: 0.30s; }
.hero--split .btn              { animation-name: heroFadeUp;    animation-delay: 0.42s; }
.hero--split .hero-media-img   { animation-name: heroSlideRight; animation-delay: 0.20s; animation-duration: 0.7s; }
.hero--split .hero-media-icon  { animation-name: heroPop;       animation-delay: 0.60s; animation-duration: 0.5s; }

/* ========================================
   Hero Split — feature detail pages
   Left: text. Right: feature image + app icon offset.
   ======================================== */

.hero--split .hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  text-align: left;
}

.hero--split .hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero--split .hero-badge {
  margin-bottom: var(--space-6);
}

.hero--split h1 {
  text-align: left;
}

.hero--split .hero-subtitle {
  text-align: left;
}

.hero--split .hero-media {
  position: relative;
}

.hero--split .hero-media-img {
  width: 100%;
  border-radius: var(--radius-card);
  display: block;
  box-shadow: var(--shadow-raised);
}

.hero--split .hero-media-icon {
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
  .hero--split .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero--split .hero-text {
    align-items: center;
    order: 1;
  }

  .hero--split h1,
  .hero--split .hero-subtitle {
    text-align: center;
  }

  .hero--split .hero-media {
    order: 2;
    margin-bottom: var(--space-8);
  }

  .hero--split .hero-media-icon {
    width: 60px;
    height: 60px;
    bottom: -16px;
    left: -12px;
  }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--forest-green);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: #0a4d2a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background: var(--pure-white);
  color: var(--forest-green);
  border: 1px solid rgba(40, 167, 69, 0.4);
}

.btn-secondary:hover {
  background: var(--mint-tint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--forest-green);
}

/* CTA section button override — white on dark gradient */
.cta-section .btn-primary {
  background: white;
  color: var(--forest-green);
  box-shadow: var(--shadow-md);
}

.cta-section .btn-primary:hover {
  background: var(--off-white);
  color: var(--forest-green);
}

/* ========================================
   Callout Boxes
   ======================================== */

.highlight-box, .tip-box, .warning-box, .info-box, .success-box {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}

.highlight-box { background: #EEF9F3; border: 1.5px solid #28A745; }
.highlight-box h4 { color: var(--forest-green); font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: var(--space-3); }

.tip-box { background: #FFFBEB; border: 1.5px solid var(--data-attention); }
.tip-box h4 { color: #92400E; font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: var(--space-3); }

.warning-box { background: #FFF7ED; border: 1.5px solid var(--data-attention); }
.warning-box h4 { color: #92400E; font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: var(--space-3); }

.info-box { background: #EFF6FF; border: 1.5px solid #3B82F6; }
.info-box h4 { color: #1E40AF; font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: var(--space-3); }

.success-box { background: #F0FDF4; border: 1.5px solid #22C55E; }
.success-box h4 { color: #166534; font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: var(--space-3); }

/* ========================================
   Section Badge
   ======================================== */

.section-badge {
  display: inline-block;
  background: var(--mint-tint);
  color: var(--forest-green);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-4);
}

/* ========================================
   Stats Section
   ======================================== */

.stats {
  padding: var(--space-16) var(--space-8);
  background: var(--vitality-green);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.25rem;
  font-weight: 900;
  color: white;
  margin-bottom: var(--space-1);
  background: none;
  -webkit-text-fill-color: unset;
}

.stat-item p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
}

/* ========================================
   Features Section — Card Grid
   ======================================== */

.features {
  padding: var(--space-24) var(--space-8);
  background: var(--pure-white);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
}

/* ========================================
   Feature Carousel
   ======================================== */

.feature-carousel {
  position: relative;
  overflow: hidden;
}

.feature-carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  gap: var(--space-6);
}

.feature-carousel-track .feature-card {
  flex-shrink: 0;
  box-sizing: border-box;
}

.feature-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--pure-white);
  color: var(--forest-green);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--mint-tint);
  border-color: var(--vitality-green);
}

.carousel-btn svg { width: 18px; height: 18px; stroke: currentColor; }

.carousel-dots {
  display: flex;
  gap: var(--space-2);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-color);
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.carousel-dot.active {
  background: var(--forest-green);
  width: 24px;
  border-radius: 4px;
}

.feature-grid-detailed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
  margin: var(--space-16) 0;
}

.feature-card {
  background: var(--pure-white);
  padding: var(--space-8);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-slow);
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(40, 167, 69, 0.3);
}

.feature-card--static {
  cursor: default;
}

.feature-card--static:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border-subtle);
}

/* Remove old gradient border pseudo-element */
.feature-card::before {
  display: none;
}

/* Feature icon box — replaces old emoji .feature-icon */
.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--mint-tint);
  border: 2px solid rgba(40, 167, 69, 0.3);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest-green);
  font-size: 1.75rem;   /* fallback for any remaining emoji */
  margin-bottom: var(--space-6);
}

.feature-icon svg,
.feature-icon i {
  width: 28px;
  height: 28px;
  stroke: var(--forest-green);
}

/* Feature icon large (used on feature detail pages) */
.feature-icon-large {
  width: 80px;
  height: 80px;
  background: var(--mint-tint);
  border: 2px solid rgba(40, 167, 69, 0.3);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest-green);
  font-size: 2.25rem;   /* fallback */
  margin: 0 auto var(--space-8);
}

.feature-icon-large svg,
.feature-icon-large i {
  width: 40px;
  height: 40px;
  stroke: var(--forest-green);
  stroke-width: 1.75;
}

.feature-card h3 {
  color: var(--deep-slate);
  margin-bottom: var(--space-3);
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--muted-slate);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.feature-card a {
  color: var(--forest-green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  z-index: 10;
  cursor: pointer;
  transition: all var(--transition-base);
}

.feature-card a:hover {
  gap: var(--space-3);
  color: var(--vitality-green);
}

/* Feature card image variant */
.feature-card--image {
  padding: 0;
  overflow: hidden;
}

.feature-card--image .feature-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.feature-card--image .feature-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.feature-card--image:hover .feature-card-img img {
  transform: scale(1.04);
}

.feature-card--image .feature-card-body {
  padding: var(--space-6) var(--space-6) var(--space-8);
}

.feature-card--image h3 {
  margin-bottom: var(--space-2);
}

.feature-card--image p {
  margin-bottom: var(--space-4);
  font-size: 0.9375rem;
}

/* ========================================
   How It Works — Steps
   ======================================== */

.how-it-works {
  padding: var(--space-24) var(--space-8);
  background: var(--off-white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-12);
  margin-top: var(--space-16);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 72px;
  height: 72px;
  background: var(--forest-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-lg);
}

.step-card h3 {
  margin-bottom: var(--space-3);
  color: var(--deep-slate);
}

.step-card p {
  color: var(--muted-slate);
}

/* Step card — image variant */
.step-card--image {
  text-align: left;
  background: var(--pure-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.step-card--image .step-card-image {
  position: relative;
}

.step-card--image .step-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.step-card--image .step-number {
  position: absolute;
  bottom: -36px;
  left: 24px;
  margin: 0;
  border: 3px solid var(--pure-white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.step-card--image .step-card-body {
  padding: 52px 24px 28px;
}

.step-card--image h3 {
  text-align: left;
  margin-bottom: var(--space-3);
}

.step-card--image p {
  text-align: left;
  margin: 0;
}

/* ========================================
   Testimonials
   ======================================== */

.testimonials {
  padding: var(--space-24) var(--space-8);
  background: var(--pure-white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-16);
}

.testimonial-card {
  background: var(--pure-white);
  padding: var(--space-8);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.rating {
  color: #F59E0B;
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
}

.rating::before {
  content: '★★★★★';
}

.testimonial-text {
  font-size: 1rem;
  color: var(--deep-slate);
  line-height: 1.8;
  margin-bottom: var(--space-6);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: var(--forest-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 0.9375rem;
  margin-bottom: 2px;
  color: var(--deep-slate);
}

.author-info p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
  padding: var(--space-32) var(--space-8);
  background: var(--forest-green);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(130, 201, 30, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-content {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--space-4);
}

.cta-section p {
  font-size: 1.125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-8);
}

.cta-section .text-small {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  margin-top: var(--space-4);
  display: block;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--deep-slate);
  color: white;
  padding: var(--space-24) var(--space-8) var(--space-8);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-section h4 {
  font-family: var(--font-display);
  color: white;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-section p,
.footer-section a {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9375rem;
  line-height: 2;
}

.footer-section a:hover {
  color: var(--vitality-green);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.social-link {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  transition: all var(--transition-base);
}

.social-link:hover {
  background: var(--vitality-green);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.875rem;
}

/* ========================================
   How-It-Works Guide — Sticky Sidenav
   ======================================== */

.guide-body-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-8);
  align-items: start;
}

.guide-sidenav {
  position: sticky;
  top: 5.5rem;
  background: var(--pure-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.guide-sidenav-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.guide-sidenav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-sidenav li {
  margin-bottom: 0;
}

.guide-sidenav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  color: var(--muted-slate);
  text-decoration: none;
  border-radius: var(--radius-md);
  line-height: 1.4;
  transition: all var(--transition-base);
}

.guide-sidenav a:hover {
  background: var(--mint-tint);
  color: var(--forest-green);
}

.guide-sidenav a.active {
  background: var(--mint-tint);
  color: var(--forest-green);
  font-weight: 600;
}

.guide-switcher a.current-guide {
  background: var(--forest-green);
  color: white;
  font-weight: 600;
}

.guide-switcher a.current-guide:hover {
  background: #0a4d2a;
  color: white;
}

.sidenav-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-4) 0;
}

.guide-content {
  min-width: 0;
  padding: var(--space-4) 0;
}

h2[id] {
  scroll-margin-top: 6rem;
}

@media (max-width: 900px) {
  .guide-body-layout {
    grid-template-columns: 1fr;
    padding: var(--space-8) var(--space-4);
  }
  .guide-sidenav {
    display: none;
  }
}

/* ========================================
   Related Guides grid
   ======================================== */

.related-guides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
}

/* ========================================
   Utilities
   ======================================== */

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

.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

.text-small {
  font-size: 0.875rem;
}

.hidden {
  display: none;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 968px) {
  :root {
    --space-24: 4rem;
    --space-32: 6rem;
  }

  .nav-menu {
    position: fixed;
    top: 73px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 73px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-8);
    gap: var(--space-6);
    transition: left var(--transition-slow);
    box-shadow: var(--shadow-xl);
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero {
    padding-top: 8rem;
    padding-bottom: var(--space-16);
  }

  .features,
  .how-it-works,
  .testimonials {
    padding: var(--space-16) var(--space-6);
  }

  .features-grid,
  .steps-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

@media (max-width: 640px) {
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   FAQ Accordion (details/summary)
   ======================================== */

.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 0.625rem;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.faq-item[open] {
  border-color: var(--vitality-green);
  box-shadow: var(--shadow-md);
}

.faq-question {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  user-select: none;
  transition: background var(--transition-fast);
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; }

.faq-item:not([open]) .faq-question:hover {
  background: var(--off-white);
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--vitality-green);
  transition: transform var(--transition-base);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid var(--border-color);
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child { margin-bottom: 0; }

.faq-answer ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.faq-answer li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.25rem;
}

/* ========================================
   Section S-Curve Dividers

   Each ::before sits at the very top of the
   receiving section, is coloured as the
   PREVIOUS section's background, and uses
   an SVG S-curve as a mask. The result: the
   previous section's colour flows in a soft
   S-shape into the new section, then fades
   to nothing — no padding adjustments needed
   since the existing padding-top on every
   section is larger than the 80px wave.

   Classes used:
     features--white        — white features section following a coloured section
     features--from-hero    — white features section following hero (off-white)
     features--feature-page — feature sub-pages: hero→features→cta (::before + ::after)
     features--offwhite     — off-white features section following a white section
     features--lime         — lime use-cases section (homepage)
     features--white2       — white features section following off-white (how-it-works page)
   ======================================== */

.features--white,
.features--from-hero,
.features--feature-page,
.features--offwhite,
.features--lime,
.features--white2,
.how-it-works,
.how-it-works--lime,
.testimonials,
.cta-section {
  position: relative;
  overflow: visible;
}

/* Shared pseudo-element setup — the S-curve mask */
.features--white::before,
.features--from-hero::before,
.features--feature-page::before,
.features--offwhite::before,
.features--lime::before,
.features--white2::before,
.how-it-works::before,
.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,80 C200,80 250,0 600,40 C950,80 1000,0 1200,0 L1200,0 L0,0 Z' fill='white'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,80 C200,80 250,0 600,40 C950,80 1000,0 1200,0 L1200,0 L0,0 Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

/* Homepage */
/* No wave on stats top — hero→stats stays a clean straight edge */
.features--white::before { background: var(--vitality-green); } /* prev: stats green */
.features--lime::before  { background: var(--pure-white); }     /* prev: features white */
.how-it-works::before    { background: var(--lime-highlight); } /* prev: lime section */
.testimonials::before    { background: var(--off-white); }      /* prev: how-it-works */

/* testimonials → cta: forest-green wave at bottom of testimonials
   (.cta-section::before is already used for the ambient glow) */
.testimonials {
  overflow: visible;
}
.testimonials::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  z-index: 1;
  background: var(--forest-green);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

/* Feature sub-pages (hero → features → cta) */
.features--feature-page::before { background: var(--off-white); }  /* prev: hero */
.features--feature-page::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  z-index: 1;
  background: var(--forest-green);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

/* Features page */
.features--from-hero::before { background: var(--off-white); }  /* prev: hero off-white */
.features--offwhite::before  { background: var(--pure-white); } /* prev: features white */

/* How It Works page */
.features--white2::before    { background: var(--off-white); }  /* prev: faq off-white */
.how-it-works--lime          { background: var(--lime-highlight); }
.how-it-works--lime::before  { background: var(--pure-white); } /* prev: guides white */
.how-it-works--lime::after   {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  z-index: 1;
  background: var(--off-white);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

/* Features & How It Works pages: last section before cta is off-white or white
   Use ::after on the last non-cta section to flow into forest-green */
.features--offwhite,
.features--white2 {
  overflow: visible;
}
.features--offwhite::after,
.features--white2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  z-index: 1;
  background: var(--forest-green);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,0 250,80 600,40 C950,0 1000,80 1200,80 L1200,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

@media (max-width: 768px) {
  .features--white::before,
  .features--from-hero::before,
  .features--feature-page::before,
  .features--feature-page::after,
  .features--offwhite::before,
  .features--lime::before,
  .features--white2::before,
  .how-it-works::before,
  .how-it-works--lime::before,
  .how-it-works--lime::after,
  .testimonials::before,
  .testimonials::after,
  .features--offwhite::after,
  .features--white2::after {
    height: 36px;
  }
}
