:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --border: #d5dce6;
  --text: #16191f;
  --muted: #5f6b7a;
  --brand: #0972d3;
  --brand-dark: #0054a6;
  --accent: #ff9900;
  --code-bg: #0f1722;
  --code-border: #223144;
  --code-text: #d6e2f0;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Public Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(9, 114, 211, 0.09), transparent 30%),
    linear-gradient(180deg, #fbfcfe 0%, #f3f6fa 100%);
  line-height: 1.6;
}

code,
pre,
.copy-button,
.toggle-button {
  font-family: "IBM Plex Mono", monospace;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(247, 248, 251, 0.88);
  border-bottom: 1px solid rgba(213, 220, 230, 0.85);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand,
.main-nav a,
.site-footer a {
  text-decoration: none;
  color: inherit;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.main-nav a,
.site-footer a {
  color: var(--muted);
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--brand);
}

.hero,
.section {
  padding: 72px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(238, 242, 247, 0.75), rgba(247, 248, 251, 0.35));
  border-top: 1px solid rgba(213, 220, 230, 0.55);
  border-bottom: 1px solid rgba(213, 220, 230, 0.55);
}

.hero-grid,
.section-grid,
.two-column {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: start;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 14px;
}

.hero-copy,
.section p,
.info-card p,
.api-item p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

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

.button.secondary {
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--border);
}

.hero-card,
.code-panel,
.info-card,
.api-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.code-panel {
  overflow: hidden;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #121b28;
  color: #eef4fb;
  border-bottom: 1px solid var(--code-border);
}

.panel-actions {
  display: flex;
  gap: 10px;
}

.copy-button,
.toggle-button,
.tab-button {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.78rem;
}

.copy-button:hover,
.toggle-button:hover,
.tab-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 0.94rem;
}

.section-heading {
  margin-bottom: 28px;
}

.tabs {
  display: grid;
  gap: 18px;
}

.tab-list {
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  background: #dfe7f1;
  border-radius: 999px;
}

.tab-button {
  color: var(--text);
  background: transparent;
  border-color: transparent;
}

.tab-button.is-active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

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

.info-card,
.api-item {
  padding: 24px;
}

.example-stack {
  display: grid;
  gap: 18px;
}

.expandable .expand-body {
  display: none;
}

.expandable.is-open .expand-body {
  display: block;
}

.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
}

@media (max-width: 960px) {
  .hero-grid,
  .section-grid,
  .two-column,
  .cards,
  .api-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .section {
    padding: 56px 0;
  }

  .container {
    width: min(var(--container), calc(100% - 20px));
  }

  .tab-list,
  .hero-actions {
    width: 100%;
  }

  .tab-list {
    flex-wrap: wrap;
  }
}
