/* ==========================================================================
   wikipilot marketing site — design tokens
   ========================================================================== */

:root {
  --bg: #08080b;
  --bg-raised: #100f16;
  --bg-card: #131219;
  --bg-card-hover: #17161f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #f4f4f7;
  --text-dim: #9d9ca9;
  --text-dimmer: #6c6b77;

  --accent: #7c6af0;
  --accent-bright: #9585ff;
  --accent-soft: rgba(124, 106, 240, 0.14);
  --warm: #f5a524;
  --warm-soft: rgba(245, 165, 36, 0.14);

  --fresh: #34d399;
  --fresh-soft: rgba(52, 211, 153, 0.14);
  --stale: #fb7185;
  --stale-soft: rgba(251, 113, 133, 0.14);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(124, 106, 240, 0.3), 0 20px 60px -20px rgba(124, 106, 240, 0.35);

  --max-w: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 900px;
  background:
    radial-gradient(600px 400px at 15% 0%, rgba(124, 106, 240, 0.16), transparent 60%),
    radial-gradient(500px 360px at 85% 10%, rgba(245, 165, 36, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, p { margin: 0; }

h1, h2, h3 {
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid rgba(124, 106, 240, 0.28);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fresh);
  box-shadow: 0 0 0 3px var(--fresh-soft);
}

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }

.btn-block { width: 100%; }

/* ---- nav ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(8, 8, 11, 0.72);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-bright), var(--warm));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #0a0a0d;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  color: var(--text-dim);
}

.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.nav-icon:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.nav-toggle { display: none; }

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--border);
  gap: 2px;
}

.nav-mobile a { padding: 12px 4px; font-size: 15px; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.nav-mobile.open { display: flex; }

/* ---- hero ---- */

.hero {
  padding: 88px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy { max-width: 640px; }

.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  margin-top: 18px;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent-bright), var(--warm) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-dim);
  max-width: 540px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 11px 16px;
  border-radius: var(--radius-full);
  color: var(--text-dim);
  cursor: pointer;
}

.code-pill .prompt { color: var(--fresh); }
.code-pill span.cmd { color: var(--text); }
.code-pill button {
  background: none;
  border: none;
  color: var(--text-dimmer);
  cursor: pointer;
  padding: 2px;
  display: flex;
}
.code-pill button:hover { color: var(--text); }

.hero-proof {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-dimmer);
}

/* ---- demo mockup ---- */

.demo {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--bg-raised), var(--bg-card));
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.demo-bar .demo-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dimmer);
}

.demo-body { padding: 22px; font-family: var(--font-mono); font-size: 13.5px; min-height: 190px; }

.term-line { color: var(--text-dim); white-space: pre; }
.term-line .prompt { color: var(--fresh); }
.term-caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--accent-bright);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-fresh { background: var(--fresh-soft); color: var(--fresh); }
.badge-stale { background: var(--stale-soft); color: var(--stale); }

.frontmatter-card {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.02);
  display: none;
}

.frontmatter-card.show { display: block; animation: fadeUp 0.4s ease both; }

.frontmatter-card .fm-row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text-dim); }
.frontmatter-card .fm-row b { color: var(--text); font-weight: 500; }

/* ---- sections ---- */

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }

.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin-top: 14px; }
.section-head p { margin-top: 14px; color: var(--text-dim); font-size: 17px; }

.pill-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
}

/* ---- problem stats ---- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-card { background: var(--bg-card); padding: 32px 28px; }
.stat-card .stat-num { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat-card .stat-num.warn { color: var(--stale); }
.stat-card p { margin-top: 10px; color: var(--text-dim); font-size: 15px; }

/* ---- how it works ---- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--bg-card);
  position: relative;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dimmer);
}

.step-card h3 { margin-top: 14px; font-size: 19px; }
.step-card p { margin-top: 10px; color: var(--text-dim); font-size: 14.5px; }

/* ---- feature grid ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: var(--bg-card);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 { font-size: 17px; }
.feature-card p { margin-top: 8px; color: var(--text-dim); font-size: 14.5px; }

/* ---- freshness deep dive ---- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.code-block {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  overflow-x: auto;
  box-shadow: var(--shadow-card);
  color: var(--text-dim);
  line-height: 1.7;
  white-space: pre-wrap;
}

.code-block .k { color: var(--accent-bright); }
.code-block .s { color: var(--warm); }
.code-block .c { color: var(--text-dimmer); }

.check-list { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.check-item { display: flex; gap: 12px; align-items: flex-start; }
.check-item .tick {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--fresh-soft);
  color: var(--fresh);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.check-item p { color: var(--text-dim); font-size: 15px; }
.check-item p b { color: var(--text); font-weight: 600; }

/* ---- trust / oss ---- */

.trust-band {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(124,106,240,0.08), rgba(245,165,36,0.05));
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-band h3 { font-size: 22px; }
.trust-band p { margin-top: 8px; color: var(--text-dim); }
.trust-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- pricing ---- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.price-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.price-card.highlight {
  border-color: rgba(124, 106, 240, 0.5);
  background: linear-gradient(180deg, rgba(124,106,240,0.08), var(--bg-card) 60%);
  box-shadow: var(--shadow-glow);
}

.price-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--warm);
  color: #1a1200;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.price-card h3 { font-size: 19px; }
.price-card .price-tagline { margin-top: 6px; color: var(--text-dim); font-size: 14px; min-height: 34px; }
.price-amount { margin-top: 20px; display: flex; align-items: baseline; gap: 6px; }
.price-amount .num { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.price-amount .period { color: var(--text-dimmer); font-size: 14px; }

.price-features { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.price-features li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-dim); align-items: flex-start; }
.price-features li svg { flex-shrink: 0; margin-top: 3px; color: var(--fresh); }

/* ---- faq ---- */

.faq-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.faq-item { background: var(--bg-card); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-q .chev { flex-shrink: 0; transition: transform 0.2s ease; color: var(--text-dimmer); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--text-dim);
  font-size: 14.5px;
  padding: 0 24px;
}

.faq-item.open .faq-a { padding-bottom: 20px; }

/* ---- cta band ---- */

.cta-band {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 72px 24px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(124,106,240,0.16), transparent 70%), var(--bg-card);
}

.cta-band h2 { font-size: clamp(26px, 4vw, 38px); }
.cta-band p { margin-top: 14px; color: var(--text-dim); font-size: 17px; }
.cta-band .hero-actions { justify-content: center; margin-top: 30px; }

/* ---- footer ---- */

.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 300px; }
.footer-brand p { margin-top: 12px; color: var(--text-dim); font-size: 14px; }
.footer-cols { display: flex; gap: 64px; }
.footer-col h4 { font-size: 13px; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14.5px; padding: 6px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-dimmer); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---- guide page ---- */

.guide-shell { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.guide-toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; }
.guide-toc a { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-dim); }
.guide-toc a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.guide-content h2 { font-size: 24px; margin-top: 48px; padding-top: 8px; }
.guide-content h2:first-child { margin-top: 0; }
.guide-content p { color: var(--text-dim); margin-top: 12px; font-size: 15.5px; }
.guide-content .code-block { margin-top: 16px; }
.guide-content ul { color: var(--text-dim); font-size: 15px; padding-left: 20px; margin-top: 12px; }
.guide-content li { margin: 6px 0; }

/* ---- reveal animation ---- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- responsive ---- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .steps, .feature-grid, .stats-grid, .pricing-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-primary { display: none; }
  .guide-shell { grid-template-columns: 1fr; }
  .guide-toc { position: static; flex-direction: row; overflow-x: auto; }
  .footer-grid { flex-direction: column; }
  .footer-cols { gap: 40px; }
}
