/* =============================================
   PickleGo Landing Page Styles
   Theme tokens sourced from src/theme/
   ============================================= */

:root {
  /* Brand palette — src/theme/colors.ts */
  --pickle-green: #4CAF50;
  --power-yellow: #FFC107;
  --court-blue: #2196F3;
  --deep-asphalt: #333333;
  --court-gray: #F5F5F5;
  --white: #FFFFFF;
  --gray-200: #E0E0E0;
  --gray-400: #999999;
  --green-overlay: rgba(76, 175, 80, 0.1);

  /* Typography — src/theme/typography.ts */
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Fredoka', sans-serif;
  --font-stats: 'Fredoka', sans-serif;

  /* Spacing — src/theme/spacing.ts */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-xxl: 24px;
  --space-xxxl: 32px;

  /* Border radius — src/theme/spacing.ts */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--deep-asphalt);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--court-blue);
  text-decoration: none;
}

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

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

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  color: var(--pickle-green);
  text-decoration: none;
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-xxxl);
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--deep-asphalt);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--pickle-green);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--deep-asphalt);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: var(--space-lg) 0;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--deep-asphalt);
  padding: var(--space-md) var(--space-xl);
  text-decoration: none;
  transition: background 0.2s;
}

.nav-mobile a:hover {
  background: var(--court-gray);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

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

.hero {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, var(--white) 0%, var(--court-gray) 100%);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--space-xxxl);
}

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

.hero-text h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.2;
  color: var(--deep-asphalt);
  margin-bottom: var(--space-lg);
}

.hero-text h1 span {
  color: var(--pickle-green);
}

.hero-text p {
  font-size: 18px;
  color: var(--gray-400);
  margin-bottom: var(--space-xxxl);
}

.hero-image {
  max-width: 320px;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
  background: var(--pickle-green);
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.35);
  color: var(--white);
}

@media (min-width: 768px) {
  .hero {
    padding: 80px 0 60px;
  }

  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .hero-text {
    text-align: left;
    flex: 1;
    max-width: 520px;
  }

  .hero-text h1 {
    font-size: 48px;
  }

  .hero-text p {
    font-size: 20px;
  }

  .hero-image {
    max-width: 400px;
    flex-shrink: 0;
  }
}

@media (min-width: 1024px) {
  .hero-text h1 {
    font-size: 56px;
  }

  .hero-image {
    max-width: 480px;
  }
}

/* =============================================
   Section shared styles
   ============================================= */

.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--court-gray);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--deep-asphalt);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-400);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto var(--space-xxxl);
}

@media (min-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 36px;
  }
}

/* =============================================
   Features
   ============================================= */

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-xxl);
  border-left: 4px solid var(--pickle-green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--green-overlay);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--pickle-green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.6;
}

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

/* =============================================
   How It Works
   ============================================= */

.how-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xxxl);
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxl);
  flex: 1;
}

.step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.step-number {
  font-family: var(--font-stats);
  font-size: 32px;
  color: var(--pickle-green);
  line-height: 1;
  flex-shrink: 0;
}

.step h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: var(--space-xs);
}

.step p {
  font-size: 14px;
  color: var(--gray-400);
}

.how-image {
  max-width: 280px;
}

@media (min-width: 768px) {
  .how-inner {
    flex-direction: row;
    align-items: center;
  }

  .how-image {
    max-width: 340px;
    order: -1;
  }
}

/* =============================================
   Stats Showcase
   ============================================= */

.stats-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xxxl);
}

.stats-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xxxl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  width: 100%;
  max-width: 500px;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.stat-item {
  padding: var(--space-lg) 0;
}

.stat-value {
  font-family: var(--font-stats);
  font-size: 36px;
  color: var(--pickle-green);
  line-height: 1.2;
}

.stat-value.loss {
  color: #F44336;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--space-xs);
}

.stats-divider {
  height: 1px;
  background: var(--gray-200);
  margin: var(--space-lg) 0;
}

.stats-winrate {
  margin-top: var(--space-lg);
}

.stats-winrate .stat-value {
  font-size: 48px;
}

.stats-image {
  max-width: 300px;
}

@media (min-width: 768px) {
  .stats-inner {
    flex-direction: row;
    justify-content: center;
  }

  .stats-image {
    max-width: 360px;
  }

  .stat-value {
    font-size: 42px;
  }
}

/* =============================================
   Download CTA
   ============================================= */

.cta {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--court-gray) 0%, var(--white) 100%);
}

.cta-image {
  max-width: 240px;
  margin: 0 auto var(--space-xxxl);
}

.cta h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  margin-bottom: var(--space-lg);
}

.cta p {
  color: var(--gray-400);
  font-size: 16px;
  margin-bottom: var(--space-xxxl);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--deep-asphalt);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s, opacity 0.2s;
}

.store-badge:hover {
  transform: translateY(-2px);
  color: var(--white);
  opacity: 0.9;
}

.store-badge svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
}

.store-badge small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.7;
}

@media (min-width: 768px) {
  .cta h2 {
    font-size: 40px;
  }
}

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

.footer {
  background: var(--deep-asphalt);
  color: var(--white);
  padding: var(--space-xxxl) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--pickle-green);
}

.footer p {
  font-size: 14px;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

/* =============================================
   Legal pages (Privacy Policy, Terms of Service)
   ============================================= */

.legal-page {
  padding: 48px 0 80px;
  background: var(--court-gray);
  min-height: calc(100vh - 64px - 160px);
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xxxl) var(--space-xxl);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.legal-content h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  color: var(--deep-asphalt);
  margin-bottom: var(--space-sm);
}

.legal-date {
  font-size: 14px;
  color: var(--gray-400);
  font-style: italic;
  margin-bottom: var(--space-xxxl);
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--pickle-green);
  margin-top: var(--space-xxxl);
  margin-bottom: var(--space-md);
}

.legal-content h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 16px;
  color: var(--deep-asphalt);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--deep-asphalt);
  margin-bottom: var(--space-md);
}

.legal-content ul {
  margin: 0 0 var(--space-lg) var(--space-xl);
  font-size: 15px;
  line-height: 1.7;
  color: var(--deep-asphalt);
}

.legal-content li {
  margin-bottom: var(--space-sm);
}

.legal-content a {
  color: var(--pickle-green);
  font-weight: 500;
}

.legal-content a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .legal-content {
    padding: 48px;
  }

  .legal-content h1 {
    font-size: 36px;
  }
}

/* =============================================
   Scroll animations
   ============================================= */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
