/* Scroll-driven building walkthrough (test page). Loaded after site.css. */

.walk {
  position: relative;
  height: 1000vh;            /* scroll distance for the whole sequence */
  padding: 0;                /* site.css pads every <section>; the stage must start at the top */
  background: var(--black);
}
/* The stage fills the screen below the sticky nav, so nothing hides behind it. */
.walk-stage {
  position: sticky;
  top: var(--nav-h, 76px);
  height: calc(100vh - var(--nav-h, 76px));
  height: calc(100svh - var(--nav-h, 76px));
  overflow: hidden;
  background: var(--black);
}
.walk-canvas { position: relative; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 450ms ease-out; }
.walk-live .walk-canvas { opacity: 1; }
/* Still of the opening shot, on screen at once while the live scene starts up. */
.walk-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .walk-canvas { transition: none; } }
.walk-black {
  position: absolute; inset: 0;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
}

.walk-intro {
  position: absolute;
  left: clamp(1.25rem, 4vw, 3rem);
  top: clamp(1.25rem, 4vh, 2.5rem);
  max-width: 30rem;
  pointer-events: none;
}
.walk-intro h1, .walk-intro h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  margin: 0.7rem 0 0.6rem;
}
.walk-intro p { color: var(--muted-on-dark); font-size: 0.98rem; margin: 0; }

.walk-hud {
  position: absolute;
  left: clamp(1.25rem, 4vw, 3rem);
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  color: var(--white);
  pointer-events: none;
}
.walk-hud-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.walk-readout { min-width: 0; }
.walk-step {
  display: flex; align-items: baseline; gap: 0.9rem;
  font-weight: 700;
}
.walk-step [data-walk-num] {
  font-size: 0.72rem; letter-spacing: 0.14em; color: #7FB2E0;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.walk-step [data-walk-name] { font-size: 1.15rem; letter-spacing: -0.01em; }

.walk-nav { display: flex; gap: 0.5rem; flex: none; pointer-events: auto; }
.walk-arrow {
  display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  color: var(--white);
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 150ms ease, background 150ms ease;
}
.walk-arrow:active { transform: scale(0.95); }
.walk-arrow:disabled { opacity: 0.35; cursor: default; transform: none; }
.walk-arrow:focus-visible { outline: 2px solid var(--focus-on-dark); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .walk-arrow:not(:disabled):hover { border-color: #7FB2E0; background: rgba(59, 121, 180, 0.3); }
}
@media (prefers-reduced-motion: reduce) { .walk-arrow:active { transform: none; } }
.walk-bar {
  margin-top: 0.9rem;
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
}
.walk-bar i {
  display: block; height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.walk-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 2rem; margin: 0;
  color: var(--muted-on-dark); text-align: center;
}
.walk-fallback[hidden] { display: none; }
.walk-nogl .walk-hud, .walk-nogl .walk-intro { display: none; }

.walk-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Data labels pinned to the model. Positions are set from script every frame. */
.walk-label-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.walk-label { position: absolute; left: 0; top: 0; opacity: 0; visibility: hidden; }
.walk-label > * { position: absolute; left: 0; top: 0; will-change: transform; }
.wl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 2px #7FB2E0, 0 0 0 5px rgba(10, 10, 10, 0.45);
}
.wl-line { height: 1px; margin-top: -0.5px; background: #7FB2E0; transform-origin: 0 50%; }
.wl-chip {
  padding: 0.45rem 0.7rem 0.5rem;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 2px solid #7FB2E0;
  border-radius: var(--radius);
  white-space: nowrap;
  color: var(--white);
}
.wl-top { display: flex; align-items: center; gap: 0.5rem; }
.wl-tag {
  font-size: 0.69rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.05rem 0.4rem; border-radius: 2px; line-height: 1.5;
}
.wl-cope { color: #0A0A0A; background: #7FB2E0; }
.wl-natcat { color: var(--white); background: var(--teal); }
.wl-thermal { color: #0A0A0A; background: #F8A01C; }
.wl-field { font-size: 0.69rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.wl-value { margin-top: 0.2rem; font-size: 0.98rem; font-weight: 700; letter-spacing: -0.005em; }
@media (max-width: 600px) {
  .wl-chip { padding: 0.35rem 0.55rem 0.4rem; }
  .wl-value { font-size: 0.9rem; }
}
/* Phones: one line per tag so the building stays visible behind them. */
@media (max-width: 600px) {
  .wl-chip { display: flex; align-items: center; gap: 0.45rem; }
  .wl-field { display: none; }
  .wl-value { margin-top: 0; font-size: 0.84rem; }
}
/* Scrim so the step readout stays legible over bright interiors. */
.walk-hud::before {
  content: ""; position: absolute; z-index: -1;
  left: -100vw; right: -100vw; bottom: -4rem; height: 12rem;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.78), rgba(10, 10, 10, 0));
  pointer-events: none;
}

/* Help panel on each tag: hover with a mouse, tap on touch. */
.wl-chip { pointer-events: auto; cursor: help; }
.walk-label.is-open { z-index: 5; }
.walk-label.is-open .wl-chip { border-color: rgba(255, 255, 255, 0.5); background: rgba(10, 10, 10, 0.94); }
.wl-i {
  display: inline-grid; place-items: center;
  width: 15px; height: 15px; margin-left: 0.45rem; vertical-align: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 50%;
  font-size: 0.62rem; font-weight: 700; font-style: normal; line-height: 1; color: rgba(255, 255, 255, 0.85);
}
.wl-tip {
  position: absolute; left: 0; top: 100%;
  width: min(280px, calc(100vw - 32px));
  padding: 0.75rem 0.85rem 0.8rem;
  background: #0A0A0A;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  white-space: normal; text-align: left; pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 150ms var(--ease-out, ease-out), transform 150ms var(--ease-out, ease-out), visibility 0s 150ms;
}
.walk-label.is-open .wl-tip { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.wl-tip-title { font-size: 0.86rem; font-weight: 700; margin-bottom: 0.5rem; }
.wl-tip-h { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #7FB2E0; margin-top: 0.55rem; }
.wl-tip p { margin: 0.15rem 0 0; font-size: 0.82rem; font-weight: 400; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
.wl-tip .wl-tip-note { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.74rem; color: rgba(255, 255, 255, 0.62); }
@media (prefers-reduced-motion: reduce) { .wl-tip { transition: none; transform: none; } }

/* Way past the walkthrough for readers who want the page below it. */
.walk-skip {
  position: absolute; top: clamp(1rem, 3vh, 1.75rem); right: clamp(1.25rem, 4vw, 3rem);
  min-height: 44px; padding: 0 0.95rem;
  font: inherit; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--white); background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--radius);
  cursor: pointer; transition: transform 160ms ease-out, background-color 160ms ease-out;
}
.walk-skip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .walk-skip:hover { background: rgba(255, 255, 255, 0.14); } }
.walk-skip:focus-visible { outline: 2px solid var(--focus-on-dark, #7FB2E0); outline-offset: 2px; }
/* No script or no WebGL: one screen with the still, not ten screens of empty scroll. */
html:not(.js) .walk, .walk-nogl { height: calc(100svh - var(--nav-h, 76px)); }
html:not(.js) .walk-hud, html:not(.js) .walk-skip, .walk-nogl .walk-skip { display: none; }
@media (max-width: 600px) { .walk-intro { top: 4.6rem; } }

.walk { scroll-margin-top: var(--nav-h, 76px); }
