/* ============================================
   Habify Landing Page
   ============================================ */

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

:root {
  --bg: #0F172A;
  --surface: #1E293B;
  --surface-border: #334155;
  --primary: #3B82F6;
  --primary-light: #60A5FA;
  --primary-dark: #2563EB;
  --text: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --max-w: 1100px;
  --section-py: 80px;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: none;
}
.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.45);
}
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--surface-border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--text);
}

/* ── Section shared ── */
section { padding: var(--section-py) 0; }

.section-headline {
  font-size: 40px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-subline {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* ============================================
   Phase 2 — Hero
   ============================================ */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin: 0 auto 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto 20px;
}
.hero-sub {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.learn-more {
  color: var(--text-secondary);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  transition: color 0.15s;
}
.learn-more:hover { color: var(--text); text-decoration: none; }

/* ============================================
   Phase 3 — Problem / Solution
   ============================================ */
.problem-solution {
  background: linear-gradient(180deg, var(--bg) 0%, #131c31 100%);
}
.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
}
.ps-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 36px;
}
.ps-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}
.ps-card.problem h3 { color: var(--danger); }
.ps-card.solution h3 { color: var(--success); }
.ps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ps-list li {
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ps-list .icon-x {
  color: var(--danger);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 18px;
}
.ps-list .icon-check {
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 18px;
}

/* ============================================
   Phase 4 — Features
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}
.feature-icon.blue { background: rgba(59,130,246,0.15); }
.feature-icon.green { background: rgba(34,197,94,0.15); }
.feature-icon.yellow { background: rgba(245,158,11,0.15); }
.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   Phase 5 — Social Proof / Stats
   ============================================ */
.social-proof {
  background: linear-gradient(180deg, #131c31 0%, var(--bg) 100%);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.stat-item {
  text-align: center;
  padding: 32px 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
}
.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-light);
  margin-bottom: 6px;
}
.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   Phase 6 — Pricing
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 36px;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.pricing-card:hover {
  transform: translateY(-4px);
}
.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 0 40px rgba(59,130,246,0.15);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pricing-tier {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.pricing-price {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 4px;
}
.pricing-period {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}
.pricing-features li {
  font-size: 15px;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  align-items: center;
}
.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}
.pricing-card .btn { width: 100%; }

/* ============================================
   Phase 7 — Download CTA
   ============================================ */
.download-cta {
  text-align: center;
  padding: 100px 0;
  position: relative;
}
.download-cta::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.download-cta h2 {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
}
.download-cta p {
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 18px;
  position: relative;
}
.download-cta .btn { position: relative; }
.download-sub {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
}

/* ============================================
   Phase 8 — Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--surface-border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   Phase 9 — Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
  .hero { padding: 80px 0 60px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 17px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .section-headline { font-size: 30px; }
  .section-subline { font-size: 16px; }

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

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

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

  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }

  .download-cta h2 { font-size: 32px; }
  .download-cta .btn { width: 100%; }

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

  :root { --section-py: 56px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .hero-icon { width: 72px; height: 72px; border-radius: 18px; }
  .section-headline { font-size: 26px; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-item { padding: 20px 12px; }
  .stat-value { font-size: 24px; }
}
