/* Second round: the reels' own form. The picture fills the window; the page is a glass card, a few pills
   and one thin light sans (Segoe UI Variable Display). Golden hour is warm glass and ivory; Blue hour is
   navy glass and gold. */
html[data-v="reel"] { background: #0B1220; overflow: hidden; }

.rl {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --pad: clamp(18px, 3vw, 40px);
  color: #fff;
  font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-weight: 300;
}
.rl[data-mood="blue"]   { --accent: #EBC977; --glass: rgba(16, 28, 52, 0.44); --edge: rgba(255, 255, 255, 0.22); --btn: #F3E7C9; --btn-ink: #1B2233; }
.rl[data-mood="golden"] { --accent: #FFE7BD; --glass: rgba(44, 31, 18, 0.48); --edge: rgba(255, 255, 255, 0.3);  --btn: #FFF4DE; --btn-ink: #3A2A14; }

.rl-screen, .rl-room, .rl-shade { position: fixed; inset: 0; width: 100%; height: 100%; }
.rl-room { object-fit: cover; opacity: 0; pointer-events: none; transition: opacity 420ms var(--ease-out); }
.rl[data-state="room"] .rl-room[data-on] { opacity: 1; }
.rl:not([data-state="room"]) .rl-room { transition-duration: 0s; }
.rl-shade { pointer-events: none; background: linear-gradient(to bottom, rgba(6, 10, 20, 0.42), rgba(6, 10, 20, 0) 24%); }
.rl-shade::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 300ms var(--ease-out);
  background: linear-gradient(20deg, rgba(6, 10, 20, 0.66) 0%, rgba(6, 10, 20, 0.2) 36%, rgba(6, 10, 20, 0) 56%);
}
.rl:is([data-state="living"], [data-state="bed"]) .rl-shade::after { opacity: 1; }

/* things that belong to one state fade with it */
.rl-brand, .rl-card, .rl-mark, .rl-cap, .rl-chips, .rl-back, .rl-cta, .rl-title, .rl-skip {
  opacity: 0; visibility: hidden; transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms;
}
.rl[data-state="intro"] :is(.rl-title, .rl-skip),
.rl[data-state="tower"] :is(.rl-brand, .rl-card, .rl-mark, .rl-cta),
.rl[data-state="living"] :is(.rl-cap, .rl-chips, .rl-back, .rl-cta),
.rl[data-state="bed"] :is(.rl-cap, .rl-back, .rl-cta) {
  opacity: 1; visibility: visible; transition: opacity 260ms var(--ease-out), visibility 0s;
}

.rl-top {
  position: fixed; z-index: 3; top: 0; left: 0; right: 0; padding: 20px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none;
}
.rl-top > * { pointer-events: auto; }
.rl-brand { font-size: 13px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; }
.rl-back { position: absolute; left: var(--pad); top: 20px; }
.rl-cta { margin-left: auto; }
.rl-pill {
  height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--edge);
  background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  color: #fff; font: inherit; font-size: 15px; font-weight: 400; text-decoration: none; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.rl-pill, .rl-go { transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms, transform 120ms var(--ease-out), background-color 150ms ease; }
.rl-pill:active, .rl-go:active { transform: scale(0.97); }
.rl-pill:focus-visible, .rl-go:focus-visible, .rl-slide:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .rl-pill:hover { background-color: rgba(255, 255, 255, 0.22); } }

/* the floor mark beside the tower: a hairline and the number */
.rl-mark {
  position: fixed; z-index: 1; left: 0; top: 0; pointer-events: none;
  transform: translate(var(--x, 0px), var(--y, 0px)) translate(-100%, -50%);
  display: flex; flex-direction: row-reverse; align-items: center; gap: 10px;
}
.rl-mark i { width: 36px; height: 1px; background: #fff; opacity: 0.85; }
.rl-mark b { font-weight: 300; font-size: 28px; line-height: 1; color: var(--accent); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5); }

/* the glass card */
.rl-card {
  position: fixed; z-index: 2; right: clamp(18px, 6vw, 96px); top: 50%; margin-top: -250px;
  width: min(360px, calc(100vw - 36px)); padding: 30px 30px 28px; border-radius: 6px;
  background: var(--glass); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.rl-card-title { font-weight: 300; font-size: 46px; line-height: 1.02; letter-spacing: -0.012em; margin-bottom: 14px; text-wrap: balance; }
.rl-how, .rl-note { font-size: 14px; line-height: 1.5; font-weight: 400; color: rgba(255, 255, 255, 0.88); }
.rl-level { display: flex; align-items: baseline; gap: 14px; margin: 22px 0 4px; }
.rl-level span { font-size: 15px; font-weight: 600; }
.rl-num { font-size: 84px; line-height: 0.9; font-weight: 300; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rl-card h3 { font-size: 19px; font-weight: 600; margin-top: 10px; }
.rl-note { min-height: 3em; margin-top: 4px; }

.rl-slide {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 6px 0 0; background: none; cursor: pointer;
}
.rl-slide::-webkit-slider-runnable-track {
  height: 1px; background: linear-gradient(to right, var(--accent) var(--at, 50%), rgba(255, 255, 255, 0.5) var(--at, 50%));
}
.rl-slide::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
}
.rl-slide::-moz-range-track { height: 1px; background: rgba(255, 255, 255, 0.5); }
.rl-slide::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--accent); }
.rl-range { display: flex; justify-content: space-between; margin-top: -8px; font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, 0.7); }
.rl-go {
  margin-top: 20px; height: 48px; padding: 0 24px; border: 0; border-radius: 3px; cursor: pointer;
  background: var(--btn); color: var(--btn-ink); font: inherit; font-size: 15px; font-weight: 600;
}

/* inside a room */
.rl-cap { position: fixed; z-index: 2; left: var(--pad); bottom: 34px; max-width: min(46rem, calc(100vw - 2 * var(--pad))); }
.rl-cap h2 { font-weight: 300; font-size: clamp(34px, 5vw, 84px); line-height: 1; letter-spacing: -0.015em; text-wrap: balance; text-shadow: 0 1px 30px rgba(0, 0, 0, 0.3); }
.rl-cap p { margin-top: 14px; font-size: clamp(16px, 1.3vw, 19px); font-weight: 400; line-height: 1.45; max-width: 36ch; color: rgba(255, 255, 255, 0.92); }
.rl-chips { position: fixed; z-index: 2; right: var(--pad); bottom: 34px; display: flex; gap: 8px; }
.rl-load { position: fixed; left: var(--pad); bottom: 30px; font-size: 14px; font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  .rl-room, .rl-shade::after { transition-duration: 150ms; }
}

/* narrow windows: the card becomes a sheet at the bottom, room buttons sit above the caption */
@media (max-width: 760px) {
  .rl-card { top: auto; right: 0; left: 0; bottom: 0; margin: 0; width: auto; border-radius: 14px 14px 0 0; border-width: 1px 0 0; padding: 18px 20px 84px; }
  .rl-card-title { font-size: 28px; margin-bottom: 0; }
  .rl-how { display: none; }
  .rl-level { margin: 10px 0 0; }
  .rl-num { font-size: 52px; }
  .rl-card h3 { font-size: 17px; margin-top: 4px; }
  .rl-note { min-height: 0; }
  .rl-go { margin-top: 10px; width: 100%; }
  .rl-cap { bottom: 150px; }
  .rl-chips { left: var(--pad); right: auto; bottom: 84px; }
  .rl-brand { letter-spacing: 0.2em; font-size: 12px; }
}

/* fourth round: the opening title over the sunset, the skip pill, and the light that fills the screen on the way in */
.rl-title { position: fixed; z-index: 2; left: var(--pad); bottom: clamp(40px, 9vh, 96px); max-width: min(52rem, calc(100vw - 2 * var(--pad))); pointer-events: none; }
.rl[data-state="intro"] .rl-title { transition: opacity 900ms var(--ease-out) 500ms, visibility 0s; }
.rl-title h1 { font-weight: 300; font-size: clamp(44px, 7.4vw, 128px); line-height: 0.96; letter-spacing: -0.02em; text-wrap: balance; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35); }
.rl-title p { margin-top: 18px; font-size: clamp(16px, 1.5vw, 22px); font-weight: 400; letter-spacing: 0.01em; text-shadow: 0 1px 20px rgba(0, 0, 0, 0.45); }
.rl-skip { position: fixed; z-index: 3; right: var(--pad); bottom: 34px; }
.rl-bloom { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, #FFF1D2 0%, #FFE0A6 45%, #F2C777 100%); transition: opacity 520ms var(--ease-out); }
.rl[data-state="moving"] .rl-bloom { transition-duration: 60ms; }
@media (max-width: 760px) { .rl-title { bottom: 96px; } }

/* short windows (a phone held sideways): a compact card, centred top to bottom, that always fits */
@media (max-height: 560px) and (min-width: 761px) {
  .rl-card { top: 12px; bottom: 12px; margin: auto 0; height: fit-content; width: min(300px, 44vw); padding: 16px 20px; }
  .rl-card-title { font-size: 26px; margin-bottom: 0; }
  .rl-how { display: none; }
  .rl-level { margin: 6px 0 0; }
  .rl-num { font-size: 44px; }
  .rl-card h3 { font-size: 15px; margin-top: 2px; }
  .rl-note { min-height: 0; font-size: 13px; }
  .rl-slide { height: 36px; margin-top: 0; }
  .rl-go { margin-top: 8px; height: 44px; }
  .rl-cap { bottom: 18px; }
  .rl-cap h2 { font-size: 30px; }
  .rl-cap p { margin-top: 6px; font-size: 14px; }
  .rl-chips { bottom: 18px; }
  .rl-title { bottom: 28px; }
  .rl-title h1 { font-size: 40px; }
  .rl-title p { margin-top: 8px; }
}

/* seventh round: the two ways from room to room, bottom right in both rooms: a line saying where to, and one button for
   each way (moving camera, smooth teleport). Each button goes at once. */
.rl-ways {
  position: fixed; z-index: 2; right: var(--pad); bottom: 34px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  opacity: 0; visibility: hidden; transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms;
}
.rl:is([data-state="living"], [data-state="bed"]) .rl-ways { opacity: 1; visibility: visible; transition: opacity 260ms var(--ease-out), visibility 0s; }
.rl-ways-to { font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.rl-ways-row { display: flex; gap: 8px; }
@media (max-width: 760px) {
  .rl-top .rl-pill { padding: 0 14px; font-size: 14px; } /* "Back to the living room" and "Register interest" touched at 390 wide */
  .rl-ways { left: var(--pad); right: auto; bottom: 84px; align-items: flex-start; }
  .rl-way { padding: 0 14px; font-size: 14px; }
  .rl[data-r="7"] .rl-cap { bottom: 178px; }
}
@media (max-height: 560px) and (min-width: 761px) {
  .rl-ways { bottom: 18px; gap: 6px; }
  .rl-way { height: 40px; padding: 0 14px; font-size: 14px; }
}

/* ninth round: one way between the rooms, so one button and no line above it. And the first picture is on screen at once:
   the title stands over it while the pictures arrive, and the loading note moves to the right so it cannot sit on the title. */
.rl[data-r="9"][data-state="loading"] .rl-title { opacity: 1; visibility: visible; }
.rl[data-r="9"] .rl-load { left: auto; right: var(--pad); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
@media (max-width: 760px) { .rl[data-r="9"] .rl-cap { bottom: 144px; } }
