/* ─────────────────────────────────────────────────────────
   THINK AEO — stylesheet
   Single dark theme, deliberate choice.
   ───────────────────────────────────────────────────────── */

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:      #0a0a0f;
  --bg2:     #111118;
  --bg3:     #1a1a26;
  --border:  rgba(255, 255, 255, 0.08);
  --fg:      #f0f0f8;
  --fg2:     #9090b0;
  --fg3:     #5a5a78;
  --accent:  #5b8fff;
  --accent2: #a78bfa;
  --green:   #34d399;
  color-scheme: dark;

  /* Type scale */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: var(--font-body); cursor: pointer; }

/* ─── Container ──────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ─── Shared components ──────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(91, 143, 255, 0.1);
  border: 1px solid rgba(91, 143, 255, 0.25);
  border-radius: 100px;
  padding: 4px 12px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  border-radius: 8px; text-decoration: none;
  transition: background 0.18s, box-shadow 0.18s, transform 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
}
.btn-primary {
  background: var(--accent); color: #fff; padding: 10px 20px;
  box-shadow: 0 0 20px rgba(91, 143, 255, 0.3);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #6b9eff; box-shadow: 0 0 32px rgba(91, 143, 255, 0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--fg2); padding: 10px 20px;
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.2); }

.btn-hero {
  background: var(--accent); color: #fff;
  padding: 14px 28px; font-size: 15px; border-radius: 10px;
  box-shadow: 0 0 32px rgba(91, 143, 255, 0.4);
  border-color: var(--accent);
}
.btn-hero:hover {
  background: #6b9eff; transform: translateY(-2px);
  box-shadow: 0 0 44px rgba(91, 143, 255, 0.55);
}
.btn-outline-hero {
  background: transparent; color: var(--fg2);
  padding: 14px 28px; font-size: 15px; border-radius: 10px;
  border-color: var(--border);
}
.btn-outline-hero:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.2); }

/* ─── Section skeleton ───────────────────────────────────── */
.section { padding: 88px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header .tag { margin-bottom: 16px; }
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; text-wrap: balance;
  margin-bottom: 12px;
}
.section-header p { color: var(--fg2); max-width: 520px; margin: 0 auto; }

/* ─── Navbar ─────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 100;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 110;
  background: rgba(10, 10, 15, 0.88);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(20px, env(safe-area-inset-left, 0px));
  height: 64px; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 17px; font-weight: 800;
  text-decoration: none; color: var(--fg); flex-shrink: 0;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
  flex: 1;
}
.nav-links a {
  font-size: 14px; color: var(--fg2); text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--fg); }
.nav-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* hamburger */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; background: none; border: none;
  width: 36px; height: 36px; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--fg2); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  display: none; flex-direction: column; gap: 0;
  border-top: 1px solid var(--border);
  padding: 12px max(20px, env(safe-area-inset-left, 0px));
  background: rgba(10, 10, 15, 0.97);
}
.mobile-menu.open { display: flex; }
.mobile-link {
  display: block; padding: 12px 0;
  font-size: 15px; color: var(--fg2); text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.mobile-link:last-of-type { border-bottom: none; }
.mobile-link:hover { color: var(--fg); }
.mobile-cta { margin-top: 16px; justify-content: center; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: -200px; pointer-events: none;
  background: radial-gradient(ellipse 55% 40% at 50% 28%, rgba(91,143,255,0.13), transparent 70%);
}
.hero-inner { position: relative; }
.hero-tag { margin-bottom: 28px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.08; text-wrap: balance;
  margin-bottom: 24px; letter-spacing: -0.025em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--fg2);
  max-width: 560px; margin: 0 auto 40px; font-weight: 300;
}
.hero-cta {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 64px;
}

/* Citation demo */
.citation-demo {
  max-width: 800px; margin: 0 auto;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  text-align: left;
}
.demo-tab-bar {
  display: flex; border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.demo-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; font-size: 13px; font-weight: 500;
  color: var(--fg2); background: none; border: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.demo-tab:hover { color: var(--fg); }
.demo-tab.active { color: var(--fg); border-bottom-color: var(--accent); }

.demo-body { padding: 24px; }
.ai-response { display: none; }
.ai-response.active { display: block; }

.demo-query { font-size: 13px; color: var(--fg); margin-bottom: 12px; }
.demo-answer { font-size: 14px; color: var(--fg2); line-height: 1.7; }
.demo-answer strong { color: var(--fg); font-weight: 500; }

.citation {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(91,143,255,0.12);
  border: 1px solid rgba(91,143,255,0.28);
  color: var(--accent); border-radius: 4px;
  font-size: 12px; padding: 1px 6px; font-weight: 500;
  vertical-align: middle; text-decoration: none;
  transition: background 0.15s;
}
.citation:hover { background: rgba(91,143,255,0.22); }

.sources-row {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-wrap: wrap;
}
.source-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 10px;
  font-size: 12px; color: var(--fg2);
}
.src-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* ─── Stats band ─────────────────────────────────────────── */
.results-band {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.results-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 48px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display); font-size: 2.8rem;
  font-weight: 800; color: var(--accent);
  line-height: 1; margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 13px; color: var(--fg2); }

/* ─── Steps ──────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px;
  transition: border-color 0.2s;
}
.step:hover { border-color: rgba(91,143,255,0.3); }
.step-num {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--accent);
  margin-bottom: 14px;
}
.step-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
}
.step h3 {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  margin-bottom: 8px;
}
.step p { font-size: 14px; color: var(--fg2); line-height: 1.65; }

/* ─── Engines ────────────────────────────────────────────── */
.engines-section { padding-top: 0; }
.engines-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; max-width: 800px; margin: 0 auto;
}
.engine-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color 0.2s;
}
.engine-card:hover { border-color: rgba(91,143,255,0.3); }
.engine-logo { font-size: 26px; }
.engine-name { font-size: 14px; font-weight: 500; }
.engine-share {
  font-family: var(--font-display); font-size: 24px; font-weight: 800;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.engine-label {
  font-size: 10px; color: var(--fg2);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ─── Services ───────────────────────────────────────────── */
.services-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px;
  transition: border-color 0.2s;
}
.service-card:hover { border-color: rgba(91,143,255,0.3); }
.service-tag {
  display: inline-block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 12px;
}
.service-card h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  margin-bottom: 8px;
}
.service-card p { font-size: 14px; color: var(--fg2); line-height: 1.65; }

/* ─── Pricing ────────────────────────────────────────────── */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; max-width: 920px; margin: 0 auto;
}
.plan {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; position: relative;
}
.plan.featured {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(91,143,255,0.07), var(--bg2));
  box-shadow: 0 0 48px rgba(91,143,255,0.1);
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 100px;
  white-space: nowrap;
}
.plan-name {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
}
.plan-price {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 800;
  line-height: 1; margin: 14px 0 4px;
  font-variant-numeric: tabular-nums;
}
.plan-price span { font-size: 1rem; color: var(--fg2); font-weight: 400; }
.plan-desc { font-size: 13px; color: var(--fg2); line-height: 1.55; margin: 8px 0 24px; }
.plan-features {
  list-style: none; display: flex; flex-direction: column;
  gap: 10px; margin-bottom: 28px;
}
.plan-features li {
  display: flex; align-items: flex-start; gap: 10px; font-size: 14px;
}
.plan-features li::before {
  content: "✓"; color: var(--green); font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}
.plan-btn { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

/* ─── FAQ ────────────────────────────────────────────────── */
.faq-section { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; text-align: left;
  padding: 20px 0; font-size: 15px; font-weight: 500; color: var(--fg);
  gap: 16px; cursor: pointer;
  transition: color 0.15s;
}
.faq-q:hover { color: var(--accent); }
.faq-chevron {
  flex-shrink: 0; transition: transform 0.2s; color: var(--fg2);
}
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a { padding-bottom: 20px; }
.faq-a p { font-size: 14px; color: var(--fg2); line-height: 1.7; }

/* ─── CTA band ───────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, rgba(91,143,255,0.07), rgba(167,139,250,0.05));
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 88px 0;
}
.cta-inner .tag { margin-bottom: 20px; }
.cta-band h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; text-wrap: balance; margin-bottom: 14px;
}
.cta-band > .container > p { color: var(--fg2); margin-bottom: 36px; font-size: 1.05rem; }

.lead-form { max-width: 700px; margin: 0 auto; }
.lead-row {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.lead-row input {
  flex: 1; min-width: 160px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px;
  font-size: 14px; color: var(--fg);
  font-family: var(--font-body); outline: none;
  transition: border-color 0.2s;
}
.lead-row input::placeholder { color: var(--fg3); }
.lead-row input:focus { border-color: var(--accent); }
.form-note { margin-top: 12px; font-size: 12px; color: var(--fg3); }

.form-success {
  display: flex !important; /* override hidden via [hidden] */
  align-items: center; justify-content: center;
  gap: 10px; margin-top: 24px;
}
.form-success[hidden] { display: none !important; }
.form-success p { color: var(--green); font-size: 15px; }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 max(36px, env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 0 max(20px, env(safe-area-inset-left, 0px));
}
.footer-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  text-decoration: none; color: var(--fg);
}
.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px; color: var(--fg2); text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--fg); }
.footer-copy { font-size: 12px; color: var(--fg3); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .results-inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stat:nth-child(4) { border-right: none; border-top: 1px solid var(--border); }

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

@media (max-width: 720px) {
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 72px 0 56px; }
  .section { padding: 64px 0; }
  .demo-tab { padding: 10px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
  .results-inner { grid-template-columns: 1fr 1fr; }
  .engines-grid { grid-template-columns: repeat(2, 1fr); }
  .lead-row { flex-direction: column; }
  .lead-row .btn-hero { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}

/* ─── Focus / accessibility ──────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
