/* =========================================================
   Virtual Room Tour · Cyber Building
   Uses tokens from style.css
   ========================================================= */

.tour-body { background: #05060f; overflow: hidden; height: 100vh; height: 100svh; }
.tour { position: fixed; inset: 0; color: #fff; overflow: hidden; background: #05060f; user-select: none; -webkit-user-select: none; }

/* ---------- Stage & scenes ---------- */
.tour__stage { position: absolute; inset: 0; perspective: 1100px; overflow: hidden; cursor: grab; touch-action: none; }
.tour__stage.is-dragging { cursor: grabbing; }
.tour__scene { position: absolute; inset: 0; will-change: transform, opacity; }
.tour__layer {
  position: absolute; left: 50%; top: 50%;
  transform-style: preserve-3d;
  will-change: transform;
}
.tour__layer > img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.tour__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(5,6,15,0) 45%, rgba(5,6,15,.55) 100%),
    linear-gradient(180deg, rgba(5,6,15,.65) 0%, rgba(5,6,15,0) 22%, rgba(5,6,15,0) 55%, rgba(5,6,15,.85) 100%);
}

/* ---------- Hotspots ---------- */
.spot {
  position: absolute; width: 0; height: 0; z-index: 2;
}
.spot__btn {
  position: absolute; left: -18px; top: -18px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font-size: 20px; line-height: 1;
  transition: transform .4s var(--ease), background-color .3s;
  cursor: pointer;
}
.spot__btn:hover, .spot.is-open .spot__btn { transform: scale(1.15); background: var(--bronze); border-color: var(--bronze); }
.spot__btn::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); animation: spotPulse 2.4s var(--ease) infinite; }
@keyframes spotPulse { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.spot__card {
  position: absolute; left: 28px; top: -14px; width: 250px;
  padding: 16px 18px; border-radius: 14px;
  background: rgba(12,16,39,.88); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  pointer-events: none;
}
.spot--left .spot__card { left: auto; right: 28px; }
.spot--up .spot__card { top: auto; bottom: -14px; }
.spot.is-open .spot__card { opacity: 1; visibility: visible; transform: none; }
.spot__card strong { display: block; font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.15; margin-bottom: 6px; }
.spot__card span { display: block; font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,.75); text-align: justify; }

/* walk hotspot */
.walk { position: absolute; width: 0; height: 0; z-index: 3; }
.walk__btn {
  position: absolute; left: -38px; top: -38px; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(215,20,29,.85); color: #fff; cursor: pointer;
  box-shadow: 0 10px 40px rgba(215,20,29,.45);
  transition: transform .5s var(--ease), background-color .3s;
}
.walk__btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.walk__btn::before, .walk__btn::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(215,20,29,.8); animation: walkPulse 2.2s var(--ease) infinite; }
.walk__btn::after { animation-delay: 1.1s; }
@keyframes walkPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
.walk__btn:hover { transform: scale(1.1); background: var(--red); }
.walk__label {
  position: absolute; left: 50%; top: 50px; transform: translateX(-50%);
  white-space: nowrap; font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 100px; background: rgba(12,16,39,.8); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  pointer-events: none;
}

/* ---------- Top bar ---------- */
.tour__top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--gutter);
}
.tour__actions { display: flex; gap: 10px; }
.tour__btn {
  height: 44px; padding: 0 18px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--display); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .3s, border-color .3s;
}
.tour__btn:hover { background: rgba(255,255,255,.2); }
.tour__btn svg { width: 18px; height: 18px; fill: currentColor; }
.tour__btn--icon { width: 44px; padding: 0; justify-content: center; }
.tour__btn--icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tour__btn .i-pause { display: none; }
.tour__btn[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.tour__btn[aria-pressed="true"] .i-play { display: none; }
.tour__btn[aria-pressed="true"] .i-pause { display: block; }

.tour__progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 21; background: rgba(255,255,255,.1); }
.tour__progress span { display: block; height: 100%; background: var(--red); transform-origin: left; transform: scaleX(0); transition: transform .8s var(--ease); }

/* ---------- Info ---------- */
.tour__info {
  position: absolute; left: var(--gutter); bottom: 150px; z-index: 10;
  width: min(460px, calc(100vw - 2 * var(--gutter)));
  pointer-events: none;
}
.tour__zone { font-family: var(--display); font-size: 11.5px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--bronze-light); margin-bottom: 12px; }
.tour__title { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.4vw, 64px); line-height: 1.02; }
.tour__desc { margin-top: 14px; color: rgba(255,255,255,.8); font-size: 15.5px; line-height: 1.6; text-align: justify; }
.tour__count { margin-top: 18px; font-family: var(--display); font-size: 12px; letter-spacing: .2em; color: rgba(255,255,255,.6); }
.tour__count span:first-child { color: #fff; font-weight: 600; }

/* ---------- Arrows ---------- */
.tour__nav { position: absolute; right: var(--gutter); bottom: 150px; z-index: 10; display: flex; gap: 10px; }
.tour__arrow {
  height: 56px; min-width: 56px; padding: 0 18px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.24);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color .3s, opacity .3s;
}
.tour__arrow:hover { background: rgba(255,255,255,.22); }
.tour__arrow:disabled { opacity: .35; cursor: default; }
.tour__arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tour__arrow--next { background: var(--red); border-color: var(--red); }
.tour__arrow--next:hover { background: var(--red-dark); }
.tour__arrow-label { font-family: var(--display); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Filmstrip ---------- */
.tour__strip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
  padding: 18px var(--gutter) 22px;
  scroll-padding-inline: var(--gutter);
}
.tour__strip::-webkit-scrollbar { display: none; }
.thumb {
  position: relative; flex: 0 0 auto; width: 132px; aspect-ratio: 16 / 10;
  border-radius: 10px; overflow: hidden; opacity: .5;
  outline: 2px solid transparent; outline-offset: 2px;
  transition: opacity .3s, outline-color .3s, transform .4s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px;
  font-size: 10.5px; line-height: 1.2; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}
.thumb:hover { opacity: .9; transform: translateY(-3px); }
.thumb.is-active { opacity: 1; outline-color: var(--red); }

/* ---------- Hint ---------- */
.tour__hint {
  position: absolute; left: 50%; top: 50%; z-index: 15;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 16px;
  max-width: min(460px, 86vw); padding: 18px 22px; border-radius: 16px;
  background: rgba(12,16,39,.8); border: 1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 14px; line-height: 1.55; text-align: justify;
  opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s;
  pointer-events: none;
}
.tour__hint.is-visible { opacity: 1; visibility: visible; }
.tour__hint-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #fff; position: relative; }
.tour__hint-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; animation: hintMove 1.8s ease-in-out infinite; }
@keyframes hintMove { 0%, 100% { transform: translateX(-9px); } 50% { transform: translateX(9px); } }

/* ---------- Intro ---------- */
.tour__intro { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--navy-deep); padding: var(--gutter); }
.tour__intro-bg { position: absolute; inset: 0; opacity: .35; }
.tour__intro-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(2px); transform: scale(1.05); }
.tour__intro::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(12,16,39,.55), rgba(12,16,39,.95)); }
.tour__intro-inner { position: relative; z-index: 1; width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; }
.tour__intro-logo { width: 96px; margin-bottom: 26px; }
.tour__intro .eyebrow { margin-bottom: 14px; }
.tour__intro-title { font-family: var(--serif); font-weight: 500; font-size: clamp(56px, 9vw, 110px); line-height: .95; text-align: center; }
.tour__intro-title em { color: var(--bronze-light); font-weight: 400; }
.tour__intro-text { margin: 24px 0 34px; color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.65; text-align: justify; text-align-last: center; }
.tour__intro-note { margin-top: 20px; font-size: 12.5px; color: rgba(255,255,255,.45); text-align: center; }
.tour__intro .btn:disabled { opacity: .6; cursor: progress; }

/* ---------- End card ---------- */
.tour__end { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: var(--gutter); background: rgba(5,6,15,.55); opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.tour__end.is-visible { opacity: 1; visibility: visible; }
.tour__end-card { width: min(520px, 100%); padding: clamp(28px, 4vw, 44px); border-radius: 22px; background: rgba(12,16,39,.9); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.tour__end-card h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.08; }
.tour__end-card h2 em { color: var(--bronze-light); }
.tour__end-card p:not(.eyebrow) { margin-top: 16px; color: rgba(255,255,255,.75); text-align: justify; }
.tour__end-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .tour__top { padding: 16px var(--gutter); }
  .tour__btn-label { display: none; }
  .tour__btn { width: 44px; padding: 0; justify-content: center; }
  .tour .brand__text { display: none; }
  .tour__info { bottom: 196px; }
  .tour__title { font-size: 34px; }
  .tour__desc { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tour__nav { left: var(--gutter); right: var(--gutter); bottom: 118px; }
  .tour__arrow--next { flex: 1; }
  .thumb { width: 104px; }
  .spot__card { width: 210px; }
  .walk__btn { left: -30px; top: -30px; width: 60px; height: 60px; }
  .walk__label { display: none; }
  .tour__info::before { content: ""; position: absolute; inset: -40px calc(-1 * var(--gutter)) -140px; z-index: -1; background: linear-gradient(180deg, rgba(5,6,15,0), rgba(5,6,15,.75) 35%); pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spot__btn::after, .walk__btn::before, .walk__btn::after, .tour__hint-icon::after { animation: none; }
}
