/* Fuelline site — dark, violet→green gradient accent */

:root {
  --bg: #0a0b10;
  --bg-soft: #101219;
  --panel: #141724;
  --panel-2: #181c2c;
  --border: #232840;
  --border-soft: #1c2033;
  --text: #e8eaf2;
  --muted: #9aa1b5;
  --dim: #6b7288;
  --violet: #8b5cf6;
  --green: #34d399;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #34d399 100%);
  --grad-soft: linear-gradient(135deg, rgba(139,92,246,.14) 0%, rgba(52,211,153,.14) 100%);
  --code-bg: #0d0f16;
  --radius: 14px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.section[id], .docs-body [id], .api-body [id] { scroll-margin-top: 88px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

body {
  margin: 0;
  font: 16px/1.65 var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 16, .78);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  color: var(--text); text-decoration: none;
}
.brand svg { display: block; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 7px 13px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--grad); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 8px 18px; border-radius: 10px;
  transition: filter .15s, transform .15s;
}
.nav-cta:hover { filter: brightness(1.12); transform: translateY(-1px); }

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

.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
.hero::before {
  content: "";
  position: absolute; inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(ellipse 55% 45% at 25% 30%, rgba(139,92,246,.16), transparent 70%),
    radial-gradient(ellipse 50% 40% at 75% 20%, rgba(52,211,153,.12), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.hero-grid > *, .docs-layout > * { min-width: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  margin-bottom: 22px;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
a.badge:hover { color: var(--text); border-color: var(--green); }
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(52,211,153,.8);
}

h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08; letter-spacing: -.03em;
  margin: 0 0 20px; font-weight: 800;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.lede {
  font-size: 18.5px; color: var(--muted);
  max-width: 560px; margin: 0 0 34px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px var(--font); text-decoration: none;
  padding: 13px 26px; border-radius: 12px;
  transition: filter .15s, transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-primary { background: var(--grad); color: #fff; }
.btn-ghost {
  color: var(--text); border: 1px solid var(--border); background: var(--bg-soft);
}

.hero-meta {
  display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap;
}
.meta-item b { display: block; font-size: 22px; letter-spacing: -.02em; }
.meta-item span { font-size: 13px; color: var(--dim); }

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

.terminal {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(139,92,246,.06);
  overflow: hidden;
  font: 13px/1.7 var(--mono);
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: var(--panel);
  border-bottom: 1px solid var(--border-soft);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: 8px; font-size: 12px; color: var(--dim); }
.terminal-body { padding: 18px; overflow-x: auto; }
.terminal-body .ln { white-space: pre; }
.tok-p { color: #8b5cf6; }
.tok-s { color: #34d399; }
.tok-k { color: #7dd3fc; }
.tok-c { color: #565f7e; }
.tok-m { color: #fbbf24; }

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

.section { padding: 84px 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--border-soft); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin: 0 0 12px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.025em;
  margin: 0 0 14px; font-weight: 750;
}
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ---------- feature cards ---------- */

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: #323a5e; }
.card .icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  font-size: 20px;
}
.card h3 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.card code, .cta code {
  font-family: var(--mono); font-size: .88em;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  padding: 1px 6px; border-radius: 6px; color: #d3d9ea;
}

/* ---------- models table ---------- */

.catalog-controls { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.catalog-controls label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.catalog-search { flex: 1; min-width: 200px; }
.catalog-controls input, .catalog-controls select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); color: var(--text); font: 14px var(--font); color-scheme: dark;
}
.catalog-controls input::placeholder { color: var(--muted); }
.catalog-controls button { min-height: 44px; cursor: pointer; }
.catalog-controls button:disabled { opacity: .6; cursor: wait; transform: none; }
.catalog-status { min-height: 23px; margin: 12px 0; font-size: 14px; color: var(--muted); }
.catalog-status a { color: var(--green); }
.models-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table.models { width: 100%; border-collapse: collapse; min-width: 640px; }
table.models th {
  text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); padding: 14px 18px; border-bottom: 1px solid var(--border);
}
table.models td { padding: 13px 18px; border-bottom: 1px solid var(--border-soft); font-size: 14.5px; }
table.models tr:last-child td { border-bottom: none; }
table.models tr:hover td { background: rgba(255,255,255,.02); }
.mono { font-family: var(--mono); font-size: 13px; }
.price { color: var(--green); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.chip {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 6px;
  background: var(--grad-soft); border: 1px solid var(--border);
  color: var(--muted); margin-right: 4px;
}
.muted { color: var(--dim); }

/* ---------- code blocks ---------- */

.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.code-block pre {
  margin: 0; padding: 18px 20px;
  overflow-x: auto;
  font: 13px/1.7 var(--mono);
  color: #c9d1e3;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 7px;
  font: 600 11px var(--font); padding: 5px 10px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.copy-btn:hover { color: var(--text); border-color: #323a5e; }
.copy-btn.done { color: var(--green); border-color: rgba(52,211,153,.4); }
.model-name .mono { display: block; overflow-wrap: anywhere; }
.model-copy { position: static; min-height: 32px; margin-top: 6px; }

/* ---------- docs layout ---------- */

.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.docs-toc {
  position: sticky; top: 88px;
  font-size: 14px;
}
.docs-toc a {
  display: block; color: var(--muted); text-decoration: none;
  padding: 6px 0 6px 14px; border-left: 2px solid var(--border-soft);
  transition: color .15s, border-color .15s;
}
.docs-toc a:hover { color: var(--text); }
.docs-toc a.active { color: var(--green); border-left-color: var(--green); }
.docs-body h2 {
  font-size: 26px; letter-spacing: -.02em; margin: 56px 0 16px;
  padding-top: 8px;
}
.docs-body h2:first-child { margin-top: 0; }
.docs-body h3 { font-size: 18px; margin: 32px 0 10px; }
.docs-body p { color: var(--muted); font-size: 15.5px; }
.docs-body ul { color: var(--muted); font-size: 15.5px; }
.docs-body li { margin: 6px 0; }
.docs-body code, .api-body code {
  font-family: var(--mono); font-size: .88em;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  padding: 2px 7px; border-radius: 6px; color: #d3d9ea;
}
.docs-body table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.docs-body th, .docs-body td {
  text-align: left; padding: 10px 14px; font-size: 14px;
  border: 1px solid var(--border);
}
.docs-body th { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--panel); }
.docs-body td { color: var(--muted); }
.docs-body td code { background: none; border: none; padding: 0; color: var(--green); }

/* ---------- api reference ---------- */

.endpoint {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); margin: 18px 0; overflow: hidden;
}
.endpoint-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-soft);
}
.method {
  font: 700 12px var(--mono); letter-spacing: .06em;
  padding: 5px 11px; border-radius: 7px;
}
.method.post { background: rgba(139,92,246,.16); color: #a78bfa; border: 1px solid rgba(139,92,246,.35); }
.method.get { background: rgba(52,211,153,.13); color: var(--green); border: 1px solid rgba(52,211,153,.35); }
.endpoint-path { font-family: var(--mono); font-size: 14.5px; font-weight: 600; }
.endpoint-body { padding: 18px 20px; }
.endpoint-body p { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }
.endpoint-body p:last-child { margin-bottom: 0; }

/* api reference sub-sections reuse docs table styles */
.api-body h2 { font-size: 26px; letter-spacing: -.02em; margin: 48px 0 16px; }
.api-body p { color: var(--muted); font-size: 15.5px; }
.api-body table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.api-body th, .api-body td {
  text-align: left; padding: 10px 14px; font-size: 14px;
  border: 1px solid var(--border);
}
.api-body th { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--panel); }
.api-body td { color: var(--muted); }
.api-body td code { background: none; border: none; padding: 0; color: var(--green); }

/* ---------- CTA ---------- */

.cta {
  position: relative; overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
}
.cta::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(139,92,246,.14), transparent 70%),
    radial-gradient(ellipse 50% 80% at 50% 100%, rgba(52,211,153,.1), transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; margin: 0 0 12px; }
.cta p { color: var(--muted); margin: 0 0 28px; }

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

footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0; margin-top: 40px;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.footer-inner p { color: var(--dim); font-size: 13.5px; margin: 0; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--muted); font-size: 13.5px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- toast ---------- */

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 10px;
  opacity: 0; transition: all .25s ease; z-index: 100;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

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

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; display: none; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .nav-inner { height: auto; min-height: 64px; flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  .nav-cta { margin-left: auto; }
  .nav-links { order: 3; flex: 1 0 100%; justify-content: space-between; }
  .nav-links a { padding: 7px 10px; }
  .section[id], .docs-body [id], .api-body [id] { scroll-margin-top: 140px; }
  .catalog-search { flex-basis: 100%; }
  .catalog-controls label:not(.catalog-search) { flex: 1; }
  table.models { min-width: 0; }
  table.models th { padding: 12px 8px; font-size: 10px; letter-spacing: .04em; }
  table.models td { padding: 12px 8px; font-size: 12px; }
  table.models .mono, table.models .price { font-size: 11px; }
  .model-copy { min-height: 44px; }
  .docs-body table, .api-body table { display: block; overflow-x: auto; }
  .endpoint-head { flex-wrap: wrap; gap: 8px; }
  .footer-links { flex-wrap: wrap; gap: 14px 22px; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
