/* AgentSEO - Dark theme with emerald accents */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #2a2a3a;
  --border-hover: #3a3a4f;
  --text-primary: #f0f0f5;
  --text-secondary: #9898a8;
  --text-muted: #5a5a6f;
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --cyan: #00f2fe;
  --magenta: #b300ff;
  --red: #ef4444;
  --yellow: #eab308;
  --orange: #f97316;
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* --- NAV --- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--emerald); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-cta {
  background: var(--emerald) !important;
  color: #000 !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.9; }

/* --- HERO --- */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--emerald-glow) 0%, transparent 70%);
  transform: translate(-50%, -60%);
  pointer-events: none;
}
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  font-size: 13px;
  color: var(--emerald);
  font-weight: 500;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--cyan), var(--emerald), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* --- SCAN FORM --- */
.scan-form-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.scan-form {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.scan-form:focus-within {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}
.scan-form input {
  flex: 1;
  background: none;
  border: none;
  padding: 16px 20px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.scan-form input::placeholder { color: var(--text-muted); }
.scan-form button {
  background: var(--emerald);
  color: #000;
  border: none;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.scan-form button:hover { opacity: 0.9; }
.scan-form button:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- ORB --- */
.orb-wrap {
  display: flex;
  justify-content: center;
  margin: 60px 0;
  position: relative;
}
.orb {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--cyan), var(--emerald), var(--magenta));
  animation: orb-breathe 4s ease-in-out infinite;
  filter: blur(1px);
  position: relative;
}
.orb::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  animation: orb-ripple 3s ease-in-out infinite;
}
@keyframes orb-breathe { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes orb-ripple { 0%, 100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.3); opacity: 0; } }

/* --- SECTIONS --- */
.section { padding: 80px 0; }
.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 16px;
}

/* --- HOW IT WORKS --- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s, transform 0.2s;
}
.step:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.step-num {
  width: 36px; height: 36px;
  background: var(--emerald-glow);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--emerald);
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

/* --- CATEGORIES --- */
.categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s;
}
.cat-card:hover { border-color: var(--border-hover); }
.cat-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.cat-card p { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }

/* --- PRICING --- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: border-color 0.3s, transform 0.2s;
}
.price-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.price-card.featured {
  border-color: var(--emerald);
  box-shadow: 0 0 30px var(--emerald-glow);
}
.price-card .tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--emerald);
  color: #000;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}
.price-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.price-card .price { font-size: 36px; font-weight: 900; margin: 12px 0 4px; }
.price-card .price span { font-size: 16px; font-weight: 400; color: var(--text-secondary); }
.price-card .desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.price-card ul { list-style: none; margin-bottom: 24px; }
.price-card li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-card li::before { content: '✓'; color: var(--emerald); font-weight: 700; }
.btn-primary {
  display: block;
  width: 100%;
  background: var(--emerald);
  color: #000;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.9; text-decoration: none; }
.btn-outline {
  display: block;
  width: 100%;
  background: none;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--emerald); text-decoration: none; }

/* --- FAQ --- */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-q {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q::after { content: '+'; font-size: 20px; color: var(--text-muted); transition: transform 0.2s; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 200px; padding-top: 12px; }

/* --- FOOTER --- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
footer a { color: var(--text-secondary); }
footer .links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; }

/* --- RESULTS PAGE --- */
.results-page { padding: 100px 0 60px; }
.score-header { text-align: center; margin-bottom: 48px; }

.score-ring-wrap { display: inline-block; position: relative; margin-bottom: 24px; }
.score-ring { width: 180px; height: 180px; }
.score-ring circle { fill: none; stroke-width: 8; }
.score-ring .bg { stroke: var(--border); }
.score-ring .fg { stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.score-value {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 900;
}
.score-grade {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.score-url { color: var(--text-muted); font-size: 14px; }

.grade-ai-native { color: var(--emerald); }
.grade-good { color: var(--yellow); }
.grade-at-risk { color: var(--orange); }
.grade-invisible { color: var(--red); }

.cat-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 48px; }
.cat-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.cat-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cat-result-header h3 { font-size: 16px; font-weight: 700; }
.cat-score-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
}
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
.progress-bar .fill { height: 100%; border-radius: 2px; transition: width 1s ease; }
.check-list { list-style: none; }
.check-item {
  padding: 8px 0;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(42, 42, 58, 0.5);
}
.check-item:last-child { border-bottom: none; }
.check-icon { flex-shrink: 0; width: 18px; text-align: center; }
.check-passed { color: var(--emerald); }
.check-failed { color: var(--red); }
.check-details { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* Fix snippet */
.fix-snippet {
  margin-top: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.fix-snippet pre {
  padding: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--emerald);
  overflow-x: auto;
  white-space: pre-wrap;
}
.fix-locked {
  text-align: center;
  padding: 20px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  margin-top: 20px;
}
.fix-locked p { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; }

/* CTA section */
.cta-section {
  text-align: center;
  padding: 60px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}
.cta-section h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.cta-section p { color: var(--text-secondary); margin-bottom: 24px; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error message */
.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
}

/* Loading state */
.scan-loading {
  text-align: center;
  padding: 100px 0;
}
.scan-loading .orb {
  width: 120px; height: 120px;
  margin: 0 auto 24px;
}
.scan-loading p { color: var(--text-secondary); font-size: 16px; }

/* Mobile */
@media (max-width: 640px) {
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 32px; }
  .scan-form { flex-direction: column; }
  .scan-form button { padding: 14px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .cat-results { grid-template-columns: 1fr; }
}
