:root {
  --bg: #0b1020;
  --bg-soft: #111b33;
  --bg-lighter: #141e35;
  --panel: rgba(10, 17, 31, 0.78);
  --line: rgba(160, 196, 255, 0.16);
  --line-strong: rgba(160, 196, 255, 0.26);
  --text: #eff5ff;
  --text-secondary: #d0d9e8;
  --muted: #aebfd8;
  --accent: #58e0c1;
  --accent-light: #8ef5e0;
  --accent-dark: #3bc79d;
  --accent-strong: #ffd166;
  --code: #09111d;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.24);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(
      circle at top right,
      rgba(88, 224, 193, 0.16),
      transparent 30%
    ),
    radial-gradient(
      circle at left 10%,
      rgba(255, 209, 102, 0.16),
      transparent 22%
    ),
    linear-gradient(160deg, #09101b, var(--bg));
  scroll-behavior: smooth;
}

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

.glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.4;
  pointer-events: none;
}

.glow-a {
  width: 280px;
  height: 280px;
  background: rgba(88, 224, 193, 0.5);
  top: -100px;
  right: -80px;
}

.glow-b {
  width: 320px;
  height: 320px;
  background: rgba(255, 209, 102, 0.3);
  bottom: -120px;
  left: -90px;
}

.site-header,
main {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  backdrop-filter: blur(12px);
  background: rgba(11, 16, 32, 0.7);
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.brand:hover {
  color: var(--accent);
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.header-nav a,
.inline-link,
.link-list a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.header-nav a {
  font-size: 0.95rem;
}

.header-nav a:hover,
.inline-link:hover,
.link-list a:hover {
  color: var(--accent);
}

.header-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-fast);
}

.header-nav a:hover::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-light));
  color: #082019;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(120deg, var(--accent-light), #a6f0df);
  box-shadow: 0 8px 24px rgba(88, 224, 193, 0.3);
}

.btn-outline,
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(88, 224, 193, 0.05);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(88, 224, 193, 0.12);
  color: var(--accent);
}

.btn-ghost {
  color: var(--accent-strong);
  background: transparent;
  border-color: rgba(255, 209, 102, 0.4);
}

.btn-ghost:hover {
  border-color: var(--accent-strong);
  background: rgba(255, 209, 102, 0.1);
  box-shadow: 0 8px 24px rgba(255, 209, 102, 0.2);
}

.hero {
  padding: 72px 0 48px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
  opacity: 0.9;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.1;
  margin-bottom: 18px;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 14px;
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.2;
  margin-bottom: 12px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Archivo", sans-serif;
}

.hero-copy {
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 0 0 24px;
}

.bots-grid {
  align-items: start;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

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

.card h2 {
  margin-bottom: 16px;
}

.card h3 {
  margin-bottom: 12px;
}

.step-list,
.link-list,
.pill-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.step-list li,
.link-list li,
.pill-list li {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.link-list a {
  color: var(--accent);
  font-weight: 600;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.pill-list li {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(88, 224, 193, 0.1);
  border: 1px solid rgba(88, 224, 193, 0.2);
  color: var(--accent-light);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 17, 29, 0.5);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(160, 196, 255, 0.08);
  vertical-align: top;
}

th {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(17, 27, 51, 0.6);
}

td {
  color: var(--muted);
  font-size: 0.95rem;
}

tbody tr:hover {
  background: rgba(88, 224, 193, 0.05);
}

.code-card {
  background: var(--panel);
}

.code-card pre {
  margin: 0;
  overflow-x: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--code);
  color: #cfe8ff;
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.reference-shell {
  padding: 28px 0 64px;
}

.reference-head {
  margin-bottom: 18px;
}

.reference-card {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

redoc {
  display: block;
}

/* Focus & Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form Elements */
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(88, 224, 193, 0.03);
  color: var(--text);
  transition: all var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
  background: rgba(88, 224, 193, 0.06);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: rgba(88, 224, 193, 0.08);
  box-shadow: 0 0 0 3px rgba(88, 224, 193, 0.1);
}

@media (max-width: 1024px) {
  .site-header,
  main {
    width: min(100vw, 100%);
    padding: 0 16px;
  }
}

@media (max-width: 860px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .header-nav {
    gap: 16px;
    display: none;
  }

  .card-wide {
    grid-column: auto;
  }

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

  .card {
    padding: 20px;
  }

  h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
  }

  h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
  }

  .hero {
    padding: 52px 0 36px;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  .table-wrap {
    margin: 0 -20px;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 0.95rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 36px 0 28px;
  }

  h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    max-width: 10ch;
  }

  h2 {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  }

  h3 {
    font-size: 1.05rem;
  }

  .hero-copy {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    display: block;
  }

  .section-grid {
    gap: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .step-list,
  .link-list,
  .pill-list {
    padding-left: 14px;
  }

  .pill-list li {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .code-card pre {
    padding: 12px;
    font-size: 0.8rem;
  }

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