/* Styles for the demo page only. You do NOT need this file in your own site. */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --code-bg: #020617;
    --anim-accent: #818cf8;
    --anim-accent-contrast: #0b1120;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;   /* stops sideways scrolling while left/right slides are off-position */
}
a { color: inherit; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.85em; }

.hero { text-align: center; padding: 96px 16px 64px; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.1; margin: 0.3em 0; }
.eyebrow { color: var(--anim-accent); font-weight: 550; letter-spacing: 0.04em; margin: 0; }
.lead { font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent;
}
.btn-solid { background: var(--anim-accent); color: var(--anim-accent-contrast); }

main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.group { padding: 48px 0; border-top: 1px solid var(--border); }
.group h2 { margin: 0 0 4px; }
.muted { color: var(--muted); margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 20px 0; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.card.tall { min-height: 120px; justify-content: center; }
.stage { height: 110px; width: 100%; display: flex; align-items: center; justify-content: center; }
.stage.col { flex-direction: column; gap: 10px; }

.box  { width: 56px; height: 56px; border-radius: 12px; background: var(--anim-accent); }
.pill { padding: 10px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; font-weight: 600; display: inline-block; }
.badge { background: #ef4444; color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 999px; display: inline-block; }
.dot  { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; display: inline-block; isolation: isolate; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.3rem; }
.big  { font-size: 2rem; font-weight: 800; }

.replay, .copy {
  font: inherit; font-size: 0.8rem; cursor: pointer; padding: 4px 12px;
  border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted);
}
.replay:hover, .copy:hover { color: var(--text); border-color: var(--muted); }

pre {
  position: relative; background: var(--code-bg); color: var(--code-text);
  padding: 18px; border-radius: 12px; overflow-x: auto; margin: 0;
}
pre code { font-size: 0.9rem; }
pre .copy { position: absolute; top: 10px; right: 10px; color: #94a3b8; border-color: #334155; }

footer { text-align: center; color: var(--muted); padding: 48px 16px; border-top: 1px solid var(--border); }

/* Visually hidden, but still read by screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
