/* ============================================================
   site.css — API Dominance shared stylesheet
   Per-page accent colours are injected via CSS custom properties
   in the inline <style> block at the top of each page's <body>.
   ============================================================ */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: #1a1a2e; line-height: 1.6; background: #fafafa; }
a { text-decoration: none; color: inherit; }
code, pre { font-family: 'JetBrains Mono', monospace; }

/* Nav */
nav { position: fixed; top: 0; width: 100%; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid #e5e7eb; z-index: 100; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; font-size: 1.25rem; color: #6c2bd9; }
.logo span { color: #1a1a2e; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: #555; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent-primary); }

/* Buttons */
.btn { display: inline-block; padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; transition: all 0.2s; }
.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { background: var(--accent-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-primary-shadow); }
.btn-secondary { background: #fff; color: var(--accent-primary); border: 2px solid var(--accent-primary); }
.btn-secondary:hover { background: var(--accent-hover-bg); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-white { background: #fff; color: var(--accent-primary); }
.btn-white:hover { background: var(--accent-hover-bg); transform: translateY(-1px); }

/* Hero */
.hero { padding: 140px 24px 80px; background: linear-gradient(135deg, var(--accent-hero-from) 0%, var(--accent-hero-to) 100%); }
.hero-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero h1 .accent { color: var(--accent-primary); }
.hero p { font-size: 1.1rem; color: #555; margin-bottom: 12px; }
.hero-subtitle { font-size: 0.95rem; color: #777; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-badges { display: flex; gap: 16px; flex-wrap: wrap; }
.badge { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: #555; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }

/* Code block (hero) */
.code-block { background: #1e1e2e; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.code-header { background: #2a2a3e; padding: 12px 16px; display: flex; gap: 8px; align-items: center; }
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.code-header span { color: #888; font-size: 0.8rem; margin-left: 12px; }
.code-body { padding: 20px; overflow-x: auto; }
.code-body pre { color: #cdd6f4; font-size: 0.82rem; line-height: 1.7; }
.code-key { color: #89b4fa; }
.code-string { color: #a6e3a1; }
.code-comment { color: #6c7086; }
.code-url { color: #f9e2af; }
.code-num { color: #fab387; }

/* Sections */
.section { padding: 80px 24px; max-width: 1100px; margin: 0 auto; }
.section-title { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: #666; margin-bottom: 48px; font-size: 1.05rem; }

/* Features grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.feature { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 28px; }
.feature-icon { font-size: 1.6rem; margin-bottom: 12px; }
.feature h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: #666; font-size: 0.9rem; }

/* Use cases */
.use-cases { background: #f9fafb; padding: 80px 24px; }
.use-cases-inner { max-width: 1100px; margin: 0 auto; }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.uc-card { background: #fff; border-radius: 12px; padding: 28px; border: 1px solid #e5e7eb; }
.uc-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--accent-primary); }
.uc-card p { color: #666; font-size: 0.9rem; }

/* Params table */
.params-section { background: #fff; }
.params-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.params-table th { text-align: left; padding: 12px 16px; background: #f9fafb; border-bottom: 2px solid #e5e7eb; font-size: 0.85rem; color: #555; text-transform: uppercase; letter-spacing: 0.05em; }
.params-table td { padding: 12px 16px; border-bottom: 1px solid #f3f4f6; font-size: 0.9rem; }
.params-table code { background: #f3f4f6; padding: 2px 8px; border-radius: 4px; font-size: 0.82rem; color: var(--accent-primary); }
.param-required { color: #ef4444; font-size: 0.75rem; font-weight: 600; }
.param-optional { color: #999; font-size: 0.75rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.plan { background: #fff; border: 2px solid #e5e7eb; border-radius: 16px; padding: 32px; text-align: center; transition: all 0.3s; }
.plan:hover { border-color: var(--accent-primary); }
.plan.featured { border-color: var(--accent-primary); position: relative; }
.plan.featured::before { content: "Most Popular"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent-primary); color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 2.5rem; font-weight: 800; color: var(--accent-primary); margin-bottom: 4px; }
.plan-price span { font-size: 1rem; font-weight: 500; color: #999; }
.plan-desc { color: #777; font-size: 0.85rem; margin-bottom: 24px; }
.plan-features { list-style: none; text-align: left; margin-bottom: 28px; }
.plan-features li { padding: 6px 0; font-size: 0.9rem; color: #555; display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: "\2713"; color: #22c55e; font-weight: 700; }

/* Response section */
.response-section { background: #1a1a2e; color: #fff; padding: 80px 24px; }
.response-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.response-inner h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.response-inner p { color: #aaa; margin-bottom: 16px; }
.response-code { background: #0d0d1a; border-radius: 12px; padding: 24px; overflow-x: auto; }
.response-code pre { color: #cdd6f4; font-size: 0.78rem; line-height: 1.7; }

/* CTA section */
.cta-section { background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark)); padding: 80px 24px; text-align: center; color: #fff; }
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
footer { background: #1a1a2e; color: #aaa; padding: 48px 24px; text-align: center; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 24px; flex-wrap: wrap; }
footer a { color: #ccc; }
footer a:hover { color: #fff; }
.footer-copy { font-size: 0.85rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; }
    .response-inner { grid-template-columns: 1fr; }
    .params-table { font-size: 0.8rem; }
    .nav-links { gap: 16px; }
}

/* ===== Homepage-specific styles ===== */

/* Hero — centered variant (homepage overrides the 2-col candidate hero) */
.hero-centered { text-align: center; }
.hero-centered h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.hero-centered p { max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-centered .hero-cta { justify-content: center; }

/* Stats bar */
.stats { display: flex; justify-content: center; gap: 60px; padding: 48px 24px; max-width: 700px; margin: 0 auto; }
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--accent-primary, #6c2bd9); }
.stat-label { font-size: 0.85rem; color: #777; margin-top: 4px; }

/* API card grid */
.api-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.api-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 36px; transition: all 0.3s; }
.api-card:hover { border-color: var(--accent-primary, #6c2bd9); box-shadow: 0 8px 30px rgba(108,43,217,0.1); transform: translateY(-4px); }
.api-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.api-card p { color: #666; margin-bottom: 20px; font-size: 0.95rem; }
.api-card .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.api-card .price { font-size: 0.9rem; color: var(--accent-primary, #6c2bd9); font-weight: 600; margin-bottom: 16px; }

/* API icon */
.api-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.icon-purple { background: #f3e8ff; }
.icon-blue { background: #e0f2fe; }

/* Tag pill */
.tag { background: #f3f4f6; color: #555; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }

/* How It Works steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; text-align: center; }
.step { padding: 24px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-primary, #6c2bd9); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; margin: 0 auto 16px; }
.step h4 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: #666; font-size: 0.9rem; margin-bottom: 0; }

@media (max-width: 640px) {
    .stats { gap: 32px; }
}
