:root {
  --ink: #f4f1ea;
  --ink-dim: rgba(244, 241, 234, 0.72);
  --accent: #d9b77a;
  --night: #070b14;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --scroll-length: 1300vh;           /* 1050 frames: longer = slower tour */
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }

.experience { position: relative; height: var(--scroll-length); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(4, 7, 13, 0.62) 0%, rgba(4, 7, 13, 0.18) 34%, rgba(4, 7, 13, 0) 55%),
              linear-gradient(to bottom, rgba(4, 7, 13, 0.35) 0%, rgba(4, 7, 13, 0) 18%); }
#cut-fade { position: absolute; inset: 0; background: var(--night); opacity: 0; pointer-events: none; }

.brand { position: fixed; top: 26px; left: clamp(20px, 4vw, 56px); z-index: 20; font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; display: flex; align-items: center; gap: 12px; mix-blend-mode: normal; }
.brand em { font-family: var(--serif); font-style: italic; letter-spacing: 0.04em; text-transform: none; font-size: 15px; color: var(--accent); }
.brand-mark { width: 18px; height: 18px; border: 1.5px solid var(--accent); transform: rotate(45deg); }

.caption { position: absolute; left: clamp(20px, 4vw, 56px); bottom: clamp(32px, 8vh, 84px); max-width: min(520px, 78vw); }
.caption-index { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.2em; color: var(--ink-dim); }
#cap-room { font-weight: 500; color: var(--accent); margin-left: 6px; transition: opacity 0.3s; }
#cap-room:empty { display: none; }
.caption-index i { width: 44px; height: 1px; background: var(--accent); }
.caption h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5.2vw, 68px); line-height: 1.02; margin: 14px 0 14px;
  letter-spacing: -0.01em; text-wrap: balance; }
.caption p { margin: 0; font-size: clamp(14px, 1.15vw, 17px); line-height: 1.6; color: var(--ink-dim); max-width: 40ch; }
.caption.enter h2, .caption.enter p { animation: cap-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.caption.enter p { animation-delay: 0.07s; }
@keyframes cap-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.rail { position: absolute; right: clamp(16px, 3vw, 44px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.rail button { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 7px 0; }
.rail button span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); opacity: 0; transform: translateX(6px);
  transition: opacity 0.25s, transform 0.25s; white-space: nowrap; }
.rail button i { position: relative; width: 26px; height: 2px; background: rgba(244, 241, 234, 0.28); overflow: hidden; transition: width 0.25s; }
.rail button i b { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.rail button:hover span, .rail button:focus-visible span { opacity: 1; transform: none; }
.rail button.active i { width: 44px; }
.rail button:focus-visible i { outline: 1px solid var(--accent); outline-offset: 4px; }

.hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-dim); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity 0.4s; }
.hint span { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }

#loader { position: fixed; inset: 0; z-index: 50; background: var(--night); display: grid; place-items: center; transition: opacity 0.6s ease, visibility 0.6s; }
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-dim); }
#loader-pct { font-family: var(--serif); font-size: 44px; letter-spacing: 0; color: var(--ink); }


/* ---------------------------------------------------------------- end-of-scroll room explorer */
html.x-lock { overflow: hidden; }   /* html only: locking body too would break the sticky stage */
.pill { all: unset; cursor: pointer; box-sizing: border-box; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; padding: 12px 20px;
  border-radius: 999px; border: 1px solid rgba(244, 241, 234, 0.32); color: var(--ink); text-align: center; white-space: nowrap; transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.pill:hover { border-color: var(--ink); }
.pill.solid { background: var(--ink); border-color: var(--ink); color: #10131a; }
.pill.solid:hover { background: #fff; transform: translateY(-1px); }
.pill:focus-visible, .x-pin:focus-visible, .x-tabs button:focus-visible, .x-levels button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.explore-cta { position: absolute; left: clamp(20px, 4vw, 56px); bottom: clamp(32px, 8vh, 84px); display: flex; align-items: center; gap: 26px;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 0.5s, transform 0.5s; }
.explore-cta.show { opacity: 1; pointer-events: auto; transform: none; }
.explore-cta dl { display: flex; gap: 22px; margin: 0; }
.explore-cta dt { font-family: var(--serif); font-size: 26px; line-height: 1; }
.explore-cta dd { margin: 5px 0 0; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }
.stage:has(.explore-cta.show) .caption { bottom: calc(clamp(32px, 8vh, 84px) + 74px); }
.stage:has(.explore-cta.show) .caption p { display: none; }

.explorer, .walk { position: absolute; inset: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.45s, visibility 0.45s; }
.stage.exploring .explorer { opacity: 1; visibility: visible; }
.stage.exploring .caption, .stage.exploring .rail, .stage.exploring .explore-cta, .stage.exploring .hint { opacity: 0; pointer-events: none; visibility: hidden; }
.stage.walking .explorer { opacity: 0; visibility: hidden; }
.stage.walking .walk { opacity: 1; visibility: visible; }
.explorer > *, .walk .w-card { pointer-events: auto; }

.x-tabs { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(12, 16, 24, 0.55); backdrop-filter: blur(14px); border: 1px solid rgba(244, 241, 234, 0.1); }
.x-tabs button, .x-levels button { all: unset; cursor: pointer; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px;
  color: var(--ink-dim); transition: background 0.2s, color 0.2s; }
.x-tabs button:hover, .x-levels button:hover { color: var(--ink); }
.x-tabs button.on, .x-levels button.on { background: var(--ink); color: #10131a; }
.x-exit { all: unset; cursor: pointer; position: absolute; top: 70px; right: clamp(20px, 4vw, 56px); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }
.x-exit:hover { color: var(--ink); }
.x-levels { position: absolute; right: clamp(20px, 4vw, 56px); top: 128px; display: none; flex-direction: column; gap: 6px; align-items: flex-end; }
.stage.x-residence .x-levels { display: flex; }
.x-levels button { background: rgba(12, 16, 24, 0.55); backdrop-filter: blur(14px); border: 1px solid rgba(244, 241, 234, 0.1); }

.x-pins { position: absolute; inset: 0; pointer-events: none !important; }
.x-pin { all: unset; cursor: pointer; pointer-events: auto; position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; letter-spacing: 0.04em; color: var(--ink); background: rgba(12, 16, 24, 0.72); border: 1px solid rgba(244, 241, 234, 0.45);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); transition: background 0.2s, color 0.2s, opacity 0.2s, box-shadow 0.2s; will-change: transform; }
.x-pin:hover, .x-pin.on { background: var(--ink); color: #10131a; box-shadow: 0 0 0 6px rgba(244, 241, 234, 0.16), 0 4px 18px rgba(0, 0, 0, 0.35); }

.x-preview { position: absolute; left: 0; top: 0; width: 240px; padding: 6px 6px 12px; border-radius: 12px; background: rgba(14, 18, 27, 0.82); backdrop-filter: blur(16px);
  border: 1px solid rgba(244, 241, 234, 0.12); opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.x-preview.show { opacity: 1; visibility: visible; }
.x-preview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 6px; background: #0b0f17; }
.x-preview b { font-weight: 500; font-size: 13px; padding: 0 6px; }
.x-preview i { font-style: normal; font-size: 11px; color: var(--ink-dim); padding: 0 6px; }
.x-preview em { font-style: normal; font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); padding: 4px 6px 0; }

.x-panel, .x-cardbar { position: absolute; left: clamp(20px, 4vw, 56px); right: clamp(20px, 4vw, 56px); bottom: clamp(20px, 5vh, 44px); margin: 0 auto; max-width: 760px; }
.x-panel { display: none; padding: 16px 22px 20px; border-radius: 16px; background: rgba(14, 18, 27, 0.74); backdrop-filter: blur(18px); border: 1px solid rgba(244, 241, 234, 0.1); }
.stage.x-residence .x-panel { display: block; }
.x-panel.empty .x-panel-row { visibility: hidden; }
.x-list-toggle { all: unset; cursor: pointer; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }
.x-list-toggle:hover { color: var(--ink); }
.x-list { display: none; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.x-list.show { display: flex; }
.x-list button { all: unset; cursor: pointer; font-size: 12px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(244, 241, 234, 0.16); }
.x-list button:hover { border-color: var(--ink); }
.x-list em { font-style: normal; color: var(--accent); margin-right: 8px; font-size: 10px; }
.x-panel-row { display: flex; align-items: center; gap: 22px; margin-top: 10px; }
.x-num { font-family: var(--serif); font-size: 54px; line-height: 0.9; min-width: 68px; }
.x-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.x-info small, .w-foot small { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.x-info b, .w-foot b { font-weight: 500; font-size: 20px; }
.x-info i, .w-foot i { font-style: normal; font-size: 12.5px; color: var(--ink-dim); }
.x-actions { display: flex; flex-direction: column; gap: 8px; }

.x-cardbar { display: block; max-width: 900px; }
.stage.x-residence .x-cardbar { display: none; }
.x-cardbar h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 12px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5); }
.x-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.x-cards button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: rgba(14, 18, 27, 0.74);
  backdrop-filter: blur(16px); border: 1px solid rgba(244, 241, 234, 0.1); transition: border-color 0.2s, background 0.2s; min-width: 0; }
.x-cards button:hover, .x-cards button.on { border-color: var(--ink); background: rgba(20, 26, 38, 0.88); }
.x-cards img { width: 64px; height: 44px; object-fit: cover; border-radius: 7px; flex: none; }
.x-cards span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.x-cards b { font-weight: 500; font-size: 13px; }
.x-cards i { font-style: normal; font-size: 10.5px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-cards em { font-style: normal; font-size: 10px; color: var(--accent); padding-right: 6px; }

.w-veil { position: absolute; inset: 0; background: rgba(8, 11, 18, 0.62); backdrop-filter: blur(22px); }
.w-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%); width: max(240px, min(1040px, 90vw, calc((100svh - 170px) * 16 / 9))); border-radius: 18px; padding: 6px;
  background: rgba(14, 18, 27, 0.5); border: 1px solid rgba(244, 241, 234, 0.14); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55); }
.w-view { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; cursor: grab; touch-action: none; box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.08); }
.w-view.grab { cursor: grabbing; }
.w-dial { position: absolute; left: 14px; top: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
.w-dial svg { width: 40px; height: 40px; }
.w-dial circle { fill: rgba(10, 13, 20, 0.5); stroke: rgba(244, 241, 234, 0.28); stroke-width: 1; }
#w-arc-bg { fill: none; stroke: rgba(244, 241, 234, 0.35); stroke-width: 1.5; }
#w-arc { fill: rgba(244, 241, 234, 0.75); }
.w-dial b { display: block; font-weight: 500; font-size: 19px; line-height: 1; }
.w-dial small { font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }
.w-close { all: unset; cursor: pointer; position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  background: rgba(10, 13, 20, 0.55); border: 1px solid rgba(244, 241, 234, 0.4); }
.w-close:hover { background: var(--ink); color: #10131a; }
.w-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px;
  background: rgba(10, 13, 20, 0.6); border: 1px solid rgba(244, 241, 234, 0.2); opacity: 0; transition: opacity 0.4s; pointer-events: none; white-space: nowrap; }
.w-hint.show { opacity: 1; }
.w-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 16px 12px; }
.w-foot > div { display: flex; flex-direction: column; gap: 3px; }

@media (max-width: 720px) {
  .x-tabs { top: 58px; }
  .x-exit { top: 104px; left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
  .x-levels { top: 140px; }
  .x-panel-row { flex-wrap: wrap; gap: 12px; }
  .x-num { font-size: 40px; min-width: 50px; }
  .x-actions { flex-direction: row; width: 100%; }
  .x-actions .pill { flex: 1; }
  .x-cards { grid-template-columns: 1fr; }
  .x-cards i { display: none; }
  .explore-cta { flex-direction: column; align-items: flex-start; gap: 16px; }
  .w-card { width: min(94vw, calc((100svh - 220px) * 0.8)); min-width: 240px; }
  .w-view { aspect-ratio: 4 / 5; }
  .w-foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .rail button span { display: none; }
  .rail { gap: 2px; }
  .hint { display: none; }
  .caption { bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { .hint span { animation: none; } .caption.enter h2, .caption.enter p { animation: none; } }
