:root {
  --bg: #000;
  --bg-raised: #0a0a0b;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #52525b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #c4b5fd;
  --code-str: #a5f3c4;
  --code-kw: #f0abfc;
  --code-com: #71717a;
  --radius: 14px;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; }
p code, li code { padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-raised); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--fg); color: var(--bg); border-radius: 8px; }
.skip:focus { left: 16px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a:hover { color: var(--fg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn svg { flex: none; margin-right: 8px; }
.btn--light { background: var(--fg); color: var(--bg); }
.btn--light:hover { background: #fff; }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.35); }
.btn--outline { border: 1px solid var(--fg); color: var(--fg); }
.btn--outline:hover, .btn--outline:focus-visible { background: var(--fg); color: var(--bg); }

/* Type */
.eyebrow { margin: 0 0 16px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.display {
  margin: 0; font: 400 clamp(52px, 8vw, 96px)/0.98 var(--serif); letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 30%, #9a9aa3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.display--sm { font-size: clamp(44px, 6vw, 76px); }
.heading { margin: 0 0 20px; font: 400 clamp(38px, 5vw, 60px)/1.04 var(--serif); letter-spacing: -0.015em; }
em { font-style: italic; color: var(--muted); }
.display em { color: inherit; }
.lede { max-width: 520px; margin: 28px 0 0; font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); max-width: 520px; }

/* Hero */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
/* Tiny canvas stretched over the hero: the browser's upscaling plus the blur leave no visible cells or edges */
.hero__mesh {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: blur(40px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 72%, transparent);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px; min-height: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__visual { position: relative; aspect-ratio: 1; width: 100%; }
#cube { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fallback { position: absolute; inset: 25%; width: 50%; height: 50%; opacity: 0.9; display: none; }
.no-webgl #cube { display: none; }
.no-webgl .hero__fallback { display: block; }

/* Band */
.band { border-block: 1px solid var(--line); padding: 40px 0; }
.band__title { margin: 0 0 24px; text-align: center; font-size: 14px; color: var(--faint); }
.band__list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 64px; margin: 0; padding: 0; list-style: none; }
.band__list img { height: 40px; width: auto; }

/* Sections */
.section { padding: 128px 0; }
.section__head { margin-bottom: 56px; }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.checks { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--muted); font-size: 15px; }
.checks li::before { content: "✓"; margin-right: 10px; color: var(--fg); }

/* Code */
.code { border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(180deg, #0d0d10, #070708); overflow: hidden; box-shadow: 0 40px 120px -40px rgba(139, 92, 246, 0.35); }
.code__tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.code__tabs button {
  flex: none; padding: 6px 12px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: 500 13px var(--sans); cursor: pointer;
}
.code__tabs button:hover { color: var(--fg); }
.code__tabs button[aria-selected="true"] { background: rgba(255, 255, 255, 0.08); color: var(--fg); }
.code__body { position: relative; }
.code pre { margin: 0; padding: 24px; min-height: 300px; overflow-x: auto; font: 13.5px/1.75 var(--mono); color: #e4e4e7; }
.tok-s { color: var(--code-str); }
.tok-k { color: var(--code-kw); }
.tok-c { color: var(--code-com); }
.copy {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--bg); color: var(--muted); font: 500 12px var(--sans); cursor: pointer;
}
.copy:hover { color: var(--fg); }

/* Features */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { padding: 36px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); transition: background 0.3s; }
.card:nth-child(3n) { border-right: 0; }
.card:nth-last-child(-n + 3) { border-bottom: 0; }
.card:hover { background: var(--bg-raised); }
.card__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 24px; border: 1px solid var(--line-strong); border-radius: 10px; font: 500 15px var(--mono); color: var(--accent); }
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

/* Showcase */
.showcase__frame {
  perspective: 1400px;
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  box-shadow: 0 60px 160px -60px rgba(139, 92, 246, 0.5);
}
.showcase__frame img { border-radius: 12px; width: 100%; height: auto; }

/* CTA */
.cta { text-align: center; border-top: 1px solid var(--line); background: radial-gradient(50% 60% at 50% 100%, rgba(139, 92, 246, 0.16), transparent 70%); }
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cmd {
  position: relative; display: flex; align-items: center; max-width: 100%; margin-top: 40px;
  padding: 14px 84px 14px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-raised);
  overflow-x: auto; text-align: left;
}
.cmd code { white-space: nowrap; color: var(--muted); }
.cmd .copy { top: 50%; transform: translateY(-50%); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer__links { display: flex; gap: 24px; }
.footer__links a:hover { color: var(--fg); }
.footer__note { margin: 0; width: 100%; color: var(--faint); font-size: 13px; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero { padding-top: 32px; }
  .hero__inner, .split { grid-template-columns: 1fr; min-height: 0; }
  .hero__visual { max-width: 420px; margin-inline: auto; }
  .grid { grid-template-columns: 1fr; }
  .card { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .card:last-child { border-bottom: 0 !important; }
  .section { padding: 88px 0; }
}

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