/* Lab 10 – Schlieren
   Das Bild ist alles. Die Oberfläche ist eine einzige Zeile Text, die nur bei Bewegung erscheint. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --text: rgba(244, 242, 238, 0.92);
  --leise: rgba(244, 242, 238, 0.6);
  --schatten: 0 1px 14px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.35);
  --fokus: rgba(244, 242, 238, 0.95);
  --auswahl: rgba(244, 242, 238, 0.28);
  --raus: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
  background: #000;
}

body.hell {
  --text: rgba(30, 28, 25, 0.9);
  --leise: rgba(30, 28, 25, 0.58);
  --schatten: 0 1px 14px rgba(255, 252, 245, 0.75), 0 0 2px rgba(255, 252, 245, 0.6);
  --fokus: rgba(30, 28, 25, 0.9);
  --auswahl: rgba(30, 28, 25, 0.16);
  color-scheme: light;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  font: 500 13px/1 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.01em;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--auswahl); color: inherit; }

.flaeche {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

body.ruhig, body.ruhig .flaeche, body.tapete, body.tapete .flaeche { cursor: none; }

.vorhang {
  position: fixed;
  inset: 0;
  background: #000;
  pointer-events: none;
  transition: opacity 1.8s ease-out;
}
.vorhang.weg { opacity: 0; }

/* ---- Titel: einmal leise beim Start ---- */
.titel {
  position: fixed;
  left: max(32px, env(safe-area-inset-left));
  bottom: max(32px, env(safe-area-inset-bottom));
  margin: 0;
  display: flex;
  gap: 0.6em;
  align-items: baseline;
  font-size: 15px;
  font-weight: 500;
  text-shadow: var(--schatten);
  opacity: 0;
  pointer-events: none;
}
.titel span + span { color: var(--leise); font-weight: 400; }
body.bereit .titel { animation: titel 4.6s var(--raus) 0.9s both; }
@keyframes titel {
  0% { opacity: 0; transform: translateY(6px); }
  18% { opacity: 1; transform: none; }
  72% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---- Die Zeile ---- */
.zeile {
  position: fixed;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  display: flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
  text-shadow: var(--schatten);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--raus), transform 0.9s var(--raus);
}
body.zeigt .zeile, .zeile:focus-within {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.zeile a, .zeile button {
  appearance: none;
  border: 0;
  background: none;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--leise);
  text-shadow: inherit;
  text-decoration: none;
  padding: 10px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.25s ease-out;
}
.zeile a:hover, .zeile button:hover { color: var(--text); }
.zeile :focus-visible { outline: 1.5px solid var(--fokus); outline-offset: 2px; }

.zeile__name { color: var(--text); }
.zeile .zeile__wechsel { font-variant-numeric: tabular-nums; min-width: 9.2em; text-align: left; }

.punkte { display: flex; gap: 0; margin: 0 -6px; }
.zeile .punkt {
  width: 22px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
}
.punkt::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--leise), 0 1px 8px rgba(0, 0, 0, 0.25);
  transition: background-color 0.4s var(--raus), box-shadow 0.4s var(--raus), transform 0.4s var(--raus);
}
body.hell .punkt::before { box-shadow: inset 0 0 0 1px var(--leise), 0 1px 8px rgba(255, 252, 245, 0.5); }
.punkt:hover::before { transform: scale(1.25); }
.punkt[aria-current="true"]::before { background: var(--text); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3); }

.trenner { width: 1px; height: 12px; background: var(--leise); opacity: 0.6; }

.ansage {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.fehler {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(244, 242, 238, 0.85);
  background: #0b0b0d;
}
.fehler[hidden] { display: none; }
.fehler a { color: inherit; }

body.tapete .zeile, body.tapete .titel { display: none; }

@media (max-width: 720px) {
  .zeile { gap: 16px; font-size: 12px; bottom: max(18px, env(safe-area-inset-bottom)); }
  .zeile [data-standbild], .zeile .trenner, .zeile .zeile__wechsel { display: none; }
  .titel { left: 18px; bottom: 76px; }
}

@media (hover: none) {
  .zeile [data-vollbild] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .zeile, .punkt::before, .vorhang { transition-duration: 0.01s; }
  body.bereit .titel { animation-duration: 3.2s; }
}
