/* A contained three-scene tour. Body pinning is scoped to an active visit. */
.apartment-tour {
  position: relative;
  width: 100%;
  height: var(--tour-height, 100svh);
  background: #293130;
  color: #fff;
  isolation: isolate;
}
.tour-stage { position: relative; height: 100%; overflow: hidden; }
.apartment-tour.is-pinned .tour-stage { position: fixed; inset: 0; width: 100%; height: 100%; }
.tour-scene { position: absolute; inset: 0; pointer-events: none; }
.tour-photo { position: absolute; inset: 0; opacity: 0; transform: scale(.88); transition: transform 820ms cubic-bezier(.22,.68,.16,1), opacity 620ms ease; }
.tour-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tour-scene.is-current .tour-photo { opacity: 1; transform: scale(1); }
.tour-scene.is-past .tour-photo { opacity: 0; transform: scale(2.4); }
.tour-scene:nth-child(1) .tour-photo { transform-origin: 51% 64%; }
.tour-scene:nth-child(2) .tour-photo { transform-origin: 53% 43%; }
.tour-scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(8,18,20,.3),transparent 40%,rgba(8,18,20,.38)); opacity: 0; transition: opacity 700ms; }
.tour-scene.is-current::after { opacity: 1; }
.tour-copy, .tour-brand { position: absolute; z-index: 2; opacity: 0; transition: opacity 400ms ease, translate 520ms ease; translate: 0 18px; }
.tour-scene.is-current .tour-copy, .tour-scene.is-current .tour-brand { opacity: 1; translate: 0 0; transition-delay: 150ms; }
.tour-brand { top: clamp(24px,4vh,60px); left: 3vw; margin: 0; color: #fff; font-size: clamp(64px,7vw,140px); font-weight: 500; letter-spacing: -.045em; line-height: .98; text-shadow: 0 2px 28px rgba(0,0,0,.3); }
.tour-copy { top: 32%; right: clamp(28px,5vw,100px); transform: translateY(-50%); width: min(460px,36vw); padding: clamp(20px,1.8vw,28px); border: 1px solid rgba(255,255,255,.2); border-radius: 24px; background: linear-gradient(145deg,rgba(255,255,255,.03),rgba(14,26,29,.045)); -webkit-backdrop-filter: blur(2px) brightness(.98); backdrop-filter: blur(2px) brightness(.98); box-shadow: 0 10px 32px rgba(0,0,0,.08); text-shadow: 0 1px 4px rgba(0,0,0,.72), 0 2px 16px rgba(0,0,0,.4); }
.tour-copy--room { top: 35%; }
.tour-copy p { color: #fff; margin: 0; font-size: clamp(17px,1.35vw,22px); font-weight: 500; line-height: 1.6; text-wrap: pretty; }
.tour-copy p + p { margin-top: .7em; }
.tour-eyebrow { display: block; margin-bottom: 12px; color: rgba(255,255,255,.9); font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.tour-controls { --tour-step: 58px; position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 12px; left: max(24px,env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); white-space: nowrap; }
.tour-controls button { appearance: none; margin: 0 !important; padding: 0; border: 0; box-shadow: none; color: #fff; font: inherit; letter-spacing: normal; text-transform: none; line-height: 1; cursor: pointer; }
.tour-rail { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 24px; background: rgba(15,25,27,.07); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 8px 28px rgba(0,0,0,.08); }
.tour-rail-line { position: absolute; left: 29px; top: 30px; bottom: 30px; width: 1px; background: rgba(255,255,255,.35); pointer-events: none; }
.tour-rail-marker { position: absolute; top: 8px; left: 8px; right: 8px; height: 44px; border: 1px solid rgba(255,255,255,.3); border-radius: 16px; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); transform: translateY(calc(var(--tour-active-step,0) * var(--tour-step))); transition: transform 650ms cubic-bezier(.22,.68,.16,1); pointer-events: none; }
.tour-controls .tour-stop { position: relative; display: flex; align-items: center; gap: 14px; width: 118px; height: 44px; padding: 0 14px; border-radius: 16px; background: transparent; text-align: left; }
.tour-dot { flex: 0 0 14px; height: 14px; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(20,28,29,.3); transition: background 400ms, box-shadow 400ms; }
.is-active .tour-dot { background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.45); }
.tour-stop-label { font-size: 12px; font-weight: 500; opacity: .72; text-shadow: 0 1px 5px rgba(0,0,0,.6); transition: opacity 400ms; }
.is-active .tour-stop-label { opacity: 1; }
.tour-controls .tour-back, .tour-controls .tour-skip { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(15,25,27,.06); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tour-arrow-icon, .room-arrow-icon { display: block; width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.tour-progress { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tour-controls button { transition: background 200ms; touch-action: manipulation; }
.tour-controls button:hover { background: rgba(255,255,255,.2); }
.tour-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.apartment-rooms { padding: clamp(42px,5vw,80px) max(22px,4vw) 100px; background: #fbf4f0; min-height: 100svh; text-align: center; }
.apartment-rooms .section-title-text { margin-top: 0; }
.apartment-room-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(18px,2.2vw,36px); max-width: 1500px; margin: 32px auto 0; }
.room-card { position: relative; display: block; width: 100%; height: auto; min-width: 0; aspect-ratio: 4 / 4.5; margin: 0; padding: 0; overflow: hidden; isolation: isolate; border: 1px solid rgba(55,38,31,.1); border-radius: 28px; background: #343330; color: white; font: inherit; text-align: left; text-transform: none; white-space: normal; letter-spacing: normal; cursor: pointer; box-shadow: 0 12px 32px rgba(51,34,23,.1); transition: transform 500ms cubic-bezier(.2,.7,.2,1), box-shadow 500ms; }
.room-card::after { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg,rgba(0,0,0,.08) 28%,rgba(10,17,20,.38) 52%,rgba(10,17,20,.93) 100%); }
.room-card.is-active { transform: translateY(-6px) scale(1.025); box-shadow: 0 24px 56px rgba(51,34,23,.2); z-index: 2; }
.room-card:focus-visible { outline: 3px solid #ff3e3f; outline-offset: 5px; }
.room-photos { position: absolute; inset: 0; }
.room-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.035); transition: opacity 850ms ease, transform 3s ease; }
.room-photos img.is-visible { opacity: 1; transform: scale(1); }
.room-details { position: absolute; z-index: 2; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: clamp(22px,2.4vw,38px); }
.room-kicker { color: rgba(255,255,255,.72); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5; }
.room-name { color: #fff; font-size: clamp(28px,3vw,46px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.room-description { color: rgba(255,255,255,.9); font-size: 16px; font-weight: 400; line-height: 1.55; max-width: 28ch; }
.room-discover { display: flex; gap: 22px; align-items: center; margin-top: 9px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.25); width: 100%; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.3; }
.room-discover .room-arrow-icon { margin-left: auto; transition: transform 400ms; }
.room-card.is-active .room-arrow-icon { transform: translate(2px,-2px); }
.room-photo-count { position: absolute; z-index: 2; top: 18px; right: 18px; padding: 8px 12px; border-radius: 99px; background: rgba(15,25,27,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 11px; line-height: 1; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
@media (orientation: portrait) {
  .tour-brand { top: max(72px,10%); left: 6vw; font-size: clamp(36px,8.4vw,66px); line-height: 1.05; }
  .tour-copy { left: 76px; right: 20px; width: auto; max-width: 490px; margin-left: auto; padding: 20px 22px; border-radius: 22px; }
  .tour-copy p { font-size: clamp(15px,3.9vw,20px); line-height: 1.55; }
  .tour-copy--valley { top: 60%; }
  .tour-copy--house { top: 40%; }
  .tour-copy--room { top: 65%; }
  .tour-eyebrow { font-size: 10px; margin-bottom: 10px; }
}
@media (max-width: 760px) {
  .apartment-room-grid { grid-template-columns: 1fr; gap: 26px; max-width: 520px; }
  .room-card { aspect-ratio: 1.13; border-radius: 25px; }
  .room-details { padding: 24px; gap: 8px; }
  .room-name { font-size: 34px; }
  .room-description { font-size: 15px; }
}
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) {
  .tour-controls { left: max(12px,env(safe-area-inset-left)); gap: 10px; }
  .tour-rail { padding: 6px; border-radius: 24px; }
  .tour-controls .tour-stop { width: 38px; padding: 0; justify-content: center; }
  .tour-rail-line { left: 25px; top: 28px; bottom: 28px; }
  .tour-rail-marker { left: 6px; right: 6px; top: 6px; border-radius: 20px; }
  .tour-stop-label { display: none; }
}
@media (max-height: 650px) {
  .tour-copy { padding: 16px 20px; }
  .tour-copy p { font-size: 14px; line-height: 1.45; }
  .tour-copy--room { top: 52%; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .tour-brand { font-size: clamp(30px,5vw,44px); top: 22px; left: max(80px,8vw); }
  .tour-copy { width: min(530px,55vw); right: max(22px,env(safe-area-inset-right)); left: auto; top: 43%; padding: 14px 20px; }
  .tour-eyebrow { margin-bottom: 6px; }
  .tour-copy p { font-size: 13px; line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-photo, .tour-copy, .tour-brand, .room-card, .room-photos img, .room-arrow-icon { transition: none !important; transform: none !important; translate: none !important; }
  .tour-copy { transform: translateY(-50%) !important; }
  .tour-rail-marker { transition: none !important; }
}

/* Honest previews of the next rooms: illustrations, not pretend photographs. */
.room-upcoming-card { --room-accent: #789078; position: relative; min-width: 0; aspect-ratio: 4 / 4.5; overflow: hidden; border: 1px solid rgba(80,70,56,.1); border-radius: 28px; background: linear-gradient(145deg,#f9faf6,#e4eae1); text-align: left; box-shadow: 0 10px 30px rgba(51,34,23,.05); }
.room-upcoming-card--astral { --room-accent: #77859b; background: linear-gradient(145deg,#f8f9fb,#e3e7ee); }
.room-upcoming-card--alora { --room-accent: #a08d74; background: linear-gradient(145deg,#fbf8f3,#eee2d3); }
.room-placeholder { position: absolute; top: 5%; left: 3%; right: 3%; height: 61%; display: grid; place-items: center; pointer-events: none; }
.room-placeholder svg { width: 100%; max-height: 100%; fill: none; stroke: var(--room-accent); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; opacity: .65; }
.room-illustration-wall { fill: rgba(255,255,255,.36); }
.room-illustration-fill { fill: rgba(255,255,255,.64); }
.room-coming-status { position: absolute; z-index: 2; top: 18px; right: 18px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.75); border-radius: 99px; background: rgba(255,255,255,.6); color: #615f59; font-size: 11px; font-weight: 500; line-height: 1; }
.room-upcoming-card .room-details { gap: 10px; }
.room-upcoming-card .room-kicker { color: #77776c; }
.room-upcoming-card .room-name { color: #393936; margin: 0; text-transform: none; }
.room-upcoming-card .room-description { color: #68665e; margin: 0; max-width: 31ch; }
@media (max-width: 760px) {
  .room-upcoming-card { aspect-ratio: 1.13; border-radius: 25px; }
  .room-upcoming-card .room-details { gap: 8px; }
  .room-upcoming-card .room-placeholder { top: 0; height: 48%; }
  .room-upcoming-card .room-description { font-size: 15px; }
}
