/* ===== Design Tokens (from CaloriePlan AI app) ===== */
:root {
  --primary: #16C784;
  --primary-light: #E8F9F1;
  --background: #F8F9FA;
  --card-white: #ffffff;
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --border-light: #E5E7EB;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ===== Navbar ===== */
.navbar {
  background: var(--card-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.navbar-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== Hero Section ===== */
.hero {
  padding: 36px 24px 80px;
  background: linear-gradient(180deg, var(--card-white) 0%, var(--background) 100%);
}

.hero-split {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-screenshot {
  flex: 0 0 auto;
}

.phone-slider {
  position: relative;
  width: 320px;
  height: 600px;
  animation: levitate 4s ease-in-out infinite;
}

.phone-mockup {
  width: 280px;
  border-radius: 28px;
}

.phone-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform, opacity;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 1s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center bottom;
}

/* Stack positions — set via JS data-stack attribute */
.phone-slider .slide[data-stack="0"] {
  z-index: 4;
  transform: translateX(0) scale(1) rotate(0deg);
  opacity: 1;
  box-shadow: 0 20px 60px rgba(22, 199, 132, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.phone-slider .slide[data-stack="1"] {
  z-index: 3;
  transform: translateX(18px) translateY(8px) scale(0.95) rotate(2.5deg);
  opacity: 1;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.phone-slider .slide[data-stack="2"] {
  z-index: 2;
  transform: translateX(34px) translateY(16px) scale(0.90) rotate(5deg);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.phone-slider .slide[data-stack="hidden"] {
  z-index: 1;
  transform: translateX(44px) translateY(22px) scale(0.86) rotate(6.5deg);
  opacity: 0;
  box-shadow: none;
}

@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-content {
  flex: 1;
  text-align: left;
}

.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin: 0 0 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(22, 199, 132, 0.18);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-icon .placeholder-icon {
  font-size: 48px;
  color: var(--primary);
  font-weight: 800;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 36px;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.play-badge {
  display: inline-block;
  transition: transform 0.2s;
}

.play-badge:hover {
  transform: scale(1.05);
}

.play-badge img {
  height: 56px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: #12b074;
  transform: translateY(-1px);
}

/* ===== Features Section ===== */
.features {
  padding: 72px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Feature icon colors */
.icon-green  { background: #E8F9F1; color: #16C784; }
.icon-purple { background: #F3EEFF; color: #8B5CF6; }
.icon-orange { background: #FFF3ED; color: #FF6B35; }
.icon-blue   { background: #EFF6FF; color: #3B82F6; }
.icon-yellow { background: #FEF3C7; color: #F59E0B; }
.icon-red    { background: #FEE2E2; color: #EF4444; }

/* ===== Footer ===== */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Privacy Policy Page ===== */
.policy-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.policy-page h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.policy-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 24px;
}

.policy-intro {
  font-size: 15px;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 16px;
}

.policy-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 28px 0;
}

.policy-page h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.policy-page h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.policy-page p {
  font-size: 14px;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 10px;
}

.policy-page .bold-text {
  font-weight: 600;
}

.policy-page ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 12px;
}

.policy-page ul li {
  font-size: 14px;
  color: #374151;
  line-height: 1.8;
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}

.policy-page ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
}

.permission-card {
  background: var(--card-white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.permission-icon {
  color: var(--primary);
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-box {
  background: var(--card-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 12px 0;
}

.contact-box p {
  margin-bottom: 4px;
}

.policy-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--card-white);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }

  .navbar-links.open {
    display: flex;
  }

  .hero {
    padding: 40px 20px 48px;
  }

  .hero-split {
    flex-direction: column;
    gap: 36px;
    text-align: center;
  }

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

  .hero-icon {
    margin: 0 auto 24px;
  }

  .hero p {
    margin: 0 auto 36px;
  }

  .phone-slider {
    width: 260px;
    height: 470px;
  }

  .phone-mockup {
    width: 220px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-badges {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .policy-page h1 {
    font-size: 26px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
