:root {
  --bg: #fff8f0;
  --bg-accent: #ffd8a8;
  --bg-accent-2: #b2f2bb;
  --ink: #11131a;
  --ink-soft: #485063;
  --card: rgba(255, 255, 255, 0.74);
  --border: rgba(17, 19, 26, 0.12);
  --brand: #ff7a18;
  --brand-dark: #cc5300;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 0% 0%, #fff2de 0%, transparent 60%),
    radial-gradient(800px 380px at 100% 0%, #e8fff0 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, #fff 100%);
}

.bg-shape {
  position: fixed;
  z-index: -1;
  filter: blur(34px);
  opacity: 0.45;
}

.bg-shape-a {
  width: 280px;
  height: 280px;
  background: var(--bg-accent);
  top: -70px;
  right: 8%;
  border-radius: 37% 63% 62% 38% / 42% 40% 60% 58%;
}

.bg-shape-b {
  width: 240px;
  height: 240px;
  background: var(--bg-accent-2);
  bottom: 5%;
  left: -60px;
  border-radius: 49% 51% 61% 39% / 39% 52% 48% 61%;
}

.container {
  width: min(1024px, 92vw);
  margin: 0 auto;
}

.topbar {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.studio-btn {
  text-decoration: none;
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #ff7a18 0%, #e04b00 100%);
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(224, 75, 0, 0.3);
  animation: studioPulse 1800ms ease-in-out infinite;
}

.studio-btn:hover {
  filter: brightness(1.05);
}

.studio-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff7ef;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
}

@keyframes studioPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(224, 75, 0, 0.3);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(224, 75, 0, 0.42);
  }
}

.hero {
  padding: 34px 0 26px;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.09em;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

h1 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 5.8vw, 4rem);
  line-height: 1.03;
  max-width: 13ch;
}

.lead {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.cta-row {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

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

#how {
  gap: 10px;
}

#how .panel {
  margin: 0;
}

.panel {
  margin: 14px 0;
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  backdrop-filter: blur(9px);
}

h2,
h3 {
  margin-top: 0;
}

.hint {
  color: var(--ink-soft);
}

.form {
  display: grid;
  gap: 14px;
}

.field-row {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.95rem;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.is-hidden {
  display: none;
}

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

.api-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.api-card h3 {
  margin: 0 0 10px;
}

.code-wrap {
  position: relative;
}

.copy-icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: #232838;
  cursor: pointer;
}

.copy-icon-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.copy-icon-btn.is-done {
  border-color: #9ed6aa;
  background: #e9f9ee;
  color: #1f6c36;
}

.api-card pre {
  margin: 0;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(11, 15, 25, 0.1);
  background: #11161d;
  color: #f4f7ff;
  padding: 12px;
  font-size: 0.82rem;
  line-height: 1.45;
}

code {
  font-family: "IBM Plex Mono", monospace;
}

.footer {
  padding: 22px 0 36px;
  color: var(--ink-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .grid {
    grid-template-columns: 1fr;
  }

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