/* === FeedPlaza Design System === */
/* Colors: Primary #3559F0 | Surface #F5F7FA | Text #101010 | Secondary #6B7280 */
/* Fonts: Lexend (headings) | Inter (body) | JetBrains Mono (code) */
/* Spacing: 4px base | Max-width: 1200px */

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

:root {
  --primary: #3559F0;
  --primary-hover: #2A4AD4;
  --secondary: #3D454D;
  --bg: #FFFFFF;
  --surface: #F5F7FA;
  --surface-hover: #E8ECF4;
  --text: #101010;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --tag-bg: #DFE9FA;
  --radius: 8px;
  --radius-lg: 12px;
  --max-w: 1200px;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Lexend', 'MiSans', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.02em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: 0.85; }

/* === Top Bar === */
.topbar {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.topbar a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

/* === Navigation === */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Lexend', sans-serif; font-weight: 600; font-size: 18px;
  color: var(--text);
}
.nav-logo:hover { opacity: 1; }
.logo-icon { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--secondary); font-size: 14px; font-weight: 500;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: border-color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); border-color: var(--primary); }
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* === Buttons === */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius);
  background: var(--primary); color: #F5F7FA;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  border: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-hover); opacity: 1; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius);
  background: var(--surface); color: var(--primary);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--surface-hover); opacity: 1; }
.btn-ghost {
  padding: 6px 14px; border-radius: var(--radius);
  background: transparent; color: var(--secondary);
  font-size: 14px; font-weight: 500; border: none; cursor: pointer;
  transition: background 0.15s;
}
.btn-ghost:hover { background: var(--surface); opacity: 1; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-copy {
  position: absolute; top: 12px; right: 16px;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius);
  background: rgba(53,89,240,0.08); color: var(--primary);
  font-size: 13px; font-weight: 500; border: none; cursor: pointer;
  transition: background 0.15s;
}
.btn-copy:hover { background: rgba(53,89,240,0.15); }

/* === Sections === */
.section-head {
  text-align: center; margin-bottom: 48px;
}
.section-head h2 {
  font-size: 36px; font-weight: 600; line-height: 1.2;
  margin-bottom: 12px; color: var(--text);
}
.section-head p {
  font-size: 16px; color: var(--text-secondary);
}

/* === Hero === */
.hero {
  padding: 80px 24px 64px;
  text-align: center;
}
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero h1 {
  font-size: 52px; font-weight: 700; line-height: 1.1;
  color: var(--text); margin-bottom: 16px;
  letter-spacing: -0.03em;
}
.hero-sub {
  font-size: 18px; color: var(--text-secondary); margin-bottom: 36px;
  max-width: 580px; margin-left: auto; margin-right: auto;
}
.hero-curl {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 28px; text-align: left;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.curl-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: rgba(0,0,0,0.04); border-bottom: 1px solid var(--border);
}
.curl-dot { width: 10px; height: 10px; border-radius: 50%; }
.curl-dot.red { background: #FF5F57; }
.curl-dot.yellow { background: #FFBD2E; }
.curl-dot.green { background: #28C840; }
.curl-title { font-size: 12px; color: var(--text-secondary); }
.hero-curl pre {
  padding: 20px 24px 20px 24px; margin: 0; overflow-x: auto;
  background: transparent; border: none;
}
.hero-curl code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px; line-height: 1.8; color: var(--text);
}
.hero-curl .prompt { color: var(--primary); font-weight: 500; user-select: none; }
.hero-curl .str { color: #059669; }
.hero-curl .key { color: #7C3AED; }
.hero-curl .out { color: var(--text-secondary); }
.hero-buttons { display: flex; gap: 16px; justify-content: center; margin-bottom: 16px; }
.hero-note { font-size: 14px; color: var(--text-secondary); }

/* === Features === */
.features { padding: 80px 24px; background: var(--surface); }
.features-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px;
}
.feature-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: border-color 0.15s;
}
.feature-card:hover { border-color: var(--primary); }
.feature-icon { font-size: 28px; margin-bottom: 16px; }
.feature-card h4 {
  font-size: 18px; font-weight: 600; margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
}

/* === Data Sources === */
.sources { padding: 80px 24px; }
.sources-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px;
}
.source-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  text-align: center; transition: border-color 0.15s;
}
.source-card:hover { border-color: var(--primary); }
.source-icon { font-size: 32px; margin-bottom: 10px; }
.source-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.source-tag {
  display: inline-block; background: var(--tag-bg); color: var(--primary);
  padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500;
}

/* === Quick Start === */
.quickstart { padding: 80px 24px; background: var(--surface); }
.code-tabs { max-width: 720px; margin: 0 auto; }
.tab-bar {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 4px 4px 16px; margin-bottom: 16px;
}
.tab-btn {
  padding: 8px 16px; border-radius: 6px;
  background: transparent; color: var(--text-secondary);
  font-size: 14px; font-weight: 500; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.tab-btn.active { background: var(--primary); color: #fff; }
.tab-btn:hover:not(.active) { background: var(--surface); }
.tab-cta { margin-left: auto; padding: 8px 16px !important; }
.tab-content {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.tab-content pre {
  padding: 20px 24px; margin: 0; overflow-x: auto;
}
.tab-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px; line-height: 1.8; color: var(--text);
}
.tab-content .str { color: #059669; }
.tab-content .kw { color: #7C3AED; font-weight: 500; }
.hidden { display: none; }

/* === Pricing Preview === */
.pricing-preview { padding: 80px 24px; }
.pricing-grid {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px;
}
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 24px;
  text-align: center; position: relative;
}
.pricing-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 4px 16px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.plan-name { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.plan-price { font-size: 40px; font-weight: 700; margin-bottom: 24px; }
.plan-price span { font-size: 16px; font-weight: 400; color: var(--text-secondary); }
.pricing-card ul { list-style: none; margin-bottom: 28px; }
.pricing-card li {
  font-size: 14px; color: var(--text-secondary); padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.pricing-card li:last-child { border-bottom: none; }
.pricing-link { text-align: center; margin-top: 32px; font-size: 14px; }

/* === CTA === */
.cta {
  padding: 80px 24px; text-align: center;
  background: var(--primary); color: #fff;
}
.cta h2 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.cta p { font-size: 16px; opacity: 0.85; margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; }
.cta .btn-primary { background: #fff; color: var(--primary); }
.cta .btn-primary:hover { background: var(--surface); }
.cta .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.cta .btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* === Footer === */
.footer { padding: 64px 24px 32px; background: var(--surface); border-top: 1px solid var(--border); }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand p { color: var(--text-secondary); font-size: 14px; margin-top: 12px; }
.footer-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Lexend', sans-serif; font-weight: 600; font-size: 18px;
  color: var(--text);
}
.footer-social { margin-top: 16px; display: flex; gap: 16px; }
.footer-social a { font-size: 14px; color: var(--text-secondary); }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-secondary); padding: 4px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  max-width: var(--max-w); margin: 48px auto 0;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-secondary); text-align: center;
}

/* === Responsive === */
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero h1 { font-size: 36px; }
  .hero-curl pre { font-size: 11px; }
  .btn-copy { display: none; }
  .tab-bar { flex-wrap: wrap; gap: 8px; }
  .tab-cta { margin-left: 0; }
}
@media (max-width: 480px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .hero-buttons { flex-direction: column; }
  .cta-buttons { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
}
