:root {
  --bg: #0a0e1a;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.72);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #7c5cff;
  --accent-2: #38bdf8;
  --accent-glow: rgba(124, 92, 255, 0.35);
  --border: rgba(148, 163, 184, 0.14);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.gradient-orb--1 {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -80px;
  background: rgba(124, 92, 255, 0.22);
}

.gradient-orb--2 {
  width: 360px;
  height: 360px;
  bottom: 20%;
  left: -100px;
  background: rgba(56, 189, 248, 0.12);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 14, 26, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.logo__mark {
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.25);
}

.logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-pages {
  display: none;
  gap: 1.5rem;
}

.nav-pages a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-pages a:hover { color: var(--text); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5b3fd4);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn--primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn--ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 163, 184, 0.3);
}

.btn--lg {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero__badge {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.hero__lead {
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero__meta strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.hero__visual {
  margin-top: 3rem;
  position: relative;
}

.hero__panel {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.08), 0 24px 48px rgba(0, 0, 0, 0.35);
}

.hero__code {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #a5b4fc;
  overflow-x: auto;
}

.hero__code .kw { color: #c4b5fd; }
.hero__code .str { color: #67e8f9; }
.hero__code .cm { color: #64748b; }

@media (min-width: 900px) {
  .hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .hero__visual { margin-top: 0; }

  .nav-pages { display: flex; }
}

/* Sections */
.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section__sub {
  margin: 0 0 2.5rem;
  color: var(--text-muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

/* Bento features */
.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
  }

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

.bento__item {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bento__item:hover {
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: 0 0 40px rgba(124, 92, 255, 0.08);
}

.bento__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.35rem;
  background: rgba(124, 92, 255, 0.12);
  border-radius: 12px;
}

.bento__item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.bento__item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Use cases */
.use-cases {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .use-cases {
    grid-template-columns: repeat(3, 1fr);
  }
}

.use-case {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.use-case h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.use-case p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Architecture */
.arch {
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: calc(var(--radius) + 4px);
  text-align: center;
}

.arch h2 { margin-bottom: 1rem; }

.arch p {
  margin: 0 auto 2rem;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.tech-pill {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* CTA band */
.cta-band {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.cta-band p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* Mobile nav */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s;
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  cursor: pointer;
}

@media (min-width: 900px) {
  .nav-toggle,
  .nav-overlay { display: none !important; }
}

@media (max-width: 899px) {
  .site-header__inner { flex-wrap: wrap; }

  .nav-pages {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    overflow-y: auto;
  }

  .nav-pages.is-open { display: flex; }

  .nav-pages a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }

  .header-cta .btn--ghost { display: none; }
}
