:root {
  color-scheme: dark;
  --accent: #fda35c;
  --accent-strong: #f59e0b;
  --danger: #ff7b7b;
  --success: #62d39b;
  --bg: #080810;
  --card: rgba(18, 18, 29, 0.88);
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.095);
  --text: #f7f2ec;
  --muted: #c8bfba;
  --subtle: rgba(247, 242, 236, 0.66);
  --line: rgba(255, 255, 255, 0.13);
  --shadow: 0 30px 90px -50px rgba(0, 0, 0, 0.9);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 10%, rgba(253, 163, 92, 0.22), transparent 30%),
    radial-gradient(circle at 84% 14%, rgba(124, 91, 255, 0.18), transparent 32%),
    linear-gradient(135deg, #080810 0%, #10101a 58%, #080810 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: -180px -220px auto auto;
  width: min(70vw, 860px);
  aspect-ratio: 1;
  border: 1px solid rgba(253, 163, 92, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 96px rgba(253, 163, 92, 0.03),
    0 0 0 190px rgba(124, 91, 255, 0.025);
  content: "";
  pointer-events: none;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 76%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--accent);
  padding: 10px 14px;
  color: #231306;
  font-weight: 850;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.portal-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(42px, 7vw, 88px);
  padding: clamp(20px, 4vw, 56px);
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.brand img {
  display: block;
  width: min(136px, 38vw);
  max-height: 48px;
  object-fit: contain;
}

.topnav,
.actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topnav {
  justify-content: center;
}

.topnav a,
.badge,
.status-dot {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #211100;
}

.button--secondary,
.button--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button--danger {
  border-color: rgba(255, 123, 123, 0.42);
  background: rgba(255, 123, 123, 0.12);
  color: #ffd5d5;
}

main {
  display: grid;
  gap: clamp(54px, 7vw, 92px);
}

.hero {
  --developer-hero-min-height: min(690px, calc(100vh - 170px));
}

.panel > *,
.section-grid > *,
.card,
.integration-card,
.endpoint,
.code-tabs,
.key-workbench,
.api-tester,
.pricing-card {
  min-width: 0;
}

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

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.93;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
}

h3 {
  font-size: 1.16rem;
}

.lead,
.hero-card p,
.card p,
.panel p,
.support p,
.endpoint p,
.integration-card p,
.security-note {
  color: var(--muted);
  line-height: 1.65;
}

.lead {
  max-width: 66ch;
  margin: 26px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.actions {
  margin-top: 28px;
}

.hero-card,
.card,
.panel,
.endpoint,
.integration-card,
.support,
.code-tabs {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
}

pre {
  overflow: auto;
  max-width: 100%;
  margin: 0;
  border: 1px solid rgba(253, 163, 92, 0.2);
  border-radius: 22px;
  background: #05050a;
  padding: 18px;
  color: #fff4e8;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.section-grid {
  display: grid;
  width: min(1180px, 100%);
  justify-self: center;
  gap: 26px;
}

.section-heading {
  display: grid;
  max-width: 780px;
  gap: 10px;
}

.feature-grid,
.integration-grid,
.endpoint-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

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

.card,
.integration-card,
.endpoint {
  padding: 22px;
}

.card--highlight {
  border-color: rgba(253, 163, 92, 0.38);
  background:
    radial-gradient(circle at 18% 0%, rgba(253, 163, 92, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
}

.inline-link {
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.endpoint code {
  min-width: 0;
  white-space: normal;
}

.endpoint {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) minmax(220px, 0.8fr);
  align-items: center;
  gap: 16px;
}

.endpoint span {
  color: var(--accent);
  font-weight: 950;
}

.panel,
.support {
  display: grid;
  width: min(1180px, 100%);
  justify-self: center;
  grid-template-columns: minmax(0, 0.82fr) minmax(300px, 1fr);
  gap: clamp(24px, 4vw, 46px);
  padding: clamp(22px, 4vw, 42px);
}

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

.key-workbench,
.api-tester,
.pricing-card {
  display: grid;
  gap: 16px;
}

.pricing-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.key-display,
.tester-output {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(253, 163, 92, 0.22);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.3);
  padding: 18px;
}

.key-display span {
  color: var(--subtle);
  font-size: 0.84rem;
  font-weight: 800;
}

.key-display code {
  overflow-wrap: anywhere;
  color: #fff4e8;
}

.key-metadata {
  display: grid;
  gap: 10px;
}

.key-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.key-row strong {
  color: var(--text);
}

.key-row.is-active {
  border-color: rgba(98, 211, 155, 0.42);
}

.key-row.is-revoked {
  opacity: 0.68;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.26);
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
}

input::placeholder {
  color: rgba(247, 242, 236, 0.42);
}

.timeline {
  display: grid;
  width: min(1180px, 100%);
  justify-self: center;
  gap: 22px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  padding: 20px;
}

.steps li::before {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #211100;
  font-weight: 950;
  text-align: center;
  line-height: 30px;
  content: counter(list-item);
}

.steps span {
  color: var(--muted);
  line-height: 1.55;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 18px 0;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 9px 14px;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.tab.is-active {
  border-color: rgba(253, 163, 92, 0.44);
  background: rgba(253, 163, 92, 0.14);
  color: var(--text);
}

.code-tabs pre {
  margin: 18px;
}

.code-tabs > .button {
  margin: 0 18px 18px;
}

.footer {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--subtle);
  font-size: 0.86rem;
}

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

  .feature-grid,
  .integration-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .key-row {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
