/* the photo tour */
#film { position: fixed; inset: 0; z-index: 9; background: #07090a; overflow: hidden; outline: none; }
#film .stage { position: absolute; inset: 0; touch-action: pan-y; }
#film .shot { position: absolute; inset: 0; overflow: hidden; animation: film-in 1.1s ease both; }
#film .shot img, #film .shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
#film .shot img.wash { filter: blur(30px) brightness(.45); transform: scale(1.15); }
#film .shot video { opacity: 0; transition: opacity .5s; }
#film .shot.moving video { opacity: 1; }
#film .shot img:not(.wash) { animation: 9s ease-out both; }
#film .drift-0 img:not(.wash) { animation-name: drift-in; }
#film .drift-1 img:not(.wash) { animation-name: drift-left; }
#film .drift-2 img:not(.wash) { animation-name: drift-out; }
#film .drift-3 img:not(.wash) { animation-name: drift-right; }
#film.paused .shot img { animation-play-state: paused; }
#film::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,7,8,.55), transparent 18%, transparent 52%, rgba(5,7,8,.86)); }
#film header, #film .words, #film footer, #film .arrow { position: absolute; z-index: 2; }
#film header { left: 22px; right: 18px; top: calc(16px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; }
#film .chapter { margin: 0; text-transform: uppercase; font-size: 11px; letter-spacing: .34em; color: var(--gold-2); text-shadow: 0 1px 10px rgba(0,0,0,.7); }
#film .close { width: 44px; height: 44px; padding: 0; border-radius: 50%; background: rgba(10,14,16,.55); backdrop-filter: blur(10px); }
#film .words { left: max(22px, 5vw); right: 22px; bottom: calc(var(--bottom) + 112px); pointer-events: none; }
#film .words.rise > * { animation: film-rise .8s cubic-bezier(.2,.7,.2,1) both; }
#film .words.rise > :nth-child(2) { animation-delay: .08s; }
#film .words.rise > :nth-child(3) { animation-delay: .16s; }
#film .words h2 { margin: 0 0 6px; font: 400 clamp(30px, 5.4vw, 66px)/1.05 var(--serif); letter-spacing: .03em; text-shadow: 0 6px 30px rgba(0,0,0,.6); }
#film .words p { margin: 0 0 16px; font-size: clamp(14px, 1.6vw, 18px); color: var(--ivory); text-shadow: 0 2px 14px rgba(0,0,0,.8); }
#film .step { pointer-events: auto; padding: 12px 22px; border-radius: 2px; text-transform: uppercase; font-size: 11px; letter-spacing: .2em; }
#film .words .step.walk-around { background: linear-gradient(135deg, #ecd9ac, #c19a58 55%, #e3c88f); border-color: transparent; color: var(--solid); font-weight: 700; }
#film .arrow { top: 44%; width: 50px; height: 50px; padding: 0 0 5px; border-radius: 50%; font: 300 30px/1 var(--serif); background: rgba(10,14,16,.45); backdrop-filter: blur(10px); }
#film .prev { left: 14px; }
#film .next { right: 14px; }
#film footer { left: 14px; right: 14px; bottom: var(--bottom); display: flex; flex-direction: column; gap: 8px; }
#film .strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; position: relative; }
#film .strip button { position: relative; flex: none; width: 92px; height: 58px; padding: 0; border-radius: 4px; overflow: hidden; opacity: .55; margin: 0; }
#film .strip button:first-child { margin-left: auto; }
#film .strip button:last-child { margin-right: auto; }
#film .strip button[aria-current="true"] { opacity: 1; background: transparent; border-color: var(--gold-2); }
#film .strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
#film .strip i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold-2); }
#film .line { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
#film .line small { flex: 1; text-align: center; font-size: 11px; color: var(--ivory); opacity: .85; }
#film .play { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 11px; }
#film .count { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

@keyframes film-in { from { opacity: 0; } }
@keyframes film-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes drift-in { from { transform: scale(1); } to { transform: scale(1.09); } }
@keyframes drift-out { from { transform: scale(1.09); } to { transform: scale(1); } }
@keyframes drift-left { from { transform: scale(1.08) translateX(1.6%); } to { transform: scale(1.08) translateX(-1.6%); } }
@keyframes drift-right { from { transform: scale(1.08) translateX(-1.6%); } to { transform: scale(1.08) translateX(1.6%); } }

/* upright phones: show the whole picture, with its blurred copy around it */
@media (max-aspect-ratio: 4/5) {
  #film .shot img:not(.wash), #film .shot video { object-fit: contain; object-position: center 36%; }
  #film .shot img:not(.wash) { animation: none; }
  #film .arrow { top: auto; bottom: calc(var(--bottom) + 116px); width: 42px; height: 42px; }
  #film .prev { left: auto; right: 66px; }
  #film .words { bottom: calc(var(--bottom) + 174px); }
  #film .strip button { width: 72px; height: 48px; }
}
@media (max-width: 720px) {
  #menu button#see-menu { color: var(--gold-2); }
  #intro .calls { gap: 8px; }
  #intro .calls button { padding: 9px 16px; }
  #film .line small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #film .shot, #film .shot img:not(.wash), #film .words.rise > * { animation: none; }
}

/* opening straight onto the building: name, parts of the project and weather */
#film .brand { margin: 0; font: 400 26px/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 2px 16px rgba(0,0,0,.7); }
#film .brand small { display: block; font: 600 10px/1.6 -apple-system, sans-serif; letter-spacing: .6em; color: var(--gold-2); }
#film header nav { display: flex; gap: 8px; }
#film header nav button { width: auto; height: auto; border-radius: 30px; padding: 10px 16px; font-size: 12px; background: rgba(10,14,16,.55); backdrop-filter: blur(10px); }
#film header nav button.gilt { background: linear-gradient(135deg, #ecd9ac, #c19a58 55%, #e3c88f); }
#film::after { background: linear-gradient(180deg, rgba(5,7,8,.6), transparent 20%, transparent 46%, rgba(5,7,8,.9)); }
#film .weather { position: absolute; z-index: 2; right: 18px; top: calc(74px + env(safe-area-inset-top)); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 70%; }
#film .weather button { font-size: 12px; padding: 7px 13px; background: rgba(10,14,16,.55); backdrop-filter: blur(10px); }
#film .weather button[aria-pressed="true"], #film .chapters button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--solid); }
#film .words { bottom: calc(var(--bottom) + 168px); }
#film .step { padding: 8px 16px; background: rgba(10,14,16,.45); }
#film .chapters { display: flex; justify-content: safe center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
#film .chapters button { flex: none; white-space: nowrap; text-transform: uppercase; font-size: 11px; letter-spacing: .14em; background: rgba(10,14,16,.6); }
#film .strip button { width: 118px; height: 72px; }
#film .strip button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 4px 4px; font-size: 10px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
#film .strip button:nth-child(n) { margin: 0; }
#film .strip { justify-content: safe center; }
#film .play { width: auto; height: auto; border-radius: 20px; padding: 7px 13px; white-space: nowrap; }
#film .line small { font-size: 10px; line-height: 1.5; }
@media (max-width: 720px) {
  #film .brand { font-size: 17px; }
  #film header { left: 12px; right: 10px; }
  #film header nav { gap: 4px; }
  #film header nav button { padding: 8px 9px; font-size: 10px; }
  #film .strip button { width: 86px; height: 54px; }
  #film .chapters { justify-content: flex-start; }
  #film .line small { font-size: 8.5px; }
  #film .count { display: none; }
}
@media (max-aspect-ratio: 4/5) {
  #film .words { bottom: calc(var(--bottom) + 220px); }
  #film .arrow { bottom: calc(var(--bottom) + 170px); }
}
#film header nav button.close { width: auto; height: auto; padding: 10px 16px; border-radius: 30px; white-space: nowrap; }
@media (max-width: 720px) { #film header nav button.close { padding: 8px 9px; } }

/* narrow phones: weather in one swipeable line, header kept inside the screen */
@media (max-width: 720px) {
  #film .weather { left: 10px; right: 10px; top: calc(66px + env(safe-area-inset-top)); max-width: none; flex-wrap: nowrap; justify-content: safe center; overflow-x: auto; scrollbar-width: none; }
  #film .weather button { flex: none; white-space: nowrap; font-size: 11px; padding: 6px 10px; }
}
@media (max-width: 400px) {
  #film .brand { font-size: 14px; letter-spacing: .1em; }
  #film .brand small { letter-spacing: .4em; }
  #film header nav button, #film header nav button.close { padding: 7px 8px; font-size: 10px; white-space: nowrap; }
}

/* panels sit above the pictures */
body.photo #drawer { z-index: 11; }
#film .words .step[hidden] { display: none; }

/* choosing a floor on the building */
#explore { position: fixed; inset: 0; z-index: 10; background: #0b0f11; display: flex; flex-direction: column; outline: none; }
#explore header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 8px; }
#explore header p { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
#explore .layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 14px; padding: 0 14px 14px; }
#explore .tower { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
#explore .tower > svg { width: 100%; height: auto; border-radius: 10px; flex: none; }
#explore polygon { fill: transparent; stroke: transparent; stroke-width: 1.5; cursor: pointer; outline: none; }
#explore polygon:hover, #explore polygon:focus-visible { fill: rgba(236,217,172,.38); stroke: #fff; }
#explore polygon.chosen { fill: rgba(236,217,172,.5); stroke: #fff; }
#explore .picker { display: flex; flex-direction: column; gap: 6px; }
#explore .picker div { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
#explore .picker button { padding: 6px 11px; font-size: 12px; }
#explore .side { min-height: 0; display: flex; flex-direction: column; background: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
#explore h2 { margin: 0 0 10px; font: 400 26px/1.15 var(--serif); }
#explore h3 { margin: 14px 0 8px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
#explore .content { flex: 1; min-height: 0; overflow-y: auto; }
#explore .note { font-size: 12px; color: var(--muted); margin: 8px 0; }
#explore .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
#explore .cards button { position: relative; padding: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; }
#explore .cards img { width: 100%; height: 100%; object-fit: cover; display: block; }
#explore .cards span { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px; font-size: 11px; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
#explore svg.plan { width: 100%; height: auto; max-height: 60vh; background: #f4efe7; border-radius: 8px; }
#explore svg.plan rect { stroke: #4a3f30; stroke-width: .08; fill: #e9ddc6; }
#explore svg.plan rect.core { fill: #b9b2a4; }
#explore svg.plan rect.open { cursor: pointer; fill: #dcc592; }
#explore svg.plan rect.open:hover { fill: #bd9c70; }
#explore svg.plan text { font: .34px sans-serif; fill: #251d10; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
#explore svg.plan text.no { font-weight: 700; font-size: .42px; }
#explore .walk { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
#explore .walk a { align-self: flex-start; text-decoration: none; padding: 11px 18px; border-radius: 30px; }
#explore .walk small { font-size: 11px; color: var(--muted); }
#film header nav button.floors { background: var(--gold); border-color: var(--gold); color: var(--solid); font-weight: 650; }
#film .words .floors-go { pointer-events: auto; padding: 12px 22px; border-radius: 2px; text-transform: uppercase; font-size: 11px; letter-spacing: .2em; }
@media (max-width: 820px) {
  #explore .layout { display: flex; flex-direction: column; overflow-y: auto; }
  #explore .tower, #explore .side, #explore .content { overflow: visible; flex: none; }
}

/* guided walking */
#film .walking { position: absolute; inset: 0; pointer-events: none; visibility: hidden; }
#film .walking.on { visibility: visible; }
#film .walking video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
#film .walking video.shown { opacity: 1; }
#film .stride { position: absolute; z-index: 3; right: 18px; bottom: calc(var(--bottom) + 190px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#film .stride button { padding: 13px 20px; touch-action: none; -webkit-touch-callout: none; background: rgba(10,14,16,.6); backdrop-filter: blur(10px); }
#film .stride button:first-child { background: var(--gold); border-color: var(--gold); color: var(--solid); font-weight: 650; }
#film .stride button:active { filter: brightness(1.2); }
#film .stride small { font-size: 11px; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
@media (max-aspect-ratio: 4/5) {
  #film .walking video { object-fit: contain; object-position: center 36%; }
  #film .stride { top: calc(112px + env(safe-area-inset-top)); bottom: auto; right: 12px; }
}

/* the front page: the building */
#front { position: fixed; inset: 0; z-index: 8; overflow: hidden; background: #07090a; }
#front > svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .75s cubic-bezier(.5,0,.8,.4), opacity .75s; }
#front.going > svg { opacity: .25; }
#front .opening { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: opacity 1.2s ease; }
@media (max-aspect-ratio: 5/4) { #front .opening { object-fit: contain; background: #07090a; } }
#front .opening-title { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 150px 20px calc(var(--bottom) + 24px); background: linear-gradient(transparent, rgba(5,7,8,.6) 45%, rgba(5,7,8,.88)); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; pointer-events: none; text-shadow: 0 2px 22px rgba(0,0,0,.95); transition: opacity .6s ease; animation: opening-rise 2.2s .5s both; }
#front .opening-title strong { font: 400 clamp(38px, 7vw, 92px)/1 var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--ivory); }
#front .opening-title span { font: 400 clamp(15px, 2vw, 22px) var(--serif); letter-spacing: .08em; color: var(--gold-2); }
#front .opening-title small { margin-top: 10px; font-size: 10px; color: var(--ivory); opacity: .85; }
@keyframes opening-rise { from { opacity: 0; transform: translateY(18px); } }
#front .opening.gone, #front .opening-title.gone { opacity: 0; pointer-events: none; }
#front .opening-title.gone { animation: none; }
#front > header, #front > .weather, #front > .rail, #front > .foot { transition: opacity .9s ease .2s; }
#front.intro > header, #front.intro > .weather, #front.intro > .rail, #front.intro > .foot { opacity: 0; visibility: hidden; }
#front .wash { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(30px) brightness(.4); transform: scale(1.15); }
#front polygon { fill: transparent; stroke: transparent; stroke-width: 1.5; cursor: pointer; outline: none; }
#front polygon:hover, #front polygon:focus-visible { fill: rgba(255,226,160,.42); stroke: #fff; }
#front header { position: absolute; z-index: 2; left: 20px; right: 16px; top: calc(14px + env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#front .brand { margin: 0; font: 400 28px/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 2px 16px rgba(0,0,0,.8); }
#front .brand small { display: block; font: 600 10px/1.6 -apple-system, sans-serif; letter-spacing: .6em; color: var(--gold-2); }
#front header nav { display: flex; gap: 8px; }
#front header button:not(.gilt), #front .weather button, #front .rail button { background: rgba(10,14,16,.62); backdrop-filter: blur(10px); }
#front .weather { position: absolute; z-index: 2; left: 16px; top: calc(76px + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#front .weather button { font-size: 12px; padding: 7px 13px; }
#front button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--solid); font-weight: 650; }
#front .rail { position: absolute; z-index: 2; right: 12px; top: calc(76px + env(safe-area-inset-top)); bottom: 70px; display: flex; flex-direction: column; justify-content: center; gap: 8px; width: 108px; }
#front .rail .wings { display: flex; gap: 4px; justify-content: center; }
#front .rail .wings button { padding: 5px 0; width: 32px; font-size: 12px; }
#front .rail .floors { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; overflow-y: auto; scrollbar-width: none; }
#front .rail .floors button { padding: 6px 0; font-size: 12px; border-radius: 8px; }
#front .rail .floors button:first-child, #front .rail .floors button:nth-last-child(-n+2) { grid-column: 1 / -1; }
#front .foot { position: absolute; z-index: 2; left: 16px; right: 136px; bottom: var(--bottom); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; pointer-events: none; text-shadow: 0 1px 10px rgba(0,0,0,.95); }
#front .foot strong { font: 400 clamp(20px, 2.6vw, 30px) var(--serif); }
#front .foot small { font-size: 10px; color: var(--ivory); opacity: .85; }
#front .tip { margin: 0; order: -1; background: var(--ivory); color: var(--solid); font-weight: 700; padding: 8px 16px; border-radius: 24px; text-shadow: none; }
@media (max-aspect-ratio: 5/4) {
  #front .weather { flex-direction: row; right: 10px; left: 10px; overflow-x: auto; scrollbar-width: none; }
  #front .weather button { flex: none; }
  #front .rail { top: auto; left: 10px; right: 10px; width: auto; bottom: 84px; }
  #front .rail .floors { display: flex; overflow-x: auto; }
  #front .rail .floors button { flex: none; min-width: 42px; padding: 9px 11px; }
  #front .foot { right: 16px; }
}
@media (max-width: 560px) { #front .brand { font-size: 16px; } #front header { left: 12px; right: 8px; } #front header nav { gap: 4px; } #front header button { padding: 7px 8px; font-size: 10px; white-space: nowrap; } }

/* the pictures of one floor */
#film .brand small.where { letter-spacing: .1em; font-size: 12px; text-transform: none; }
#film header nav button.home { background: var(--gold); border-color: var(--gold); color: var(--solid); font-weight: 700; }
#film.one-floor .chapters { display: none; }
#planbox { position: fixed; inset: 0; z-index: 10; background: rgba(5,7,8,.82); display: grid; place-items: center; padding: 14px; }
#planbox > div { width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: var(--solid); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
#planbox header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#planbox h2 { margin: 0; font: 400 22px var(--serif); }
#planbox p { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
#planbox svg.plan { width: 100%; height: auto; max-height: 68vh; background: #f4efe7; border-radius: 8px; }
#planbox svg.plan rect { stroke: #4a3f30; stroke-width: .08; fill: #e9ddc6; }
#planbox svg.plan rect.core { fill: #b9b2a4; }
#planbox svg.plan rect.open { cursor: pointer; fill: #dcc592; }
#planbox svg.plan rect.open:hover { fill: #bd9c70; }
#planbox svg.plan text { font: .34px sans-serif; fill: #251d10; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
#planbox svg.plan text.no { font-weight: 700; font-size: .42px; }
#front::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,7,8,.66), transparent 17%, transparent 72%, rgba(5,7,8,.82)); }
