/* ============================================================
   Lynx Api — brand site
   Palette: graphite + bone white + lynx-amber (no purple, no blobs)
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-600.woff2") format("woff2");
}

:root {
  --bg: #0b0c0e;
  --bg-raise: #111317;
  --bg-panel: #14171c;
  --line: rgba(242, 239, 233, 0.09);
  --line-strong: rgba(242, 239, 233, 0.16);
  --text: #f2efe9;
  --text-dim: #9a9890;
  --text-faint: #6b6a63;
  --amber: #f0a028;
  --amber-hi: #ffbf5e;
  --amber-deep: #d97f06;
  --code-key: #8fd0c6;
  --code-str: #ffcf87;
  --font-display: "Space Grotesk", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/* fixed film-grain overlay (pointer-events none, never on scrolling containers) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 80; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: rgba(240, 160, 40, 0.3); }
html, body { overflow-x: hidden; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
section { padding: 112px 0; scroll-margin-top: 84px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 14px 16px 0;
}
.nav-inner {
  display: flex; align-items: center; gap: 32px; height: 56px;
  max-width: 1080px; margin: 0 auto; padding: 0 12px 0 18px;
  background: rgba(11, 12, 14, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}
.nav.scrolled .nav-inner { border-color: var(--line-strong); background: rgba(11, 12, 14, 0.86); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--amber); border: 1px solid rgba(240, 160, 40, 0.4);
  padding: 1px 7px; border-radius: 999px; transform: translateY(-1px);
}
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-burger { display: none; background: none; border: 0; width: 34px; height: 34px; cursor: pointer; position: relative; }
.nav-burger span {
  display: block; width: 20px; height: 2px; background: var(--text);
  margin: 5px auto; transition: transform 0.25s, opacity 0.25s;
}
.nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-burger span:nth-child(2) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: all 0.3s var(--ease-soft); line-height: 1.4;
  font-family: var(--font-body);
}
.btn-primary {
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  color: #14100a; box-shadow: 0 0 24px rgba(240, 160, 40, 0.22);
}
.btn-primary:hover { box-shadow: 0 0 36px rgba(240, 160, 40, 0.4); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-dim); background: rgba(242, 239, 233, 0.04); }
.btn:active { transform: scale(0.98); }
.btn-orb {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(20, 16, 10, 0.16); color: #14100a;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
  transition: transform 0.45s var(--ease-out);
}
.btn-primary:hover .btn-orb { transform: translate(2px, -2px) scale(1.08); }
.btn-big { padding: 14px 34px; font-size: 16px; }
.nav .btn { padding: 7px 16px; font-size: 14px; }

/* ---------- hero ---------- */
.hero {
  padding: 150px 0 96px;
  background:
    radial-gradient(720px 420px at 78% 8%, rgba(240, 160, 40, 0.07), transparent 68%),
    radial-gradient(560px 400px at 8% 90%, rgba(143, 208, 198, 0.045), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--amber); margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 10px var(--amber); animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(38px, 5.4vw, 62px); line-height: 1.12; letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.lede { color: var(--text-dim); font-size: 17px; max-width: 30em; margin-bottom: 30px; }
.lede code {
  font-family: var(--font-mono); font-size: 0.86em; color: var(--amber-hi);
  background: rgba(240, 160, 40, 0.09); padding: 2px 7px; border-radius: 5px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- terminal ---------- */
/* double-bezel: outer machined tray + inner core */
.terminal-shell {
  padding: 10px; border: 1px solid var(--line);
  border-radius: 20px; background: rgba(242, 239, 233, 0.03);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.terminal {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; max-width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  background: rgba(242, 239, 233, 0.025);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; background: #2b2f36; }
.t-title { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.terminal-body {
  padding: 20px 22px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.85;
}
.terminal-body code { display: block; min-width: max-content; }
.t-line { display: block; white-space: pre; }
.t-gap { height: 8px; }
.t-prompt { color: var(--amber); font-weight: 600; }
/* dark, thin scrollbars for code panes (blend into theme) */
.terminal-body, .codepane { scrollbar-width: thin; scrollbar-color: #2b2f36 transparent; }
.terminal-body::-webkit-scrollbar, .codepane::-webkit-scrollbar { height: 8px; }
.terminal-body::-webkit-scrollbar-track, .codepane::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb, .codepane::-webkit-scrollbar-thumb { background: #2b2f36; border-radius: 4px; }
.t-key { color: var(--code-key); }
.t-str { color: var(--code-str); }
.t-typed { border-right: 2px solid var(--amber); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { border-color: transparent; } }

/* ---------- stats ---------- */
.stats { padding: 0; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 38px 12px; text-align: center;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.stat:first-child { border-left: 0; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: 38px; letter-spacing: -0.02em; }
.stat-num em { font-style: normal; color: var(--amber); }
.stat-label { color: var(--text-faint); font-size: 13px; }

/* ---------- sections ---------- */
.sec-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em; margin-bottom: 14px;
}
.sec-sub { color: var(--text-dim); max-width: 40em; margin-bottom: 48px; }
.fineprint { color: var(--text-faint); font-size: 13px; margin-top: 28px; }

/* ---------- models ---------- */
#models { border-bottom: 1px solid var(--line); }
.model-groups { display: flex; flex-direction: column; gap: 34px; }
.model-group h3 {
  font-size: 14px; color: var(--text-dim); font-weight: 600;
  letter-spacing: 0.04em; margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--bg-raise); transition: all 0.35s var(--ease-soft);
}
.chip:hover { border-color: rgba(240, 160, 40, 0.55); color: var(--amber-hi); transform: translateY(-2px); }

/* ---------- quota ---------- */
#quota { border-bottom: 1px solid var(--line); }
.quota-rows { display: flex; flex-direction: column; }
.quota-row {
  display: grid; grid-template-columns: 148px 1fr; gap: 28px; align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.quota-row:last-of-type { border-bottom: 1px solid var(--line); }
.quota-num {
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
  color: var(--amber); letter-spacing: -0.01em;
}
.quota-row h3 { font-size: 17px; margin-bottom: 4px; }
.quota-row p { color: var(--text-dim); font-size: 15px; }

/* ---------- quickstart ---------- */
#quickstart { border-bottom: 1px solid var(--line); }
.steps { list-style: none; margin-bottom: 52px; }
.steps li { display: grid; grid-template-columns: 46px 1fr; gap: 20px; padding: 18px 0; }
.step-no {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(240, 160, 40, 0.5); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.steps h3 { font-size: 17px; margin-bottom: 4px; }
.steps p { color: var(--text-dim); font-size: 15px; max-width: 46em; }

.codetabs { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--bg-raise); }
.codetabs-bar {
  display: flex; align-items: center; border-bottom: 1px solid var(--line);
  background: rgba(242, 239, 233, 0.025);
}
.tab {
  background: none; border: 0; color: var(--text-faint); cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; padding: 12px 18px;
  border-bottom: 2px solid transparent; transition: all 0.18s;
}
.tab:hover { color: var(--text-dim); }
.tab.active { color: var(--amber); border-bottom-color: var(--amber); }
.copy-btn {
  margin-left: auto; margin-right: 12px; background: none; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text-dim);
  font-size: 12px; padding: 5px 12px; transition: all 0.18s; font-family: var(--font-body);
}
.copy-btn:hover { color: var(--text); border-color: var(--text-dim); }
.codepane { display: none; padding: 22px 24px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.8; }
.codepane.active { display: block; }
.codepane code { color: #d8d4cb; }

/* ---------- apply ---------- */
#apply { padding: 128px 0; }
.apply-box { text-align: center; }
.apply-box h2 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.apply-box p { color: var(--text-dim); margin-bottom: 30px; }
.apply-box .fineprint { margin-top: 26px; }
.textlink { color: var(--amber); text-decoration: none; }
.textlink:hover { text-decoration: underline; }

/* ---------- faq ---------- */
.faq-list { max-width: 760px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 2px;
  font-size: 16.5px; font-weight: 600; position: relative; transition: color 0.2s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--amber); font-family: var(--font-mono); font-size: 20px; transition: transform 0.25s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list summary:hover { color: var(--amber-hi); }
.faq-list details p { color: var(--text-dim); font-size: 15px; padding: 0 2px 22px; max-width: 60em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--text-dim); font-size: 14px; }
.footer-links { display: flex; gap: 22px; margin-left: auto; }
.footer-links a { color: var(--text-faint); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-faint); font-size: 13px; font-family: var(--font-mono); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 130px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .quota-row { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  section { padding: 68px 0; }
  .nav-links {
    display: none; position: absolute; top: 76px; left: 16px; right: 16px;
    flex-direction: column; gap: 0; background: rgba(11, 12, 14, 0.97);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line-strong); border-radius: 16px; padding: 8px 20px 14px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 15px; }
  .nav-burger { display: block; }
  .stat-num { font-size: 30px; }
  .terminal-body { font-size: 12px; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .eyebrow .dot, .t-typed { animation: none; }
  .btn-orb { transition: none; }
}
