@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0c0c0e;
  --bg-2: #141416;
  --ink: #f2f2f0;
  --mut: #9a9a94;
  --acid: #e8ff4a;
  --card: #141416;
  --line: rgba(232, 255, 74, 0.16);
  --radius: 4px;
  --max: 1140px;
  --nav-h: 68px;
  --ui: "Archivo", ui-sans-serif, system-ui, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
body.human {
  --bg: #f3f3ee;
  --bg-2: #fff;
  --ink: #121210;
  --mut: #5c5c54;
  --acid: #121210;
  --card: #fff;
  --line: rgba(18, 18, 16, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  line-height: 1.5;
  letter-spacing: -0.03em;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 90; background: var(--acid); color: #0c0c0e; padding: 8px 12px; }
.skip:focus { top: 12px; }

.announce {
  background: var(--acid); color: #0c0c0e; text-align: center; padding: 9px 16px; font-size: 13px; font-weight: 700;
}
.announce a { text-decoration: underline; }

.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 14px; height: var(--nav-h); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.07em; font-size: 18px; }
.logo-mark { width: 18px; height: 18px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 650; }
.nav-links > a { padding: 8px 10px; color: var(--mut); }
.nav-links > a:hover, .nav-links > a.active { color: var(--ink); }
.mode {
  display: flex; border: 1px solid var(--line); overflow: hidden; margin-left: 8px;
}
.mode button {
  background: transparent; border: 0; padding: 7px 10px; cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.mode button.on { background: var(--acid); color: #0c0c0e; }
.menu-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--line); width: 40px; height: 40px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 16px; height: 2px; background: var(--ink); margin: 0 auto; position: relative;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius); padding: 11px 16px; font-weight: 750; font-size: 13px; cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-y { background: var(--acid); color: #0c0c0e; }
body.human .btn-y { background: #121210; color: #f3f3ee; }
.btn-g { background: transparent; border: 1px solid var(--line); color: var(--ink); }

.hero { position: relative; overflow: hidden; padding: 48px 0 24px; }
.hero-grid-bg {
  position: absolute; inset: 0; background: url("../img/grid.svg") center / cover no-repeat; opacity: 0.9; pointer-events: none;
}
body.human .hero-grid-bg { opacity: 0.18; filter: invert(1); }
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(3rem, 8vw, 6.4rem); letter-spacing: -0.08em; line-height: 0.88; font-weight: 800; margin: 12px 0 18px; max-width: 12ch;
}
.lead { color: var(--mut); font-size: 1.12rem; max-width: 40rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 18px; }
.note { color: var(--mut); font-size: 14px; }
.note a, .acid { color: var(--acid); }
body.human .note a { color: #121210; font-weight: 700; }

.panel {
  background: var(--bg-2); border: 1px solid var(--line); padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; margin-top: 28px; max-width: 720px;
}
.panel .k { color: var(--acid); }
.setup { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.apis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; }
.api {
  border: 1px solid var(--line); padding: 20px; min-height: 150px; background: var(--card);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.api:hover { border-color: var(--acid); transform: translateY(-3px); }
.api span { font-family: var(--mono); font-size: 11px; color: var(--acid); display: block; margin-bottom: 10px; }
.api p { margin: 8px 0 0; color: var(--mut); font-size: 14px; }

.section { padding: 80px 0; }
.section.alt { background: var(--bg-2); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acid); margin: 0 0 10px; }
h1, h2, h3 { letter-spacing: -0.05em; line-height: 1.08; }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 14px; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin: 0 0 14px; font-weight: 800; }
h3 { font-size: 1.1rem; margin: 0 0 8px; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 750; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--acid); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--mut); margin: 10px 0 0; }

.cta-band { padding: 88px 0; text-align: center; background: var(--acid); color: #0c0c0e; }
body.human .cta-band { background: #121210; color: #f3f3ee; }
.cta-band h2 { margin-bottom: 10px; }
.cta-band .hero-actions { justify-content: center; }
body.human .cta-band .btn-y { background: #e8ff4a; color: #0c0c0e; }

.footer { padding: 48px 0 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mut); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 24px; }
.footer h3 { font-size: 11px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.footer a, .footer p { display: block; margin: 7px 0; color: var(--mut); }
.footer a:hover { color: var(--ink); }
.legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }

.page-hero { padding: 48px 0 8px; }
.rate { width: 100%; border-collapse: collapse; margin: 18px 0 36px; font-size: 14px; }
.rate th, .rate td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.rate th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); }
.rate td:last-child { font-family: var(--mono); }

.form { display: grid; gap: 12px; max-width: 520px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--mut); }
.form input, .form select, .form textarea {
  border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 11px 12px; outline: none;
}
.form input:focus { border-color: var(--acid); }

.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 36px 0 80px; }
.side { position: sticky; top: calc(var(--nav-h) + 12px); align-self: start; }
.side a { display: block; color: var(--mut); font-size: 13px; padding: 7px 0; font-family: var(--mono); }
.side a:hover, .side a.active { color: var(--acid); }

.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: 320px;
  background: var(--bg-2); border: 1px solid var(--line); padding: 14px; font-size: 13px;
}
.cookie .btn { margin-top: 10px; }

.js [data-reveal] { opacity: 0; transform: translateY(12px); animation: reveal 0.6s var(--ease) forwards; animation-play-state: paused; }
.js [data-reveal].in { animation-play-state: running; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .apis, .footer-grid, .docs-layout { grid-template-columns: 1fr; }
  .wrap { width: min(var(--max), calc(100% - 32px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { animation: none !important; opacity: 1; transform: none; }
}
