:root {
  --bg: #f7f2e7;
  --bg-alt: #e6f2ef;
  --panel: #ffffff;
  --panel-warm: #fbf8f2;
  --ink: #1f2933;
  --muted: #52606d;
  --accent: #0f766e;
  --accent-strong: #0b5a54;
  --accent-soft: #cce9e6;
  --highlight: #f59e0b;
  --border: #d7cec0;
  --shadow: 0 14px 30px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, var(--bg), var(--bg-alt));
  min-height: 100vh;
}

.backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.18), transparent 55%),
    radial-gradient(circle at 85% 10%, rgba(15, 118, 110, 0.18), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(17, 94, 89, 0.12), transparent 60%);
  z-index: -1;
}

.hero {
  max-width: 1200px;
  margin: 48px auto 24px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2.4rem, 3vw, 3.4rem);
  margin: 0;
}

.subtitle {
  max-width: 560px;
  color: var(--muted);
  margin-top: 10px;
}

.hero-badge {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 20px;
  min-width: 180px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  text-align: left;
}

.hero-badge span {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-badge strong {
  font-size: 1.1rem;
}

.grid {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card span,
.card p {
  color: var(--muted);
}

.card-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.card-head p {
  margin: 0;
}

.span-2 {
  grid-column: span 2;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  font-size: 0.95rem;
  background: var(--panel-warm);
}

textarea {
  font-family: "JetBrains Mono", "Courier New", monospace;
  min-height: 160px;
  resize: vertical;
}

.toggle {
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding-top: 24px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.link-button {
  text-decoration: none;
}

.link-button.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: transparent;
  font-weight: 600;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(31, 41, 51, 0.15);
}

button.action {
  background: var(--accent);
  color: white;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.note {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.api-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.api-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-warm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.api-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.api-number {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
}

.api-label {
  font-weight: 600;
  color: var(--ink);
}

.api-path {
  font-family: \"JetBrains Mono\", \"Courier New\", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.progress-bar.indeterminate {
  width: 40%;
  animation: progress-slide 1.2s ease-in-out infinite;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.82rem;
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, 0.2);
}

pre.response {
  background: #0b1926;
}

pre.code {
  background: #111827;
}

pre.curl {
  background: #1f2933;
}

.log-stream {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
}

.log-entry {
  background: #0b1926;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.log-entry .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  font-size: 0.78rem;
}

.footer {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes progress-slide {
  0% {
    transform: translateX(-80%);
  }
  50% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(220%);
  }
}

@media (max-width: 900px) {
  .span-2 {
    grid-column: span 1;
  }

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

  .footer {
    flex-direction: column;
    gap: 6px;
  }
}
