/* drei. v4 "The House". Every rule is gated on html.v4 (set by house.js). Without JS the page is the original. */
.sound{display:none}
.v4{--fs:56px;--fg:#EFE8DC;--iv:#EFE8DC;--br:#b49a62;--ink:#1A1814;scroll-behavior:auto;background:#0a0908}
.v4 body{background:transparent;color:var(--fg);overflow-x:hidden}
.v4 .gl{position:fixed;inset:0;width:100%;height:100%;height:100lvh;display:block;z-index:0;pointer-events:none}
.v4 main,.v4 footer{position:relative;z-index:1}
.v4 .reveal{animation:none!important;opacity:1;transform:none}
.v4 ::selection{background:var(--br);color:#0a0908}

/* the walk: sections are only scroll length; their content is a fixed stage driven by the camera */
.v4 .opening{display:block;height:340svh;min-height:0;padding:0}
.v4 .sec{max-width:none;margin:0;padding:0;position:relative}
.v4 .sec[aria-labelledby=areas]{height:720svh}
.v4 .sec[aria-labelledby=principles]{height:520svh}
.v4 .divider{width:auto;height:30svh;background:none;margin:0}
.v4 .close{height:250svh;padding:0;position:relative}

/* the name, set above the door like a carved inscription: real type, whole pixels, no scaling */
.v4 .opening>div:not(.cue){position:fixed;left:0;top:0;width:100%;height:100%;height:100lvh;pointer-events:none;z-index:2;opacity:var(--ov,1)}
.v4 .mark{position:absolute;left:var(--nx,0px);right:0;width:100%;top:calc(var(--ny,30svh) - var(--fs)*.62);margin:0;font-size:var(--fs);line-height:1;letter-spacing:-.01em;
 color:var(--iv);animation:fade 3.2s var(--slow) .3s both;-webkit-font-smoothing:antialiased;text-rendering:geometricPrecision;font-kerning:normal}
.v4 .mark span{color:var(--br)}
.v4 .motto{position:absolute;left:var(--nx,0px);width:100%;top:calc(var(--ny,30svh) + var(--fs)*.55);margin:0;color:rgba(239,232,220,.62);
 animation:fade 3s var(--slow) 1.8s both;-webkit-font-smoothing:antialiased}
.v4 .opening .rule{position:absolute;left:calc(50% + var(--nx,0px));top:calc(var(--ny,30svh) + var(--fs)*.55 + 36px);width:28px;margin:0 0 0 -14px;background:var(--br);opacity:.5;
 animation:fade 3s var(--slow) 2.8s both}
.v4 .cue{position:fixed;animation:none;opacity:var(--cv,0);z-index:2;background:rgba(239,232,220,.12)}
.v4 .cue i{background:rgba(239,232,220,.5)}

/* beats: one line of the story at a time */
.v4 .sec>.sc,.v4 .sec>h2,.v4 .entries li,.v4 .close>div,.v4 .close .copy{position:fixed;left:0;right:0;z-index:2;margin:0!important;
 opacity:var(--v,0);pointer-events:none;transform:translate3d(var(--dx,0px),var(--dy,0px),0)}
.v4 .entries{margin:0}
.v4 .sc{color:#8a7445}
.v4 .entries .sc{margin-bottom:14px;letter-spacing:.42em;color:#8a7445}
.v4 h2,.v4 .entries h3{font-weight:300;color:var(--ink)}
/* areas: set low, on the sunlit floor of each room */
.v4 .sec[aria-labelledby=areas]>.sc{top:calc(70svh - 34px)}
.v4 .sec[aria-labelledby=areas]>h2{top:70svh;font-size:clamp(44px,11vw,76px);letter-spacing:.01em}
.v4 .sec[aria-labelledby=areas] .entries li{top:68svh}
.v4 .entries h3{font-size:clamp(36px,9vw,60px);letter-spacing:.015em;line-height:1.1}
/* principles: in the hall, each one stands inside the light on the far wall */
.v4 .sec[aria-labelledby=principles]>.sc{top:calc(66svh - 34px);color:var(--br)}
.v4 .sec[aria-labelledby=principles]>h2{top:66svh;color:var(--iv);font-size:clamp(44px,11vw,76px);letter-spacing:.01em}
.v4 .sec[aria-labelledby=principles] .entries li{top:var(--ty,24svh);transform:translate3d(var(--tx,0px),var(--dy,0px),0)}
.v4 .sec[aria-labelledby=principles] .entries .sc{color:#7c683e}
.v4 .sec[aria-labelledby=principles] .entries h3{font-size:clamp(32px,8vw,54px)}
/* the invitation, on the lit wall */
.v4 .close>div{top:30svh}
.v4 .close .mail{font-size:clamp(14px,1.2vw,17px);letter-spacing:.3em}
.v4 .close .mail a{color:var(--ink);border-bottom:1px solid rgba(124,104,62,.55);padding-bottom:8px}
.v4 .close .mail a:hover{border-bottom-color:var(--ink)}
.v4 .close .mail a:focus-visible{outline:1px solid var(--ink)}
.v4 .close .copy{top:auto;bottom:max(26px,4svh);color:#5e5547}
.v4 .close.live>div{pointer-events:auto}

/* sound (off by default) */
.v4 .sound{display:block;position:fixed;right:clamp(14px,2.2vw,30px);bottom:clamp(14px,2.2vw,30px);z-index:8;width:40px;height:40px;border-radius:50%;
 border:1px solid rgba(239,232,220,.4);background:transparent;mix-blend-mode:difference;color:#fff;cursor:pointer;opacity:0;animation:fade 2s var(--slow) 5s both}
.v4 .sound svg{width:100%;height:100%;fill:#fff}
.v4 .sound rect{transform-origin:50% 50%;transform-box:fill-box}
.v4 .sound[aria-pressed=true] rect{animation:eq 1.6s ease-in-out infinite}
.v4 .sound[aria-pressed=true] rect:nth-child(2){animation-delay:-.4s}.v4 .sound[aria-pressed=true] rect:nth-child(3){animation-delay:-.8s}.v4 .sound[aria-pressed=true] rect:nth-child(4){animation-delay:-1.2s}
.v4 .sound:focus-visible{outline:1px solid #fff;outline-offset:4px}
@keyframes eq{0%,100%{transform:scaleY(1)}50%{transform:scaleY(3)}}

/* no WebGL: the same walk, painted: dark street with the door's light, then stone, then the hall and its light */
.v4.nogl body::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
 background:radial-gradient(ellipse var(--pw,20%) var(--ph,34%) at var(--px,50%) var(--py,42%),var(--pc,rgba(236,214,172,.4)),transparent),linear-gradient(to bottom,var(--b1,#0c0b09),var(--b2,#16130f))}

@media (min-width:700px){
 .v4{--fs:66px}
 .v4 .sec[aria-labelledby=areas] .entries li{top:70svh}
}
@media (prefers-reduced-motion:reduce){
 .v4 .mark,.v4 .motto,.v4 .opening .rule,.v4 .sound{animation:none!important;opacity:1}
 .v4 .motto{opacity:1}.v4 .opening .rule{opacity:.5}
}
