/* Modellbau Diorama, Theme »guckkasten« (TIK-0898). Tokens aus 74 - Brands und Styles/Modellbau Diorama/design-tokens.json.
   Der Saal ist dunkel, jedes Werk steht auf einer reinweißen Lichtfläche, Mondlicht ist das einzige Licht.
   Radius 0 überall, Schatten nur als Lichtschein der Lichtfläche. */

@font-face { font-family: Gloock; src: url("schriften/Gloock-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("schriften/HankenGrotesk-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("schriften/HankenGrotesk-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("schriften/RedHatMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("schriften/RedHatMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --saal: #10151C;
  --flaeche: #161D27;
  --portal-grund: #1C2431;
  --linie: #2A3544;
  --spot: #1A2230;
  --licht: #E9E6E0;
  --gedaempft: #9AA5B2;
  --mond: #A9CBE6;
  --weiss: #FFFFFF;
  --f-display: Gloock, Didot, "Bodoni 72", Georgia, serif;
  --f-text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Red Hat Mono", ui-monospace, "Cascadia Mono", monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.853rem;
  --fs-md: 1rem;
  --fs-lg: 1.335rem;
  --fs-xl: 1.776rem;
  --fs-2xl: 2.371rem;
  --fs-3xl: 3.159rem;
  --schein: 0 0 120px 20px rgba(255, 255, 255, .07);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --langsam: 900ms;
  --breite: 76rem;
  --rand: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; scrollbar-color: var(--linie) var(--saal); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--saal); color: var(--licht);
  font: 400 var(--fs-md)/1.6 var(--f-text);
  font-kerning: normal; text-rendering: optimizeLegibility;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: rgba(169, 203, 230, .55); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--mond); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--mond); outline-offset: 3px; }
::selection { background: var(--mond); color: var(--saal); }
.code { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
h1, h2 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; margin: 0; }

.sprung { position: absolute; left: -9999px; }
.sprung:focus { left: var(--rand); top: .75rem; z-index: 10; background: var(--mond); color: var(--saal); padding: .5rem .9rem; }

/* Kopf und Fuß */
.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem var(--rand); max-width: calc(var(--breite) + 2 * var(--rand)); width: 100%; margin: 0 auto;
}
.marke { display: block; flex: 0 1 auto; }
.marke img { height: 2.6rem; width: auto; }
.sprachen { display: flex; gap: .15rem; font: 500 var(--fs-sm)/1 var(--f-mono); }
.sprachen > * { padding: .55rem .6rem; min-width: 2.75rem; text-align: center; }
.sprachen [aria-current] { color: var(--mond); box-shadow: inset 0 -1px 0 var(--mond); }
.sprachen a { text-decoration: none; color: var(--gedaempft); }
.sprachen a:hover { color: var(--licht); }
.sprachen__aus { color: var(--linie); }

.fuss {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 1.5rem;
  margin-top: clamp(4rem, 9vw, 7rem); padding: 2rem var(--rand) 2.5rem;
  border-top: 1px solid var(--linie); color: var(--gedaempft); font-size: var(--fs-sm);
}
.fuss p { margin: 0; }
.fuss__signet { width: 2.2rem; height: 2.2rem; }
.fuss__recht { display: flex; gap: 1.5rem; }
.fuss a { text-decoration: none; }
.fuss a:hover { text-decoration: underline; }

/* Das Bühnenportal (vorlagen/portal.html) */
.portal { position: relative; margin: 0 auto; width: 100%; }
.portal__kasten { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.portal__kasten line, .portal__rahmen { stroke: var(--mond); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.portal__kasten line { stroke-opacity: .55; }
.portal__boden { fill: rgba(169, 203, 230, .10); stroke: none; }
.portal__flaeche {
  position: absolute; top: 8%; left: 10%; right: 10%; bottom: 14%;
  background: var(--weiss); box-shadow: var(--schein); overflow: hidden;
}
.portal__flaeche img { width: 100%; height: 100%; object-fit: cover; }

/* Daguerres Lichtwechsel: einmal beim Laden wandert die Nacht aus der Lichtfläche. Das Foto bleibt unverändert,
   verändert wird nur eine Lichtebene darüber. Ruhezustand ist der Tag. */
.portal__flaeche--licht::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(14, 22, 36, 0) 0%, rgba(14, 22, 36, 0) 38%,
              rgba(169, 203, 230, .28) 44%, rgba(24, 40, 64, .80) 50%, rgba(14, 22, 36, .93) 62%,
              rgba(12, 18, 28, .95) 100%);
  background-size: 300% 100%; background-position: 0% 0;
  animation: daguerre 4.6s cubic-bezier(.55, .05, .35, 1) .3s backwards;
}
/* Mit JavaScript wartet die Nacht, bis das Foto da ist (Hotlink von HZA, sonst verpasst). Ohne JavaScript läuft sie sofort. */
.js .portal__flaeche--licht:not(.bereit)::after { animation-play-state: paused; }
@keyframes daguerre { from { background-position: 100% 0; } to { background-position: 0% 0; } }

/* Start: der Auftritt der jüngsten Szene */
.start main { background: radial-gradient(ellipse 70% 42rem at 50% 18rem, var(--spot), transparent 72%) no-repeat; }
.auftritt { max-width: calc(var(--breite) + 2 * var(--rand)); margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem) var(--rand) 0; }
.auftritt__buehne { display: block; max-width: 70rem; margin: 0 auto; }
.auftritt__text { text-align: center; max-width: 42rem; margin: clamp(1.75rem, 4vw, 3rem) auto 0; }
.auftritt__titel { font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem); }
.auftritt__titel a { text-decoration: none; }
.auftritt__titel a:hover { color: var(--licht); text-decoration: underline; text-decoration-thickness: 1px; }
.auftritt__ort { margin: .9rem 0 0; font: 400 var(--fs-sm)/1.5 var(--f-mono); color: var(--mond); }
.auftritt__einleitung { margin: 1.25rem 0 0; color: var(--gedaempft); font-size: var(--fs-lg); line-height: 1.45; }

/* Spielplan: eine Programmliste, keine Kachelwand */
.spielplan { max-width: calc(var(--breite) + 2 * var(--rand)); margin: clamp(4rem, 9vw, 7rem) auto 0; padding: 0 var(--rand); }
.spielplan__titel { font-size: var(--fs-2xl); display: flex; align-items: baseline; gap: 1rem; padding-bottom: 1.25rem; }
.spielplan__titel .code { font-size: var(--fs-sm); color: var(--mond); }
.spielplan__liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.auffuehrung { border-bottom: 1px solid var(--linie); }
.auffuehrung__link {
  display: grid; grid-template-columns: 7.5rem 11rem 1fr auto; grid-template-areas: "nr bild name premiere" "nr bild ort premiere";
  align-items: center; column-gap: clamp(1rem, 3vw, 2.5rem); padding: 1.25rem .5rem;
  text-decoration: none; transition: background-color 260ms var(--ease);
}
.auffuehrung__link:hover { background: var(--flaeche); color: var(--licht); }
.auffuehrung__link:hover .auffuehrung__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.auffuehrung__nr { grid-area: nr; font-size: var(--fs-sm); color: var(--mond); }
.auffuehrung__bild { grid-area: bild; background: var(--weiss); box-shadow: 0 0 40px 4px rgba(255, 255, 255, .05); align-self: center; }
.auffuehrung__bild img { width: 100%; height: auto; }
.auffuehrung__name { grid-area: name; align-self: end; font: 400 var(--fs-xl)/1.15 var(--f-display); }
.auffuehrung__ort { grid-area: ort; align-self: start; margin-top: .35rem; color: var(--gedaempft); font-size: var(--fs-sm); }
.auffuehrung__premiere { grid-area: premiere; font-size: var(--fs-sm); color: var(--gedaempft); text-align: right; }

/* Szene: beim Öffnen dimmt der Saal langsam ab, die Lichtfläche bleibt */
.szene::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 80% 55% at 50% 22%, var(--portal-grund), transparent 70%);
  opacity: .35; animation: saal-dimmt var(--langsam) var(--ease) backwards;
}
.szene { position: relative; z-index: 0; }
@keyframes saal-dimmt { from { opacity: 1; } to { opacity: .35; } }
.szene__stueck, .recht__blatt { max-width: calc(var(--breite) + 2 * var(--rand)); margin: 0 auto; padding: 0 var(--rand); }
.zurueck { margin: .5rem 0 1.5rem; font: 400 var(--fs-sm)/1.4 var(--f-mono); }
.zurueck a { color: var(--gedaempft); text-decoration: none; }
.zurueck a::before { content: "← "; }
.zurueck a:hover { color: var(--mond); }
.portal--szene { max-width: 70rem; }
.szene__kopf {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 1fr); gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: clamp(2rem, 5vw, 3.5rem); align-items: start;
}
.szene__name { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4rem); }
.szene__text p { margin: 1.4rem 0 0; font-size: var(--fs-lg); line-height: 1.55; max-width: 36em; }

.zettel { background: var(--portal-grund); padding: 1.5rem 1.6rem 1.25rem; border-top: 1px solid var(--mond); }
.zettel__titel { font-size: var(--fs-xl); }
.zettel__nr { margin: .35rem 0 1.1rem; font-size: var(--fs-xs); color: var(--mond); }
.zettel dl { margin: 0; }
.zettel dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--linie); }
.zettel dt { color: var(--gedaempft); font-size: var(--fs-sm); line-height: 1.5; }
.zettel dd { margin: 0; font-size: var(--fs-md); line-height: 1.5; }
.zettel dd.code { font-size: var(--fs-sm); line-height: 1.6; }
.zettel ul { list-style: none; margin: 0; padding: 0; }

.bildfolge { margin-top: clamp(3.5rem, 8vw, 6rem); }
.bildfolge__titel { font-size: var(--fs-2xl); margin-bottom: 1.5rem; }
.bildfolge__raster { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: clamp(.75rem, 2vw, 1.5rem); }
.bildfolge__raster li { break-inside: avoid; margin-bottom: clamp(.75rem, 2vw, 1.5rem); }
.bildfolge__raster a { display: block; background: var(--weiss); outline: 1px solid var(--linie); outline-offset: 0; }
.bildfolge__raster a:hover { outline-color: var(--mond); }
.bildfolge__raster img { width: 100%; height: auto; }

.verweise { margin-top: clamp(3rem, 7vw, 5rem); max-width: 48rem; }
.verweise__vitrine { margin: 0; font-size: var(--fs-lg); }
.verweise__titel { font-size: var(--fs-xl); margin-top: 2.5rem; }
.verweise__hinweis { color: var(--gedaempft); font-size: var(--fs-sm); margin: .5rem 0 0; }
.verweise ol { margin: 1rem 0 0; padding: 0; list-style: none; }
.verweise li { padding: .6rem 0; border-top: 1px solid var(--linie); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; }
.verweise li .code { color: var(--gedaempft); font-size: var(--fs-sm); }

.blaettern { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--linie); padding-top: 1.5rem; }
.blaettern a { text-decoration: none; font: 400 var(--fs-lg)/1.2 var(--f-display); }
.blaettern span { display: block; margin-bottom: .4rem; font: 400 var(--fs-xs)/1.4 var(--f-mono); color: var(--gedaempft); }
.blaettern__vor { grid-column: 2; text-align: right; }
.blaettern__nach { grid-column: 1; }

/* Rechtstexte */
.recht__blatt h1 { font-size: var(--fs-3xl); }
.recht__stand { color: var(--gedaempft); font-size: var(--fs-sm); }
.recht__text { max-width: 44rem; margin-top: 2rem; }
.recht__text h2 { font-size: var(--fs-xl); margin: 2.5rem 0 .75rem; }
.recht__text h3 { font: 500 var(--fs-md)/1.4 var(--f-text); margin: 1.75rem 0 .5rem; }
.recht__text p, .recht__text li { color: var(--licht); max-width: 68ch; }

/* 404: die leere Bühne */
.leer__buehne { max-width: 40rem; margin: clamp(2rem, 6vw, 4rem) auto 0; padding: 0 var(--rand); text-align: center; }
.leer__kasten { width: min(22rem, 70vw); aspect-ratio: 1; margin: 0 auto 2.5rem; }
.leer__kasten svg { width: 100%; height: 100%; overflow: visible; }
.leer__kasten line, .leer__kasten .portal__rahmen, .leer__rueckwand { stroke: var(--mond); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.leer__rueckwand { fill: var(--weiss); fill-opacity: .06; }
.leer__buehne h1 { font-size: var(--fs-3xl); }
.leer__buehne p { color: var(--gedaempft); }

@media (max-width: 56rem) {
  .szene__kopf { grid-template-columns: 1fr; }
  .auffuehrung__link { grid-template-columns: 7rem 1fr; grid-template-areas: "bild name" "bild ort" "bild premiere" "bild nr"; row-gap: .15rem; }
  .auffuehrung__nr, .auffuehrung__premiere { text-align: left; font-size: var(--fs-xs); }
  .auffuehrung__name { font-size: var(--fs-lg); }
}
@media (max-width: 34rem) {
  .marke img { height: 2.1rem; }
  .fuss { grid-template-columns: auto 1fr; }
  .fuss__recht { grid-column: 1 / -1; }
  .zettel dl > div { grid-template-columns: 1fr; gap: .15rem; }
  .bildfolge__raster { columns: 1; }
  .blaettern { grid-template-columns: 1fr; }
  .blaettern__vor { grid-column: 1; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .portal__flaeche--licht::after, .szene::before { animation: none; }
  .auffuehrung__link { transition: none; }
}
