/* ===== Am I Citable? — Premium Redesign ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #08080a;
  --bg-raised: #111114;
  --bg-surface: #18181b;
  --bg-surface-hover: #1f1f23;
  --accent: #8b7cff;
  --accent-dim: rgba(139, 124, 255, 0.12);
  --accent-glow: rgba(139, 124, 255, 0.08);
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;
  --text: #a1a1aa;
  --text-muted: #52525b;
  --text-bright: #fafafa;
  --text-secondary: #71717a;
  --border: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--text-bright); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: 'IBM Plex Mono', monospace; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0;
  background: rgba(8, 8, 10, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-weight: 700; font-size: 0.95rem; color: var(--text-bright);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.02em;
}

.nav-logo:hover { opacity: 1; color: var(--text-bright); }

.nav-logo .logo-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.75rem; color: #08080a;
  font-family: 'IBM Plex Mono', monospace;
}

.nav-links {
  list-style: none; display: flex; gap: 8px; align-items: center;
}

.nav-links a {
  color: var(--text-secondary); font-size: 0.82rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; transition: all var(--transition);
}

.nav-links a:hover { color: var(--text-bright); background: var(--bg-surface); opacity: 1; }

/* ===== HERO ===== */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent); font-size: 0.78rem; font-weight: 500;
  margin-bottom: 32px;
  border: 1px solid rgba(139, 124, 255, 0.15);
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 800; letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 680px; margin: 0 auto 20px;
}

.hero h1 .dim { color: var(--text-secondary); }

.hero .subtitle {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 480px; margin: 0 auto 56px;
  font-weight: 400; line-height: 1.6;
}

/* ===== SCAN FORM ===== */
.scan-form-wrapper {
  max-width: 580px; margin: 0 auto; position: relative;
}

.scan-form {
  display: flex;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.scan-form:focus-within {
  border-color: rgba(139, 124, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.08), 0 8px 40px rgba(0,0,0,0.3);
}

.scan-form input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-bright); font-size: 0.95rem;
  padding: 14px 18px; font-family: inherit;
}

.scan-form input::placeholder { color: var(--text-muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  background: var(--accent); color: #08080a;
  font-weight: 600; font-size: 0.85rem;
  border: none; border-radius: 10px; cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(139, 124, 255, 0.3);
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }

.btn-secondary {
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-bright);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255,255,255,0.1);
  box-shadow: none; filter: none;
}

.hero-meta {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 20px; color: var(--text-muted); font-size: 0.8rem;
}

.hero-meta span { display: flex; align-items: center; gap: 5px; }

/* ===== SECTIONS ===== */
section { padding: 100px 0; }

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; font-weight: 500;
  color: var(--accent); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px; letter-spacing: -0.03em;
}

.section-desc {
  color: var(--text-secondary); max-width: 520px;
  font-size: 0.95rem; line-height: 1.7;
}

.section-desc.center { margin: 0 auto; text-align: center; }
.section-heading.center { text-align: center; }
.section-label.center { text-align: center; }

/* ===== WHAT WE ANALYZE ===== */
.analysis-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-subtle); border-radius: var(--radius);
  overflow: hidden; margin-top: 56px;
  border: 1px solid var(--border);
}

.analysis-item {
  padding: 36px 32px; background: var(--bg-raised);
  transition: background var(--transition);
}

.analysis-item:hover { background: var(--bg-surface); }

.analysis-item-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}

.analysis-item h3 { font-size: 0.95rem; font-weight: 600; }

.analysis-weight {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; color: var(--accent);
  background: var(--accent-dim); padding: 3px 9px;
  border-radius: 4px;
}

.analysis-item p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; }

/* ===== FAQ ===== */
.faq-list { max-width: 680px; margin: 48px auto 0; }

.faq-item { border-bottom: 1px solid var(--border); }

.faq-question {
  width: 100%; background: none; border: none; text-align: left;
  padding: 20px 0; color: var(--text-bright);
  font-size: 0.92rem; font-weight: 500; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Inter', sans-serif;
  transition: color var(--transition);
}

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

.faq-question::after {
  content: '+'; font-size: 1.2rem; color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0; margin-left: 16px;
}

.faq-item.open .faq-question::after { transform: rotate(45deg); color: var(--accent); }

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

.faq-item.open .faq-answer { max-height: 300px; }

.faq-answer p {
  color: var(--text-secondary); font-size: 0.88rem;
  line-height: 1.7; padding-bottom: 20px;
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-muted); font-size: 0.78rem;
}

/* ===== ERROR ===== */
.error-banner {
  display: none; max-width: 580px; margin: 12px auto 0;
  padding: 12px 16px; background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-sm);
  color: var(--red); text-align: center; font-size: 0.85rem;
}

.error-banner.active { display: block; }

/* ===== SCANNING OVERLAY ===== */
.scanning-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(8, 8, 10, 0.96); z-index: 200;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 28px;
}

.scanning-overlay.active { display: flex; }

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bg-surface);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.scanning-status {
  color: var(--text-secondary); font-size: 0.9rem; text-align: center;
}

.scanning-status strong {
  color: var(--text-bright); display: block;
  font-size: 1rem; margin-bottom: 6px;
}

/* ===== RESULTS PAGE ===== */
.results-header {
  padding: 100px 0 32px; text-align: center;
}

.results-header h1 {
  font-size: 1.3rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 8px;
  letter-spacing: 0;
}

.results-url {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-bright); font-size: 0.9rem;
  word-break: break-all;
}

/* Score Gauge */
.score-section { text-align: center; padding: 20px 0 60px; }

.score-gauge {
  position: relative; width: 220px; height: 220px;
  margin: 0 auto 20px;
}

.score-gauge svg {
  transform: rotate(-90deg);
  width: 220px; height: 220px;
}

.score-gauge .track {
  fill: none; stroke: var(--bg-surface); stroke-width: 10;
}

.score-gauge .fill {
  fill: none; stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.23, 1, 0.32, 1), stroke 0.5s ease;
}

.score-value {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 3.5rem; font-weight: 600;
  color: var(--text-bright);
}

.score-label {
  font-size: 0.9rem; color: var(--text-secondary);
}

.score-label .grade { font-weight: 600; font-size: 0.95rem; }

/* Breakdown */
.breakdown {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 60px;
}

.breakdown-card {
  padding: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.breakdown-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.breakdown-card-header h3 { font-size: 0.9rem; font-weight: 600; }
.breakdown-card-header .weight { color: var(--text-muted); font-weight: 400; }

.breakdown-score {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.5rem; font-weight: 600;
}

.breakdown-bar {
  width: 100%; height: 4px;
  background: var(--bg-surface); border-radius: 2px;
  margin-bottom: 16px; overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.checks-list { display: flex; flex-direction: column; }

.check-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.84rem;
}
.check-item:last-child { border-bottom: none; }

.check-icon { flex-shrink: 0; font-size: 0.85rem; margin-top: 1px; }
.check-pass { color: var(--green); }
.check-fail { color: var(--red); }
.check-warn { color: var(--yellow); }

.check-label { color: var(--text); flex: 1; }

.check-recommendation {
  display: block; color: var(--text-muted);
  font-size: 0.78rem; margin-top: 3px;
}

/* Actions */
.results-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; padding: 32px 0;
}

/* Email capture */
.email-capture {
  max-width: 480px; margin: 0 auto;
  text-align: center; padding: 40px 28px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius);
}

.email-capture h3 { font-size: 1rem; margin-bottom: 6px; }
.email-capture > p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 20px; }

.email-form { display: flex; gap: 8px; }

.email-form input {
  flex: 1; padding: 11px 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-bright);
  font-family: inherit; font-size: 0.88rem; outline: none;
}

.email-form input:focus { border-color: rgba(139, 124, 255, 0.4); }

/* ===== CATEGORY SUMMARY (ungated) ===== */
.category-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px;
}

.summary-card {
  padding: 24px; background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between;
}

.summary-card-info h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.summary-card-info .weight { font-size: 0.72rem; color: var(--text-muted); }

.summary-grade {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.8rem; font-weight: 700;
}

.summary-bar { width: 100%; height: 4px; background: var(--bg-surface); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.summary-bar-fill { height: 100%; border-radius: 2px; transition: width 1.2s cubic-bezier(0.23,1,0.32,1); }

/* ===== EMAIL GATE ===== */
.gate-section { padding-top: 0; }

.email-gate {
  max-width: 520px; margin: 0 auto 40px; text-align: center;
  padding: 48px 36px; background: var(--bg-raised);
  border: 1px solid rgba(139, 124, 255, 0.2); border-radius: var(--radius);
  position: relative; z-index: 10;
}

.email-gate.hidden { display: none; }

.gate-icon { font-size: 2rem; margin-bottom: 16px; }

.email-gate h3 {
  font-size: 1.2rem; margin-bottom: 10px;
}

.email-gate > p {
  color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6;
  margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto;
}

.gate-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }

.gate-form input {
  flex: 1; padding: 13px 16px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-bright); font-family: inherit; font-size: 0.88rem; outline: none;
}

.gate-form input:focus { border-color: rgba(139, 124, 255, 0.4); }

.gate-fine-print {
  display: block; margin-top: 12px; font-size: 0.72rem; color: var(--text-muted);
}

/* Gated content - blurred until unlocked */
.gated-content { position: relative; }

.gated-blur-wrapper {
  filter: blur(6px); pointer-events: none; user-select: none;
  opacity: 0.5; transition: filter 0.6s ease, opacity 0.6s ease;
}

.gated-blur-wrapper.unlocked {
  filter: none; pointer-events: auto; user-select: auto; opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { padding: 140px 0 80px; }
  .nav-links { display: none; }
  .analysis-grid { grid-template-columns: 1fr; }
  .breakdown { grid-template-columns: 1fr; }
  .category-summary { grid-template-columns: 1fr; }
  .gate-form { flex-direction: column; }
  .scan-form {
    flex-direction: column; border-radius: var(--radius);
    padding: 8px;
  }
  .scan-form input { padding: 14px 14px; }
  .btn { justify-content: center; width: 100%; }
  .email-form { flex-direction: column; }
  .results-actions { flex-direction: column; align-items: stretch; }
  section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 2.2rem; }
}
