/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #09090b;
  --bg-card: #111113;
  --bg-card-hover: #19191d;
  --bg-elevated: #1c1c21;
  --border: #222228;
  --border-subtle: #1a1a1f;
  --text: #d4d4d8;
  --text-dim: #71717a;
  --text-bright: #fafafa;
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-muted: rgba(16, 185, 129, 0.12);
  --accent-glow: rgba(16, 185, 129, 0.08);
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.nav-brand { font-size: 20px; font-weight: 800; color: var(--text-bright); letter-spacing: -0.5px; }
.nav-brand span { color: var(--text-bright); }
.nav-links { display: flex; gap: 12px; align-items: center; }
.nav-links a, .nav-links button {
  font-size: 14px; padding: 8px 16px; border-radius: var(--radius-sm);
  background: transparent; border: none; color: var(--text-dim); cursor: pointer;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links button:hover { color: var(--text-bright); background: var(--bg-card); }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); border: none;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s;
  text-align: center; font-family: var(--font);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 24px rgba(16, 185, 129, 0.25); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 17px; border-radius: var(--radius); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center; padding: 120px 0 80px;
  background: radial-gradient(ellipse at center top, var(--accent-glow) 0%, transparent 50%);
  position: relative;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-muted), transparent);
}
.hero h1 {
  font-size: clamp(36px, 5vw, 58px); font-weight: 800; color: var(--text-bright);
  margin-bottom: 20px; line-height: 1.1; letter-spacing: -1.5px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--accent), #6ee7b7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: var(--text-dim); max-width: 560px; margin: 0 auto 32px; line-height: 1.7; }

/* ─── Section Headers ─────────────────────────────────────────────────────── */
.section-header {
  text-align: center; margin-bottom: 48px;
}
.section-header h2 {
  font-size: 32px; font-weight: 800; color: var(--text-bright);
  letter-spacing: -0.5px; margin-bottom: 12px;
}
.section-header p {
  font-size: 16px; color: var(--text-dim); max-width: 500px; margin: 0 auto;
}

/* ─── Features ────────────────────────────────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; margin-top: 48px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 28px; transition: all 0.3s;
}
.feature-card:hover { border-color: var(--border); background: var(--bg-card-hover); }
.feature-card .icon {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 16px; font-size: 18px; font-weight: 700;
  background: var(--accent-muted); color: var(--accent);
}
.feature-card h3 { font-size: 16px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ─── Steps ───────────────────────────────────────────────────────────────── */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px;
}
.step-card { text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 16px; font-size: 18px; font-weight: 800;
  background: var(--accent-muted); color: var(--accent); border: 2px solid var(--accent);
}
.step-card h3 { font-size: 16px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 280px; margin: 0 auto; }

/* ─── Proof ───────────────────────────────────────────────────────────────── */
.proof-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 48px; text-align: center; max-width: 640px; margin: 32px auto 0;
}
.proof-score {
  font-size: 64px; font-weight: 800; color: var(--accent); letter-spacing: -2px;
}
.proof-stats {
  display: flex; justify-content: center; gap: 48px; margin-top: 24px; flex-wrap: wrap;
}
.proof-stat-val { font-size: 28px; font-weight: 800; color: var(--text-bright); }
.proof-stat-lbl { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ─── Pricing ─────────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 48px;
}
.price-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 36px; text-align: center; position: relative; transition: all 0.3s;
}
.price-card.popular {
  border-color: var(--accent); background: linear-gradient(180deg, rgba(16,185,129,0.04) 0%, var(--bg-card) 100%);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.06);
}
.price-card.popular::before {
  content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 4px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
}
.price-card h3 { font-size: 18px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.price-card .price { font-size: 48px; font-weight: 800; color: var(--text-bright); margin: 16px 0 4px; letter-spacing: -2px; }
.price-card .price span { font-size: 16px; font-weight: 400; color: var(--text-dim); letter-spacing: 0; }
.price-card .billing { font-size: 13px; color: var(--text-dim); margin-bottom: 28px; }
.price-card ul { list-style: none; text-align: left; margin-bottom: 28px; }
.price-card li { font-size: 14px; color: var(--text-dim); padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.price-card li:last-child { border-bottom: none; }
.price-card li::before { content: '✓ '; color: var(--accent); font-weight: 700; }

/* ─── Auth Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px; width: 100%; max-width: 420px; position: relative;
}
.modal h2 { font-size: 22px; font-weight: 700; color: var(--text-bright); margin-bottom: 24px; text-align: center; }
.modal .close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 24px; cursor: pointer;
}
.modal .close:hover { color: var(--text-bright); }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 15px; outline: none;
  transition: border-color 0.2s; font-family: var(--font);
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-dim); }
.form-error { color: var(--red); font-size: 13px; margin-top: 4px; }
.form-toggle { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-dim); }
.form-toggle a { cursor: pointer; }

/* ─── Dashboard ───────────────────────────────────────────────────────────── */
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 32px;
}
.dash-header h2 { font-size: 24px; font-weight: 700; color: var(--text-bright); }
.usage-badge {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 16px; font-size: 13px; color: var(--text-dim);
}
.analyze-form { display: flex; gap: 12px; margin-bottom: 32px; }
.analyze-form input { flex: 1; }
.analyze-form .btn { white-space: nowrap; }

/* ─── Report Cards ────────────────────────────────────────────────────────── */
.report-list { display: flex; flex-direction: column; gap: 12px; }
.report-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: all 0.2s;
}
.report-card:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.report-score {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 800; border: 3px solid;
}
.report-meta h4 { font-size: 15px; font-weight: 600; color: var(--text-bright); margin-bottom: 2px; }
.report-meta p { font-size: 13px; color: var(--text-dim); }
.report-date { font-size: 12px; color: var(--text-dim); text-align: right; }

/* ─── Score Ring ──────────────────────────────────────────────────────────── */
.score-display { text-align: center; margin: 24px 0; }
.score-big { font-size: 72px; font-weight: 800; }
.score-label { font-size: 14px; color: var(--text-dim); }

/* ─── Results Scores Grid ─────────────────────────────────────────────────── */
.scores-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 24px 0;
}
.score-item {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}
.score-item .val { font-size: 28px; font-weight: 700; }
.score-item .lbl { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ─── Recommendations ─────────────────────────────────────────────────────── */
.rec-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.rec-item {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg-card); border-left: 4px solid;
}
.rec-item.critical { border-left-color: var(--red); }
.rec-item.warning { border-left-color: var(--yellow); }
.rec-item.info { border-left-color: var(--blue); }
.rec-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; color: #fff;
  margin-right: 8px;
}
.rec-badge.critical { background: var(--red); }
.rec-badge.warning { background: var(--yellow); color: #000; }
.rec-badge.info { background: var(--blue); }
.rec-cat { font-size: 12px; color: var(--text-dim); font-weight: 600; margin-right: 8px; }
.rec-text { font-size: 14px; color: var(--text); margin-top: 6px; }

/* ─── Loading Spinner ─────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast ───────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm); color: #fff;
  font-size: 14px; font-weight: 500; animation: slideIn 0.3s;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; gap: 24px; }
  .proof-stats { gap: 24px; }
}
@media (max-width: 640px) {
  .hero { padding: 80px 0 48px; }
  .hero h1 { font-size: 32px; letter-spacing: -1px; }
  .analyze-form { flex-direction: column; }
  .report-card { grid-template-columns: auto 1fr; }
  .report-date { grid-column: span 2; text-align: left; }
  .section { padding: 48px 0; }
  .modal { margin: 16px; padding: 24px; }
  .scores-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}
