/* ===== CSS Custom Properties (Design Tokens) ===== */
:root {
  --color-bg: #0F172A;
  --color-surface: #1E293B;
  --color-surface-light: #334155;
  --color-primary: #3B82F6;
  --color-primary-hover: #2563EB;
  --color-accent: #8B5CF6;
  --color-accent-hover: #7C3AED;
  --color-success: #10B981;
  --color-text: #F8FAFC;
  --color-text-muted: #94A3B8;
  --color-border: #334155;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --section-padding: 5rem 1.5rem;
}

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

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

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

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.nav-logo span {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
  font-weight: 500;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: var(--color-surface-light);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: #475569;
}

.btn-accent {
  background: var(--color-accent);
  color: white;
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
}

.mobile-nav.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav a {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--color-text);
}

.mobile-nav .btn {
  margin-top: 0.5rem;
  text-align: center;
}

/* ===== Hero Section ===== */
.hero {
  padding: 8rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.05) 40%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

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

.hero-stat .number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
}

.hero-stat .label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* ===== Section shared styles ===== */
.section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== Features Section ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-icon.ai {
  background: rgba(139, 92, 246, 0.15);
}

.feature-icon.tracking {
  background: rgba(16, 185, 129, 0.15);
}

.feature-icon.plans {
  background: rgba(59, 130, 246, 0.15);
}

.feature-icon.library {
  background: rgba(251, 191, 36, 0.15);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== How it Works Section ===== */
.how-it-works {
  background: var(--color-surface);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.step-number {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Connector line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 3.75rem;
  right: -1rem;
  width: 2rem;
  height: 2px;
  background: var(--color-border);
}

/* ===== Pricing Section ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.pricing-card .price .period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.pricing-card .price-note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.pricing-features li .check {
  color: var(--color-success);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card .btn {
  width: 100%;
}

/* ===== FAQ Section ===== */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.active {
  border-color: var(--color-primary);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-family);
  width: 100%;
  text-align: left;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-question .arrow {
  transition: transform 0.3s;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
}

.cta-section h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 1.5rem 2rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.footer-logo span {
  font-size: 1.25rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 7rem 1.5rem 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero-stat .number {
    font-size: 1.375rem;
  }

  .section {
    padding: 3rem 1.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

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

  .steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .step:not(:last-child)::after {
    display: none;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

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

  .cta-section h2 {
    font-size: 1.75rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
