/* ==========================================================================
   Die Farbenlichtorgel — orgel.v1.css
   Bühne: tiefes Schwarz, additive Leuchtspuren kommen vom Canvas.
   Inhalt: mzone-ui-Tokens, artefakteigenes Feintuning mit fo-Präfix.
   ========================================================================== */

.fo-body { background: #04050a; }

/* ---------- Bühne ---------- */
.fo-stage {
  position: relative;
  height: 100svh; min-height: 600px;
  overflow: hidden;
  background: #04050a;
  border-bottom: 1px solid var(--mz-border);
}
#foCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: none; touch-action: none;
}
.fo-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse 90% 75% at 50% 45%, transparent 55%, rgba(0,0,0,.5) 100%);
}
.fo-grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .07; }

/* Riesige Kontur-Typo als Textur hinter allem */
.fo-marquee {
  position: absolute; top: 50%; left: 0; z-index: 1;
  transform: translateY(-50%);
  white-space: nowrap; pointer-events: none; user-select: none;
  font: 900 26vh/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.065);
  animation: fo-mq 90s linear infinite;
}
.fo-marquee span { display: inline-block; }
@keyframes fo-mq { to { transform: translateY(-50%) translateX(-50%); } }

/* ---------- HUD ---------- */
.fo-hud {
  position: absolute; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px;
  font-family: var(--mz-mono); font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: rgba(235,240,255,.55);
}
.fo-hud--top { top: 0; background: linear-gradient(to bottom, rgba(4,5,10,.75), transparent); }
.fo-hud--bottom {
  bottom: 0; flex-direction: column; gap: 12px;
  background: linear-gradient(to top, rgba(4,5,10,.8), transparent);
}
.fo-hud__brand { color: rgba(255,255,255,.85); }
.fo-hud__brand::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #8ab4ff; box-shadow: 0 0 10px #8ab4ff; margin-right: 10px; vertical-align: 1px;
}
.fo-hud__readout {
  flex: 1; text-align: center; color: #fff;
  text-shadow: 0 0 18px rgba(140,170,255,.6);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fo-scope { flex: none; opacity: .85; }
@media (max-width: 700px) { .fo-scope, .fo-hud__brand { display: none; } .fo-hud__readout { text-align: left; } }

/* ---------- Titel ---------- */
.fo-title {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 20px; pointer-events: none;
  transition: opacity 1.4s ease;
}
.fo-stage.is-live .fo-title { opacity: .12; }
.fo-title__eyebrow {
  font-family: var(--mz-mono); font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: rgba(180,200,255,.75); margin: 0 0 22px;
}
.fo-title__word {
  margin: 0;
  font: 800 clamp(72px, 15vw, 190px)/.88 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -.03em; color: #f4f6ff;
  text-shadow: 0 0 90px rgba(130,160,255,.28);
}
.fo-title__line { display: block; }
.fo-title__hint {
  margin: 26px 0 0; max-width: 52ch;
  font-family: var(--mz-mono); font-size: 11px; line-height: 1.9; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(235,240,255,.5);
}

/* ---------- Tastatur-Karte ---------- */
.fo-keys { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.fo-keys__row { display: flex; gap: 6px; }
.fo-keys__cap {
  min-width: clamp(26px, 3.1vw, 40px); height: clamp(30px, 3.5vw, 42px); padding: 0 6px;
  display: grid; place-items: center;
  font-family: var(--mz-mono); font-size: 10px; letter-spacing: .05em;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.16); border-bottom-width: 2px; border-radius: 6px;
  background: rgba(255,255,255,.03);
  user-select: none; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease, color .12s ease;
}
.fo-keys__cap.is-on {
  border-color: var(--kc, #fff); color: #fff;
  box-shadow: 0 0 16px var(--kc, #fff), inset 0 0 10px rgba(255,255,255,.07);
  transform: translateY(1px);
}
.fo-keys__cap--space { min-width: clamp(150px, 22vw, 260px); letter-spacing: .3em; font-size: 9px; }
.fo-keys__hint {
  margin: 0; font-family: var(--mz-mono); font-size: 9px; letter-spacing: .22em;
  color: rgba(235,240,255,.38); text-transform: uppercase; text-align: center;
}
@media (max-width: 760px) { .fo-keys, .fo-keys__hint { display: none; } }

.fo-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fo-controls .mz-btn { font-size: 11px; letter-spacing: .06em; }

.fo-stepdot {
  position: absolute; right: 24px; bottom: 24px; z-index: 6;
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.12); transition: background .08s, box-shadow .08s;
}
.fo-stepdot.is-on { background: #ff4d3a; box-shadow: 0 0 14px #ff4d3a; }

/* ---------- Inhalt ---------- */
.fo-sec { padding-top: clamp(52px, 9vh, 104px); }
.fo-sec:last-child { padding-bottom: 64px; }

/* Skrjabin-Farbkreis: spielbare Zeilen */
.fo-scr { border-top: 1px solid var(--mz-border); margin-top: 28px; }
.fo-scr__row {
  display: grid; grid-template-columns: 52px 44px 1fr auto; align-items: center; gap: 16px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: 0; border-bottom: 1px solid var(--mz-border);
  color: var(--mz-text); text-align: left; cursor: pointer;
  font-family: var(--mz-mono); font-size: 12px; letter-spacing: .08em;
  transition: background .15s ease;
}
.fo-scr__row:hover, .fo-scr__row:focus-visible { background: rgba(255,255,255,.045); outline: none; }
.fo-scr__row.is-on { background: rgba(255,255,255,.08); }
.fo-scr__note { font-size: 15px; font-weight: 700; color: var(--mz-text-strong); }
.fo-scr__sw { display: block; height: 22px; border-radius: 3px; box-shadow: 0 0 12px var(--kc); background: var(--kc); }
.fo-scr__name { color: var(--mz-text-muted); }
.fo-scr__hex { color: var(--mz-text-muted); font-size: 11px; }

/* Legende: 26 Karten */
.fo-legend {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px; margin-top: 28px;
}
.fo-leg {
  border: 1px solid var(--mz-border); border-radius: var(--mz-radius);
  background: var(--mz-surface); padding: 12px 14px;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center;
}
.fo-leg__cap {
  grid-row: span 3;
  width: 38px; height: 38px; display: grid; place-items: center;
  font: 700 17px/1 var(--mz-mono); color: #fff;
  border: 1px solid var(--kc); border-radius: 7px;
  box-shadow: inset 0 0 10px rgba(255,255,255,.05), 0 0 12px color-mix(in srgb, var(--kc) 45%, transparent);
  background: color-mix(in srgb, var(--kc) 16%, transparent);
}
.fo-leg__note { font-family: var(--mz-mono); font-size: 12px; color: var(--mz-text-strong); }
.fo-leg__form { font-family: var(--mz-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--mz-text-muted); }
.fo-leg__color { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--mz-text-muted); }
.fo-leg__color i { width: 10px; height: 10px; border-radius: 50%; background: var(--kc); box-shadow: 0 0 8px var(--kc); }

/* ---------- Bewegung respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .fo-marquee { animation: none; }
  .fo-title, .fo-keys__cap, .fo-stepdot { transition: none; }
}
