/**
 * SEO Inspector — Landing Page Styles
 * Clean, modern, conversion-focused design.
 */

/* ── Design Tokens ──────────────────────────────────────────────────── */
:root {
  --green: #10b981;
  --green-bg: #ecfdf5;
  --yellow: #f59e0b;
  --red: #ef4444;
  --blue: #2563eb;
  --purple: #7c3aed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1100px;
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: #fafbfc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.2; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.05rem; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--gray-500); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* gradient-text removed — absolute ban. Use solid color + weight instead. */

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9rem;
  transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fafbfc; }
.btn-primary:hover { background: #059669; box-shadow: 0 4px 12px rgba(16, 185, 129, .3); }
.btn-outline { border: 2px solid var(--gray-200); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--gray-400); background: var(--gray-50); }
.btn-sm { padding: 8px 16px; font-size: .82rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Navigation ─────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  background: #fafbfc;
  border-bottom: 1px solid #e9ebee;
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1rem; color: var(--gray-800);
}
.nav-links {
  display: flex; align-items: center; gap: 24px;
  font-size: .88rem; font-weight: 500;
}
.nav-links a:not(.btn) { color: var(--gray-600); }
.nav-links a:not(.btn):hover { color: var(--gray-900); }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
  overflow: hidden;
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--green-bg);
  color: #065f46;
  border-radius: 100px;
  font-size: .85rem; font-weight: 600;
  margin-bottom: 24px;
}
.hero-title { margin-bottom: 16px; }
.hero-desc {
  max-width: 540px; margin: 0 auto 32px;
  font-size: 1.1rem; color: var(--gray-500); line-height: 1.7;
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 48px; }
.hero-note { font-size: .82rem; color: var(--gray-400); }

/* Preview mockup (hero) */
.hero-preview { max-width: 480px; margin: 0 auto; }
.preview-window {
  background: #fafbfc; border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.preview-dots {
  display: flex; gap: 6px; padding: 12px 16px; background: var(--gray-50); border-bottom: 1px solid var(--gray-100);
}
.preview-dots span { width: 10px; height: 10px; border-radius: 50%; }
.preview-dots span:nth-child(1) { background: var(--red); }
.preview-dots span:nth-child(2) { background: var(--yellow); }
.preview-dots span:nth-child(3) { background: var(--green); }

.preview-content {
  display: flex; align-items: center; gap: 24px; padding: 24px;
}
.preview-score {
  width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; color: var(--green);
  flex-shrink: 0;
}
.preview-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.preview-bar {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; color: var(--gray-500);
}
.preview-bar span:first-child { width: 80px; flex-shrink: 0; }
.bar { height: 6px; border-radius: 3px; flex: 1; }
.bar-green { background: var(--green); width: 85%; }
.bar-yellow { background: var(--yellow); width: 55%; }
.bar-red { background: var(--red); width: 30%; }

/* ── Demo Popup Mockup (see it in action) ─────────────────────────────── */
.demo-popup-header {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.demo-popup-body {
  display: flex; align-items: center; gap: 16px; padding: 16px 14px;
}
.demo-popup-score {
  position: relative;
  width: 100px; height: 100px;
  flex-shrink: 0;
}
.demo-popup-score svg { width: 100%; height: 100%; }
.demo-score-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  line-height: 1;
}
.demo-popup-cats {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
}
.demo-cat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px; border-radius: 4px;
  font-size: .68rem; font-weight: 600;
}
.demo-cat.good { background: #ecfdf5; color: #065f46; }
.demo-cat.warning { background: #fffbeb; color: #92400e; }
.demo-cat.poor { background: #fef2f2; color: #991b1b; }

/* ── Trust Strip ────────────────────────────────────────────────────── */
.trust {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: center; gap: 48px;
  padding: 48px 24px;
  border-top: 1px solid var(--gray-100);
  text-align: center;
}
.trust-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.trust-icon { color: var(--green); flex-shrink: 0; }
.trust-item strong { font-size: .9rem; }
.trust-item span:last-child { font-size: .82rem; color: var(--gray-400); }

/* ── Features ────────────────────────────────────────────────────────── */
.features { padding: 100px 24px 80px; }
.features-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  padding: 28px; border: 1px solid var(--gray-200); border-radius: var(--radius);
  transition: box-shadow .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { font-size: .9rem; color: var(--gray-500); line-height: 1.6; }

/* ── How It Works ───────────────────────────────────────────────────── */
.how-it-works { padding: 80px 24px; background: var(--gray-50); }
.steps {
  max-width: 700px; margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: center;
  gap: 16px;
}
.step {
  flex: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gray-900); color: #fafbfc;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800;
}
.step-arrow {
  font-size: 1.5rem; color: var(--gray-300);
  margin-top: 10px;
}
.step h3 { font-size: .95rem; }
.step p { font-size: .85rem; color: var(--gray-500); }

/* ── Demo ───────────────────────────────────────────────────────────── */
.demo { padding: 80px 24px 100px; }

/* ── Pricing ─────────────────────────────────────────────────────────── */
.pricing { padding: 80px 24px; background: var(--gray-50); }

/* Billing toggle */
.billing-toggle {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 40px;
  font-size: .9rem; font-weight: 500; color: var(--gray-600);
}
.billing-toggle .active { color: var(--gray-900); }
.save-badge {
  background: var(--green-bg); color: #065f46;
  padding: 2px 8px; border-radius: 100px;
  font-size: .72rem; font-weight: 700;
}
.toggle-switch {
  width: 44px; height: 24px;
  border-radius: 12px;
  background: var(--gray-300);
  position: relative;
  cursor: pointer;
  transition: background .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.toggle-switch.annual { background: var(--gray-900); }
.toggle-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fafbfc;
  position: absolute; top: 3px; left: 3px;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}
.toggle-switch.annual .toggle-thumb { transform: translateX(20px); }

/* Price cards */
.pricing-grid {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.price-card {
  background: #fafbfc; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 32px 28px;
  display: flex; flex-direction: column;
  position: relative;
}
.price-card.featured {
  border-color: var(--gray-900);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gray-900); color: #fafbfc;
  padding: 4px 16px; border-radius: 100px;
  font-size: .75rem; font-weight: 700;
}
.price-card h3 { margin-bottom: 12px; }
.price { margin-bottom: 20px; }
.price-amount { font-size: 2.2rem; font-weight: 800; }
.price-period { font-size: .88rem; color: var(--gray-400); }
.price-features {
  flex: 1;
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 24px;
  font-size: .88rem; color: var(--gray-600);
  line-height: 1.4;
}
.price-features li { padding-left: 2px; }

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq { padding: 80px 24px; }
.faq-list { max-width: 680px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--gray-100);
  padding: 20px 0;
}
.faq-item summary {
  font-weight: 600; font-size: .95rem;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem; color: var(--gray-400);
  transition: transform .2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin-top: 12px;
  font-size: .88rem; color: var(--gray-500); line-height: 1.7;
}

/* ── Checkout Modal ──────────────────────────────────────────────────── */
.checkout-modal {
  border: none; border-radius: var(--radius);
  padding: 0; max-width: 420px; width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  animation: modalIn .25s cubic-bezier(0.16, 1, 0.3, 1);
}
.checkout-modal::backdrop { background: rgba(0,0,0,.4); }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-inner { padding: 32px 28px; }
.modal-close {
  position: absolute; top: 12px; right: 16px;
  font-size: 1.4rem; color: var(--gray-400);
  background: none; border: none; cursor: pointer;
}
.modal-close:hover { color: var(--gray-700); }

.modal-inner h2 { font-size: 1.2rem; margin-bottom: 4px; }
#modal-plan-name { color: var(--gray-500); font-size: .9rem; margin-bottom: 20px; }

#checkout-form { display: flex; flex-direction: column; gap: 12px; }
#checkout-form label { font-size: .82rem; font-weight: 600; color: var(--gray-600); }
#checkout-form input[type="email"] {
  padding: 12px 16px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: .95rem; outline: none;
}
#checkout-form input[type="email"]:focus {
  border-color: var(--gray-900); box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}
#checkout-submit {
  padding: 14px 24px; font-size: 1rem; margin-top: 4px;
}
#checkout-submit:disabled { opacity: .6; cursor: not-allowed; }
.card-icons { margin-left: 6px; }

.modal-note {
  margin-top: 14px; font-size: .75rem; color: var(--gray-400); text-align: center;
}
.modal-error {
  margin-top: 10px; padding: 8px 12px;
  background: #fef2f2; color: #991b1b;
  border-radius: var(--radius-sm); font-size: .82rem;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  padding: 32px 24px;
  border-top: 1px solid var(--gray-100);
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-brand strong { font-size: .9rem; }
.footer-brand span { font-size: .8rem; color: var(--gray-400); }
.footer-links { display: flex; gap: 20px; font-size: .85rem; color: var(--gray-500); }
.footer-links a:hover { color: var(--gray-900); }

/* ── Scroll Reveal ───────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s cubic-bezier(0.16, 1, 0.3, 1), transform .5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.feature-card.reveal:nth-child(1) { transition-delay: 0ms; }
.feature-card.reveal:nth-child(2) { transition-delay: 80ms; }
.feature-card.reveal:nth-child(3) { transition-delay: 160ms; }
.feature-card.reveal:nth-child(4) { transition-delay: 240ms; }
.feature-card.reveal:nth-child(5) { transition-delay: 320ms; }
.feature-card.reveal:nth-child(6) { transition-delay: 400ms; }

.price-card.reveal:nth-child(1) { transition-delay: 0ms; }
.price-card.reveal:nth-child(2) { transition-delay: 100ms; }
.price-card.reveal:nth-child(3) { transition-delay: 200ms; }

/* ── Focus Visible ────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
details summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.toggle-switch:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ── Hero background tint ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, #ecfdf5 0%, #fafbfc 100%);
}

/* ── Demo Screenshot ──────────────────────────────────────────────────── */
.demo-screenshot {
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.12), 0 8px 20px rgba(0,0,0,.06);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.demo-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links a:not(.btn) { display: none; }
  .trust { flex-direction: column; gap: 24px; }
  .steps { flex-direction: column; gap: 0; }
  .step-arrow { transform: rotate(90deg); }
  .price-card.featured { transform: none; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 100px 16px 48px; }
  .features { padding: 48px 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── Reduced Motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
