/* ==========================================================================
   360° Virtual Tour (/360-virtual-tour)
   Page-only layouts. Shared pieces come from components.css; values are tokens.
   ========================================================================== */

/* ── Hero: a live tour viewer, panning slowly under a compass ──────────── */
.vt-hero { position: relative; padding-bottom: var(--section-pad-tight); overflow-x: clip; isolation: isolate; }
.vt-hero__light { position: absolute; z-index: -1; inset: -15% -10% auto 40%; height: 120%; background: var(--light-spot); pointer-events: none; }
.vt-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6) var(--grid-gutter); align-items: center; }
@media (min-width: 1200px) { .vt-hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.vt-hero__copy { display: grid; gap: var(--sp-3); justify-items: start; }
.vt-hero__title { max-width: 14ch; }
.vt-hero__answer { color: var(--c-text); max-width: 54ch; }
.vt-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-1); }
@media (max-width: 575.98px) { .vt-hero__actions .btn { width: 100%; padding-inline: var(--sp-3); white-space: normal; text-align: center; text-wrap: balance; line-height: 1.2; } }
.js-motion .vt-hero__copy > * { animation: vt-rise var(--dur-slow) var(--ease-signature) backwards; }
.js-motion .vt-hero__copy > :nth-child(2) { animation-delay: var(--stagger-items); }
.js-motion .vt-hero__copy > :nth-child(3) { animation-delay: calc(var(--stagger-items) * 2); }
.js-motion .vt-hero__copy > :nth-child(n + 4) { animation-delay: calc(var(--stagger-items) * 3); }
@keyframes vt-rise { from { opacity: 0.01; transform: translateY(var(--reveal-rise)); } }

.pano { position: relative; display: grid; gap: var(--sp-2); margin: 0; min-width: 0; }
.js-motion .pano { animation: vt-on var(--dur-slow) var(--ease-signature) calc(var(--stagger-items) * 2) backwards; }
@keyframes vt-on { from { opacity: 0; filter: brightness(2) blur(6px); } }
.pano__frame { position: relative; aspect-ratio: 16 / 9; border: var(--border-strong); border-radius: var(--r-lg); overflow: hidden; background: var(--c-surface-2); box-shadow: var(--shadow), 0 0 120px -30px var(--glow-color); }
.pano__view { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; isolation: isolate; }
.pano__view:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -4px; }
/* each poster sits a little larger than the frame and drifts sideways: the view turning */
.pano__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.14); transition: opacity var(--dur-slow) var(--ease-signature); }
.pano__view img.is-on { opacity: 1; }
.js-motion .pano__view img { animation: vt-pan calc(var(--dur-slow) * 9) var(--ease-hover) infinite alternate; }
@keyframes vt-pan { from { transform: scale(1.14) translateX(5.5%); } to { transform: scale(1.14) translateX(-5.5%); } }
/* a soft light passes across the scene */
.pano__beam { position: absolute; z-index: 1; inset: -20% -60%; background: var(--light-beam); mix-blend-mode: screen; opacity: 0.7; pointer-events: none; transform: translateX(-20%) rotate(8deg); }
.js-motion .pano__beam { animation: vt-beam calc(var(--dur-slow) * 9) var(--ease-hover) infinite alternate; }
@keyframes vt-beam { to { transform: translateX(20%) rotate(8deg); } }
.pano__open { position: absolute; z-index: 2; left: 50%; bottom: var(--sp-2); display: inline-flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-2); translate: -50% 0; border: 1px solid rgb(var(--c-accent-rgb) / 0.55); border-radius: var(--r-pill); background: var(--c-overlay); color: var(--c-text); font-size: var(--fs-small); font-weight: var(--text-weight-bold); white-space: nowrap; transition: background-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover), scale var(--dur-base) var(--ease-signature); }
.pano__open .icon { --icon-size: 1rem; color: var(--c-accent-text); transition: color var(--dur-fast) var(--ease-hover); }
.pano__view:hover .pano__open, .pano__view:focus-visible .pano__open { background: var(--c-accent); color: var(--c-accent-ink); scale: 1.05; }
.pano__view:hover .pano__open .icon, .pano__view:focus-visible .pano__open .icon { color: currentColor; }

/* the compass: headings slide past a fixed needle, in step with the pan */
.pano__compass { position: relative; height: 2.25rem; border: var(--border); border-radius: var(--r-sm); overflow: hidden; background: repeating-linear-gradient(90deg, rgb(244 239 233 / 0.18) 0 1px, transparent 1px 12.5%), var(--c-surface-1); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.pano__strip { position: absolute; inset: 0 auto 0 -25%; display: flex; width: 200%; }
.pano__strip b { flex: 1; display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--fs-caption); font-weight: var(--text-weight); letter-spacing: var(--eyebrow-tracking); color: var(--c-text-muted); }
.pano__strip b:nth-child(4n + 1) { color: var(--c-text); }
.js-motion .pano__strip { animation: vt-compass calc(var(--dur-slow) * 9) var(--ease-hover) infinite alternate; }
@keyframes vt-compass { from { transform: translateX(6%); } to { transform: translateX(-6%); } }
.pano__needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; translate: -50% 0; background: var(--c-accent); box-shadow: 0 0 12px var(--glow-color); }

/* five scenes: three over two on phones, one row from tablets up */
.pano__scenes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-1); list-style: none; }
.pano__scenes > li { grid-column: span 2; }
.pano__scenes > li:nth-child(n + 4) { grid-column: span 3; }
@media (min-width: 768px) { .pano__scenes { grid-template-columns: repeat(5, minmax(0, 1fr)); } .pano__scenes > li, .pano__scenes > li:nth-child(n + 4) { grid-column: auto; } }
.pano__scene { display: grid; gap: 2px; justify-items: start; width: 100%; min-height: var(--tap-min); padding: var(--sp-1); border: var(--border); border-radius: var(--r-sm); background: transparent; color: var(--c-text-muted); font-size: var(--fs-caption); line-height: 1.25; text-align: left; cursor: pointer; transition: color var(--dur-fast) var(--ease-hover), border-color var(--dur-fast) var(--ease-hover), background-color var(--dur-fast) var(--ease-hover); }
.pano__scene b { font-family: var(--font-mono); font-weight: var(--text-weight); color: var(--c-accent-text); }
.pano__scene:hover, .pano__scene.is-on { color: var(--c-text); border-color: rgb(var(--c-accent-rgb) / 0.55); background: rgb(var(--c-accent-rgb) / 0.08); }

/* ── 01 · What a visitor sees ──────────────────────────────────────────── */
.vt-what__grid { display: grid; gap: var(--sp-6) var(--grid-gutter); align-items: start; }
@media (min-width: 992px) { .vt-what__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--sp-6) clamp(3rem, 6vw, 6rem); } }
.vt-what__intro { display: grid; gap: var(--sp-3); }
.vt-what__intro .t-h2 { max-width: 14ch; }
.vt-what__shot { display: grid; gap: var(--sp-1); margin: var(--sp-2) 0 0; }
.vt-what__shot figcaption { font-size: var(--fs-small); color: var(--c-text-muted); }
.vt-what__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-2); cursor: pointer; }
.vt-what__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-signature); }
.vt-what__media:hover img { transform: scale(1.03); }
.vt-do { display: grid; list-style: none; border-top: var(--border-strong); }
.vt-do li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: var(--border); }
.vt-do__icon { display: grid; place-items: center; width: 3rem; aspect-ratio: 1; border: 1px solid rgb(var(--c-accent-rgb) / 0.4); border-radius: 50%; color: var(--c-accent-text); background: radial-gradient(circle, rgb(var(--c-accent-rgb) / 0.16), transparent 70%); }
.vt-do__icon .icon { --icon-size: 1.25rem; }
.vt-do h3 { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.2; }
.vt-do p { margin-top: 4px; color: var(--c-text-muted); max-width: 46ch; }

/* ── 02 · The five live tours ───────────────────────────────────────────── */
.tours { display: grid; gap: var(--sp-5) var(--grid-gutter); list-style: none; }
/* five tours: one wide then pairs on tablets; two wide over three on desktop — no orphan */
@media (min-width: 576px) and (max-width: 991.98px) { .tours { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tours > :first-child { grid-column: 1 / -1; } }
@media (min-width: 992px) { .tours { grid-template-columns: repeat(6, minmax(0, 1fr)); } .tours > * { grid-column: span 2; } .tours > :nth-child(-n + 2) { grid-column: span 3; } }
.tour { display: grid; align-content: start; gap: var(--sp-1); }
.tour__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: var(--sp-1); padding: 0; border: var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-2); cursor: pointer; isolation: isolate; }
.tour__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.85); transition: transform var(--dur-slow) var(--ease-signature), filter var(--dur-base) var(--ease-signature); }
/* the key light: a warm spot that wakes the scene on hover */
.tour__media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 0%, rgb(var(--c-accent-rgb) / 0.28), transparent 70%); mix-blend-mode: screen; opacity: 0; transition: opacity var(--dur-base) var(--ease-signature); }
.tour__open { position: absolute; z-index: 2; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-2); translate: -50% -50%; border-radius: var(--r-pill); background: var(--c-overlay); color: var(--c-text); font-size: var(--fs-small); font-weight: var(--text-weight-bold); white-space: nowrap; transition: background-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover), scale var(--dur-base) var(--ease-signature); }
.tour__open .icon { --icon-size: 1rem; }
.tour__media:hover img { transform: scale(1.04); filter: none; }
.tour__media:hover::after { opacity: 1; }
.tour__media:hover .tour__open, .tour__media:focus-visible .tour__open { background: var(--c-accent); color: var(--c-accent-ink); scale: 1.05; }
.tour__kind { font-family: var(--font-mono); font-size: var(--fs-caption); letter-spacing: var(--eyebrow-tracking); text-transform: uppercase; color: var(--c-accent-text); }
.tour__name { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.2; }
.tour__text { color: var(--c-text-muted); font-size: var(--fs-small); max-width: 40ch; }

/* ── 03 · Who it's for ─────────────────────────────────────────────────── */
.vt-who__grid { display: grid; gap: var(--sp-5) var(--grid-gutter); align-items: start; }
@media (min-width: 992px) { .vt-who__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .vt-who__intro { position: sticky; top: calc(var(--header-h) + var(--sp-4)); } }
.vt-who__intro { display: grid; gap: var(--sp-3); }
.vt-who__intro .t-h2 { max-width: 12ch; }
.vt-for { display: grid; gap: var(--grid-gutter); list-style: none; }
@media (min-width: 576px) { .vt-for { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vt-for__card { display: grid; align-content: start; gap: var(--sp-1); padding: var(--sp-3); }
.vt-for__card h3 { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.2; }
.vt-for__card p { color: var(--c-text-muted); font-size: var(--fs-small); }

/* ── 04 · Process + handover ───────────────────────────────────────────── */
.vt-process__grid { display: grid; gap: var(--sp-6) var(--grid-gutter); align-items: start; }
@media (min-width: 992px) { .vt-process__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-6) clamp(3rem, 6vw, 6rem); } .vt-process .delivery { position: sticky; top: calc(var(--header-h) + var(--sp-4)); } }
.vt-process__steps { display: grid; gap: var(--sp-3); }
.vt-process__steps .t-h2 { max-width: 14ch; }
.vt-steps { display: grid; list-style: none; margin-top: var(--sp-2); border-top: var(--border-strong); }
.vt-steps li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: var(--border); }
.vt-steps__no { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--display-weight); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgb(var(--c-accent-rgb) / 0.75); }
.vt-steps h3 { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.2; }
.vt-steps p { margin-top: 4px; color: var(--c-text-muted); max-width: 46ch; }
@media (max-width: 374.98px) { .delivery__list li { flex-wrap: wrap; } .delivery__list b { text-align: left; } }

/* ── 05 · Tour, film, photos or 3D ─────────────────────────────────────── */
.which { display: grid; gap: var(--grid-gutter); }
@media (min-width: 576px) { .which { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .which { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.which__card { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; align-content: start; gap: var(--sp-2); padding: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem); border: var(--border); border-radius: var(--r-lg); background: var(--c-surface-1); transition: border-color var(--dur-base) var(--ease-signature); }
.which__card:not(.which__card--here):hover { border-color: var(--c-line-strong); }
.which__card--here { border-color: rgb(var(--c-accent-rgb) / 0.55); background: radial-gradient(circle at 100% 0%, rgb(var(--c-accent-rgb) / 0.14), transparent 55%), var(--c-surface-1); }
.which__here { position: absolute; top: 0; right: var(--sp-3); translate: 0 -50%; padding: 2px var(--sp-1); border-radius: var(--r-pill); background: var(--c-accent); color: var(--c-accent-ink); font-size: var(--fs-caption); font-weight: var(--text-weight-bold); }
.which__when { font-family: var(--font-mono); font-size: var(--fs-caption); letter-spacing: var(--eyebrow-tracking); text-transform: uppercase; color: var(--c-accent-text); }
.which__name { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.2; }
.which__name a { color: inherit; text-decoration: none; }
.which__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.which__name a:focus-visible { outline: none; }
.which__card:has(a:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.which__text { color: var(--c-text-muted); font-size: var(--fs-small); }
.which__card:hover .which__go .icon { translate: 4px 0; }

/* off screen, or while the visitor reads a scene: the view holds still */
.pano.is-paused .pano__view img, .pano.is-paused .pano__beam, .pano.is-paused .pano__strip { animation-play-state: paused; }
