/* Zoetrope website. No framework, no web fonts: fast, private, offline-friendly. */
:root {
  --bg: #121218;
  --panel: #1b1b23;
  --panel-2: #23232d;
  --border: #31313d;
  --text: #e8e8ee;
  --muted: #a3a3b4;
  --accent: #e86a92;
  --accent-2: #f5c518;
  --link: #8cc4ff;
  --radius: 10px;
  --max: 1160px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code, kbd, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; }
code { background: var(--panel-2); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: #0d0d12; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
kbd { background: var(--panel-2); border: 1px solid #44444f; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- header / footer ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(18, 18, 24, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 7px; }
.links { display: flex; gap: 18px; flex-wrap: wrap; }
.links a { color: var(--muted); }
.links a:hover { color: var(--text); text-decoration: none; }
.bottom { margin-top: 60px; padding: 28px 20px; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 0.9rem; }
.bottom p { margin: 6px 0; }

main > section { max-width: var(--max); margin: 0 auto; padding: 64px 20px 0; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 2rem; margin: 0 0 8px; }
.section-lede { color: var(--muted); margin: 0 0 28px; max-width: 760px; }

/* ---------- buttons ---------- */
.button {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-weight: 600;
}
.button:hover { border-color: var(--accent); text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #1a0d12; }
.button.primary:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; padding-top: 56px !important; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 18px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lede { font-size: 1.15rem; color: #cfcfda; margin: 0 0 24px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-shot { margin: 0; }
.hero-shot img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }

.band { position: relative; }
.demos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.demos figure { margin: 0; }
.demos iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius); background: #0f1020; display: block; }
.demos figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }
.demos figcaption b { color: var(--text); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.features article { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.features img { aspect-ratio: 16 / 10; object-fit: cover; object-position: center 35%; border-bottom: 1px solid var(--border); }
.features h3 { margin: 16px 18px 6px; }
.features p { margin: 0 18px 18px; color: var(--muted); font-size: 0.95rem; }

.why .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; color: #cfcfda; }

.downloads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 16px; }
.platform { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.platform h3 { margin: 0 0 4px; }
.platform p { margin: 0 0 14px; font-size: 0.9rem; flex: 1; }
.platform .assets { display: flex; flex-direction: column; gap: 8px; }
.platform .assets .button { text-align: center; font-size: 0.92rem; }
.platform.yours { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.platform.yours h3::after { content: "Your system"; margin-left: 8px; font-size: 0.7rem; vertical-align: middle; color: var(--accent); border: 1px solid var(--accent); padding: 1px 6px; border-radius: 999px; }

/* ---------- manual ---------- */
.manual { max-width: var(--max); margin: 0 auto; padding: 36px 20px 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; }
.manual-nav { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; }
.manual-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
.manual-nav li a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--muted); font-size: 0.95rem; }
.manual-nav li a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.manual-nav li a[aria-current="page"] { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.doc { max-width: 820px; min-width: 0; }
.doc h1 { font-size: 2.3rem; margin: 0 0 10px; }
.doc h2 { font-size: 1.5rem; margin: 2.2em 0 0.4em; padding-top: 0.4em; border-top: 1px solid var(--border); }
.doc h3 { font-size: 1.15rem; margin: 1.6em 0 0.3em; }
.doc .lede { font-size: 1.1rem; }
.doc figure { margin: 18px 0; }
.doc figure img { border-radius: var(--radius); border: 1px solid var(--border); }
.doc figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--border); padding: 7px 10px 7px 0; vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.doc ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
.doc ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 14px; }
.doc ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #1a0d12; font-weight: 700; display: grid; place-items: center; }
.note, .tip, .warn { border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; border: 1px solid var(--border); background: var(--panel); }
.tip { border-left: 4px solid var(--accent-2); }
.note { border-left: 4px solid var(--link); }
.warn { border-left: 4px solid #ff8a65; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cards a { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; color: var(--text); }
.cards a:hover { border-color: var(--accent); text-decoration: none; }
.cards a span { display: block; color: var(--muted); font-size: 0.9rem; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .hero, .why .columns, .demos { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .downloads { grid-template-columns: 1fr 1fr; }
  .manual { grid-template-columns: 1fr; }
  .manual-nav { position: static; max-height: none; }
}
@media (max-width: 600px) {
  .features, .downloads, .cards { grid-template-columns: 1fr; }
  .links { gap: 12px; font-size: 0.9rem; }
  h2 { font-size: 1.6rem; }
}
