:root {
  --bg: #08090d;
  --surface: #11131a;
  --surface-2: #171a23;
  --ink: #f5f3ee;
  --muted: #9ca5b5;
  --line: rgba(255, 255, 255, 0.1);
  --brand: #8b5cf6;
  --brand-2: #6d28d9;
  --accent: #2dd4bf;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 500px at 12% 8%, rgba(109, 40, 217, 0.2), transparent 70%),
    radial-gradient(650px 500px at 90% 30%, rgba(45, 212, 191, 0.08), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 58px 58px, 58px 58px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.8rem max(1rem, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 13, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.topbar nav,
.footer nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.8rem;
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 118px;
  height: auto;
}

.brand span {
  padding-left: 0.8rem;
  color: var(--muted);
  border-left: 1px solid var(--line);
}

.topbar nav {
  gap: 1rem;
}

.topbar nav > a:not(.button),
.footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.topbar nav > a:hover,
.footer nav a:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 36px rgba(109, 40, 217, 0.3);
}

.button-soft {
  color: var(--ink);
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.3);
}

.button-outline {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--line);
}

main,
.footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  min-height: 620px;
  padding: 5rem 0;
}

.eyebrow,
.card-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.12;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 5.3rem);
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 62ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.endpoint-card,
.guide-card,
.steps,
.api-tools,
.api-group,
.security {
  border: 1px solid var(--line);
  background: rgba(17, 19, 26, 0.85);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.endpoint-card {
  overflow: hidden;
  border-radius: 22px;
}

.endpoint-card > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.15rem 1.3rem;
  border-bottom: 1px solid var(--line);
}

.endpoint-card > div:last-child {
  border: 0;
}

.endpoint-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.endpoint-card code,
.endpoint-card a {
  overflow-wrap: anywhere;
  color: #d8ccff;
  font-family: var(--mono);
  font-size: 0.86rem;
}

.section {
  padding: 5rem 0;
  scroll-margin-top: 88px;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2,
.guide-card h2,
.security h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.035em;
}

.section-head > p:last-child,
.guide-card > p,
.security p {
  max-width: 70ch;
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.6rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps li:nth-child(2n) {
  border-right: 0;
}

.steps li:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.step-number {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.steps h3 {
  margin: 0;
  font-size: 1.2rem;
}

.steps p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.inline-code {
  display: block;
  margin-top: 0.75rem;
  padding: 0.7rem;
  overflow-x: auto;
  border-radius: 8px;
  color: #d8ccff;
  background: #090a0e;
  font-size: 0.75rem;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.guide-card {
  min-width: 0;
  padding: 1.6rem;
  border-radius: 22px;
}

.guide-card h2 {
  font-size: 1.75rem;
}

pre {
  margin: 1.4rem 0 0;
  padding: 1.15rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #d9e0ec;
  background: #08090d;
  font-size: 0.78rem;
  line-height: 1.65;
}

.mini-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.mini-list code {
  color: #d8ccff;
  font-size: 0.8rem;
}

.note {
  padding: 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(45, 212, 191, 0.05);
}

.security {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: start;
  margin: 1rem 0;
  padding: 1.5rem;
  border-color: rgba(251, 191, 36, 0.25);
  border-radius: 18px;
}

.security-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #1b1402;
  background: #fbbf24;
  font: 800 1.25rem var(--display);
}

.security h2 {
  font-size: 1.35rem;
}

.security p {
  margin-top: 0.35rem;
}

.api-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.api-tools {
  position: sticky;
  top: 82px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(200px, 0.3fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border-radius: 16px;
  backdrop-filter: blur(16px);
}

.search,
.filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.search span,
.filter span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #0b0c11;
  font: 500 0.9rem var(--font);
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.api-groups {
  display: grid;
  gap: 1rem;
}

.api-group {
  overflow: hidden;
  border-radius: 18px;
}

.api-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.api-group-head h3 {
  margin: 0;
}

.api-group-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.endpoint {
  border-bottom: 1px solid var(--line);
}

.endpoint:last-child {
  border: 0;
}

.endpoint summary {
  display: grid;
  grid-template-columns: 72px minmax(180px, 0.9fr) 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  list-style: none;
}

.endpoint summary::-webkit-details-marker {
  display: none;
}

.endpoint summary:hover {
  background: rgba(255, 255, 255, 0.025);
}

.method {
  display: inline-flex;
  justify-content: center;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  color: #d6fff8;
  background: rgba(45, 212, 191, 0.12);
  font: 700 0.7rem var(--mono);
}

.method.post {
  color: #ded3ff;
  background: rgba(139, 92, 246, 0.16);
}

.method.put,
.method.patch {
  color: #ffebbd;
  background: rgba(251, 191, 36, 0.13);
}

.method.delete {
  color: #ffd0d0;
  background: rgba(248, 113, 113, 0.14);
}

.path {
  overflow-wrap: anywhere;
  color: #d8ccff;
  font-size: 0.78rem;
}

.summary {
  color: var(--muted);
  font-size: 0.88rem;
}

.endpoint-body {
  padding: 0 1.1rem 1.1rem;
}

.endpoint-body p {
  color: var(--muted);
}

.endpoint-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.endpoint-meta div {
  padding: 0.7rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
}

.endpoint-meta strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.endpoint-meta span,
.endpoint-meta code {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.api-loading,
.api-empty,
.api-error {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.api-error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.25);
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.footer img {
  height: 30px;
  width: auto;
}

.footer p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer > p {
  grid-column: 1 / -1;
  margin: 0;
}

.footer nav {
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 800px) {
  .hero,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 4rem 0;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps li,
  .steps li:nth-child(2n),
  .steps li:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .steps li:last-child {
    border-bottom: 0;
  }

  .endpoint summary {
    grid-template-columns: 64px 1fr;
  }

  .endpoint summary .summary {
    grid-column: 1 / -1;
  }

  .endpoint-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .brand span,
  .topbar nav > a:not(.button) {
    display: none;
  }

  .api-heading {
    align-items: start;
    flex-direction: column;
  }

  .api-tools {
    position: static;
    grid-template-columns: 1fr;
  }

  .mini-list div,
  .footer {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .footer > p {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
