/* aasprite.com — Editorial Launch Stylesheet (Commanding Typography Above Wide Live AA Stage) */
:root {
  --bg: #070c16;
  --bg-elev: #0d1525;
  --bg-card: rgba(15, 24, 42, 0.72);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.42);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --cyan: #38bdf8;
  --cyan-bright: #67e8f9;
  --orange: #ff5d2e;
  --emerald: #34d399;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 540px at 50% -6%, rgba(56, 189, 248, 0.16), transparent 62%),
    var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 17px; border-radius: 10px;
  font: 700 13.5px/1.1 var(--sans); cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  text-decoration: none !important;
  transition: transform 90ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}
.btn:hover { border-color: var(--border-strong); background: rgba(24, 37, 62, 0.92); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: rgba(125, 211, 252, 0.55); color: #ffffff;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8, #3b82f6);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.40);
}
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-gh { gap: 7px; }
.btn-gh svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.oss-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px; margin-top: 18px;
}

/* Hero Section — Commanding Centered Typography Above Wide Live A/B Showcase */
.hero { padding: 30px 0 44px; }
.hero-stack {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.hero-header {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.06; letter-spacing: -0.036em; font-weight: 850;
  color: #ffffff;
  text-wrap: balance;
}
.nowrap { white-space: nowrap; }
.grad-text {
  background: linear-gradient(95deg, #38bdf8 0%, #7dd3fc 52%, #fb923c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  margin: 0 auto 7px;
  max-width: 860px;
  font-size: clamp(16.5px, 1.65vw, 19px);
  line-height: 1.42; font-weight: 550;
  color: #f1f5f9;
  text-wrap: balance;
}
.hero-solution {
  margin: 0 auto 20px;
  max-width: 860px;
  font-size: 15px; line-height: 1.48;
  color: #94a3b8;
  text-wrap: balance;
}
.hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 10px 14px; flex-wrap: wrap;
}
.proof-inline {
  margin-left: 4px;
  font: 500 12.5px/1.2 var(--mono); color: var(--text-muted);
}
@media (max-width: 440px) {
  .proof-inline { margin-left: 0; font-size: 11.5px; }
}
.proof-inline strong { color: #e2e8f0; font-weight: 700; }

/* Wide Cinematic Live WebGL2 A/B Anti-Aliasing Stage */
.stage-card {
  position: relative; width: 100%; max-width: 980px;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: #e8eef6;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.56), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.stage-viewport {
  position: relative; width: 100%;
  height: clamp(320px, 49vh, 456px);
  overflow: hidden;
  touch-action: pan-y; user-select: none; cursor: grab;
  background: #edf2f8;
}
.stage-viewport:active { cursor: grabbing; }
#heroCanvas { width: 100%; height: 100%; display: block; }

/* Draggable 50/50 Split Curtain (Active Immediately on Load) */
#heroSplitOverlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 3; display: none;
}
#heroSplitOverlay.visible { display: block; }
#heroSplitHandle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
  pointer-events: auto; cursor: ew-resize; transform: translateX(-1px);
}
.hero-split-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 999px;
  background: #0f172a; color: #38bdf8; border: 2px solid #38bdf8;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.38);
}
.hero-split-tag {
  position: absolute; bottom: 12px; padding: 5px 10px; border-radius: 7px;
  background: rgba(15, 23, 42, 0.86); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font: 700 11px/1 var(--mono); color: #f8fafc;
}
.hero-split-tag.left { left: 12px; }
.hero-split-tag.right {
  right: 12px; border-color: rgba(56, 189, 248, 0.65); color: var(--cyan-bright);
}

/* Live 4x Pixel Magnifier Loupe */
.hero-loupe {
  position: absolute; right: 14px; top: 14px; z-index: 5;
  width: 160px; border-radius: 10px; overflow: hidden;
  border: 2px solid #0f172a;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.72), 0 10px 28px rgba(15, 23, 42, 0.34);
  background: #edf2f8; pointer-events: none; display: none;
}
.hero-loupe.visible { display: block; }
#heroLoupeCanvas {
  width: 160px; height: 160px; display: block; image-rendering: pixelated;
}
.hero-loupe-cap {
  padding: 5px 6px; text-align: center;
  background: rgba(15, 23, 42, 0.94); color: #e2e8f0;
  font: 700 10px/1 var(--mono); letter-spacing: 0.01em; white-space: nowrap;
}
.loupe-reticle {
  position: absolute; z-index: 4; pointer-events: none; display: none;
  width: 36px; height: 36px; transform: translate(-50%, -50%);
  border: 1.5px solid rgba(15, 23, 42, 0.74);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.74);
  border-radius: 4px;
}
.loupe-reticle.visible { display: block; }

.stage-hint {
  position: absolute; left: 14px; top: 14px; z-index: 4; pointer-events: none;
  padding: 5px 9px; border-radius: 6px;
  background: rgba(15, 23, 42, 0.72); color: #e2e8f0;
  font: 600 10.5px/1 var(--mono);
}

/* Single-Row Stage Control Dock with Live AA Quality Softswitch */
.stage-dock {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 9px 12px; background: rgba(9, 15, 28, 0.98); border-top: 1px solid var(--border);
}
.dock-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dock-sep { width: 1px; height: 18px; background: rgba(148, 163, 184, 0.22); }
.dock-label {
  font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin-right: 3px;
}
.dock-btn {
  appearance: none; padding: 6px 8.5px; min-height: 29px; border-radius: 7px;
  border: 1px solid var(--border); background: rgba(15, 23, 42, 0.92); color: #cbd5e1;
  font: 700 11px/1 var(--mono); cursor: pointer; white-space: nowrap;
  transition: background-color 110ms ease, color 110ms ease, border-color 110ms ease;
}
.dock-btn:hover { border-color: var(--border-strong); color: #fff; }
.dock-btn[aria-pressed="true"] {
  background: var(--cyan); color: #04111f; border-color: var(--cyan);
}
.stage-stats {
  font: 600 11px/1 var(--mono); color: var(--text-muted); margin-left: auto; white-space: nowrap;
}

/* Sections */
section.band { padding: 56px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 26px; max-width: 720px; }
.section-kicker {
  font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cyan); margin-bottom: 8px;
}
.section-head h2 {
  margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.025em; line-height: 1.15;
}
.section-head p { margin: 0; color: var(--text-muted); font-size: 15.5px; }
.section-head code, .card code, .demo-body code {
  font: 600 12.5px/1 var(--mono); color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.11); padding: 2px 5px; border-radius: 4px;
}

/* Cards & Grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.card {
  padding: 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
}
.card h3 { margin: 0 0 8px; font-size: 15.5px; letter-spacing: -0.015em; color: #f8fafc; }
.card p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.58; }

.media-frame {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #edf2f8;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
}
.media-caption {
  padding: 11px 16px; font: 600 12px/1.45 var(--mono); color: var(--text-muted);
  border-top: 1px solid var(--border); background: rgba(9, 15, 28, 0.96);
}

/* Side-by-Side AA Visual Comparison */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.compare-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.compare-card {
  margin: 0;
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}
.compare-card.featured {
  border-color: rgba(56, 189, 248, 0.52);
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.16), 0 0 0 1px rgba(56, 189, 248, 0.20) inset;
}
.compare-img-wrap {
  background: #edf2f8;
  aspect-ratio: 5 / 4;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.compare-img-wrap img {
  width: 100%; height: 100%; object-fit: contain;
}
.compare-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.compare-body h3 {
  margin: 0; font-size: 17px; letter-spacing: -0.015em; color: #f8fafc;
}
.compare-body p {
  margin: 0; font-size: 13.8px; line-height: 1.56; color: var(--text-muted);
}
.compare-body strong { color: #e2e8f0; font-weight: 700; }
.compare-badge {
  align-self: flex-start;
  padding: 3px 8px; border-radius: 6px;
  font: 700 10.5px/1.1 var(--mono); letter-spacing: 0.02em;
  border: 1px solid var(--border);
}
.compare-badge.warn {
  background: rgba(251, 146, 60, 0.14); color: #fdba74; border-color: rgba(251, 146, 60, 0.34);
}
.compare-badge.cyan {
  background: rgba(56, 189, 248, 0.16); color: var(--cyan-bright); border-color: rgba(56, 189, 248, 0.42);
}
.compare-badge.green {
  background: rgba(52, 211, 153, 0.14); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.34);
}

/* Live Demo Showcase Cards */
.demo-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 140ms ease, transform 120ms ease;
}
.demo-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.demo-thumb {
  display: block; aspect-ratio: 16 / 9.5; overflow: hidden;
  background: #0b1220; border-bottom: 1px solid var(--border);
}
.demo-thumb-studio { background: #f5f8fc; }
.demo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.demo-thumb-studio img { object-fit: contain; }
.demo-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.demo-body h3 { margin: 0; font-size: 18px; letter-spacing: -0.015em; }
.demo-body p { margin: 0 0 4px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }

/* Code Tabs */
.code-shell {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #0a111f;
}
.code-tabs {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; background: rgba(15, 23, 42, 0.92); border-bottom: 1px solid var(--border);
}
.tab-list { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-btn {
  appearance: none; padding: 6px 11px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: var(--text-muted); font: 700 12px/1 var(--mono); cursor: pointer;
}
.tab-btn[aria-selected="true"] {
  background: rgba(56, 189, 248, 0.16); color: var(--cyan-bright); border-color: rgba(56, 189, 248, 0.34);
}
.code-panel { display: none; margin: 0; padding: 18px 20px; overflow-x: auto; font: 12.5px/1.6 var(--mono); color: #e2e8f0; }
.code-panel.active { display: block; }

.ecosystem-note {
  margin: 16px 0 0; font-size: 13.5px; color: var(--text-muted);
}
.ecosystem-note code {
  font: 600 12px/1 var(--mono); color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.10); padding: 2px 5px; border-radius: 4px;
}

/* Docs Layout */
.docs-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px;
  padding: 36px 0 72px; align-items: start;
}
.docs-sidebar {
  position: sticky; top: 82px;
  padding: 16px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
}
.docs-sidebar h4 {
  margin: 0 0 10px; font: 700 11px/1 var(--mono); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
}
.docs-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.docs-nav a {
  display: block; padding: 7px 10px; border-radius: 8px;
  color: #cbd5e1; font-size: 13.5px; font-weight: 600;
}
.docs-nav a:hover { background: rgba(56, 189, 248, 0.10); color: #fff; text-decoration: none; }
.docs-nav a.active { background: rgba(56, 189, 248, 0.18); color: var(--cyan-bright); }

.prose {
  min-width: 0; padding: 28px 32px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
}
.prose h1 { margin-top: 0; font-size: 32px; letter-spacing: -0.025em; }
.prose h2 { margin-top: 30px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 22px; }
.prose h3 { margin-top: 22px; font-size: 17px; }
.prose p, .prose li { color: #cbd5e1; }
.prose code {
  font: 600 12.5px/1.4 var(--mono); padding: 2px 6px; border-radius: 5px;
  background: rgba(56, 189, 248, 0.12); color: var(--cyan-bright);
}
.prose pre {
  padding: 14px 16px; border-radius: 10px; overflow-x: auto;
  background: #070d19; border: 1px solid var(--border);
}
.prose pre code { background: none; padding: 0; color: #e2e8f0; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; display: block; overflow-x: auto;
}
.prose th, .prose td {
  padding: 9px 12px; border: 1px solid var(--border); text-align: left;
}
.prose th { background: rgba(15, 23, 42, 0.9); color: #fff; }
.prose blockquote {
  margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--cyan);
  background: rgba(56, 189, 248, 0.08); border-radius: 0 8px 8px 0;
}
.prose img { border-radius: 10px; border: 1px solid var(--border); margin: 16px 0; }

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

/* Visual Primer Page (/primer/) */
.primer-main { padding: 42px 0 68px; }
.primer-wrap { max-width: 960px; }
.primer-header { margin-bottom: 36px; max-width: 760px; }
.primer-header h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.06; letter-spacing: -0.032em; font-weight: 850; color: #ffffff;
}
.primer-lead {
  margin: 0; font-size: 17.5px; line-height: 1.58; color: #cbd5e1;
}
.primer-section {
  padding: 34px 0; border-top: 1px solid var(--border);
}
.primer-section h2 {
  margin: 0 0 12px; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.022em; color: #f8fafc;
}
.primer-section p {
  margin: 0 0 14px; font-size: 15.5px; line-height: 1.65; color: #cbd5e1; max-width: 780px;
}
.primer-section strong { color: #f8fafc; }
.primer-section code {
  font: 600 12.5px/1.3 var(--mono); color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.11); padding: 2px 6px; border-radius: 5px;
}
.primer-figure {
  margin: 20px 0;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}
.primer-img-pad {
  background: #edf2f8;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--border);
}
.primer-img-pad img { width: 100%; height: auto; }
.slice-labels {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 8px 20px; gap: 6px; text-align: center;
  background: rgba(15, 23, 42, 0.94); border-bottom: 1px solid var(--border);
  font: 700 11px/1.2 var(--mono); color: var(--cyan-bright);
}
.primer-cap {
  padding: 12px 16px; font-size: 13.5px; line-height: 1.5; color: var(--text-muted);
  background: rgba(9, 15, 28, 0.94);
}
.primer-cap strong { color: #e2e8f0; }
.primer-code {
  margin: 16px 0 0; padding: 16px 18px; border-radius: 12px; overflow-x: auto;
  background: #0a111f; border: 1px solid var(--border);
  font: 13px/1.6 var(--mono); color: #e2e8f0;
}
.primer-code code { background: none; padding: 0; color: inherit; }
.primer-2up {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  margin: 20px 0 22px;
}
.primer-2up .primer-figure { margin: 0; display: flex; flex-direction: column; }
.primer-2up .primer-img-pad { aspect-ratio: 5 / 4.4; overflow: hidden; }
.primer-2up .primer-img-pad img { width: 100%; height: 100%; object-fit: contain; }
.primer-2up .primer-cap { flex: 1; }
.primer-callout {
  padding: 20px 22px; border-radius: var(--radius);
  background: rgba(56, 189, 248, 0.07); border: 1px solid rgba(56, 189, 248, 0.24);
}
.primer-callout h3 { margin: 0 0 8px; font-size: 16px; color: var(--cyan-bright); }
.primer-callout p { margin: 0; font-size: 14.5px; color: #cbd5e1; max-width: none; }
.primer-steps {
  margin: 16px 0 0; padding-left: 20px; display: grid; gap: 12px; max-width: 780px;
}
.primer-steps li { font-size: 15px; line-height: 1.6; color: #cbd5e1; }
.primer-steps strong { color: #f8fafc; }
.primer-cta-box {
  margin-top: 24px; padding: 26px 28px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(56, 189, 248, 0.34);
  display: flex; flex-direction: column; gap: 16px;
}
.primer-cta-box h2 { margin: 0 0 6px; font-size: 22px; color: #ffffff; }
.primer-cta-box p { margin: 0; color: #cbd5e1; font-size: 14.5px; max-width: 680px; }
.primer-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 960px) {
  .compare-grid, .compare-grid-2 { grid-template-columns: 1fr; }
  .primer-2up { grid-template-columns: 1fr; }
  .slice-labels { font-size: 9.5px; padding: 6px 8px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .prose { padding: 20px; }
  .dock-sep { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 20px 0 32px; }
  .hero-header { text-align: left; }
  .hero-actions { justify-content: flex-start; }
  .proof-inline { margin-left: 0; width: 100%; }
  .stage-viewport { height: 280px; }
  .hero-loupe { width: 112px; right: 10px; top: 10px; }
  #heroLoupeCanvas { width: 112px; height: 112px; }
  .hero-loupe-cap { font-size: 9px; padding: 3px 4px; }
  .stage-hint { display: none; }
}
@media (pointer: coarse) {
  .btn, .dock-btn, .tab-btn { min-height: 40px; }
}
