/* Wühlwerk Trickfilmstudio — Beispiel-Website (erfundener Betrieb), Stil aus MXL-024 */

@font-face { font-family: "Archivo Narrow"; src: url("../fonts/archivo-narrow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Narrow"; src: url("../fonts/archivo-narrow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Narrow"; src: url("../fonts/archivo-narrow-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-200-normal.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-200-italic.woff2") format("woff2"); font-weight: 200; font-style: italic; font-display: swap; }

:root {
  --canvas: #ffffff;
  --ink: #000000;
  --mascot: #e04040;
  --work-yellow: #f3ea13;
  --work-pink: #f6a0ed;
  --work-green: #34ab4e;
  --haze: #d9d9ee;
  --fg: var(--ink);
  --bg: var(--canvas);
  --narrow: "Archivo Narrow", "Arial Narrow", "Roboto Condensed", sans-serif;
  --serif: "Spectral", "Times New Roman", serif;
  --gutter: clamp(16px, 2.2vw, 24px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.45 var(--narrow);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

html { scrollbar-color: var(--fg) var(--bg); }

.skip-link {
  position: absolute; left: var(--gutter); top: 8px; z-index: 50;
  padding: 12px 16px; background: var(--fg); color: var(--bg);
  font-weight: 700; font-size: 14px; text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfzeile: vier Anker, Figur in der Mitte ---------- */
.site-header {
  position: relative; z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr minmax(120px, 200px) 1fr 1fr;
  align-items: center;
  padding: 6px var(--gutter) 0;
  font-size: 14px; font-weight: 700;
}
.site-header a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none;
}
.site-header a:hover, .site-header a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.site-header .brand { justify-self: start; }
.site-header .nav-l { justify-self: center; display: flex; gap: 28px; }
.site-header .nav-r { justify-self: center; display: flex; gap: 28px; }
.site-header .cta { justify-self: end; }
.site-header nav { display: contents; }
.site-header .slot { grid-column: 3; }

/* Kleine Figur auf Unterseiten: lugt über die Linie */
.peek {
  position: relative;
  border-bottom: 1px solid var(--fg);
  height: 0;
}
.peek .murkel {
  position: absolute; left: 50%; bottom: -1px;
  width: 112px; transform: translateX(-50%);
}
.page-head { padding-top: 72px; }

/* ---------- Startseite: Bühne mit Erdloch ---------- */
[hidden] { display: none !important; }
.stage {
  position: relative;
  min-height: calc(100svh - 50px);
  display: grid;
  grid-template-rows: 1fr auto;
}
.stage__pit {
  position: relative;
  display: grid; justify-items: center; align-content: start;
  padding-top: clamp(4px, 2vh, 28px);
}
.pit {
  --d: min(58svh, 80vw, 680px);
  position: relative;
  width: var(--d); height: var(--d);
  margin-top: max(calc(var(--d) * 0.32 - 40px), calc(var(--d) * 0.32 - 6vh));
}
.pit__hole {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--ink);
  display: grid; place-items: end center;
  padding-bottom: calc(var(--d) * 0.16);
  color: #fff;
}
.pit__mole {
  position: absolute; left: 50%; top: 0;
  width: calc(var(--d) * 0.46);
  transform: translate(-50%, -82%);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.pit__mole svg { width: 100%; height: auto; overflow: visible; }
.pit__mole:focus-visible { outline-offset: 6px; border-radius: 40% 40% 12px 12px; }
.pit__mole:hover .murkel__head { transform: translateY(-2%); }
.murkel__head { transition: transform .5s var(--ease); transform-box: fill-box; }
.pit__caption { text-align: center; font-size: 14px; line-height: 1.4; }
.pit__caption b { font-weight: 700; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; margin-top: 12px;
  border: 1px solid currentColor; border-radius: 100vw;
  background: transparent; font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.pit .pill { color: #fff; }
.pit .pill:hover { background: #fff; color: var(--ink); }
.pit .pill:focus-visible { outline-color: #fff; }

.stage__foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  align-items: end;
  padding: 20px var(--gutter) 22px;
}
.stage__foot h1 {
  margin: 0; max-width: 31ch;
  font: 400 16px/1.4 var(--narrow);
}
.stage__foot h1 strong { font-weight: 700; }
.now { justify-self: end; text-align: right; max-width: 34ch; font-size: 16px; margin: 0; }
.now em { font-style: italic; }
.now span { display: block; font-size: 14px; font-weight: 700; }

.rule { border: 0; border-top: 1px solid var(--fg); margin: 0; }

/* ---------- Index mit Unschärfe ---------- */
.index { padding: 28px var(--gutter) 56px; }
.index__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  align-items: center; margin-bottom: 28px;
}
.index__bar h2 { font: 700 14px/1.2 var(--narrow); margin: 0; }
.filters { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.filters legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filters label {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; cursor: pointer; font-size: 16px;
}
.filters input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters label::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--fg); background: transparent;
}
.filters label:has(input:checked)::before { background: var(--fg); }
.filters label:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 2px; }
.filters .count { font-size: 12px; vertical-align: super; }

.tiles {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1280px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.tile a { display: block; text-decoration: none; position: relative; }
.tile__img {
  display: block; isolation: isolate;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 10px;
  transition: filter .6s var(--ease), border-radius .6s var(--ease), transform .6s var(--ease);
  filter: blur(9px) saturate(.7);
}
.tile__img::after {
  content: ""; position: absolute; inset: 0; background: var(--haze); opacity: .55;
  transition: opacity .6s var(--ease);
}
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile__cap {
  display: block; margin-top: 10px; font-size: 14px; line-height: 1.35;
  opacity: 0; transition: opacity .4s var(--ease);
}
.tile__cap b { font-weight: 700; }
.tiles:not(:hover):not(:focus-within) .tile.is-sharp .tile__img,
.tile a:hover .tile__img, .tile a:focus-visible .tile__img {
  filter: none; border-radius: 40px; transform: scale(1.02);
}
.tiles:not(:hover):not(:focus-within) .tile.is-sharp .tile__img::after,
.tile a:hover .tile__img::after, .tile a:focus-visible .tile__img::after { opacity: 0; }
.tiles:not(:hover):not(:focus-within) .tile.is-sharp .tile__cap,
.tile a:hover .tile__cap, .tile a:focus-visible .tile__cap { opacity: 1; }
.tile a:focus-visible { outline-offset: 6px; border-radius: 40px; }

/* Filtern ohne JavaScript */
.index:has(#f-erklaer:checked) .tile:not([data-k~="erklaer"]),
.index:has(#f-kinder:checked) .tile:not([data-k~="kinder"]),
.index:has(#f-museum:checked) .tile:not([data-k~="museum"]),
.index:has(#f-musik:checked) .tile:not([data-k~="musik"]),
.index:has(#f-werkstatt:checked) .tile:not([data-k~="werkstatt"]) { display: none; }

/* ---------- Auslage: gedrehte Abzüge ---------- */
.spread { padding: 24px 0 40px; }
.print {
  position: relative; margin: 0 auto clamp(56px, 10vw, 140px);
  width: min(1040px, calc(100% - 2 * var(--gutter)));
}
.print__img {
  display: block; transform: rotate(var(--tilt, -2deg));
  transition: transform .7s var(--ease);
}
.print__img img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
.print a.print__link { text-decoration: none; display: block; }
.print a.print__link:hover .print__img { transform: rotate(0deg) scale(1.01); }
.print a.print__link:focus-visible { outline-offset: 8px; }
.print__meta {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(var(--tilt, -2deg));
  width: min(92%, 720px);
  text-align: center; font-size: 15px; line-height: 1.9;
}
.print__meta span {
  background: var(--canvas); color: var(--ink);
  padding: 3px 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.print__meta b { font-weight: 700; }
.print__meta u { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Schluss ---------- */
.close { padding: 40px var(--gutter) 0; text-align: center; }
.close__name {
  font: 200 clamp(3.5rem, 12vw, 6rem)/0.95 var(--serif);
  letter-spacing: -0.02em; margin: 0 0 24px;
}
.close p { margin: 0 auto 8px; max-width: 52ch; }
.close .pill { margin-top: 16px; }

.site-footer {
  margin-top: 64px; border-top: 1px solid var(--fg);
  padding: 18px var(--gutter) 22px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Unterseiten ---------- */
.lead {
  padding: 0 var(--gutter);
  max-width: 1120px; margin: 0 auto;
}
.lead h1 {
  font: 200 clamp(2.6rem, 6.4vw, 5.6rem)/1.02 var(--serif);
  letter-spacing: -0.02em; margin: 0 0 24px; text-wrap: balance;
}
.lead p.intro { font-size: 18px; max-width: 58ch; margin: 0 0 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 104px) 0 0; }
.section > .wrap > h2, .section h2.big {
  font: 200 clamp(2rem, 4.2vw, 3.4rem)/1.05 var(--serif);
  letter-spacing: -0.015em; margin: 0 0 20px; text-wrap: balance;
}
.section h3 { font: 700 16px/1.3 var(--narrow); margin: 0 0 6px; }
.prose p { max-width: 66ch; margin: 0 0 14px; font-size: 17px; }

/* Ablauf als Blattfolge an der Passerleiste */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 0; counter-reset: s; }
.steps li {
  display: grid; grid-template-columns: 64px 1fr minmax(120px, auto); gap: 8px 24px;
  padding: 18px 0; border-top: 1px solid var(--fg);
  align-items: baseline;
}
.steps li:last-child { border-bottom: 1px solid var(--fg); }
.steps .n { font: 200 40px/1 var(--serif); }
.steps p { margin: 0; max-width: 60ch; }
.steps .dur { font-size: 14px; font-weight: 700; text-align: right; }

.calc {
  margin-top: 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px;
  align-items: start;
}
.calc form { display: grid; gap: 22px; }
.field label, .field legend { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.field fieldset { border: 0; padding: 0; margin: 0; }
.field .hint { font-size: 14px; margin: 6px 0 0; }
.range { display: flex; align-items: center; gap: 16px; }
.range output { font-weight: 700; min-width: 7ch; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: currentColor; }
input[type="range"]::-moz-range-track { height: 1px; background: currentColor; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background: var(--bg); border: 1px solid currentColor;
}
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid currentColor; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; margin: 0;
  border: 1px solid var(--fg); border-radius: 100vw; font-weight: 400; font-size: 15px; cursor: pointer;
}
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices label:has(input:checked) { background: var(--fg); color: var(--bg); }
.choices label:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 3px; }

.result { position: sticky; top: 24px; }
.result__num { font: 200 clamp(3.6rem, 8vw, 6rem)/1 var(--serif); letter-spacing: -0.02em; margin: 0; font-variant-numeric: tabular-nums; }
.result__unit { font-weight: 700; font-size: 14px; margin: 4px 0 16px; }
.result dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 15px; }
.result dt { font-weight: 700; }
.result dd { margin: 0; font-variant-numeric: tabular-nums; }
.stack { position: relative; height: 220px; margin: 8px 0 20px; }
.stack svg { width: 100%; height: 100%; }
.small { font-size: 14px; }
table.examples { border-collapse: collapse; width: 100%; font-size: 15px; margin-top: 16px; font-variant-numeric: tabular-nums; }
table.examples th, table.examples td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--fg); }
table.examples th { font-weight: 700; font-size: 14px; }
.scroll-x { overflow-x: auto; }

/* Mienen-Register */
.roster { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 20px; }
.roster li { text-align: center; }
.roster .murkel { width: 120px; margin: 0 auto 10px; }
.roster b { display: block; font-size: 14px; }
.roster span { font-size: 14px; }

.team { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.team li { border-top: 1px solid var(--fg); padding: 16px 0 20px; }
.team b { display: block; }
.team p { margin: 4px 0 0; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 16px 0 0; font-size: 15px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.tilted { transform: rotate(var(--tilt, -2deg)); }

/* Formular */
.form { display: grid; gap: 20px; max-width: 640px; }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  width: 100%; min-height: 44px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--fg);
  background: transparent; border-radius: 0; font-size: 17px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.form ::placeholder { color: #555; }
.form .pill { justify-self: start; background: var(--fg); color: var(--bg); padding: 0 28px; }
.form .pill:hover { background: var(--bg); color: var(--fg); }
.notice { border-top: 1px solid var(--fg); border-bottom: 1px solid var(--fg); padding: 14px 0; font-size: 15px; }
.error { font-size: 14px; font-weight: 700; color: #b01f1f; margin: 6px 0 0; }

.legal .prose h2 { font: 700 16px/1.3 var(--narrow); margin: 32px 0 8px; }
.demo-flag { display: inline-block; border: 1px solid var(--fg); border-radius: 100vw; padding: 2px 12px; font-size: 14px; font-weight: 700; margin-bottom: 20px; }

/* ---------- Vorführraum (Arbeiten) ---------- */
body.dark { --fg: #ffffff; --bg: #000000; color-scheme: dark; }
.player { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.player__stage { position: relative; aspect-ratio: 4 / 3; background: var(--work-yellow); overflow: hidden; }
.player__stage svg { width: 100%; height: 100%; }
.player__stage .onion { opacity: .28; }
.player__controls { display: grid; gap: 18px; }
.player__row { display: flex; flex-wrap: wrap; gap: 8px; }
.player__status { font-size: 15px; margin: 0; min-height: 3em; }
.player__status b { font-weight: 700; }
body.dark .pill:hover { background: #fff; color: #000; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: #fff; }
.work { padding-top: clamp(72px, 10vw, 128px); }
.work h2 { font: 200 clamp(2.4rem, 5.6vw, 4.6rem)/1 var(--serif); letter-spacing: -0.02em; margin: 0 0 24px; text-wrap: balance; }
.work figure { margin: 0 0 32px; }
.work figure img { width: 100%; aspect-ratio: 3 / 2; height: auto; }
.work figcaption { font-size: 14px; margin-top: 18px; }

@media (max-width: 991.98px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .player, .calc, .split { grid-template-columns: 1fr; }
  .result { position: static; }
}
@media (max-width: 767.98px) {
  .site-header { grid-template-columns: 1fr auto; row-gap: 0; padding-top: 4px; }
  .site-header .brand { grid-column: 1; }
  .site-header .cta { grid-column: 2; }
  .site-header .slot { display: none; }
  .site-header .nav-l, .site-header .nav-r { grid-row: 2; justify-self: stretch; gap: 0; }
  .site-header .nav-l { grid-column: 1; justify-content: flex-start; gap: 24px; }
  .site-header .nav-r { grid-column: 2; justify-content: flex-end; }
  .stage { min-height: 0; }
  .stage__foot { grid-template-columns: 1fr; gap: 14px; padding-top: 28px; }
  .now { justify-self: start; text-align: left; }
  .pit { --d: min(78vw, 50svh); margin-top: calc(var(--d) * 0.34); }
  .print__meta { position: static; transform: none; width: auto; margin-top: 18px; text-align: left; line-height: 1.45; }
  .print__meta span { background: none; padding: 0; }
  .team { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 44px 1fr; }
  .steps .dur { grid-column: 2; text-align: left; }
  .steps .n { font-size: 32px; }
  .page-head { padding-top: 64px; }
  .peek .murkel { width: 96px; }
}
@media (max-width: 575.98px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile__cap { font-size: 13px; }
  .tile--crop { display: none; }
  .lead p.intro { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
