/* Phones: svh is the screen with the browser's address bar showing, dvh follows it as the bar slides away on scroll. The stage and the photo use dvh (svh first, for browsers without it) so nothing is left uncovered below the bottom bar once the address bar hides. */
#hero{height:440vh;position:relative;background:#fff}
.stage{position:sticky;top:64px;height:calc(100svh - 64px);height:calc(100dvh - 64px);background:#fff;overflow:hidden}
.sc{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,calc((100svh - 64px)*var(--ratio,2.1132)));width:max(100%,calc((100dvh - 64px)*var(--ratio,2.1132)));aspect-ratio:var(--ratio,2.1132)}
.sc>img,.sc>svg{position:absolute;inset:0;width:100%;height:100%;display:block;-webkit-user-drag:none;user-select:none}
#ph{clip-path:inset(0 100% 0 0)}#bp,#lg{mix-blend-mode:multiply}
#bp{-webkit-mask-image:linear-gradient(to top,#000 var(--m,-14%),transparent calc(var(--m,-14%) + 14%));mask-image:linear-gradient(to top,#000 var(--m,-14%),transparent calc(var(--m,-14%) + 14%))}
#scan{position:absolute;top:0;bottom:0;width:3px;left:0;background:#fff;box-shadow:0 0 26px 9px rgba(201,170,110,.85);opacity:0;pointer-events:none}
.hs{pointer-events:none;opacity:0;transition:opacity .6s}.live .hs{opacity:1}.live .z{pointer-events:auto;cursor:pointer}
.z polygon{fill:rgba(201,170,110,0);stroke:rgba(255,255,255,0);stroke-width:var(--sw,5);transition:fill .25s,stroke .25s}
.z:hover polygon,.z:focus polygon,.z.on polygon{fill:rgba(201,170,110,.34);stroke:#fff}.z:focus{outline:none}
.dot{fill:#fff;stroke:var(--cu);stroke-width:6;pointer-events:none}
.ring{fill:none;stroke:#fff;stroke-width:4;transform-box:fill-box;transform-origin:center;animation:pl 2.2s infinite;pointer-events:none}@keyframes pl{from{transform:scale(1);opacity:.9}to{transform:scale(3.4);opacity:0}}
#bar{position:absolute;z-index:4;top:14px;left:50%;transform:translateX(-50%);max-width:calc(100% - 28px);display:flex;align-items:center;gap:18px;padding:8px 8px 8px 22px;border-radius:0;background:rgba(251,249,244,.88);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 10px 30px -14px rgba(15,27,46,.45)}
#cap{font:400 clamp(.72rem,1vw,.92rem)/1.25 "Special Gothic Expanded One",sans-serif;transition:opacity .3s}
#bar .acts{flex-wrap:nowrap;gap:12px}#bar .btn{padding:.85em 1.3em;white-space:nowrap}.sr{position:absolute;left:-9999px}
#pop{position:fixed;z-index:5;width:min(300px,86vw);background:var(--card);border:1px solid var(--line);border-radius:0;padding:20px;box-shadow:0 24px 50px -16px rgba(15,27,46,.5);opacity:0;pointer-events:none;transform:translate(-50%,0);transition:opacity .2s}
#pop.up{transform:translate(-50%,-100%)}#pop.open{opacity:1;pointer-events:auto}
#pop .x{position:absolute;top:8px;right:12px;border:0;background:none;font-size:1.5rem;cursor:pointer;color:var(--mut)}

@media(max-width:720px){#pop,#pop.up{left:12px!important;right:12px;top:auto!important;bottom:calc(12px + env(safe-area-inset-bottom));width:auto;transform:none;max-height:60svh;overflow:auto}}
@media(prefers-reduced-motion:reduce){#hero{height:auto}.stage{position:relative}}

/* portrait screens: full-height pinned stage, photo centred above the caption, blurred copy of the photo fills the space */
#bd{display:none;position:absolute;inset:-6%;width:112%;height:112%;object-fit:cover;filter:blur(22px) brightness(.8);clip-path:inset(0 100% 0 0);pointer-events:none}


/* portrait screens use the vertical hero set: the photo fills the stage (anchored at the bottom), pop-ups open in the sky above the house */
@media(max-aspect-ratio:1/1){
.sc{--ratio:.731555;top:auto;bottom:var(--lift,0px);transform:translateX(-50%)}#bd{display:none!important}
#bar{top:auto;bottom:0;left:0;right:0;transform:none;max-width:none;flex-direction:column;gap:10px;padding:14px 14px calc(14px + env(safe-area-inset-bottom));text-align:center;background:rgba(251,249,244,.95);box-shadow:0 -12px 30px -18px rgba(15,27,46,.5)}
#cap{min-height:3.6em;display:flex;align-items:center;justify-content:center}#bar .acts{width:100%;flex-wrap:wrap;justify-content:center}#bar .btn{flex:1;text-align:center}
#pop,#pop.up{left:50%!important;right:auto!important;top:calc(64px + 14px)!important;bottom:auto!important;width:min(420px,calc(100vw - 28px));transform:translateX(-50%)!important;max-height:none}}

/* scroll cue: small, pinned with the hero, loops gently */
.sd{position:absolute;right:clamp(14px,2.6vw,40px);bottom:clamp(28px,6vh,60px);z-index:4;display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 9px 12px;background:rgba(255,255,255,.9);border:1px solid var(--line);color:var(--ink);text-decoration:none;font:600 .66rem "Mukta Vaani",sans-serif;letter-spacing:.3em;text-transform:uppercase;box-shadow:0 10px 28px -16px rgba(22,48,45,.5);transition:background .25s}
.sd:hover{background:#fff}.sd span{writing-mode:vertical-rl}
.sd i{position:relative;display:block;width:1.5px;height:38px;background:rgba(22,48,45,.18);overflow:hidden}
.sd i:after{content:"";position:absolute;left:0;top:-100%;width:100%;height:100%;background:var(--gold);animation:sdl 2.2s cubic-bezier(.65,0,.35,1) infinite}
.sd svg{width:12px;height:8px;fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linecap:square;animation:sdb 2.2s ease-in-out infinite}
@keyframes sdl{0%{top:-100%}60%,100%{top:100%}}
@keyframes sdb{0%,100%{transform:translateY(0);opacity:.45}50%{transform:translateY(5px);opacity:1}}
@media(max-aspect-ratio:1/1){.sd{right:12px;bottom:calc(180px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.sd i:after,.sd svg{animation:none}.sd i:after{top:0}}

/* hero buttons stack on portrait screens: one per row, full width, so the labels are never cropped */
@media(max-aspect-ratio:1/1){#bar .acts{flex-direction:column;flex-wrap:nowrap;gap:10px;width:100%}#bar .btn{flex:none;width:100%;white-space:normal}}

/* portrait: the photo is lifted (--lift, set in index.html) so the house always ends above the button bar; the scroll cue steps aside once the house is tappable */
@media(max-aspect-ratio:1/1){.sd{transition:opacity .4s,visibility .4s,background .25s}.sc.live~.sd{opacity:0;visibility:hidden;pointer-events:none}}

/* small screens: the pop-up lives inside the hero stage, so it scrolls away with the hero instead of floating over the sections below */
.stage>#pop,.stage>#pop.up{position:absolute;left:50%!important;right:auto!important;top:14px!important;bottom:auto!important;width:min(420px,calc(100% - 28px));transform:translateX(-50%)!important;max-height:none}
@media(max-width:720px) and (min-aspect-ratio:1/1){.stage>#pop,.stage>#pop.up{left:12px!important;right:12px!important;top:auto!important;bottom:12px!important;width:auto;transform:none!important;max-height:calc(100% - 24px);overflow:auto}}
