/* Tour page: street-view style step-by-step walk + gallery */
.site-nav a.active { color: var(--brass-light); }
.tour-body { background: #04130e; }

/* ---------- Stage ---------- */
.walk { position: relative; background: #000; overflow: hidden; isolation: isolate; }
.walk-bg { position: absolute; inset: -6%; background-size: cover; background-position: center; filter: blur(34px) brightness(0.4) saturate(1.2); transition: background-image 0.8s ease; z-index: 0; }
.walk-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, auto); justify-items: center; gap: 1.25rem; justify-content: center; align-items: start; padding: clamp(0.6rem, 1.5vw, 1.2rem) clamp(0.6rem, 2vw, 1.5rem); }

.walk-view {
  position: relative; height: min(80vh, 840px); aspect-ratio: 9 / 16; max-width: 100%;
  border-radius: 22px; overflow: hidden; background: #000; user-select: none;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(246,241,231,0.08);
}
.frames { position: absolute; inset: 0; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1); will-change: opacity, transform; }
.frame.show { opacity: 1; }
.walk-layout > * { min-width: 0; }
.walk-side, .chapter-list, .map-card { min-width: 0; }
/* forward: the old frame pushes in while the new one fades up – feels like a step */
.frame.out-fwd { animation: pushIn 0.55s ease forwards; }
.frame.in-fwd { animation: arriveFwd 0.55s ease forwards; }
.frame.out-back { animation: pullOut 0.55s ease forwards; }
.frame.in-back { animation: arriveBack 0.55s ease forwards; }
@keyframes pushIn     { from { opacity: 1; transform: scale(1); }    to { opacity: 0; transform: scale(1.12); } }
@keyframes arriveFwd  { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes pullOut    { from { opacity: 1; transform: scale(1); }    to { opacity: 0; transform: scale(0.92); } }
@keyframes arriveBack { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .frame { animation: none !important; transition: opacity 0.3s; } }

.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%), linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 24%, transparent 72%, rgba(0,0,0,0.45) 100%); }

.walk-caption { position: absolute; left: 0; right: 0; top: 0; padding: 2.2rem 1.1rem 0; display: flex; flex-direction: column; gap: 0.15rem; color: var(--cream); text-shadow: 0 1px 8px rgba(0,0,0,0.7); pointer-events: none; z-index: 2; }
.walk-chapter-no { position: absolute; left: 1.1rem; top: 1rem; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass-light); font-weight: 700; }
.walk-caption strong { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 2rem); letter-spacing: 0.04em; line-height: 1; }
.walk-caption span:last-child { font-size: 0.85rem; color: var(--cream-dim); max-width: 34ch; line-height: 1.35; }

/* click zones */
.zone { position: absolute; top: 0; bottom: 0; background: none; border: none; cursor: pointer; z-index: 1; color: var(--cream); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3.2rem; }
.zone:focus-visible { outline: 2px solid var(--brass); outline-offset: -4px; }
.zone-back { left: 0; width: 22%; align-items: center; padding: 0; opacity: 0; transition: opacity 0.2s; background: linear-gradient(to right, rgba(0,0,0,0.35), transparent); }
.zone-back span { font-size: 1.6rem; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }
.walk-view:hover .zone-back { opacity: 1; }
.zone-fwd { left: 22%; right: 0; flex-direction: column; gap: 0.2rem; }
.chevron { display: block; width: 46px; height: 46px; position: relative; opacity: 0.85; animation: bob 1.8s ease-in-out infinite; }
.chevron i { position: absolute; left: 50%; width: 22px; height: 22px; border-left: 3px solid var(--cream); border-top: 3px solid var(--cream); transform: translateX(-50%) rotate(45deg); filter: drop-shadow(0 1px 3px rgba(0,0,0,0.9)); }
.chevron i:first-child { top: 4px; } .chevron i:last-child { top: 18px; opacity: 0.6; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.zone-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,0.9); opacity: 0.85; }
.zone-fwd:hover .chevron, .zone-fwd:hover .zone-label { opacity: 1; }
.walk-view.at-end .zone-fwd { display: none; }

.stop-counter { position: absolute; right: 0.9rem; top: 0.95rem; font-size: 0.72rem; color: var(--cream-dim); background: rgba(0,0,0,0.5); padding: 0.25rem 0.55rem; border-radius: 999px; z-index: 2; font-variant-numeric: tabular-nums; }

/* intro overlay */
.walk-intro { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; background: linear-gradient(to bottom, rgba(6,35,26,0.55), rgba(6,35,26,0.88)); backdrop-filter: blur(2px); transition: opacity 0.7s ease, visibility 0.7s; }
.walk-intro.hide { opacity: 0; visibility: hidden; }
.walk-intro-logo { height: 110px; margin-bottom: 0.5rem; filter: drop-shadow(0 0 2px rgba(246,241,231,0.95)) drop-shadow(0 0 12px rgba(246,241,231,0.35)); animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.walk-intro h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 0.95; margin: 0.2rem 0 0.6rem; }
.walk-intro p.muted { max-width: 30ch; font-size: 0.95rem; }
.walk-intro .btn { margin-top: 0.8rem; min-width: 220px; justify-content: center; }
.walk-intro-hint { margin-top: 0.8rem; font-size: 0.75rem; color: var(--muted); }

/* ---------- Side panel ---------- */
.walk-side { display: flex; flex-direction: column; gap: 0.8rem; width: 100%; }
.map-card { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 16px; padding: 0.8rem 0.9rem; backdrop-filter: blur(6px); }
.map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.4rem; }
.map { width: 100%; height: auto; display: block; }
.map-room { fill: rgba(246,241,231,0.06); stroke: rgba(246,241,231,0.28); stroke-width: 1; rx: 6; transition: fill 0.4s, stroke 0.4s; }
.map-room.on { fill: rgba(214,165,76,0.22); stroke: var(--brass); }
.map-label { font: 700 8.5px Inter, sans-serif; fill: var(--cream-dim); letter-spacing: 0.04em; pointer-events: none; }
.map-room-g { cursor: pointer; }
.map-room-g:hover .map-room { stroke: var(--cream); }
.map-trail { fill: none; stroke: rgba(246,241,231,0.25); stroke-width: 2.2; stroke-dasharray: 3 4; stroke-linecap: round; stroke-linejoin: round; }
.map-done { fill: none; stroke: var(--brass); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: d 0.4s; }
.map-you { fill: var(--green); stroke: #fff; stroke-width: 1.5; transition: cx 0.45s ease, cy 0.45s ease; }
.map-door { font: 700 8px Inter, sans-serif; fill: var(--brass-light); }

.walk-controls { display: flex; flex-direction: column; gap: 0.55rem; background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 16px; padding: 0.8rem 0.9rem; backdrop-filter: blur(6px); }
.walk-transport { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.5rem; }
.walk-transport .btn { justify-content: center; padding: 0.7rem 0.9rem; }
.walk-extra { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
#btnAuto.on { background: var(--green-soft); border-color: rgba(62,201,138,0.5); color: #9ef0c6; }
.walk-progress { position: relative; height: 22px; cursor: pointer; display: flex; align-items: center; }
.walk-progress::before { content: ''; position: absolute; left: 0; right: 0; height: 5px; border-radius: 999px; background: rgba(246,241,231,0.18); }
.walk-progress-fill { position: absolute; left: 0; height: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--brass), var(--brass-light)); width: 0; box-shadow: 0 0 12px rgba(214,165,76,0.5); transition: width 0.3s; }
.walk-progress-ticks { position: absolute; left: 0; right: 0; height: 100%; }
.walk-progress-ticks i { position: absolute; top: 50%; width: 3px; height: 13px; margin-left: -1.5px; transform: translateY(-50%); background: rgba(246,241,231,0.55); border-radius: 2px; }

.chapter-list { display: flex; flex-direction: column; gap: 0.35rem; }
.chapter { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 0.6rem; padding: 0.35rem 0.6rem 0.35rem 0.35rem; border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,0.35); color: var(--cream-dim); cursor: pointer; text-align: left; transition: all 0.15s; }
.chapter img { width: 40px; height: 54px; object-fit: cover; border-radius: 8px; display: block; background: #111; }
.chapter b { display: block; font-size: 0.82rem; color: var(--cream); }
.chapter small { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.chapter .n { font-family: var(--font-display); font-size: 1.1rem; color: var(--muted); }
.chapter:hover { border-color: rgba(246,241,231,0.35); }
.chapter.on { background: rgba(214,165,76,0.16); border-color: var(--brass); }
.chapter.on b, .chapter.on .n { color: var(--brass-light); }

/* full screen */
.walk:fullscreen .walk-layout { height: 100vh; align-items: center; }
.walk:fullscreen .walk-view { height: 96vh; }

/* ---------- Below the fold ---------- */
.tour-main { padding-top: 2.5rem; }
.tour-intro h2, .gallery-section h2 { font-size: 2.4rem; }
.tour-intro > p { max-width: 760px; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem; margin: 1.25rem 0 3rem; }
.area-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 3; cursor: pointer; background: #000; text-align: left; padding: 0; }
.area-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.area-card:hover img { transform: scale(1.06); }
.area-card .lbl { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.8rem 0.9rem; background: linear-gradient(to top, rgba(6,35,26,0.95), transparent); color: var(--cream); }
.area-card .lbl strong { display: block; font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.04em; }
.area-card .lbl span { font-size: 0.8rem; color: var(--cream-dim); }
.area-card .lbl em { font-style: normal; font-size: 0.72rem; color: var(--brass-light); margin-left: 0.4rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 170px; grid-auto-flow: dense; gap: 0.6rem; margin-bottom: 3rem; }
.gallery button { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; padding: 0; background: #000; cursor: pointer; }
.gallery button.wide { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery button:hover img { transform: scale(1.05); }
.tour-cta { padding-bottom: 3rem; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 10px; box-shadow: var(--shadow); }
.lb-close { position: absolute; top: 1rem; right: 1.2rem; background: none; border: none; color: var(--cream); font-size: 2.4rem; cursor: pointer; line-height: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45); border: 1px solid var(--border); color: var(--cream); font-size: 2.2rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lb-caption { position: absolute; bottom: 1.2rem; left: 0; right: 0; text-align: center; color: var(--cream-dim); font-size: 0.9rem; margin: 0; }

@media (max-width: 900px) {
  .walk-layout { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .walk-view { height: auto; width: min(100%, 460px); aspect-ratio: 9 / 16; max-height: 78vh; border-radius: 16px; }
  .walk-side { max-width: 460px; }
  .chapter-list { flex-direction: row; overflow-x: auto; padding-bottom: 0.4rem; }
  .chapter { flex: 0 0 auto; grid-template-columns: 36px 1fr; }
  .chapter .n { display: none; }
  .chapter b { white-space: nowrap; }
  .chapter-list { width: 100%; }
  .zone-back { opacity: 1; background: none; width: 26%; }
  .zone-back span { opacity: 0.5; }
  .walk-caption strong { font-size: 1.5rem; }
  .gallery { grid-auto-rows: 120px; }
  .gallery button.wide { grid-column: span 1; }
  .lb-nav { width: 42px; height: 42px; font-size: 1.8rem; }
}

/* ---------- In-picture arrow bar: Back | Forward, equal size, centred at the bottom ---------- */
.zone { display: none; }
.arrow-bar {
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.85rem; z-index: 2;
  display: flex; align-items: stretch; padding: 0.25rem; border-radius: 999px; max-width: 300px; margin: 0 auto;
  background: rgba(6,35,26,0.6); border: 1px solid rgba(246,241,231,0.35); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.arrow {
  display: flex; align-items: center; gap: 0.4rem; flex: 1 1 0; min-width: 0; height: 46px; justify-content: center;
  border: none; border-radius: 999px; background: transparent; color: var(--cream); cursor: pointer;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.arrow:hover { background: rgba(214,165,76,0.9); color: var(--felt-900); }
.arrow:active { transform: scale(0.96); }
.arrow-glyph { font-size: 1.05rem; line-height: 1; }
.arrow-fwd { background: rgba(214,165,76,0.22); }
.arrow-fwd .arrow-glyph { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.arrow-sep { flex: 0 0 1px; margin: 0.5rem 0.2rem; background: rgba(246,241,231,0.25); }
.arrow[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }
.arrow[disabled] .arrow-glyph { animation: none; }
.walk-side { max-width: 380px; }
@media (max-width: 420px) { .arrow { height: 44px; font-size: 0.72rem; } }

/* ---------- Intro: nothing else shows until the walk starts; content stays centred on short screens ---------- */
.walk-view:not(.started) .walk-caption, .walk-view:not(.started) .arrow, .walk-view:not(.started) .stop-counter { visibility: hidden; }
.walk-intro { justify-content: center; overflow: hidden; gap: 0; }
.walk-intro-logo { height: clamp(64px, 13vh, 110px); margin-bottom: 0.3rem; }
.walk-intro .eyebrow { margin-bottom: 0.3rem; }
.walk-intro h1 { font-size: clamp(1.5rem, 3.6vh, 2.6rem); margin: 0.1rem 0 0.4rem; }
.walk-intro p.muted { font-size: clamp(0.8rem, 1.8vh, 0.95rem); margin-bottom: 0.2rem; }
.walk-intro .btn { margin-top: 0.5rem; }
.walk-intro-hint { margin-top: 0.5rem; }
