/* The small per-Einsatzort 3D hero: one landmark, one parked Meissner van,
   full-bleed beneath the page's own H1/intro, same borderless white-floor
   treatment as the main Einsatzgebiet animation so every page in the group
   still feels like one product. */

/* Replaces the site's old blue-banner .hero for these pages - plain white,
   same kicker/H1/intro rhythm as the Einsatzgebiet section on the landing
   page, so an Einsatzort page reads as the same product as the homepage. */
.location-hero-section {
  padding: clamp(36px, 5vw, 72px) 0 8px;
  background: #fff;
}

.location-hero-frame {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 22px 0 0;
  background: #fff;
}

.location-hero-stage {
  position: relative;
  width: 100%;
  /* Tall enough for a single building to read. Full-bleed and shallow gives a
     frame around 3.7:1, and one landmark can only ever fill a third of that -
     the camera fits to the height, so everything else is empty white. */
  height: clamp(360px, 62vh, 620px);
  overflow: hidden;
  background: #fff;
  contain: layout paint;
}

.location-hero-stage canvas {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

/* Pre-rendered still at the camera's starting angle (see location-boot.js).
   It paints with the page; the live canvas, when it runs at all, fades in on
   top once its first frame is drawn. */
.location-hero-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.location-hero-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.location-hero-stage.has-poster canvas {
  opacity: 0;
  transition: opacity 0.6s ease;
}
/* .is-live: first frame drawn with the logo on it (see location-hero.js reveal()). */
.location-hero-stage.has-poster.is-live canvas {
  opacity: 1;
}
.location-hero-stage.has-poster:not(.is-ready)::before {
  display: none;
}

.location-hero-note {
  max-width: 720px;
  margin: 18px auto 0;
  padding: 0 20px;
  text-align: center;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.6;
  color: var(--muted, #5b636c);
}

.location-hero-note strong {
  color: var(--headline-tone, #23272e);
}

/* --------------------------------------------------------------- fallback */

.location-hero-fallback {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: #fff;
  color: #23272e;
}

.location-hero-stage.is-unsupported .location-hero-fallback {
  display: flex;
}

.location-hero-fallback img {
  width: min(220px, 55%);
  height: auto;
}

.location-hero-fallback p {
  margin: 0;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.6;
  color: #5b636c;
}

/* ------------------------------------------------------------ loading hint */

.location-hero-stage:not(.is-ready)::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 3px solid rgba(207, 31, 40, 0.2);
  border-top-color: var(--brand, #cf1f28);
  animation: locationHeroSpin 0.9s linear infinite;
}

@keyframes locationHeroSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .location-hero-stage {
    height: clamp(300px, 48vh, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .location-hero-stage:not(.is-ready)::before {
    animation: none;
  }
}

/* ------------------------------------------------------------ trade scenes */

/* Maler and Fliesenleger pages show a whole work story (trade/stage.js), not a
   single landmark - a little more height so interiors can be read. */
.location-hero-stage[data-trade] {
  height: clamp(420px, 66vh, 680px);
}

.trade3d-ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* Chapter caption: what the visitor is looking at right now. */
.trade3d-caption {
  position: absolute;
  left: max(16px, calc((100% - 1200px) / 2 + 20px));
  bottom: 22px;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: calc(100% - 32px - 200px);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 20px rgba(24,25,27, 0.08);
  backdrop-filter: blur(6px);
  font-size: 14px;
  line-height: 1.35;
  color: var(--headline-tone, #23272e);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.location-hero-stage.is-live .trade3d-caption { opacity: 1; }

.trade3d-ui.is-swap .trade3d-caption span { animation: trade3dSwap 0.5s ease both; }

.trade3d-step {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand, #cf1f28);
}

.trade3d-label { font-weight: 600; }

@keyframes trade3dSwap {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Story progress: a hairline along the bottom edge. Only transformed, never
   resized, so it costs no layout per frame. */
.trade3d-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(24,25,27, 0.06);
}

.trade3d-progress span {
  display: block;
  height: 100%;
  background: var(--brand, #cf1f28);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.trade3d-replay {
  position: absolute;
  right: max(16px, calc((100% - 1200px) / 2 + 20px));
  bottom: 22px;
  pointer-events: auto;
  padding: 9px 16px;
  border: 1px solid rgba(24,25,27, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--headline-tone, #23272e);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(24,25,27, 0.08);
}

.trade3d-replay::before { content: "↻ "; color: var(--brand, #cf1f28); }
.trade3d-replay:hover { border-color: rgba(207, 31, 40, 0.45); }
.trade3d-replay:focus-visible { outline: 3px solid rgba(207, 31, 40, 0.5); outline-offset: 3px; }

.location-hero-stage.is-static .trade3d-progress,
.location-hero-stage.is-static .trade3d-replay { display: none; }

@media (max-width: 640px) {
  .location-hero-stage[data-trade] { height: clamp(340px, 54vh, 480px); }
  .trade3d-caption { bottom: 14px; font-size: 13px; max-width: calc(100% - 32px); }
  .trade3d-replay { bottom: auto; top: 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .trade3d-ui.is-swap .trade3d-caption span { animation: none; }
}

/* ------------------------------------------------- local content block */

/* Distance, building types, frequent services and FAQ per town
   (scripts/generate-location-pages.mjs). */
.ort-inhalt { padding: clamp(28px, 4vw, 56px) 0; }
.ort-inhalt .section-header p { max-width: 74ch; margin-left: auto; margin-right: auto; }

.ort-inhalt__grid {
  display: grid;
  gap: 24px 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  margin-top: 28px;
}

.ort-inhalt h3 {
  margin: 0 0 12px;
  font-size: clamp(18px, 1.8vw, 21px);
  font-weight: 800;
  color: var(--headline-tone, #23272e);
}

.ort-inhalt p { line-height: 1.7; color: var(--muted, #5b636c); }
.ort-inhalt a { color: var(--brand, #cf1f28); font-weight: 700; }

.ort-inhalt__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ort-inhalt__list li {
  padding: 14px 16px;
  border: 1px solid rgba(24,25,27, 0.1);
  border-left: 3px solid var(--brand, #cf1f28);
  border-radius: 10px;
  background: #fff;
  line-height: 1.6;
  color: var(--muted, #5b636c);
}
.ort-inhalt__list strong { color: var(--headline-tone, #23272e); }

.ort-faq { margin-top: 34px; max-width: 860px; margin-left: auto; margin-right: auto; }
.ort-faq__item {
  border: 1px solid rgba(24,25,27, 0.12);
  border-radius: 12px;
  background: #fff;
  margin-top: 10px;
}
.ort-faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 18px;
  font-weight: 700;
  color: var(--headline-tone, #23272e);
  position: relative;
}
.ort-faq__item summary::-webkit-details-marker { display: none; }
.ort-faq__item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--brand, #cf1f28);
}
.ort-faq__item[open] summary::after { content: "–"; }
.ort-faq__item summary:focus-visible { outline: 3px solid rgba(207, 31, 40, 0.5); outline-offset: 2px; border-radius: 12px; }
.ort-faq__item p { margin: 0; padding: 0 18px 16px; }
