/*
 * Kilo by Automorphism - Brand Design System
 * Soft-Modern & Data-Driven Minimalism
 * Super smart, credible, fun friend who gets you
 */

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */

:root {
  /* Primary Palette - Kilo Brand Colors */
  --color-primary: #4A154B;           /* Aubergine - Headers, navigation, primary elements */
  --color-primary-light: #611F69;     /* Lighter Aubergine for subtle lift gradients */
  --color-primary-dark: #3A0F3C;      /* Darker Aubergine */

  --color-accent-luxury: #ECB22E;     /* Vibrant Yellow - Premium CTAs, interactive highlights */
  --color-accent-luxury-light: #F5E39C; /* Lighter Yellow for radial gradient edges */
  --color-accent-luxury-dark: #D49A1A;  /* Darker Yellow */

  --color-accent-support: #ECB22E;    /* Vibrant Yellow - CTAs, interactive elements */
  --color-accent-support-light: #F5E39C;
  --color-accent-support-dark: #D49A1A;

  --color-neutral: #F7F7F7;           /* Cream/Soft White - Backgrounds, breathing room */
  --color-neutral-dark: #E8E8E8;

  /* Extended Palette */
  --color-success: #014421;           /* Forest Green - Feature blocks, completed goals */
  --color-alert: #D49A1A;             /* Dark Yellow - Attention items */

  /* Semantic Text Colors */
  --color-text: #2D2D2F;              /* Charcoal - Main copy, headlines */
  --color-text-secondary: #6B6B6B;    /* Warm Gray - Secondary text, captions */
  --color-text-muted: #9B9B9B;

  /* Legacy color mappings for macro visualizations */
  --color-tomato: #ECB22E;            /* Mapped to Vibrant Yellow for protein */
  --color-carrot: #F5E39C;            /* Mapped to Light Yellow for carbs */
  --color-cucumber: #014421;          /* Mapped to Forest Green for fats */

  /* Background & Surface Colors */
  --color-background: #FFFFFF;        /* Pure White */
  --color-background-secondary: var(--color-neutral);
  --color-surface: #FFFFFF;
  --color-border: var(--color-neutral-dark);
  --color-border-light: var(--color-neutral);

  /* Brand Colors for Macros */
  --color-protein: var(--color-tomato);
  --color-carbs: var(--color-carrot);
  --color-fats: var(--color-cucumber);

  /* Typography Scale */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  --font-size-7xl: 4.5rem;    /* 72px */

  /* Font Weights - Expressive Range */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
  --line-height-loose: 2;

  /* Spacing Scale - 4px base with organic feel */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* Border Radius - Soft Modern Shapes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* Shadows - Soft with Aubergine Undertones */
  --shadow-xs: 0 1px 2px 0 rgba(74, 21, 75, 0.08);
  --shadow-sm: 0 2px 4px 0 rgba(74, 21, 75, 0.1), 0 1px 2px 0 rgba(74, 21, 75, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(74, 21, 75, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(74, 21, 75, 0.12), 0 4px 8px -2px rgba(74, 21, 75, 0.08);
  --shadow-xl: 0 24px 48px -8px rgba(74, 21, 75, 0.15), 0 8px 16px -4px rgba(74, 21, 75, 0.1);
  --shadow-warm: 0 8px 32px rgba(236, 178, 46, 0.15);
  --shadow-glow: 0 0 40px rgba(74, 21, 75, 0.15);

  /* Transitions - Organic Easing */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Layout */
  --container-max-width: 1200px;
  --container-padding: var(--space-8);
  --header-height: 80px;
}

/* ==========================================================================
   Base Styles & Resets
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto',
               system-ui, -apple-system, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI',
               system-ui, -apple-system, sans-serif;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin: 0 0 var(--space-4) 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.03em;
}
h2 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
}
h3 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}
h4 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
}
h5 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}
h6 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

p {
  margin: 0 0 var(--space-4) 0;
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: var(--font-weight-medium);
}

a:hover {
  color: #014421;
}

ul, ol {
  margin: 0 0 var(--space-4) 0;
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

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

/* ==========================================================================
   Layout Components
   ========================================================================== */

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

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  box-shadow: var(--shadow-sm);
}

.header .container {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: -0.02em;
  line-height: 1;
  height: 40px;
  transform: translateY(-2px);
}

.logo:hover {
  color: var(--color-primary-light);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  font-size: var(--font-size-base);
  line-height: 1;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-neutral);
}

.nav-link.active {
  color: white;
  background-color: var(--color-primary);
}

/* Mobile Navigation */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--color-primary);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.mobile-menu-button:hover {
  background-color: var(--color-neutral);
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    gap: 0;
    padding: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2);
  }

  .mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-base);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: radial-gradient(circle, #ECB22E 0%, #F5E39C 100%);
  color: #2D2D2F;
  font-weight: var(--font-weight-bold);
  box-shadow: 0 4px 14px 0 rgba(236, 178, 46, 0.3);
}

.btn-primary:hover {
  background: radial-gradient(circle, #D49A1A 0%, #ECB22E 100%);
  color: #2D2D2F;
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 8px 25px 0 rgba(236, 178, 46, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: translateY(-2px) scale(0.98);
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--font-size-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   Cards & Components
   ========================================================================== */

.card {
  background-color: white;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-success);
  opacity: 0;
  transition: var(--transition-base);
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-success);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.card-description {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Feature Cards */
.feature-card {
  text-align: center;
  padding: var(--space-10);
  background: white;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: var(--color-success);
  transition: var(--transition-base);
  opacity: 0.05;
}

.feature-card:hover::after {
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-warm);
  border-color: var(--color-success);
}

.feature-card:hover .feature-icon {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto var(--space-6) auto;
  border-radius: var(--radius-xl);
  background: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3xl);
  color: white;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
  transition: var(--transition-base);
}

.feature-icon svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  transition: var(--transition-fast);
}

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

.hero {
  background: linear-gradient(135deg, #4A154B 0%, #611F69 100%);
  padding: var(--space-32) 0 var(--space-24) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ECB22E 0%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #014421 0%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
}

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

.hero-title {
  font-size: clamp(var(--font-size-4xl), 8vw, var(--font-size-7xl));
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  color: white;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-10);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-normal);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   App Showcase Section
   ========================================================================== */

.app-showcase {
  background: var(--color-neutral);
  position: relative;
  overflow: hidden;
}

.app-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--color-background) 0%, transparent 100%);
  pointer-events: none;
}

.app-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  margin-top: var(--space-12);
}

.demo-tabs {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-2);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.demo-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: transparent;
  border: none;
  border-radius: var(--radius-xl);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition-fast);
  flex: 1;
  justify-content: center;
  font-size: var(--font-size-sm);
}

.demo-tab svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.demo-tab.active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.demo-tab:hover:not(.active) {
  background: var(--color-neutral);
  color: var(--color-primary);
}

.demo-features {
  position: relative;
  min-height: 400px;
}

.demo-feature {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transition: all 0.4s ease-in-out;
  transform: translateY(20px);
}

.demo-feature.active {
  opacity: 1;
  visibility: visible;
  position: static;
  transform: translateY(0);
}

.demo-feature h3 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-5);
  color: var(--color-primary);
}

.demo-feature p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  line-height: var(--line-height-relaxed);
}

.feature-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-benefits li {
  display: flex;
  align-items: center;
  padding: var(--space-3) 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

.phone-mockup {
  position: relative;
  width: 300px;
  height: 600px;
  margin: 0 auto;
  background: linear-gradient(135deg, #2D2D2F 0%, #4A4A4C 100%);
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 24px 64px rgba(74, 21, 75, 0.25);
  transform: rotate(-3deg);
  transition: var(--transition-base);
}

.phone-mockup:hover {
  transform: rotate(0deg) scale(1.02);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.demo-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease-in-out;
  transform: translateX(20px);
}

.demo-screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.app-interface {
  padding: var(--space-6);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
}

.interface-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid #014421;
}

.interface-header h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin: 0;
  color: var(--color-primary);
}

.interface-header .date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background: var(--color-neutral);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.macro-rings {
  display: flex;
  justify-content: space-around;
  margin: var(--space-8) 0;
  gap: var(--space-4);
}

.macro-ring {
  position: relative;
  width: 75px;
  height: 75px;
}

.ring-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--ring-color, var(--color-primary)) 0deg,
    var(--ring-color, var(--color-primary)) calc(var(--progress, 0%) * 3.6deg),
    var(--color-neutral-dark) calc(var(--progress, 0%) * 3.6deg),
    var(--color-neutral-dark) 360deg
  );
  mask: radial-gradient(circle, transparent 38%, black 39%);
  -webkit-mask: radial-gradient(circle, transparent 38%, black 39%);
}

.macro-ring.protein {
  --ring-color: var(--color-protein);
}

.macro-ring.carbs {
  --ring-color: var(--color-carbs);
}

.macro-ring.fats {
  --ring-color: var(--color-fats);
}

.ring-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.macro-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1;
}

.macro-label {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 3px;
  font-weight: var(--font-weight-medium);
}

.recent-foods {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.food-item {
  padding: var(--space-3) var(--space-4);
  background: white;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-xs);
}

.analytics-chart {
  margin: var(--space-6) 0;
}

.chart-bars {
  display: flex;
  gap: var(--space-2);
  height: 140px;
  align-items: end;
  margin-bottom: var(--space-3);
}

.bar {
  flex: 1;
  background: var(--color-success);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  min-height: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-labels {
  display: flex;
  gap: var(--space-2);
}

.chart-labels span {
  flex: 1;
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-semibold);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.stat-item {
  text-align: center;
  padding: var(--space-5);
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-xs);
}

.stat-value {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-semibold);
}

.goals-progress {
  margin: var(--space-6) 0;
}

.goal-item {
  margin-bottom: var(--space-5);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.goal-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

.goal-target {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}

.progress-bar {
  height: 10px;
  background: var(--color-neutral-dark);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: var(--color-success);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(1, 68, 33, 0.5);
}

.recommendation {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: #F5E39C;
  border-radius: var(--radius-lg);
  border: 2px solid #ECB22E;
}

.recommendation p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

@media (max-width: 768px) {
  .app-demo {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .phone-mockup {
    width: 280px;
    height: 560px;
    transform: rotate(0deg);
  }

  .demo-tabs {
    flex-direction: column;
    gap: var(--space-2);
  }

  .demo-tab {
    justify-content: flex-start;
  }

  .demo-features {
    min-height: 350px;
  }
}

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

.cta-section {
  background: radial-gradient(circle at center, #ECB22E 0%, #F5E39C 100%);
  color: #2D2D2F;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 1;
}

.cta-text .section-title {
  color: #2D2D2F;
  margin-bottom: var(--space-6);
}

.cta-text .section-subtitle {
  color: #2D2D2F;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
}

.cta-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.cta-feature {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: #2D2D2F;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

.cta-feature svg {
  width: 24px;
  height: 24px;
  color: #014421;
  flex-shrink: 0;
}

.download-options {
  margin-top: var(--space-8);
}

.app-store-badges {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.app-store-badge {
  display: flex;
  align-items: center;
  background: rgba(74, 21, 75, 0.1);
  border: 2px solid rgba(74, 21, 75, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-3) var(--space-5);
  text-decoration: none;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-store-badge:hover {
  background: rgba(74, 21, 75, 0.2);
  border-color: rgba(74, 21, 75, 0.5);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(74, 21, 75, 0.2);
}

.badge-content {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.badge-icon svg {
  width: 32px;
  height: 32px;
  color: #2D2D2F;
}

.badge-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.badge-line1 {
  font-size: var(--font-size-xs);
  color: #2D2D2F;
  line-height: 1;
}

.badge-line2 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: #2D2D2F;
  line-height: 1.3;
}

.alternative-download {
  text-align: center;
  padding-top: var(--space-6);
  border-top: 2px solid rgba(74, 21, 75, 0.3);
}

.alternative-download p {
  color: #2D2D2F;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
}

.cta-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-code-section {
  text-align: center;
}

.qr-code {
  display: inline-block;
  padding: var(--space-8);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 48px rgba(74, 21, 75, 0.25);
  border: 4px solid #014421;
}

.qr-placeholder {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-neutral);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.qr-placeholder svg {
  width: 90px;
  height: 90px;
  color: var(--color-text-secondary);
}

.qr-text {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0;
}

@media (max-width: 768px) {
  .cta-content {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    text-align: center;
  }

  .app-store-badges {
    flex-direction: column;
    align-items: center;
  }

  .app-store-badge {
    width: 100%;
    max-width: 240px;
    justify-content: center;
  }
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-5);
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: var(--line-height-relaxed);
}

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

.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.95);
  padding: var(--space-16) 0 var(--space-8) 0;
  margin-top: var(--space-24);
  border-top: 4px solid #ECB22E;
}

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

.footer-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.footer-link {
  color: rgba(255, 255, 255, 0.95);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: #ECB22E;
}

.footer-copyright {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
}

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

@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-5);
    --space-20: 3.5rem;
    --space-24: 4.5rem;
    --space-32: 5rem;
  }

  .hero {
    padding: var(--space-16) 0 var(--space-12) 0;
    min-height: 70vh;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card,
  .feature-card {
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-lg);
  }

  .section-title {
    font-size: var(--font-size-3xl);
  }

  .btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
  }
}

/* ==========================================================================
   Content Styling
   ========================================================================== */

.content {
  line-height: var(--line-height-relaxed);
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
  color: var(--color-primary);
}

.content h2:first-child,
.content h1:first-child {
  margin-top: 0;
}

.content p {
  margin-bottom: var(--space-6);
}

.content ul,
.content ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-8);
}

.content blockquote {
  border-left: 4px solid #014421;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
  background-color: var(--color-neutral);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.content blockquote p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.content pre {
  background-color: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.95);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-6) 0;
}

.content code {
  background-color: var(--color-neutral);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--color-primary);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
  border: 1px solid var(--color-border-light);
}

.content pre code {
  background: none;
  padding: 0;
  color: inherit;
  border: none;
}

/* ==========================================================================
   Utilities & Accessibility
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.no-scroll {
  overflow: hidden;
}

/* Focus Styles */
button:focus-visible,
.btn:focus-visible,
.demo-tab:focus-visible,
.app-store-badge:focus-visible,
a:focus-visible {
  outline: 3px solid #ECB22E;
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .feature-card:hover,
  .card:hover,
  .btn:hover,
  .phone-mockup:hover {
    transform: none !important;
  }
}
