/* mxsp.eu – Keycap Boot
   Farben sind aus den Videoframes gesampelt (tools/frames.sh).
   Die Seite beginnt auf Schwarz (Frame 0) und landet auf Paper (Frame 108). */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/roboto-mono.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #fdfdfd;
  --paper-2: #f2f3f6;
  --ink: #0a0c10;
  --ink-2: #5a6470;
  --line: #d9dce3;
  --blue: #0e426e;
  --blue-deep: #082a48;
  --amber: #f0a030;
  --key-face: #fdfdfd;
  --key-side: #cfd4dc;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-stretch: 112%; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.05; }
h3 { font-size: 1rem; font-weight: 600; margin-top: 1.6em; }
p { margin: 0; max-width: 62ch; }
.mono { font-family: var(--font-mono); }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em;
  color: var(--chrome, #fff);
  pointer-events: none;
  transition: color .2s;
}
.topbar > * { pointer-events: auto; }
.topbar .brand { font-weight: 500; text-decoration: none; color: inherit; }
.topbar.past { color: var(--ink); background: rgba(253, 253, 253, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); margin-right: 8px; vertical-align: 1px; }

/* ---------- Bühne ---------- */
.track { height: 460vh; position: relative; background: #000; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--stage-bg, #000);
  color: var(--chrome, #fff);
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.js .stage canvas { display: block; }
.js .stage .poster { display: none; }

.boot {
  position: absolute; left: 24px; bottom: 24px;
  font-family: var(--font-mono); font-size: .85rem; line-height: 1.7;
  white-space: pre;
}
.boot .cur::after { content: "▮"; animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.counter { position: absolute; right: 24px; bottom: 24px; font-family: var(--font-mono); font-size: .8rem; font-variant-numeric: tabular-nums; opacity: .75; }
/* Scroll-Hinweis in der Bildmitte:
   Desktop – 5×5-Tastenmatrix, in der der Pfeil zeilenweise blau aufleuchtet
   Touch   – Wischgeste nach oben (pointer: coarse) */
.hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  transition: opacity .35s; pointer-events: none;
}
.hint-label { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.hint-matrix { display: grid; grid-template-columns: repeat(5, 28px); gap: 6px; }
.hint-matrix i {
  display: block; width: 28px; height: 28px; border-radius: 5px; background: #15181d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 4px 0 #000;
}
.hint-matrix i.on { animation: glow 2.4s ease-out infinite; }
.hint-matrix .r1 { animation-delay: .12s; }
.hint-matrix .r2 { animation-delay: .24s; }
.hint-matrix .r3 { animation-delay: .36s; }
.hint-matrix .r4 { animation-delay: .48s; }
@keyframes glow {
  0%, 72%, 100% { background: #15181d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 4px 0 #000; transform: translateY(0); }
  8% { background: #3a7fc4; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 #082a48, 0 0 18px rgba(58, 127, 196, .8); transform: translateY(3px); }
  16%, 50% { background: var(--blue); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 4px 0 #082a48; transform: translateY(0); }
}
.hint-swipe { display: none; position: relative; width: 60px; height: 130px; }
.hint-swipe .trail {
  position: absolute; left: 50%; top: 20px; width: 2px; height: 90px; transform: translateX(-50%); opacity: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5));
  animation: trail 2.2s ease-out infinite;
}
.hint-swipe .dot {
  position: absolute; left: 50%; width: 24px; height: 24px; border-radius: 50%; background: #e9ebef;
  box-shadow: 0 0 0 7px rgba(233, 235, 239, .18), 0 6px 14px rgba(0, 0, 0, .6);
  transform: translateX(-50%); animation: swipe 2.2s cubic-bezier(.3, .6, .2, 1) infinite;
}
@keyframes swipe { 0% { top: 98px; opacity: 0; } 12% { opacity: 1; } 60% { top: 8px; opacity: 1; } 75% { top: 8px; opacity: 0; } 100% { top: 98px; opacity: 0; } }
@keyframes trail { 0%, 10% { opacity: 0; } 40% { opacity: 1; } 70%, 100% { opacity: 0; } }
.l-swipe { display: none; }
@media (pointer: coarse) {
  .hint-matrix, .l-scroll { display: none; }
  .hint-swipe, .l-swipe { display: block; }
}

.hero-title {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  max-width: 40vw; opacity: 0; transition: opacity .4s;
}
.hero-title h1 { font-size: clamp(2.2rem, 5.5vw, 5rem); font-weight: 800; line-height: .95; font-stretch: 118%; }
.hero-title p { margin-top: 18px; font-size: clamp(1rem, 1.4vw, 1.25rem); max-width: 30ch; line-height: 1.4; }
.hero-title .key-row { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Ohne JavaScript: Endbild mit Titel, keine Sequenz, kein Scrollweg */
html:not(.js) .track { height: 100vh; height: 100svh; }
html:not(.js) .hero-title { opacity: 1; --chrome: var(--ink); color: var(--ink); }
html:not(.js) .boot, html:not(.js) .counter, html:not(.js) .hint { display: none; }
html:not(.js) .topbar { color: var(--ink); }
html:not(.js) .stage { --stage-bg: #fdfdfd; }
@media (min-aspect-ratio: 1/1) {
  html:not(.js) .poster { object-position: 0 50%; transform: translateX(12%) scale(1.1); transform-origin: 0 50%; }
}
@media (max-aspect-ratio: 1/1) {
  html:not(.js) .poster { object-fit: contain; transform: scale(1.6) translateY(-14%); }
}

@media (max-width: 760px) {
  .hero-title { max-width: calc(100vw - 48px); top: auto; bottom: 96px; transform: none; }
  .boot { bottom: 20px; font-size: .75rem; }
  .counter { display: none; }
  .topbar { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .track { height: 100vh; height: 100svh; }
  .hero-title { opacity: 1 !important; transition: none; }
  .hint { display: none; }
  html { scroll-behavior: auto; }
  .boot .cur::after { animation: none; }
}

/* ---------- Taste ---------- */
.key {
  --face: var(--key-face); --side: var(--key-side); --legend: #0a0c10;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px;
  background: var(--face); color: var(--legend);
  border: 0; border-radius: 7px;
  font-family: var(--font-mono); font-size: .85rem; font-weight: 500; letter-spacing: .02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 0 var(--side), 0 10px 18px rgba(0, 0, 0, .22);
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease;
}
.key:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 0 var(--side), 0 14px 22px rgba(0, 0, 0, .24); }
.key:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 0 var(--side), 0 3px 6px rgba(0, 0, 0, .2); }
.key:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.key--blue { --face: var(--blue); --side: var(--blue-deep); --legend: #fff; }
.key--big { font-size: clamp(1rem, 2.2vw, 1.35rem); padding: 18px 28px; }
@media (prefers-reduced-motion: reduce) { .key, .key:hover, .key:active { transition: none; transform: none; } }

/* ---------- Inhalt ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 0 24px 80px; }
.sec { padding: 88px 0 56px; border-top: 1px solid var(--line); }
.sec:first-child { border-top: 0; }
.sec > * + * { margin-top: 20px; }
.lead { font-size: 1.15rem; line-height: 1.5; }
.legal { font-size: .95rem; color: var(--ink-2); }
.legal h2 { color: var(--ink); }
.legal h3 { color: var(--ink); margin-bottom: -12px; }
.legal p + p { margin-top: 12px; }
.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: .75rem; color: var(--ink-2); }
.foot a { color: inherit; }
