/* Landing page for the API. Self-contained: one file, no fonts or images to fetch. */

:root {
  --bg: #08090c;
  --panel: #101317;
  --code-bg: #0b0e13;
  --line: #1e232b;
  --line-strong: #2a313b;
  --text: #e7eaf0;
  --muted: #949cab;
  --dim: #6a7381;
  --accent: #e0234e;
  --get: #4fd1a5;
  --post: #f0b429;
  --delete: #f0506e;
  --radius: 12px;
  --sans:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  --mono:
    ui-monospace, 'JetBrains Mono', 'Cascadia Code', 'SF Mono', Menlo, Consolas,
    'Liberation Mono', monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(
      900px 520px at 10% -12%,
      rgba(224, 35, 78, 0.17),
      transparent 70%
    ),
    radial-gradient(
      760px 480px at 100% 4%,
      rgba(79, 209, 165, 0.07),
      transparent 65%
    );
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── top bar ─────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: blur(10px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(160deg, #f03a5f, #a3123a);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.brand__text {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.topbar__nav a,
.pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 10px;
}

.topbar__nav a {
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.topbar__nav a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.pill--live {
  color: var(--get);
  border-color: rgba(79, 209, 165, 0.35);
}

.pill--live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

/* ── hero ────────────────────────────────────────────────────────────────── */

.hero {
  padding: 84px 0 60px;
}

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

h1 span {
  color: var(--accent);
}

.lede {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 3px 9px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ── panels ──────────────────────────────────────────────────────────────── */

.panel {
  border-top: 1px solid var(--line);
  padding: 56px 0;
}

.panel__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.8em;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: -0.04em;
}

.count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.panel__lede {
  margin: 0 0 30px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── endpoint table ──────────────────────────────────────────────────────── */

.routes {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.route {
  display: grid;
  grid-template-columns: 76px minmax(140px, 1fr) minmax(0, 2.1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.route:last-child {
  border-bottom: 0;
}

.route:hover {
  background: rgba(255, 255, 255, 0.017);
}

.method {
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 2px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
}

.method--GET {
  color: var(--get);
}

.method--POST {
  color: var(--post);
}

.method--DELETE {
  color: var(--delete);
}

.route__path {
  font-size: 13.5px;
}

.route__summary {
  color: var(--muted);
  font-size: 0.9rem;
}

.route__notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.tag {
  border-radius: 5px;
  background: #161a21;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

/* ── request lifecycle ───────────────────────────────────────────────────── */

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flow__step {
  position: relative;
  margin-left: 6px;
  padding: 0 0 26px 30px;
  border-left: 1px solid var(--line-strong);
}

.flow__step:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.flow__step::before {
  content: '';
  position: absolute;
  top: 9px;
  left: -4.5px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
}

.flow__step--accent::before {
  border-color: var(--accent);
  background: var(--accent);
}

.flow__name {
  margin: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
}

.flow__role {
  margin: 3px 0 0;
  font-size: 0.95rem;
}

.flow__detail {
  margin: 6px 0 0;
  max-width: 74ch;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ── error envelope ──────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: start;
}

.code {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  padding: 18px 20px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  overflow-x: auto;
}

.code .k {
  color: var(--get);
}

.code .s {
  color: var(--post);
}

.code .n {
  color: var(--delete);
}

.failures {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.failures th {
  padding: 0 12px 10px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--dim);
}

.failures td {
  border-top: 1px solid var(--line);
  padding: 11px 12px 11px 0;
  vertical-align: top;
  color: var(--muted);
}

.failures td:first-child {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
}

.failures code {
  font-size: 12px;
  color: var(--text);
}

/* ── footer ──────────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  border-top: 1px solid var(--line);
  padding: 26px 0 64px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.footer a {
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .route {
    grid-template-columns: 68px minmax(0, 1fr);
    row-gap: 6px;
  }

  .route__summary,
  .route__notes {
    grid-column: 2;
  }

  .route__notes {
    justify-content: flex-start;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }

  .hero {
    padding: 56px 0 44px;
  }

  .topbar__nav .pill--live {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
