/* Smily’s Autotechnik: Richtung A „Gelbes Schild“, Einstieg als Halle hinter dem gelben Tor */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --gelb: #FFD400;
  --gelb-tief: #F2C600;
  --schwarz: #111111;
  --anthrazit: #23262A;
  --putz: #F2F1EC;
  --putz-tief: #E6E4DD;
  --text-ruhig: #44474C;
  --stahl-1: #D7DADD;
  --stahl-2: #B9BEC3;
  --stahl-3: #CDD1D4;
  --r: 18px;
  --r-innen: 12px;
  --feder: cubic-bezier(0.32, 0.72, 0, 1);
  --schwung: cubic-bezier(0.34, 1.45, 0.5, 1);
  --rand: clamp(16px, 4.5vw, 64px);
  --breite: 1240px;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-stretch: 100%;
  font-weight: 420;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--schwarz);
  background: var(--gelb);
  font-variant-numeric: tabular-nums;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.02; font-stretch: 78%; font-weight: 860; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 3px solid var(--schwarz); outline-offset: 3px; border-radius: 6px; }
.besuch :focus-visible, .fuss :focus-visible, .anlass .vorne :focus-visible { outline-color: var(--gelb); }

.sprung {
  position: absolute; left: 12px; top: -80px; z-index: 30;
  background: var(--schwarz); color: var(--gelb); padding: 12px 18px; border-radius: 999px;
  font-weight: 700; text-decoration: none;
}
.sprung:focus { top: 12px; }

.rahmen { width: 100%; max-width: var(--breite); margin: 0 auto; padding-inline: var(--rand); }

/* Knopf */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 0 22px;
  background: var(--schwarz); color: var(--gelb);
  border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-weight: 760; font-stretch: 88%; font-size: 1rem; letter-spacing: 0.01em;
  transition: transform 0.5s var(--feder), background-color 0.4s var(--feder);
}
.knopf:hover { background: #000; }
.knopf:active { transform: scale(0.97); }
.knopf-gross { min-height: 64px; padding: 0 8px 0 28px; font-size: 1.25rem; gap: 18px; }
.knopf-kreis {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gelb); color: var(--schwarz);
  transition: transform 0.6s var(--schwung);
}
.knopf-kreis svg { width: 22px; height: 22px; }
.knopf:hover .knopf-kreis { transform: translateX(3px) rotate(-12deg) scale(1.05); }

/* Kopf */
.kopf { position: relative; z-index: 5; }
.kopf-innen {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 16px var(--rand);
}
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--schwarz); margin-right: auto; min-width: 0; }
.marke-zeichen { width: 44px; height: 44px; flex: none; }
.marke-text { display: flex; flex-direction: column; line-height: 1.05; }
.marke-name { font-weight: 880; font-stretch: 82%; font-size: 1.3rem; white-space: nowrap; letter-spacing: -0.005em; }
.marke-unter { font-size: 0.8rem; font-weight: 560; margin-top: 3px; white-space: nowrap; }
.kopf-nav { display: flex; gap: 6px; }
.kopf-nav a {
  text-decoration: none; font-weight: 640; padding: 12px 14px; border-radius: 999px;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: background-color 0.4s var(--feder);
}
.kopf-nav a:hover { background: rgba(17,17,17,0.08); }

/* Held: hinter dem gelben Tor die Halle mit Hebebühne */
.held {
  --bw: min(64vw, calc((100svh - 76px) * 1.2), 1180px);
  --weg: 200;      /* Hubweg der Bühne in SVG-Einheiten */
  --hub: 1;        /* 0 = Räder am Boden, 1 = oben; ohne JS steht das Auto oben */
  --wipp: 0;
  --rad: 0;
  --hebel: 1;
  --lauf: 104px;
  --unter: 22px;
  --tief: clamp(28px, 6vh, 64px);
  --decke: 56px;
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100svh - 76px);
  display: flex; flex-direction: column;
  color: #F5F3EE;
  background-color: #2A2E33;
  background-image:
    linear-gradient(to bottom, #121416 0, #121416 var(--decke), rgba(0,0,0,0.38) var(--decke), rgba(0,0,0,0) calc(var(--decke) + 90px)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, rgba(0,0,0,0.12) 1px 2px, transparent 2px 200px),
    linear-gradient(to bottom, #31363B 0%, #2B2F34 55%, #24282C 100%);
}
.held-innen {
  position: relative; z-index: 2; pointer-events: none;
  width: 100%; max-width: 1440px; margin: 0 auto;
  padding: calc(var(--decke) + clamp(16px, 4vh, 52px)) var(--rand) calc(var(--bw) * 0.08 + var(--unter) + var(--tief) + clamp(20px, 4vh, 56px));
  flex: 1; display: flex; flex-direction: column; justify-content: center;
}
.held-innen > * { pointer-events: auto; width: fit-content; max-width: 100%; }
.held-ober { font-weight: 640; font-size: 0.95rem; letter-spacing: 0.02em; margin-bottom: 22px; color: #C6CBD0; }
.held-titel {
  font-size: clamp(2.5rem, 4.9vw, 5.2rem);
  font-stretch: 72%; font-weight: 900; line-height: 0.95; letter-spacing: -0.02em;
  color: #F7F5F0;
}
.held-titel .zeile { display: block; }
.held-titel .zeile-stark { margin-top: 0.14em; }
.markiert {
  background: var(--gelb); color: var(--schwarz);
  padding: 0.01em 0.14em 0.05em; margin-left: -0.08em;
  border-radius: 0.1em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  line-height: 1.12;
}
@media (min-width: 761px) { .held-titel .zeile { white-space: nowrap; } }
.held-unter { margin-top: 24px; font-size: clamp(1.1rem, 1.5vw, 1.3rem); max-width: 31ch; font-weight: 500; color: #DADDE0; }
.held-handlung { margin-top: 30px; }
.held .knopf { background: var(--gelb); color: var(--schwarz); }
.held .knopf:hover { background: #FFE033; }
.held .knopf-kreis { background: var(--schwarz); color: var(--gelb); }
.held :focus-visible { outline-color: var(--gelb); }
.held-belege { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 640; color: #E7E9EB; }
.held-belege li { display: inline-flex; align-items: center; gap: 8px; }
.stern { width: 18px; height: 18px; color: var(--schwarz); flex: none; }
.held .stern { color: var(--gelb); }
.offen-status::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gelb); box-shadow: 0 0 0 3px rgba(255,212,0,0.22);
}
.offen-status.zu::before { background: transparent; border: 2px solid #E7E9EB; box-shadow: none; }

/* Halle */
.halle { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.licht {
  position: absolute; top: calc(var(--decke) / 2 - 5px); height: 10px; width: 20vw;
  border-radius: 3px; background: #F4F6EF;
  box-shadow: 0 0 0 3px #2A2E33, 0 0 16px 3px rgba(255,250,228,0.5), 0 6px 60px 14px rgba(255,246,210,0.16);
}
.licht::after {
  content: ""; position: absolute; left: -45%; right: -45%; top: 14px; height: 52vh;
  background: radial-gradient(ellipse 50% 100% at 50% 0, rgba(255,247,220,0.10), rgba(255,247,220,0) 70%);
}
.licht-1 { left: 7vw; }
.licht-2 { left: 40vw; }
.licht-3 { left: 73vw; }
.boden {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--bw) * 0.08 + var(--unter) + var(--tief));
  background:
    radial-gradient(ellipse 12% 70% at 17% 62%, rgba(255,247,220,0.07), transparent 70%),
    radial-gradient(ellipse 12% 70% at 50% 62%, rgba(255,247,220,0.07), transparent 70%),
    radial-gradient(ellipse 12% 70% at 83% 62%, rgba(255,247,220,0.07), transparent 70%),
    linear-gradient(to bottom, #4A4F55 0 2px, #26292D 2px, #1A1C1F 100%);
}
.boden::before {
  content: ""; position: absolute; left: 0; right: 0; height: 26px; bottom: 100%;
  background: linear-gradient(to bottom, #262A2E, #202327);
}
.boden::after {
  content: ""; position: absolute; left: 0; right: 0; height: 5px;
  top: calc(var(--bw) * 0.044);
  background: var(--gelb); opacity: 0.88;
}
.buehne-mass {
  position: absolute; right: 0; bottom: calc(var(--unter) + var(--tief));
  width: var(--bw); aspect-ratio: 1000 / 640;
}
.buehne { height: auto; overflow: visible; }

/* Das Tor: gelbe Sektionallamellen, im Ruhezustand oben eingefahren */
.tor {
  --lam: clamp(56px, 8.6vh, 82px);
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 4;
  background:
    linear-gradient(to top, #111 0 12px, transparent 12px),
    repeating-linear-gradient(to top, transparent 0 12px, rgba(0,0,0,0.06) 12px 13px, rgba(255,255,255,0.16) 13px 14px, transparent 14px 26px),
    repeating-linear-gradient(to top, #F3C900 0 2px, #FFD400 2px calc(var(--lam) - 10px), #FFE45A calc(var(--lam) - 10px) calc(var(--lam) - 7px), #D6AF00 calc(var(--lam) - 7px) calc(var(--lam) - 3px), #5E4E00 calc(var(--lam) - 3px) var(--lam));
  transform: translateY(calc(-100% + 18px));
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}
.tor-fenster {
  position: absolute; left: 7%; right: 7%;
  bottom: calc(var(--lam) * 4 + 12px + var(--lam) * 0.25);
  height: calc(var(--lam) * 0.5);
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0) 40%),
    repeating-linear-gradient(90deg, #1C2024 0 calc(12.5% - 22px), transparent calc(12.5% - 22px) 12.5%);
  border-radius: 4px;
}

/* Einstieg: Grundzustand ist der Endzustand, Animation läuft rückwärts hinein.
   Ohne JavaScript bleibt das Tor offen und nichts bewegt sich. */
@media (prefers-reduced-motion: no-preference) {
  .js .tor { animation: tor 1.05s cubic-bezier(0.62, 0, 0.22, 1) 0.18s backwards; }
  .js .licht { animation: licht 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.42s backwards; }
  .js .held-ober, .js .held-titel .zeile, .js .held-unter, .js .held-handlung, .js .held-belege {
    animation: hoch 0.6s var(--feder) backwards;
  }
  .js .held-ober { animation-delay: 0.42s; }
  .js .held-titel .zeile:nth-child(1) { animation-delay: 0.5s; }
  .js .held-titel .zeile:nth-child(2) { animation-delay: 0.58s; }
  .js .held-titel .zeile:nth-child(3) { animation-delay: 0.68s; }
  .js .held-unter { animation-delay: 0.78s; }
  .js .held-handlung { animation-delay: 0.86s; }
  .js .held-belege { animation-delay: 0.92s; }
  .js .streifen { animation: streifen 0.9s var(--feder) 0.5s backwards; }
}
@keyframes tor { from { transform: translateY(0); } }
@keyframes licht { 0% { opacity: 0.05; } 30% { opacity: 0.9; } 42% { opacity: 0.2; } 60% { opacity: 1; } }

.streifen {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--unter); z-index: 3;
  background: repeating-linear-gradient(-45deg, var(--schwarz) 0 16px, var(--gelb) 16px 32px);
  transform-origin: 0 50%;
}
@keyframes hoch { from { opacity: 0; transform: translateY(24px); } }
@keyframes streifen { from { transform: scaleX(0); } }
@keyframes klappe { from { transform: perspective(900px) rotateX(-85deg); opacity: 0; } }

/* Kernstück */
.kern { padding: clamp(80px, 11vw, 150px) 0 clamp(80px, 10vw, 140px); }
.kern-kopf { display: grid; justify-items: center; text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }
.kern-kopf h2 { font-size: clamp(2.6rem, 6.4vw, 6rem); font-weight: 900; font-stretch: 72%; letter-spacing: -0.02em; }
.mund { width: min(420px, 70vw); height: auto; margin: 10px auto 0; overflow: visible; }
.mund path {
  fill: none; stroke: var(--schwarz); stroke-width: 14; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: 50% 0%;
  transform: scaleY(-0.42);
  transition: transform 0.9s var(--schwung);
}
.kern.froh .mund path, .mund-froh path { transform: scaleY(1); }
.kern-text { margin-top: 14px; font-size: 1.15rem; font-weight: 500; max-width: 34ch; }

.anlaesse {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.anlass { perspective: 1400px; min-width: 0; }
.karte { height: 100%; }
.vorne { font-size: inherit; }
.dreh {
  all: unset; box-sizing: border-box; cursor: pointer;
  width: 100%; height: 100%; min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  padding: 22px 22px 24px;
  background: var(--schwarz); color: var(--gelb);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 6px var(--schwarz), inset 0 0 0 8px rgba(255, 212, 0, 0.55);
  transition: transform 0.5s var(--feder);
}
.dreh:hover { transform: translateY(-3px); }
.dreh:active { transform: scale(0.98); }
.dreh-text {
  order: 2;
  font-size: clamp(1.7rem, 2.5vw, 2.35rem); font-weight: 880; font-stretch: 74%; line-height: 0.98;
  letter-spacing: -0.01em; text-wrap: balance;
}
.dreh-kreis {
  order: 1; align-self: flex-end;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 212, 0, 0.14); color: var(--gelb);
  transition: transform 0.7s var(--schwung);
}
.dreh-kreis svg { width: 20px; height: 20px; }
.dreh:hover .dreh-kreis { transform: rotate(-35deg) scale(1.08); }

.hinten {
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
  padding: 22px 20px 20px;
  background: var(--putz); color: var(--schwarz);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 2px var(--schwarz);
}
.hinten:focus { outline: none; }
.hinten:focus-visible { outline: 3px solid var(--schwarz); outline-offset: 3px; }
.hinten p { font-size: 1rem; line-height: 1.45; }
.hinten .sag { font-weight: 700; font-size: 0.95rem; margin-top: auto; }
.hinten .knopf { width: 100%; }
.zurueck {
  all: unset; box-sizing: border-box; cursor: pointer;
  align-self: center; min-height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center;
  font-weight: 640; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 4px;
  border-radius: 999px;
}
.zurueck:focus-visible { outline: 3px solid var(--schwarz); outline-offset: 2px; }

/* Ohne JavaScript: Schild oben, Text darunter, alles sichtbar */
html:not(.js) .dreh { cursor: default; min-height: 0; border-radius: var(--r) var(--r) 0 0; }
html:not(.js) .dreh-kreis { display: none; }
html:not(.js) .hinten { border-radius: 0 0 var(--r) var(--r); }

/* Mit JavaScript: Schild klappt um */
.js .karte {
  display: grid; grid-template-columns: minmax(0, 1fr); position: relative;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--schwung);
}
.js .vorne, .js .hinten { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.js .vorne { visibility: visible; transition: visibility 0s linear 0s; }
.js .hinten { transform: rotateY(180deg); visibility: hidden; transition: visibility 0s linear 0.3s; }
.js .anlass.ist-offen .karte { transform: rotateY(180deg); }
.js .anlass.ist-offen .vorne { visibility: hidden; transition-delay: 0.3s; }
.js .anlass.ist-offen .hinten { visibility: visible; transition-delay: 0s; }

/* Betrieb: weißer Putz, anthrazit Sockel */
.betrieb { background: var(--putz); position: relative; padding-top: clamp(90px, 11vw, 160px); }
.betrieb-raster {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.betrieb h2 { font-size: clamp(2.3rem, 4.8vw, 4.4rem); font-weight: 900; font-stretch: 72%; letter-spacing: -0.02em; }
.betrieb-text > p { margin-top: 22px; font-size: 1.15rem; color: var(--text-ruhig); max-width: 46ch; }
.belege { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.belege li {
  padding: 18px 16px 18px 0;
  border-top: 2px solid var(--schwarz);
  display: flex; flex-direction: column; gap: 4px;
}
.beleg-gross { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(1.35rem, 2.1vw, 1.75rem); font-weight: 860; font-stretch: 78%; line-height: 1.05; }
.beleg-gross .stern { width: 0.85em; height: 0.85em; }
.beleg-klein { font-size: 0.95rem; color: var(--text-ruhig); }

.foto { margin: 0; }
.foto-schale {
  padding: 8px; border-radius: calc(var(--r) + 8px);
  background: var(--putz-tief);
  box-shadow: inset 0 0 0 1px rgba(17,17,17,0.06), 0 30px 60px -30px rgba(35,38,42,0.35);
}
.foto-schale img { width: 100%; height: auto; border-radius: var(--r); background: #cfd3d6; }
.foto figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--text-ruhig); padding-left: 8px; }

.ablauf { padding-top: clamp(90px, 10vw, 140px); padding-bottom: clamp(90px, 10vw, 140px); }
.ablauf-titel { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 880; font-stretch: 74%; }
.schritte {
  list-style: none; margin: 30px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px);
}
.schritte li { padding-top: 18px; border-top: 6px solid var(--gelb); font-size: 1.1rem; color: var(--text-ruhig); }
.schritte strong { display: block; color: var(--schwarz); font-size: 1.45rem; font-weight: 860; font-stretch: 78%; margin-bottom: 6px; }
.sockel { height: 40px; background: var(--anthrazit); }

/* Besuch: Edelstahltafel auf Anthrazit */
.besuch { background: var(--anthrazit); color: #F2F1EC; padding: clamp(80px, 10vw, 140px) 0 clamp(90px, 11vw, 150px); }
.besuch-titel { font-size: clamp(2.3rem, 4.8vw, 4.4rem); font-weight: 900; font-stretch: 72%; letter-spacing: -0.02em; margin-bottom: clamp(30px, 4vw, 52px); }
.tafel {
  padding: 10px; border-radius: calc(var(--r) + 10px);
  background: linear-gradient(160deg, #3a3e44, #2b2e33);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 40px 80px -40px rgba(0,0,0,0.6);
}
.tafel-innen {
  color: var(--schwarz);
  border-radius: var(--r);
  padding: clamp(26px, 4vw, 56px);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.10) 0 1px, rgba(0,0,0,0.025) 1px 2px, transparent 2px 4px),
    linear-gradient(100deg, var(--stahl-1) 0%, var(--stahl-2) 28%, var(--stahl-3) 52%, var(--stahl-2) 74%, var(--stahl-1) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.12);
}
.tafel-marke { display: flex; align-items: center; gap: 16px; padding-bottom: 26px; border-bottom: 2px solid rgba(17,17,17,0.75); }
.tafel-zeichen { width: clamp(52px, 6vw, 72px); height: auto; flex: none; }
.tafel .tafel-name { font-size: clamp(1.8rem, 4.4vw, 3.6rem); font-weight: 900; font-stretch: 80%; line-height: 1; letter-spacing: -0.01em; }
.tafel-raster { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: clamp(26px, 4vw, 56px); padding-top: 28px; }
.tafel h3 { font-size: 1rem; font-stretch: 100%; font-weight: 760; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.tafel p { font-size: 1.1rem; font-weight: 560; }
.tafel p + p { margin-top: 12px; }
.tafel .klein { font-size: 0.98rem; font-weight: 480; color: #26292d; }
.zeiten { margin: 0; display: grid; gap: 14px; }
.zeiten dt { font-weight: 760; }
.zeiten dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 520; }
.tafel-tel a {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 900; font-stretch: 80%;
  text-decoration: none; display: inline-flex; min-height: 48px; align-items: center;
}
.tafel-tel a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.textlink { font-weight: 680; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; display: inline-flex; min-height: 44px; align-items: center; overflow-wrap: anywhere; }
.besuch .tafel :focus-visible { outline-color: var(--schwarz); }

/* Schluss */
.schluss { padding: clamp(90px, 12vw, 170px) 0; background: var(--gelb); position: relative; }
.schluss::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px;
  background: repeating-linear-gradient(-45deg, var(--schwarz) 0 16px, var(--gelb) 16px 32px);
}
.schluss-innen { display: grid; justify-items: center; text-align: center; gap: 22px; }
.schluss .mund { margin: 0 auto 4px; }
.schluss h2 { font-size: clamp(2.5rem, 6vw, 5.6rem); font-weight: 900; font-stretch: 72%; letter-spacing: -0.02em; max-width: 14ch; }
.schluss p { font-size: 1.15rem; font-weight: 520; }

/* Fuß */
.fuss { background: var(--schwarz); color: #E9E7E1; padding: 48px 0 56px; }
.fuss-innen { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.fuss p { font-size: 0.98rem; }
.fuss nav { display: flex; gap: 8px; }
.fuss nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; text-underline-offset: 4px; }
.fuss .vorschau { width: 100%; font-size: 0.88rem; color: #B9B7B0; }
.fuss :focus-visible { outline-color: var(--gelb); }

/* Einblenden beim Scrollen (nur mit JS und Bewegung erlaubt) */
@media (prefers-reduced-motion: no-preference) {
  .js .zeigen.wartet { opacity: 0; transform: translateY(40px); }
  .js .zeigen { transition: opacity 0.9s var(--feder), transform 1s var(--feder); }
  .js .anlaesse.wartet .anlass { opacity: 0; transform: translateY(36px); }
  .js .anlaesse .anlass { transition: opacity 0.8s var(--feder), transform 0.9s var(--feder); }
  .js .anlaesse .anlass:nth-child(2) { transition-delay: 0.05s; }
  .js .anlaesse .anlass:nth-child(3) { transition-delay: 0.1s; }
  .js .anlaesse .anlass:nth-child(4) { transition-delay: 0.15s; }
  .js .anlaesse .anlass:nth-child(5) { transition-delay: 0.2s; }
  .js .anlaesse .anlass:nth-child(6) { transition-delay: 0.25s; }
  .js .anlaesse .anlass:nth-child(7) { transition-delay: 0.3s; }
  .js .anlaesse .anlass:nth-child(8) { transition-delay: 0.35s; }
}

/* Ruhige Fassung */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .karte { transition: none; transform: none !important; }
  .js .hinten { transform: none; }
  .js .vorne, .js .hinten { backface-visibility: visible; }
  .js .anlass .hinten { opacity: 0; }
  .js .anlass.ist-offen .hinten { opacity: 1; }
  .js .anlass.ist-offen .vorne { opacity: 0; }
  .mund path, .knopf, .knopf-kreis, .dreh, .dreh-kreis { transition: none; }
}

/* Mittlere Breiten */
@media (max-width: 1080px) {
  .anlaesse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kopf-nav { display: none; }
  .betrieb-raster { grid-template-columns: 1fr; }
  .foto { max-width: 720px; }
  .tafel-raster { grid-template-columns: 1fr 1fr; }
  .tafel-raster > div:first-child { grid-column: 1 / -1; }
}

/* Handy */
@media (max-width: 760px) {
  .kopf-innen { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .marke { gap: 9px; }
  .marke-zeichen { width: 38px; height: 38px; }
  .marke-name { font-size: 1.05rem; display: flex; flex-direction: column; line-height: 1.02; }
  .marke-unter { display: none; }
  .knopf-kopf { min-height: 46px; padding: 0 16px; font-size: 0.95rem; }
  .held { --bw: 124vw; --decke: 26px; --tief: 14px; min-height: calc(100svh - 70px); }
  .held-innen { justify-content: flex-start; padding-top: calc(var(--decke) + 14px); padding-bottom: calc(var(--bw) * 0.43 + var(--unter) + var(--tief)); }
  /* Handy: kurze Säule, nur Auto, Bühne und Boden */
  .saeule, .saeule-hinten { transform-box: view-box; transform-origin: 0 560px; transform: scaleY(0.7); }
  .buehne .wand, .buehne .plakette, .buehne .oelwanne, .buehne .wagen { display: none; }
  .tor { transform: translateY(calc(-100% + 10px)); }
  .held-ober { display: none; }
  .held-titel { font-size: clamp(2.1rem, 9.6vw, 2.6rem); }
  .held-titel .zeile { white-space: nowrap; }
  .held-unter { margin-top: 12px; font-size: 1rem; line-height: 1.45; max-width: none; }
  .held-handlung { margin-top: 18px; }
  .knopf-gross { font-size: 1.1rem; min-height: 58px; padding-left: 22px; gap: 14px; }
  .knopf-kreis { width: 44px; height: 44px; }
  .held-belege { margin-top: 14px; font-size: 0.95rem; gap: 6px 18px; }
  .buehne-mass { right: auto; left: calc(50% - var(--bw) / 2); }
  .licht { width: 34vw; height: 7px; top: calc(var(--decke) / 2 - 3px); }
  .licht-1 { left: 8vw; } .licht-2 { left: 58vw; } .licht-3 { display: none; }
  .tor { --lam: 52px; }
  .anlaesse { grid-template-columns: 1fr; gap: 10px; }
  .dreh { min-height: 76px; padding: 14px 14px 14px 20px; flex-direction: row; align-items: center; }
  .dreh-text { order: 1; font-size: 1.7rem; }
  .dreh-kreis { order: 2; align-self: center; flex: none; }
  /* Handy: das Schild klappt nach unten auf wie eine Klappe */
  .js .karte { display: block; transform: none !important; transition: none; }
  .js .vorne, .js .hinten { backface-visibility: visible; -webkit-backface-visibility: visible; }
  .js .hinten { transform: none; visibility: visible; transform-origin: 50% 0; }
  .js .anlass:not(.ist-offen) .hinten { display: none; }
  .js .anlass.ist-offen .vorne { visibility: visible; }
  .js .anlass.ist-offen .dreh { border-radius: var(--r) var(--r) 0 0; }
  .js .anlass.ist-offen .hinten { border-radius: 0 0 var(--r) var(--r); animation: klappe 0.7s var(--schwung); }
  .js .anlass.ist-offen .dreh-kreis { transform: rotate(180deg); }
  .hinten { padding: 18px 18px 14px; }
  .js .anlass .hinten, .js .anlass.ist-offen .vorne { opacity: 1; }
  .belege { grid-template-columns: 1fr; }
  .schritte { grid-template-columns: 1fr; }
  .tafel-raster { grid-template-columns: 1fr; }
  .tafel { padding: 6px; }
  .fuss-innen { flex-direction: column; }
}
@media (max-width: 380px) {
  .knopf-kopf { padding: 0 13px; font-size: 0.9rem; }
  .marke-zeichen { width: 34px; height: 34px; }
}

/* Rechtliche Seiten */
.recht { background: var(--putz); padding: clamp(56px, 8vw, 110px) 0 clamp(80px, 10vw, 130px); border-top: 22px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--schwarz) 0 16px, var(--gelb) 16px 32px) 22; }
.recht .rahmen { max-width: 820px; }
.recht h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; font-stretch: 72%; margin-bottom: 28px; }
.recht h2 { font-size: 1.5rem; font-stretch: 80%; margin: 34px 0 10px; }
.recht p { color: #2b2e33; }
.recht p + p { margin-top: 12px; }
.recht a { text-underline-offset: 3px; }
.recht .hinweis { display: inline-block; background: var(--schwarz); color: var(--gelb); font-weight: 700; padding: 8px 16px; border-radius: 999px; margin-bottom: 28px; font-size: 0.95rem; }
.offen { background: rgba(255, 212, 0, 0.55); box-shadow: inset 0 -2px 0 var(--schwarz); padding: 0 4px; border-radius: 4px; font-weight: 600; white-space: nowrap; }

/* Tablet quer: Bühne etwas kleiner, rechts angeschnitten */
@media (min-width: 761px) and (max-width: 1180px) and (orientation: landscape) {
  .held { --bw: min(58vw, calc((100svh - 76px) * 1.15)); }
  .buehne-mass { right: -3vw; }
}
/* Tablet hoch: Text oben, Halle darunter */
@media (min-width: 761px) and (max-width: 1180px) and (orientation: portrait) {
  .held { --bw: 100vw; }
  .held-innen { justify-content: flex-start; padding-bottom: calc(var(--bw) * 0.6 + var(--unter) + var(--tief)); }
  .buehne-mass { right: auto; left: 0; }
}

/* ===== Werkstattszene zum Anfassen: Bühne, Unterboden, Leuchtpunkte ===== */
.js .held { --hub: 0; --hebel: 0; }
@media (prefers-reduced-motion: reduce) { .js .held { --hub: 1; --hebel: 1; } }

/* Hub in SVG-Einheiten: 199 = Räder am Boden, minus Hubweg */
.hebe { transform: translateY(calc((199 - var(--hub) * var(--weg)) * 1px)); }
.aufbau { transform: translateY(calc(var(--wipp) * 1px)); }
.rad-dreh { transform-box: fill-box; transform-origin: center; transform: rotate(calc(var(--rad) * 1deg)); }
.unterboden { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(clamp(0, calc((var(--hub) - 0.08) / 0.56), 1)); }
.schatten-boden { transform-box: fill-box; transform-origin: center; transform: scale(calc(0.92 + var(--hub) * 0.26), calc(1 - var(--hub) * 0.3)); opacity: calc(1 - var(--hub) * 0.45); }
.lichtfleck { transform-box: fill-box; transform-origin: center; transform: scaleX(calc(0.6 + var(--hub) * 0.45)); opacity: calc(0.1 + var(--hub) * 0.9); }

.hl { opacity: 0; transition: opacity 0.45s var(--feder); }
.held[data-teil="inspektion"] .hl-inspektion,
.held[data-teil="klima"] .hl-klima,
.held[data-teil="unfall"] .hl-unfall,
.held[data-teil="oel"] .hl-oel,
.held[data-teil="auspuff"] .hl-auspuff,
.held[data-teil="sonst"] .hl-sonst { opacity: 1; }
.held[data-teil="bremse"] .rad-vorne { --scheibe-an: 1; }
.held[data-teil="reifen"] .rad-hinten { --reifen-an: 1; }

/* Werkzeug an der Lochwand pendelt, wenn man darüberfährt */
.wz { pointer-events: auto; transform-box: fill-box; transform-origin: 50% 0; transition: transform 1.2s var(--schwung); }
.wz:hover { transform: rotate(7deg); transition-duration: 0.5s; }

/* Taschenlampe: folgt am Rechner dezent dem Mauszeiger */
.lampe {
  position: absolute; left: 0; top: 0; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 244, 210, 0.2), rgba(255, 244, 210, 0.07) 55%, rgba(255, 244, 210, 0));
  opacity: 0; transform: translate3d(-9999px, 0, 0);
  transition: opacity 0.8s var(--feder), transform 0.6s var(--feder);
}
.lampe.an { opacity: 1; }

/* Bedienebene, deckungsgleich mit der Zeichnung */
.szene { z-index: 3; pointer-events: none; }
.punkte { position: absolute; inset: 0; transform: translateY(calc((199 - var(--hub) * var(--weg)) / 640 * 100%)); }
.griff-auto { position: absolute; left: 15%; width: 70%; top: calc(122 / 6.4 * 1%); height: calc(184 / 6.4 * 1%); }
@media (hover: hover) and (pointer: fine) {
  .js .griff-auto { pointer-events: auto; cursor: grab; }
  .js .griff-auto.zieht { cursor: grabbing; }
}

.punkt {
  position: absolute; left: calc(var(--x) * 0.1%); top: calc(var(--y) / 6.4 * 1%);
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  display: grid; place-items: center; border-radius: 50%;
  pointer-events: auto; text-decoration: none; color: var(--schwarz);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.45s var(--feder), transform 0.65s var(--schwung);
}
.punkt-kern {
  position: relative; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(17, 17, 17, 0.66);
  box-shadow: 0 0 0 2px var(--gelb), 0 0 0 7px rgba(255, 212, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.55s var(--schwung);
}
.punkt-kern::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--gelb); }
.punkt-kern::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--gelb); opacity: 0; }
.punkt:hover .punkt-kern { transform: scale(1.14); }
.punkt.aktiv .punkt-kern { background: var(--gelb); box-shadow: 0 0 0 3px var(--schwarz), 0 0 0 9px rgba(255, 212, 0, 0.4), 0 8px 20px rgba(0, 0, 0, 0.4); }
.punkt.aktiv .punkt-kern::after { background: var(--schwarz); inset: 9px; }
.held .punkt:focus-visible { outline: 3px solid var(--gelb); outline-offset: 1px; border-radius: 50%; }
.punkt-name {
  position: absolute; left: calc(100% - 2px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; pointer-events: none;
  padding: 5px 12px; border-radius: 999px;
  background: var(--schwarz); color: var(--gelb);
  font-weight: 740; font-stretch: 88%; font-size: 0.9rem; line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(255, 212, 0, 0.35), 0 8px 18px -8px rgba(0, 0, 0, 0.6);
  transition: opacity 0.35s var(--feder), transform 0.45s var(--feder);
}
.punkt[data-seite="links"] .punkt-name { left: auto; right: calc(100% - 2px); }

.js .punkt { opacity: 0; transform: scale(0.4); pointer-events: none; }
.js .punkt.sichtbar { opacity: 1; transform: none; pointer-events: auto; }
.js .punkt-name { opacity: 0; transform: translate(-6px, -50%); }
.js .punkt[data-seite="links"] .punkt-name { transform: translate(6px, -50%); }
.js .punkt:hover .punkt-name, .js .punkt:focus-visible .punkt-name, .js .punkt.aktiv .punkt-name { opacity: 1; transform: translate(0, -50%); }
@keyframes puls { 0% { opacity: 0.95; transform: scale(1); } 100% { opacity: 0; transform: scale(2.5); } }

/* Hebel an der Säule */
.hebel {
  position: absolute; left: 50%; top: calc(332 / 6.4 * 1%);
  transform: translateX(-50%); pointer-events: auto;
}
.hebel-schale {
  padding: 5px; border-radius: 21px;
  background: rgba(10, 11, 13, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 18px 40px -14px rgba(0, 0, 0, 0.7);
}
.hebel-kasten {
  position: relative; display: block; width: 54px; height: calc(var(--lauf) + 52px);
  border-radius: 16px;
  background: linear-gradient(180deg, #383C42, #25282C);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  touch-action: none; cursor: ns-resize; -webkit-tap-highlight-color: transparent;
}
.hebel-schlitz {
  position: absolute; left: 50%; top: 14px; bottom: 14px; width: 8px; margin-left: -4px;
  border-radius: 4px; background: #0B0C0E; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hebel-griff {
  position: absolute; left: 6px; right: 6px; top: 6px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(180deg, #FFE660, #FFD400 55%, #D8B100);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  transform: translateY(calc((1 - var(--hebel)) * var(--lauf)));
  cursor: grab;
}
.hebel-griff::before {
  content: ""; position: absolute; left: 11px; right: 11px; top: 50%; height: 11px; margin-top: -5.5px;
  background: repeating-linear-gradient(180deg, rgba(17, 17, 17, 0.6) 0 2px, transparent 2px 4.5px);
  border-radius: 2px;
}
.held .hebel-griff:focus-visible { outline: 3px solid var(--gelb); outline-offset: 5px; border-radius: 13px; }
.hebel-tipp {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--gelb); color: var(--schwarz);
  font-weight: 780; font-stretch: 88%; font-size: 0.92rem; line-height: 1.2;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.7);
  transition: opacity 0.5s var(--feder);
  pointer-events: none;
}
.hebel-tipp::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: var(--gelb); transform: rotate(45deg); border-radius: 0 0 2px 0;
}
.hebel-tipp svg { width: 15px; height: 15px; }
.hebel.benutzt .hebel-tipp { opacity: 0; }

/* Werkstatt-Karte zum angetippten Teil */
.werkstattkarte { position: absolute; left: 0; top: 0; z-index: 6; width: min(320px, calc(100vw - 32px)); }
.wk-schale {
  padding: 6px; border-radius: 26px;
  background: rgba(14, 15, 17, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 212, 0, 0.3), 0 34px 70px -26px rgba(0, 0, 0, 0.8);
  opacity: 0; transform: translateY(10px) scale(0.96);
  transition: opacity 0.3s var(--feder), transform 0.55s var(--schwung);
}
.werkstattkarte.ist-auf .wk-schale { opacity: 1; transform: none; }
.wk-kern {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
  padding: 18px 18px 18px 20px; border-radius: 20px;
  background: var(--putz); color: var(--schwarz);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.wk-ort { font-size: 0.8rem; font-weight: 720; letter-spacing: 0.07em; text-transform: uppercase; color: #565A5F; padding-right: 40px; }
.wk-titel { font-size: 1.7rem; font-weight: 900; font-stretch: 74%; line-height: 1; letter-spacing: -0.01em; padding-right: 30px; }
.wk-titel:focus { outline: none; }
.wk-satz { font-size: 1rem; line-height: 1.45; color: #2B2E33; margin-bottom: 6px; }
.held .wk-anruf { width: 100%; justify-content: space-between; min-height: 52px; padding: 0 6px 0 20px; background: var(--schwarz); color: var(--gelb); }
.held .wk-anruf:hover { background: #000; }
.held .wk-anruf .knopf-kreis { width: 40px; height: 40px; background: var(--gelb); color: var(--schwarz); }
.wk-zu {
  all: unset; box-sizing: border-box; position: absolute; top: 6px; right: 6px;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  transition: transform 0.5s var(--schwung);
}
.wk-zu svg { width: 16px; height: 16px; }
.wk-zu:hover { transform: rotate(90deg); }
.held .werkstattkarte :focus-visible { outline: 3px solid var(--schwarz); outline-offset: 2px; }

/* Schild: Am Auto zeigen */
.hinten-fuss { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 6px; margin-top: -4px; }
.hinten-fuss .zurueck { padding: 0 6px; }
.am-auto {
  all: unset; box-sizing: border-box; cursor: pointer;
  min-height: 44px; padding: 0 13px; display: inline-flex; align-items: center; white-space: nowrap;
  border-radius: 999px; box-shadow: inset 0 0 0 2px var(--schwarz);
  font-weight: 720; font-size: 0.9rem;
  transition: transform 0.5s var(--feder);
}
.am-auto:active { transform: scale(0.97); }
.am-auto:focus-visible { outline: 3px solid var(--schwarz); outline-offset: 2px; }

/* Einstieg der Bedienung (nach dem Tor) */
@media (prefers-reduced-motion: no-preference) {
  .js .punkte { animation: einblenden 0.6s var(--feder) 1.35s backwards; }
  .js .hebel { animation: einblenden 0.6s var(--feder) 1.15s backwards; }
  .js .held.bereit .punkt.sichtbar .punkt-kern::before { animation: puls 1.5s var(--feder) 1; }
}
@keyframes einblenden { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .punkt, .punkt-kern, .punkt-name, .wk-schale, .lampe, .wz, .hl, .hebel-tipp, .wk-zu, .am-auto { transition: none !important; }
  .lampe { display: none; }
}

/* Handy: kürzerer Hub, kleinerer Hebel, Namen nur in der Karte */
@media (max-width: 760px) {
  .held { --bw: 112vw; --weg: 140; --lauf: 46px; }
  .held-innen { padding-bottom: calc(var(--bw) * 0.47 + var(--unter) + var(--tief)); }
  .hebel { top: calc(318 / 6.4 * 1%); }
  .hebel-schale { padding: 3px; border-radius: 16px; background: rgba(10, 11, 13, 0.6); }
  .hebel-kasten { width: 42px; border-radius: 13px; height: calc(var(--lauf) + 46px); }
  .hebel-griff { left: 5px; right: 5px; top: 6px; height: 34px; border-radius: 9px; }
  .hebel-griff::before { left: 9px; right: 9px; }
  .hebel-schlitz { width: 6px; margin-left: -3px; top: 12px; bottom: 12px; }
  .hebel-tipp { font-size: 0.84rem; padding: 6px 12px 6px 9px; bottom: calc(100% + 10px); }
  .punkt-name { display: none; }
  .punkt-kern { width: 22px; height: 22px; box-shadow: 0 0 0 2px var(--gelb), 0 0 0 5px rgba(255, 212, 0, 0.2), 0 6px 14px rgba(0, 0, 0, 0.4); }
  .punkt-kern::after { inset: 7px; }
  .punkt.aktiv .punkt-kern { box-shadow: 0 0 0 3px var(--schwarz), 0 0 0 7px rgba(255, 212, 0, 0.45); }
  .lampe { display: none; }
}
