:root {
  --ink: #08080c;
  --surface: #101017;
  --surface-2: #15151f;
  --surface-3: #1b1b27;
  --line: #24242f;
  --line-2: #33333f;
  --text: #f2efe7;
  --muted: #9c9cab;
  --yellow: #ffd84d;
  --blue: #5cc8ff;
  --purple: #8b7cff;
  --pink: #ff9ec4;
  --green: #4ade80;
  --radius: 14px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --sidebar: 250px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(139, 124, 255, .16), transparent 60%),
    radial-gradient(700px 420px at -5% 12%, rgba(92, 200, 255, .1), transparent 55%),
    var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}

::selection {
  background: var(--yellow);
  color: #12120a;
}

a {
  color: var(--yellow);
  text-decoration: none;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration: underline;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 10px 16px;
  background: var(--yellow);
  color: #12120a;
  z-index: 100;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 70px;
  padding-inline: max(18px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 12, .94);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.06em;
  color: var(--text);
}

.logo span {
  color: var(--yellow);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.pill {
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font: 600 .78rem var(--font-mono);
}

.ghost {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
}

.ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  text-decoration: none;
}

.menu {
  display: none;
  margin-left: auto;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: 600 .85rem var(--font-body);
}

.shell {
  width: min(1240px, calc(100% - 36px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: 56px;
}

.sidebar {
  position: sticky;
  top: 70px;
  align-self: start;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  padding: 34px 0 60px;
  border-right: 1px solid var(--line);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 20px;
}

.nav-label {
  margin: 22px 0 8px;
  padding-left: 12px;
  color: var(--muted);
  font: 600 .72rem var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sidebar a {
  padding: 8px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
}

.sidebar a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.sidebar a.is-active {
  border-left-color: var(--yellow);
  background: rgba(255, 216, 77, .07);
  color: var(--text);
}

main {
  min-width: 0;
  padding-bottom: 60px;
}

section {
  padding-block: 58px 10px;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: 0;
}

.hero {
  padding-block: 66px 46px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--yellow);
  font: 600 .8rem var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.lead {
  max-width: 720px;
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 1.12rem;
}

.lead em {
  color: var(--text);
  font-style: normal;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  color: var(--text);
  font-weight: 600;
}

.btn:hover {
  text-decoration: none;
  background: var(--surface-2);
}

.btn.primary {
  border-color: transparent;
  background: var(--yellow);
  color: #12120a;
}

.btn.primary:hover {
  background: #ffe27a;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 42px;
}

.hero-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
}

.hero-grid strong {
  display: block;
  font: 700 1.25rem var(--font-display);
  letter-spacing: -.02em;
}

.hero-grid span {
  color: var(--muted);
  font-size: .82rem;
}

h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -.04em;
}

h3 {
  margin: 38px 0 12px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -.02em;
}

p {
  color: #d3cfc6;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: #f0e6c8;
  font: 500 .86em var(--font-mono);
}

pre {
  position: relative;
  margin: 16px 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0b11;
  line-height: 1.65;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #d9d4c9;
  font: 400 .86rem var(--font-mono);
}

.code-wrap {
  position: relative;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font: 600 .72rem var(--font-mono);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease, border-color .15s ease;
}

.code-wrap:hover .copy,
.copy:focus-visible {
  opacity: 1;
}

.copy:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.copy.done {
  border-color: var(--green);
  color: var(--green);
}

.table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

th,
td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--surface-2);
  color: var(--text);
  font: 600 .78rem var(--font-mono);
  letter-spacing: .04em;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(255, 255, 255, .02);
}

td:first-child {
  color: #e7e2d7;
  white-space: nowrap;
}

.note {
  margin: 14px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--yellow);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 216, 77, .06);
  color: #d8d2c4;
  font-size: .92rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.card-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
}

.card-grid h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.card-grid p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}

.phases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0 8px;
}

.phases div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.phases span {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid rgba(139, 124, 255, .4);
  border-radius: 50%;
  color: var(--purple);
  font: 700 .72rem var(--font-mono);
}

.phases strong {
  display: block;
  font-family: var(--font-display);
}

.phases p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.list {
  padding-left: 20px;
}

.list li {
  margin: 8px 0;
  color: #d3cfc6;
}

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

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0 10px;
}

.demo-reveal {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  box-shadow: 0 22px 50px -34px rgba(0, 0, 0, .9);
  opacity: 0;
}

.demo-reveal.visible {
  opacity: 1;
}

.demo-reveal span {
  color: var(--purple);
  font: 700 .8rem var(--font-mono);
}

.demo-reveal h3 {
  margin: 14px 0 8px;
}

.demo-reveal p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.faq {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

details {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

summary {
  padding: 14px 18px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: .92rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sidebar {
    position: fixed;
    inset: 70px 0 auto;
    z-index: 29;
    display: none;
    max-height: calc(100vh - 70px);
    padding: 12px 18px 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 8, 12, .98);
  }

  .sidebar.open {
    display: block;
  }

  .sidebar nav {
    padding-right: 0;
  }

  .menu {
    display: block;
  }

  .topbar .ghost {
    display: none;
  }

  section {
    padding-block: 46px 8px;
  }

  .hero {
    padding-block: 44px 34px;
  }

  .hero-grid,
  .phases {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .topbar {
    padding-inline: 14px;
  }

  .shell {
    width: calc(100% - 28px);
  }

  pre {
    padding: 15px 14px;
  }

  footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
