@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-VF.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}

/* Free "Cyber" theme: cyan light emitted in a dark room. */
:root {
  --bg: #000000;
  --ink: #eaf6f8;
  --muted: #7c8b92;
  --body: #c2ccd2;
  --accent: #00e0ff;
  --glow: 0, 224, 255;
  --line: rgba(0, 224, 255, 0.16);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* Landing */
body.home { display: flex; flex-direction: column; min-height: 100vh; }
.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 32px;
  background-image: radial-gradient(58% 50% at 50% 42%, rgba(var(--glow), 0.10), transparent 72%);
}
.mark {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 6.5vw, 3.5rem);
  letter-spacing: 0.16em;
  margin: 0;
  text-indent: 0.16em;
  text-shadow: 0 0 28px rgba(var(--glow), 0.5);
}

/* Interactive demo (the hero centerpiece) */
.demo {
  position: relative;
  width: min(420px, 84vw);
  aspect-ratio: 1;
  margin: clamp(6px, 2.4vh, 22px) 0 clamp(8px, 2vh, 18px);
}
.demo canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.demo canvas:active { cursor: grabbing; }
.demo .hint {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.5s ease;
}
.demo.touched .hint { opacity: 0; }
.demo .shuffle {
  position: absolute;
  right: 4px;
  bottom: 2px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--accent);
  background: rgba(var(--glow), 0.07);
  border: 1px solid var(--line);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, background 0.2s ease;
}
.demo .shuffle:hover { background: rgba(var(--glow), 0.16); }
.demo.solved .shuffle { opacity: 0.8; pointer-events: auto; }
.demo .mute {
  position: absolute;
  left: 6px;
  bottom: 4px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.demo .mute:hover { opacity: 0.85; }
.demo .mute.off { color: var(--muted); opacity: 0.34; }

.tag { color: var(--muted); font-size: 1.02rem; margin: 4px 0 30px; max-width: 34ch; }
.links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.links a {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: border-color .2s, color .2s, box-shadow .2s;
}
.links a:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 18px rgba(var(--glow), 0.2); }

/* Document pages (privacy / support) */
main.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }
.brandbar { margin-bottom: 40px; }
.brandbar a {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}
h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; text-wrap: balance; }
.eff { color: var(--muted); font-size: 0.95rem; margin: 0 0 36px; }
h2 { font-size: 1.18rem; letter-spacing: -0.01em; margin: 36px 0 10px; }
p, li { color: var(--body); text-wrap: pretty; }
ul { padding-left: 1.2em; }
li { margin: 6px 0; }
.note { color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); margin-top: 44px; padding-top: 20px; }
footer { color: var(--muted); font-size: 0.85rem; text-align: center; padding: 24px; border-top: 1px solid var(--line); }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .demo .hint, .demo .shuffle, .links a { transition: none; }
}
