:root {
  --blue: #00A2FF;
  --blue-dark: #0078C8;
  --navy: #0A1428;
  --navy-soft: #121F38;
  --panel: #16243F;
  --white: #FFFFFF;
  --grey: #8B97A8;
  --grey-light: #C7CFDB;
  --red: #E2231A;
  --red-dark: #B81B14;
  --green: #2ECC71;
  --radius: 10px;
  --stud: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Baloo 2', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.stud-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.stud {
  width: var(--stud);
  height: var(--stud);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.stud.dim { background: var(--panel); }
.stud.red { background: var(--red); }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 20, 40, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 19px;
  font-weight: 700;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--blue);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  background: var(--navy);
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 15px;
  font-weight: 600;
  color: var(--grey-light);
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--blue); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 0 var(--red-dark), 0 6px 16px rgba(226,35,26,0.25);
}
.btn-primary:hover { background: #ef2c22; box-shadow: 0 4px 0 var(--red-dark), 0 8px 22px rgba(226,35,26,0.35); }
.btn-primary:active { box-shadow: 0 2px 0 var(--red-dark); }
.btn-secondary {
  background: var(--panel);
  color: var(--white);
  box-shadow: 0 4px 0 #0a1530;
}
.btn-secondary:hover { background: #1c2c4d; }
.btn-secondary:active { box-shadow: 0 2px 0 #0a1530; }
.btn-blue {
  background: var(--blue);
  color: var(--navy);
  box-shadow: 0 4px 0 var(--blue-dark);
}
.btn-blue:hover { background: #16ade0; }
.btn-blue:active { box-shadow: 0 2px 0 var(--blue-dark); }
.btn-ghost {
  background: transparent;
  color: var(--grey-light);
  padding: 13px 14px;
}
.btn-ghost:hover { color: var(--white); }
.btn-lg { padding: 17px 30px; font-size: 16.5px; }
.btn-block { width: 100%; }

.hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,162,255,0.12);
  border: 1px solid rgba(0,162,255,0.35);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.04;
  max-width: 760px;
}
.hero h1 .accent { color: var(--blue); }
.hero p.lead {
  font-size: 19px;
  color: var(--grey-light);
  max-width: 560px;
  margin-top: 22px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.block-field {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}
.block {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--panel);
  position: relative;
  border: 1px solid rgba(255,255,255,0.05);
}
.block::after {
  content: "";
  position: absolute;
  top: 5px; left: 50%;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.block.filled { background: var(--blue); }
.block.filled::after { background: rgba(10,20,40,0.35); }
.block.writing { background: var(--green); animation: pulse 1.8s ease-in-out infinite; }
.block.writing::after { background: rgba(10,20,40,0.3); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

section { padding: 84px 0; }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head p { color: var(--grey-light); font-size: 16.5px; margin-top: 14px; }
.section-alt { background: var(--navy-soft); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 28px;
}
.card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(0,162,255,0.14);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--grey-light); font-size: 14.5px; }

.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.step:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--blue);
  color: var(--navy);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.step-body h3 { font-size: 17px; margin-bottom: 6px; }
.step-body p { color: var(--grey-light); font-size: 14.5px; }
.step-body code {
  background: rgba(0,162,255,0.12);
  color: var(--blue);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
}

.code-panel {
  background: #0d1830;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
}
.code-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f56; }
.dot.y { background: #ffbd2e; }
.dot.g { background: #27c93f; }
.code-panel-title { margin-left: 8px; font-size: 12.5px; color: var(--grey); font-family: 'JetBrains Mono', monospace; }
.code-panel pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.65;
  color: #d7e3f7;
}
.tok-kw { color: #ff8fb3; }
.tok-fn { color: #5ec9ff; }
.tok-str { color: #a3e635; }
.tok-com { color: #5b6a8a; }
.tok-num { color: #ffb86c; }

.price-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border: 2px solid var(--blue);
  background: linear-gradient(160deg, rgba(0,162,255,0.10), var(--panel) 60%);
  position: relative;
}
.price-card.featured .badge {
  position: absolute;
  top: -13px; left: 28px;
  background: var(--blue);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
}
.price-card h3 { font-size: 19px; }
.price-card .price {
  font-family: 'Baloo 2', sans-serif;
  font-size: 42px;
  margin: 14px 0 4px;
}
.price-card .price span { font-size: 15px; color: var(--grey); font-family: 'Inter', sans-serif; font-weight: 600; }
.price-card .desc { color: var(--grey-light); font-size: 14px; margin-bottom: 22px; }
.price-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0 0 26px; flex-grow: 1; }
.price-list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--grey-light); align-items: flex-start; }
.price-list li .check { color: var(--blue); flex-shrink: 0; margin-top: 1px; }

.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 0 36px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 36px;
}
.footer-links {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--grey-light); margin-bottom: 10px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--grey);
  font-size: 13.5px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
  gap: 10px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.docs-side {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.docs-side a {
  font-size: 14.5px;
  color: var(--grey-light);
  padding: 8px 12px;
  border-radius: 8px;
}
.docs-side a:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.docs-side a.active { color: var(--blue); background: rgba(0,162,255,0.1); font-weight: 600; }
.docs-side .side-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); margin: 18px 0 4px; padding: 0 12px; }
.docs-side .side-label:first-child { margin-top: 0; }
.docs-main h2 { font-size: 26px; margin: 44px 0 16px; }
.docs-main h2:first-child { margin-top: 0; }
.docs-main h3 { font-size: 18px; margin: 28px 0 12px; }
.docs-main p { color: var(--grey-light); font-size: 15.5px; margin-bottom: 14px; }
.docs-main ul, .docs-main ol { color: var(--grey-light); font-size: 15.5px; margin: 0 0 16px 22px; }
.docs-main li { margin-bottom: 8px; }
.docs-main code { background: rgba(0,162,255,0.12); color: var(--blue); padding: 2px 7px; border-radius: 5px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; }
.docs-main .code-panel { margin: 18px 0 22px; }
.callout {
  background: rgba(0,162,255,0.08);
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  color: var(--grey-light);
}
.callout.warn { background: rgba(226,35,26,0.08); border-left-color: var(--red); }
.callout strong { color: var(--white); }
table.api-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14.5px; }
table.api-table th { text-align: left; color: var(--grey); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
table.api-table td { padding: 12px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); color: var(--grey-light); vertical-align: top; }
table.api-table td:first-child { color: var(--blue); font-family: 'JetBrains Mono', monospace; font-size: 13.5px; white-space: nowrap; }

.key-flow {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 36px;
}
.discord-msg {
  background: #0d1830;
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.discord-msg .who { color: var(--blue); font-weight: 700; margin-bottom: 6px; }
.discord-msg .cmd { color: var(--green); }
.discord-msg .resp { color: var(--grey-light); margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06); }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .docs-side .side-label { display: none; }
  .footer-top { flex-direction: column; }
  .block-field { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .block.writing { animation: none; }
}
