/* Schrift der Website (Dateien liegen schon unter /assets/fonts) */
@font-face {
  font-family: 'Brutalist Mono';
  src: url('/assets/fonts/BrutalistMono.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Momo Trust Display (SIL OFL 1.1, Lizenz: /assets/fonts/OFL-Momo-Trust-Display.txt) */
@font-face {
  font-family: 'Momo Trust Display';
  src: url('/assets/fonts/momo-trust-display-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --fg: #e9e6e1;
  --fg-dim: rgba(233, 230, 225, 0.55);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden; /* Die Seite scrollt nie, Scrollen bewegt die Szene */
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.4 'Brutalist Mono', ui-monospace, monospace;
}

#stage {
  position: fixed;
  inset: 0;
}

#stage:focus {
  outline: none; /* bekommt nur per Skript Fokus, nach dem Verlassen des Durchblicks */
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none; /* Wischen/Drehen übernimmt das Skript */
}

/* Pfeile zum Wechseln der ViewMaster */
.nav-arrow {
  position: fixed;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(233, 230, 225, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

#prev { left: 32px; }
#next { right: 32px; }

.nav-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-arrow:hover:not(:disabled) {
  border-color: rgba(233, 230, 225, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.nav-arrow:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.nav-arrow:disabled {
  opacity: 0.2;
  cursor: default;
}



/* KIKO-Logo oben mittig, liegt über Szene und Schwarzblende */
.noscript {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  text-align: center;
}

.noscript a,
.noscript a:visited {
  color: var(--fg);
}

.brand {
  position: fixed;
  top: 44px; /* gleiche Mittellinie wie der „Zurück“-Button */
  left: 50%;
  transform: translate(-50%, -50%);
}

.brand a {
  display: block;
  border-radius: 4px;
}

.brand a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 6px;
}

.brand img {
  display: block;
  width: auto;
  height: clamp(18px, 2.4vw, 26px);
}

#loader {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  transition: opacity 0.6s ease;
}

#loader.is-done {
  opacity: 0;
  pointer-events: none;
}

#loader.is-error {
  color: #ff8a7a;
}

/* Blick durchs Okular: abgerundetes Fenster in Bildgröße, außen schwarz mit weichem, verwischtem Rand.
   Breite/Höhe setzt controller.js pro Bild (--window-w / --window-h). */
#eyepiece {
  --window-w: 70vw;
  --window-h: 70vh;
  --window-radius: 18px;
  --window-blur: 22px;
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255, 226, 180, 0.06), transparent 60%);
}

.lens-window {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(var(--window-w), 94vw);
  height: min(var(--window-h), 94vh);
  border-radius: var(--window-radius);
  box-shadow: 0 0 0 200vmax #000; /* alles außerhalb des Fensters schwarz */
  filter: blur(var(--window-blur)); /* verwischt die Kante */
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .lens-window { transition: none; }
}

#eyepiece.is-on {
  opacity: 1;
}

#fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

#hint,
#counter {
  position: fixed;
  left: 50%;
  bottom: 32px;
  margin: 0;
  transform: translateX(-50%);
  color: var(--fg-dim);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Projektname unter den ViewMastern: glatte Schrift wie bei Trauerfotografie Schulze */
#hint {
  font-family: 'Momo Trust Display', 'Avenir Next', system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

#counter {
  font-variant-numeric: tabular-nums;
}

#back {
  position: fixed;
  top: 24px;
  left: 24px;
  padding: 10px 16px;
  border: 1px solid rgba(233, 230, 225, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#back:hover {
  border-color: rgba(233, 230, 225, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

#back:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

#back kbd {
  margin-left: 8px;
  color: var(--fg-dim);
  font: inherit;
  font-size: 11px;
}

/* Cookie-Einstellungen: dezent oben rechts (die Seite hat keinen Footer) */
#consent-settings {
  position: fixed;
  top: 32px;
  right: 24px;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--fg-dim);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

#consent-settings:hover {
  color: var(--fg);
}

#consent-settings:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* Im Durchblick ausblenden, damit nichts vom Bild ablenkt */
body:has(#eyepiece.is-on) #consent-settings {
  display: none;
}

/* Cookie-Hinweis (gleicher Text wie auf der übrigen Website) */
.consent {
  position: fixed;
  left: 50%;
  bottom: 72px;
  z-index: 10;
  width: min(560px, calc(100vw - 32px));
  padding: 18px 20px;
  border: 1px solid rgba(233, 230, 225, 0.2);
  border-radius: 14px;
  background: rgba(11, 11, 12, 0.92);
  color: var(--fg);
  transform: translateX(-50%);
}

.consent-text {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.55;
}

.consent-text a,
.consent-text a:visited {
  color: var(--fg);
}

.consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Beide Knöpfe gleich stark (Ablehnen ist gleichwertig zu Akzeptieren) */
.consent-btn {
  padding: 9px 18px;
  border: 1px solid rgba(233, 230, 225, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.consent-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.consent-btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* Schmale Handys: „Esc“-Hinweis weglassen (keine Tastatur), damit „Zurück“ nicht ans Logo stößt */
@media (max-width: 480px) {
  #back { left: 16px; }
  #back kbd { display: none; }
  #consent-settings { top: 62px; right: 16px; font-size: 10px; } /* unter die Logo-Zeile, sonst stößt es ans Logo */
  #hint { white-space: normal; width: max-content; max-width: calc(100vw - 48px); text-align: center; }
  .consent { bottom: 100px; } /* Platz für zweizeilige Projektnamen darunter */
}

[hidden] {
  display: none !important;
}

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