/* Landing Page Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --indigo: #6366f1;
  --indigo-dark: #4f46e5;
  --accent: #f59e0b;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --radius: 12px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Buttons */
.btn-primary {
  background: var(--indigo);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary:hover { background: var(--indigo-dark); }
.btn-primary.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-primary.btn-block { width: 100%; }

.btn-ghost {
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: background 0.2s;
}
.btn-ghost:hover { background: rgba(0,0,0,0.05); }

.btn-outline {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-outline.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-outline.btn-block { width: 100%; }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Hero */
.hero {
  padding: 80px 24px 100px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: #eef2ff;
  color: var(--indigo);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--indigo); }
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); }

/* Hero visual */
.hero-visual { display: flex; flex-direction: column; gap: 20px; }
.streak-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.streak-num { font-size: 4rem; font-weight: 800; color: var(--indigo); line-height: 1; }
.streak-label { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0 8px; }
.streak-habit { font-weight: 600; font-size: 1rem; margin-bottom: 12px; }
.streak-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.streak-fill { height: 100%; background: linear-gradient(90deg, var(--indigo), #818cf8); border-radius: 3px; }
.habits-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.habit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.95rem;
}
.habit-row:last-child { border-bottom: none; }
.habit-row .check { color: var(--success); font-weight: 700; }
.habit-row .circle {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
}
.habit-row.done { color: var(--text); }
.habit-row:not(.done) { color: var(--text-muted); }
.streak-tag { margin-left: auto; font-size: 0.82rem; color: #f59e0b; }

/* How It Works */
.how-it-works {
  padding: 80px 24px;
  background: var(--bg);
}
.hiw-inner { max-width: 1100px; margin: 0 auto; }
.hiw-inner h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 48px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.step-card {
  text-align: center;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}
.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--indigo);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}
.step-icon { font-size: 2.2rem; margin-bottom: 14px; }
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.step-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; max-width: 480px; }
}

/* Features */
.features { background: var(--surface); padding: 80px 24px; }
.features-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  text-align: center;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--indigo);
  margin-bottom: 12px;
}
.features h2, .pricing h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 48px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* Pricing */
.pricing { padding: 80px 24px; background: var(--bg); }
.pricing-inner { max-width: 1100px; margin: 0 auto; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; margin: 0 auto; }
.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
}
.plan-premium {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--indigo);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.plan-price { font-size: 2.8rem; font-weight: 800; color: var(--text); margin-bottom: 24px; }
.plan-price .plan-period { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.plan-features { list-style: none; margin-bottom: 28px; }
.plan-features li { font-size: 0.92rem; padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.plan-features li.muted { color: var(--text-muted); }
.check-green { color: var(--success); font-weight: 700; }
.check-gray { color: #d1d5db; }

/* Footer */
.footer { padding: 32px 24px; border-top: 1px solid var(--border); }
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.modal-box {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 36px 32px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-box h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-group label .optional { font-weight: 400; color: var(--text-muted); }
.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--indigo); }
.form-error { background: #fef2f2; color: #dc2626; padding: 10px 12px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 12px; }
.modal-switch { text-align: center; margin-top: 16px; font-size: 0.88rem; color: var(--text-muted); }
.modal-switch a { color: var(--indigo); font-weight: 600; text-decoration: none; margin-left: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 60px 20px 80px; }
  .hero h1 { font-size: 2.4rem; }
  .hero-visual { display: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
}