/* The homepage (templates/api_client/home.html) - the same palette as the app (templates/api_client/index.html). */

:root {
    --bg: #09090f;
    --bg-alt: #0c0d15;
    --surface: #10121c;
    --surface2: #151826;
    --border: #1d2134;
    --border-strong: #2a3050;
    --accent: #4d8ef7;
    --accent-hover: #3478e6;
    --accent-2: #9b7bff;
    --success: #3fb950;
    --warning: #d29922;
    --text: #e3e8fa;
    --text-body: #b4bedc;
    --text-muted: #7d8bb0;
    --radius: 14px;
    --mono: 'Cascadia Code', 'Fira Code', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text-body); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { color: var(--text); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 9px 18px; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 24px -8px rgba(77, 142, 247, 0.7); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface2); border-color: var(--text-muted); }
.btn-lg { padding: 13px 24px; font-size: 16px; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(9, 9, 15, 0.78); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid rgba(29, 33, 52, 0.7); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-signin { color: var(--text); font-weight: 500; font-size: 15px; }

/* ── Hero ── */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: 0.55; }
.glow-1 { width: 520px; height: 520px; background: rgba(77, 142, 247, 0.35); top: -200px; left: -120px; }
.glow-2 { width: 460px; height: 460px; background: rgba(155, 123, 255, 0.25); top: 40px; right: -160px; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--text); background: rgba(77, 142, 247, 0.1); border: 1px solid rgba(77, 142, 247, 0.3); padding: 6px 14px; border-radius: 999px; margin-bottom: 24px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.6); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(63, 185, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); } }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -0.035em; }
.grad { background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin-top: 22px; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-row-center { justify-content: center; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 26px 0 0; font-size: 14px; color: var(--text-muted); }
.hero-points li::before { content: '✓'; color: var(--success); font-weight: 700; margin-right: 7px; }

/* the app, drawn in HTML */
.hero-visual { position: relative; }
.window { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset; overflow: hidden; transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c3150; }
.window-bar i:nth-child(1) { background: #f8514999; }
.window-bar i:nth-child(2) { background: #d2992299; }
.window-bar i:nth-child(3) { background: #3fb95099; }
.window-bar span { margin-left: auto; font-size: 12px; color: var(--success); display: inline-flex; align-items: center; gap: 6px; }
.window-bar span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.window-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.req-line { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px 7px 10px; font-size: 13px; }
.req-line code { color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.method { font-family: var(--mono); font-weight: 700; font-size: 11px; padding: 3px 7px; border-radius: 5px; }
.method-post { background: rgba(210, 153, 34, 0.15); color: #e3b341; }
.send { background: var(--accent); color: #fff; font-weight: 600; font-size: 12px; padding: 5px 12px; border-radius: 6px; }
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pane { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.pane-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.status { color: var(--success); background: rgba(63, 185, 80, 0.13); padding: 1px 7px; border-radius: 8px; letter-spacing: 0; }
.ms { color: var(--text-muted); letter-spacing: 0; text-transform: none; font-weight: 500; }
.pane pre { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.65; color: var(--text-body); white-space: pre; overflow: hidden; }
.pane code { font-size: inherit; }
.k { color: #89b4fa; } .s { color: #a6e3a1; } .n { color: #fab387; } .p { color: var(--text-muted); }
.secret { letter-spacing: 1px; color: var(--text-muted); }
.extract { display: flex; align-items: center; gap: 8px; font-size: 12px; background: rgba(77, 142, 247, 0.07); border: 1px dashed rgba(77, 142, 247, 0.4); border-radius: 8px; padding: 7px 10px; }
.extract-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 10.5px; color: var(--text-muted); }
.extract code { color: var(--text); }
.extract .var { color: var(--accent); }
.arrow { color: var(--text-muted); }

.float-card { position: absolute; right: -14px; bottom: -36px; width: 248px; background: rgba(16, 18, 28, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px 16px; box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.85); font-size: 13px; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float-title { color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.float-steps { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.float-steps li { display: flex; align-items: center; gap: 8px; color: var(--text-body); }
.float-steps em { margin-left: auto; font-style: normal; color: var(--text-muted); font-size: 12px; }
.tick { color: var(--success); font-weight: 700; }
.float-foot { border-top: 1px solid var(--border); padding-top: 9px; font-size: 12px; color: var(--text-muted); }
.float-foot strong { color: var(--text); }

/* ── Strip ── */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.strip-list { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; padding-top: 22px; padding-bottom: 22px; font-size: 14px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }
.strip-list li { display: inline-flex; align-items: center; gap: 10px; }
.strip-list li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.8; }

/* ── Images ── */
.showcase { padding: 72px 0 8px; }
.frame { margin: 0; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); padding: 8px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.frame img, .frame .img-placeholder { border-radius: calc(var(--radius) - 6px); width: 100%; }
.frame-wide { box-shadow: 0 40px 120px -30px rgba(77, 142, 247, 0.25), 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.img-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; background: repeating-linear-gradient(-45deg, var(--surface2) 0 14px, var(--surface) 14px 28px); border: 1px dashed var(--border-strong); color: var(--text-muted); }
.img-placeholder-file { font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; }
.img-placeholder-alt { font-size: 14px; max-width: 46ch; }

/* ── Sections ── */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.tag { font-size: 11px; letter-spacing: 0.04em; color: #fff; background: linear-gradient(100deg, var(--accent), var(--accent-2)); padding: 2px 8px; border-radius: 999px; }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; }
.section-lead { margin-top: 16px; font-size: 1.1rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color 0.2s, transform 0.2s; }
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature h3 { font-size: 1.12rem; margin: 16px 0 8px; }
.feature p { font-size: 15.5px; }
.feature code { color: var(--accent); }
.icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, rgba(77, 142, 247, 0.2), rgba(155, 123, 255, 0.14)); border: 1px solid rgba(77, 142, 247, 0.3); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.split-reverse .split-copy { order: 2; }
.split-copy h2 { margin-bottom: 18px; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 14px; }
.checks li { position: relative; padding-left: 32px; font-size: 16px; }
.checks li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--success); background: rgba(63, 185, 80, 0.13); }
.checks strong { color: var(--text); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px 26px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 800; color: #fff; background: linear-gradient(140deg, var(--accent), var(--accent-2)); margin-bottom: 16px; }
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { font-size: 15.5px; }

/* ── Pricing ── */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px 26px; }
.plan-featured { border-color: rgba(77, 142, 247, 0.6); background: linear-gradient(165deg, rgba(77, 142, 247, 0.13), var(--surface) 55%); box-shadow: 0 30px 80px -40px rgba(77, 142, 247, 0.6); }
.plan-badge { position: absolute; top: -12px; left: 26px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: linear-gradient(100deg, var(--accent), var(--accent-2)); padding: 4px 11px; border-radius: 999px; }
.plan h3 { font-size: 1.2rem; }
.plan-price { margin: 14px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.plan-price .amount { font-size: 2.6rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.plan-price .period { color: var(--text-muted); font-size: 15px; }
.plan-tagline { font-size: 15px; color: var(--text-muted); min-height: 48px; }
.plan-features { list-style: none; padding: 0; margin: 22px 0 28px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.plan-features li { position: relative; padding-left: 26px; font-size: 15px; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.plan-cta { width: 100%; }
.credits-note { margin: 28px auto 0; max-width: 860px; text-align: center; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; }
.credits-note h3 { font-size: 1rem; margin-bottom: 8px; }
.credits-note p { font-size: 15px; }
.credits-note strong { color: var(--text); }

/* ── FAQ ── */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 22px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 19px 32px 19px 0; position: relative; color: var(--text); font-weight: 600; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--accent); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 20px; font-size: 15.5px; }

/* ── Final CTA ── */
.final-cta { padding: 110px 0; position: relative; overflow: hidden; text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(77, 142, 247, 0.22), transparent 70%); }
.final-cta h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; max-width: 760px; margin: 0 auto; }
.final-cta p { margin-top: 16px; font-size: 1.1rem; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-muted); }
.footer-credit { margin-left: auto; color: var(--text-muted); }

/* ── Smaller screens ── */
@media (max-width: 980px) {
    .hero { padding: 64px 0 88px; }
    .hero-grid { grid-template-columns: 1fr; gap: 64px; }
    .window { transform: none; }
    .float-card { right: 12px; }
    .split, .split-reverse { grid-template-columns: 1fr; gap: 40px; }
    .split-reverse .split-copy { order: 0; }
    .feature-grid, .pricing { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr; }
    .section { padding: 80px 0; }
}
@media (max-width: 760px) {
    .nav-links { display: none; }
    .nav-signin { display: none; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .container { padding: 0 16px; }
    .feature-grid, .pricing { grid-template-columns: 1fr; }
    .panes { grid-template-columns: 1fr; }
    .float-card { position: relative; right: auto; bottom: auto; width: auto; margin: 16px 12px 0; animation: none; }
    .cta-row .btn { width: 100%; }
    .footer-credit { margin-left: 0; }
    .plan-tagline { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
