/* ==========================================================================
   AUTOHAUS SENKAN — walkthrough.css
   Fixed video layer behind the sections #showroom … #haendler (js/walkthrough.js)
   and its HUD label. main.js sets the opacity (dip to black at both ends).
   ========================================================================== */

/* lvh: a mobile address bar showing / hiding no longer re-zooms the cover-fitted video (css/main.css .webgl) */
.walk {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-webgl);
  height: 100vh; height: 100lvh;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
  opacity: 0; visibility: hidden;
  contain: strict;
}

/* video, frozen frame (orientation swap) and posters share the cover framing */
.walk__video,
.walk__still,
.walk__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
}
/* poster to poster (fallback and loading) and poster to video are cuts – never a crossfade */
.walk__poster { opacity: 0; }
.walk__poster.is-on { opacity: 1; }
.walk.is-video .walk__poster { visibility: hidden; }

/* Legibility: an even tint plus a soft vignette; the sections add scrims behind their copy */
.walk::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(130% 95% at 50% 45%, rgba(6, 6, 7, 0) 34%, rgba(6, 6, 7, 0.6) 100%),
    rgba(6, 6, 7, 0.32);
}

/* AI disclosure (EU AI Act Art. 50): visible whenever the walk is, text from manifest.label */
.walk-hud {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-hud);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 2 * var(--gutter));
  margin: 0; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(6, 6, 7, 0.82);
  font-family: var(--font-mono); font-size: 10px; line-height: 1.3;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0; visibility: hidden;
}
/* shown at the first exposure only, then faded out for good (main.js initWalkLabel) – beats the inline opacity */
.walk-hud.is-done { opacity: 0 !important; visibility: hidden !important; transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
.walk-hud::before {
  content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--bronze-hi);
}

@media (min-width: 761px) and (max-width: 960px) and (orientation: portrait) and (pointer: fine) {
  /* narrow portrait windows: between the speedo (left) and gear + place (right) it is tight – sit above them.
     Not on touch tablets (no speedo there, css/main.css – lifted, the pill covered headings) and not on
     landscape phones (844×390 …): there the label fits between them, and 104px up would cover the copy. */
  .walk-hud { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
}

/* Portrait tablets (3:4 …): the 9:16 portrait source is cut at top and bottom, and centred the cut took the
   signs at the top of the frame ("SENKAN" at the entrance, "INFORMATION / SERVICE"). Cut more off the floor
   instead. Phones are narrower than 9:16: there the cut is at the sides and this changes nothing. */
@media (orientation: portrait) and (min-aspect-ratio: 3/5) {
  .walk__video, .walk__still, .walk__poster { object-position: 50% 25%; }
}

@media (max-width: 760px) {
  /* the speedo HUD is hidden on phones; the contact dock (WhatsApp / e-mail) owns the right corner.
     The disclosure is never cut off: it wraps (11px – at 9px it was hard to read). */
  .walk-hud {
    left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: none;
    max-width: calc(100vw - 92px);
    padding: 5px 10px 5px 9px;
    border-radius: 12px;
    font-size: 11px; letter-spacing: 0.06em;
    white-space: normal;
  }
}

@media print {
  .walk, .walk-hud { display: none !important; }
}
