/* Nova Chiropractic - immersive office tour (Nova Immersive.html)
   Static markup, no React. Scroll-driven effects applied via tour.js. */

html, body { margin: 0; padding: 0; background: #000; font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
::selection { background: #B8945F; color: #FAF7F1; }
button { font-family: inherit; }
.tour-mono { font-family: var(--font-mono); text-transform: uppercase; }

@keyframes tourBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ── Fixed chrome ── */
.tour-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 28px; mix-blend-mode: difference; color: #fff;
}
.tour-logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: #fff; }
.tour-logo-mark { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; }
.tour-logo-sub { font-size: 9px; letter-spacing: 0.32em; opacity: 0.8; }
.tour-header-actions { display: flex; align-items: center; gap: 20px; }
.tour-classic-link { font-size: 9px; letter-spacing: 0.28em; color: #fff; text-decoration: none; opacity: 0.75; }
.tour-book-btn { display: inline-block; text-decoration: none; background: #fff; color: #000; border: 0; padding: 12px 20px; font-size: 10px; letter-spacing: 0.28em; cursor: pointer; }

/* ── Cinematic layer ── */
.tour-grain { position: fixed; inset: 0; z-index: 30; pointer-events: none; background-size: 140px 140px; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E"); }
.tour-vignette { position: fixed; inset: 0; z-index: 29; pointer-events: none; background: radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,0.32) 100%); }

.tour-skip { position: fixed; left: -9999px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 10px 14px; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; }
.tour-skip:focus { left: 8px; }

/* ── Progress rail ── */
.tour-rail { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 0; mix-blend-mode: difference; }
.tour-rail-item { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 24px; min-width: 24px; border: 0; padding: 0; cursor: pointer; background: transparent; color: #fff; }
.tour-rail-label { font-size: 8px; letter-spacing: 0.28em; opacity: 0; transition: opacity .35s ease; }
.tour-rail-dash { width: 9px; height: 2px; background: #fff; opacity: 0.4; transition: all .35s cubic-bezier(.22,1,.36,1); display: block; }
.tour-rail-item.active .tour-rail-label { opacity: 0.95; }
.tour-rail-item.active .tour-rail-dash { width: 26px; opacity: 1; }

/* ── Entrance ── */
/* Scenes overlap while pinned so each one can dissolve into the next (tour.js fades the upper one out).
   Each room adds 70vh of scrolling: 210vh tall, pulled up by 100vh + 40vh of overlap. Earlier scenes sit on top. */
.tour-entrance { height: 200vh; position: relative; z-index: 20; }
.tour-entrance-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #000; }
.tour-entrance-sticky img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transform-origin: 50% 56%; }
.tour-entrance-dark { position: absolute; inset: 0; background: #000; opacity: 0; }
.tour-entrance-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 9vh; text-align: center; color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,0.55); background: linear-gradient(to top, rgba(0,0,0,0.66) 0%, rgba(0,0,0,0.38) 34%, rgba(0,0,0,0) 62%); }
.tour-entrance-text .eyebrow { font-size: 10px; letter-spacing: 0.4em; }
.tour-entrance-text h1 { font-family: var(--font-display); font-size: clamp(56px, 9vw, 140px); line-height: 0.95; letter-spacing: -0.03em; margin: 16px 0 0; font-weight: 400; }
.tour-entrance-text p { font-size: 16px; max-width: 440px; line-height: 1.55; margin: 18px auto 0; opacity: 0.9; }
.tour-scroll-hint { font-size: 9px; letter-spacing: 0.35em; margin-top: 42px; opacity: 0.8; animation: tourBob 2.2s ease-in-out infinite; }

/* ── Room scenes ── */
.tour-room { height: 210vh; position: relative; }
/* The overlap only applies while tour.js is running (it does the fading); without it the rooms simply stack. */
.tour-js .tour-room { margin-top: calc(-100vh - 40vh); }
.tour-js .tour-room:has(+ .tour-end) { height: 170vh; }
/* Only the visible picture layer takes clicks/long-presses; the tall transparent section boxes let them through. */
.tour-entrance, .tour-room { pointer-events: none; }
.tour-entrance-sticky, .tour-room-sticky { pointer-events: auto; }
.tour-room:nth-of-type(2) { z-index: 19; } .tour-room:nth-of-type(3) { z-index: 18; } .tour-room:nth-of-type(4) { z-index: 17; }
.tour-room:nth-of-type(5) { z-index: 16; } .tour-room:nth-of-type(6) { z-index: 15; } .tour-room:nth-of-type(7) { z-index: 14; }
.tour-room:nth-of-type(8) { z-index: 13; } .tour-room:nth-of-type(9) { z-index: 12; } .tour-room:nth-of-type(10) { z-index: 11; }
.tour-room:nth-of-type(11) { z-index: 10; } .tour-room:nth-of-type(12) { z-index: 9; } .tour-room:nth-of-type(13) { z-index: 8; }
.tour-room-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #000; }
.tour-room-frame { position: absolute; inset: 0; }
.tour-room-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }
.tour-room-scrim { position: absolute; inset: 0; }
.tour-room[data-side="left"] .tour-room-scrim { background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.04) 70%); }
.tour-room[data-side="right"] .tour-room-scrim { background: linear-gradient(270deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.04) 70%); }
.tour-room[data-side="center"] .tour-room-scrim { background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.16) 45%, rgba(0,0,0,0.04) 75%); }

.tour-panel-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-start; padding: 0 5vw 9vh; }
.tour-room[data-side="right"] .tour-panel-wrap { justify-content: flex-end; }
.tour-room[data-side="center"] .tour-panel-wrap { align-items: flex-end; justify-content: center; }
/* Panel sits low over the floor so the room itself (e.g. the reception desk) stays visible */
.tour-room[data-panel="low"] .tour-panel-wrap { align-items: flex-end; padding-bottom: 5vh; }
.tour-room[data-panel="low"] .tour-room-scrim { background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.16) 40%, rgba(0,0,0,0.04) 70%); }

.tour-panel {
  max-width: 500px; color: #fff; text-align: left;
  background: rgba(12,10,8,0.32);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.14); border-top: 1px solid rgba(255,255,255,0.26);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  padding: 30px 34px 32px;
}
.tour-room[data-side="center"] .tour-panel { text-align: center; }
.tour-panel-meta { font-size: 10px; letter-spacing: 0.32em; color: var(--brass); display: flex; align-items: center; gap: 12px; justify-content: flex-start; }
.tour-room[data-side="center"] .tour-panel-meta { justify-content: center; }
.tour-panel-meta .dash { width: 22px; height: 1px; background: var(--brass); display: inline-block; }
.tour-panel-meta .dir { color: #fff; opacity: 0.85; }
.tour-panel h2 { font-family: var(--font-display); font-size: clamp(36px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.025em; margin: 16px 0 0; font-weight: 400; }
.tour-panel p { font-size: 16px; line-height: 1.6; margin: 14px 0 0; color: rgba(255,255,255,0.88); }

/* text panel reveal - the glass box fades, its lines cascade in (toggled by tour.js; without it the text simply shows) */
.tour-js .tour-panel { opacity: 0; transition: opacity .5s ease; }
.tour-js .tour-panel.on { opacity: 1; transition-duration: .6s; }
.tour-js .tour-panel > * { opacity: 0; transform: translateY(24px); transition: opacity .75s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1); }
.tour-js .tour-panel.on > * { opacity: 1; transform: none; }
.tour-js .tour-panel.on > *:nth-child(1) { transition-delay: .05s; }
.tour-js .tour-panel.on > *:nth-child(2) { transition-delay: .16s; }
.tour-js .tour-panel.on > *:nth-child(3) { transition-delay: .3s; }

/* ── End / booking ── */
.tour-end { background: var(--bone); color: var(--ink); padding: 120px 32px 80px; position: relative; z-index: 31; }
.tour-end-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.tour-end h2 { font-family: var(--font-display); font-size: clamp(52px, 7vw, 110px); line-height: 0.95; letter-spacing: -0.03em; margin: 24px 0 0; font-weight: 400; }
.tour-end > .tour-end-inner > p { font-size: 17px; color: rgba(20,17,14,0.65); max-width: 560px; margin: 24px auto 0; line-height: 1.6; }
.tour-end-actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.tour-end-actions .btn-fill { display: inline-block; text-decoration: none; background: var(--ink); color: var(--bone); border: 0; padding: 18px 30px; font-size: 11px; letter-spacing: 0.3em; cursor: pointer; }
.tour-end-actions .btn-line { color: var(--ink); border: 1px solid var(--line); padding: 18px 30px; font-size: 11px; letter-spacing: 0.3em; text-decoration: none; display: inline-block; }
.tour-end-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 90px; padding-top: 40px; border-top: 1px solid var(--line); text-align: left; }
.tour-end-label { font-size: 9px; letter-spacing: 0.3em; color: var(--brass-text); margin-bottom: 12px; }
.tour-end-value { font-size: 14px; line-height: 1.8; }
.tour-end-value a { color: inherit; text-decoration: none; }
.tour-end-reg { font-size: 13px; line-height: 1.7; color: rgba(20,17,14,0.66); margin-top: 70px; }
.tour-end-reg a { color: inherit; }
.tour-end-copyright { font-size: 9px; letter-spacing: 0.28em; color: rgba(20,17,14,0.66); margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .tour-js .tour-panel, .tour-js .tour-panel > * { transition: none; }
  .tour-js .tour-panel > * { opacity: 1; transform: none; }
  .tour-grain { display: none; }
  .tour-scroll-hint { animation: none; }
}

@media (max-width: 760px) {
  .tour-rail { display: none !important; }
  .tour-classic-link { display: none !important; }
  .tour-panel-wrap { padding: 0 16px 6vh !important; align-items: flex-end !important; justify-content: center !important; }
  .tour-panel { max-width: 100% !important; text-align: left !important; padding: 22px 22px 24px !important; }
  .tour-room[data-side="center"] .tour-panel { text-align: left !important; }
  .tour-end-info { grid-template-columns: 1fr !important; text-align: left; }
}

/* Smooth cross-page transition (progressive enhancement) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 3px; }
