/* La casa, the first scene. The existing home and letter keep their own styles. */
.house-link{font-size:clamp(13px,.95vw,18px);color:var(--soft);text-decoration:none;display:inline-flex;align-items:center;min-height:44px;padding:0 12px;margin-right:auto;margin-left:26px}
.house-link:hover{color:var(--light);text-decoration:underline;text-decoration-thickness:1px}
.house-leaving #experience,.house-leaving .masthead,.house-leaving .skip{opacity:0!important;transition:opacity 380ms ease!important;pointer-events:none}
@media(max-width:760px){.house-link{margin-left:auto;margin-right:8px;padding:0 4px;font-size:13px}.masthead{gap:8px}.masthead .location{max-width:88px;line-height:1.5}}
.house-page{--green:#17231e;--paper:#f7f4ec;--soft:#c7d0ca;background:var(--green);color:var(--paper);margin:0;font-family:MolardOptima,Optima,serif;-webkit-font-smoothing:antialiased}
html:has(.house-page){background:#17231e;scrollbar-color:#87978a #17231e}
/* Applied in the head, before the first entry paint. Removed once the cue appears. */
html.house-entry-locked{overflow:hidden;overscroll-behavior:none;scrollbar-gutter:stable}
html.house-entry-locked .house-page{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none;touch-action:pinch-zoom}
html.house-entry-locked .house-scroll{pointer-events:none}
.house-page *{box-sizing:border-box}
.house-page ::selection{background:#b7c6bb;color:#17231e}
.house-entry{position:relative;min-height:100svh;overflow:hidden;isolation:isolate;background:var(--green)}
.house-city{position:absolute;top:3svh;left:50%;transform:translateX(-50%);width:min(72svh,calc(100vw - 40px));height:77svh;pointer-events:none;mask-image:linear-gradient(to bottom,transparent,#000 6%,#000 85%,transparent);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 6%,#000 85%,transparent)}
.house-city img,.house-city canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.house-city canvas{opacity:0}.house-entry.is-drawing canvas,.house-entry.has-drawing canvas{opacity:1}.house-entry.is-drawing img,.house-entry.has-drawing img{visibility:hidden}
.house-welcome{position:absolute;left:20px;right:20px;bottom:12svh;margin:0;text-align:center;font-family:MolardOptima,Optima,serif;font-size:clamp(38px,4.1vw,64px);line-height:1.12;font-weight:400;text-wrap:balance}
.house-scroll{position:absolute;bottom:3.6svh;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:13px;color:var(--soft);font-size:13px;white-space:nowrap}
.house-scroll svg{width:20px;height:28px}
.house-back{position:absolute;z-index:2;top:20px;left:clamp(22px,4.5vw,72px);color:var(--soft);font-size:13px;text-decoration:none;min-height:44px;display:inline-flex;align-items:center;gap:9px}
.house-back:hover{color:var(--paper);text-decoration:underline;text-underline-offset:5px}.house-back svg{width:18px;height:18px}
.house-back:focus-visible{outline:none;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:6px}.house-welcome:focus{outline:none}
.house-entry.is-drawing .house-welcome,.house-entry.is-drawing .house-scroll{opacity:0}
/* A quiet handoff from the last drawn stroke. Opacity only keeps the welcome
   anchored at the exact centre throughout, including wrapped translations. */
.house-entry.is-complete .house-welcome{animation:house-words 1800ms 160ms cubic-bezier(.4,0,.2,1) both}.house-entry.is-complete .house-scroll{animation:house-words 1500ms 650ms cubic-bezier(.4,0,.2,1) both}
@keyframes house-words{from{opacity:0}to{opacity:1}}
html.house-static-entry .house-entry.is-complete .house-welcome,
html.house-static-entry .house-entry.is-complete .house-scroll{animation:none}
@media(max-width:600px){.house-city{top:10svh;height:65svh;width:calc(100vw - 28px)}.house-welcome{bottom:15svh;font-size:clamp(34px,8.7vw,48px)}.house-scroll{bottom:5svh}.house-back{top:12px}}
@media(max-height:500px) and (min-width:601px){.house-city{top:0;height:72svh}.house-welcome{font-size:32px;bottom:15svh}.house-scroll{font-size:12px;bottom:2svh;gap:4px}.house-scroll svg{height:18px}}
@media(prefers-reduced-motion:reduce){.house-leaving #experience,.house-leaving .masthead{transition:none!important}.house-entry.is-complete .house-welcome,.house-entry.is-complete .house-scroll{animation:none}}

/* Full-screen artwork, with the welcome at the visual centre. */
.house-city{inset:0;transform:none;width:100%;height:100svh;mask-image:none;-webkit-mask-image:none}
.house-city img{object-fit:cover;object-position:50% 42%}
.house-welcome{top:50%;bottom:auto;transform:translateY(-50%);font-size:clamp(38px,4.1vw,68px);z-index:1}
.house-welcome-line{white-space:nowrap}
@media(max-width:760px){.house-welcome-line{display:block}}
.house-link{white-space:nowrap;flex-shrink:0}
.house-preparing .house-city,.house-preparing .house-welcome,.house-preparing .house-scroll{visibility:hidden}
@media(max-width:760px){.house-link{margin:0;padding:0 4px}.masthead{gap:6px}.masthead .location{max-width:70px}}
@media(max-width:600px){.house-city{inset:0;width:100%;height:100svh}.house-welcome{top:50%;bottom:auto;font-size:clamp(34px,8.7vw,48px)}.house-city img{object-position:54% 40%}}

/* The green is always the site surface. Screen blends only the pale drawing marks. */
.house-city{filter:grayscale(1) contrast(1.4);mix-blend-mode:screen;opacity:.72}
.house-back{background:#17231e;padding:0 12px;left:clamp(10px,3.7vw,60px)}

.house-city picture{position:absolute;inset:0;display:block}
.house-city img{mask-image:url('/assets/geneve-ink-mask.svg');-webkit-mask-image:url('/assets/geneve-ink-mask.svg');mask-size:cover;-webkit-mask-size:cover;mask-position:50% 42%;-webkit-mask-position:50% 42%;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}
@media(max-width:600px){.house-city img{mask-image:url('/assets/geneve-ink-mask-mobile.svg');-webkit-mask-image:url('/assets/geneve-ink-mask-mobile.svg')}}
.house-city picture,.house-city canvas{mask-image:linear-gradient(to bottom,#000 72%,transparent 98%);-webkit-mask-image:linear-gradient(to bottom,#000 72%,transparent 98%)}
@media(max-width:600px){.house-city img{object-position:50% 42%}.house-city{opacity:.65;mask-image:radial-gradient(ellipse 75% 16% at 50% 50%,rgba(0,0,0,.15),rgba(0,0,0,.55)55%,#000 100%);-webkit-mask-image:radial-gradient(ellipse 75% 16% at 50% 50%,rgba(0,0,0,.15),rgba(0,0,0,.55)55%,#000 100%)}}

/* Return stays quiet during the drawing, then appears as plain type and arrow. */
.house-back{background:transparent;padding:0;font-size:16px;color:var(--paper);left:clamp(22px,4.5vw,72px);text-shadow:0 1px 4px #17231e,0 2px 12px #17231e}
.house-back svg{width:21px;height:21px}
.house-preparing .house-back,.house-entry.is-drawing .house-back{visibility:hidden;opacity:0;pointer-events:none}
.house-entry.is-complete .house-back{animation:house-words 700ms 200ms ease-out both}
@media(prefers-reduced-motion:reduce){.house-entry.is-complete .house-back{animation:none}}

/* A little air above the drawing keeps the navigation on uninterrupted green. */
.house-city{--art-offset:clamp(28px,4svh,44px);top:var(--art-offset);bottom:auto;height:calc(100svh - var(--art-offset))}
.house-city picture,.house-city canvas{mask-image:linear-gradient(to bottom,transparent,rgba(0,0,0,.25) 46px,#000 112px,#000 72%,transparent 98%);-webkit-mask-image:linear-gradient(to bottom,transparent,rgba(0,0,0,.25) 46px,#000 112px,#000 72%,transparent 98%)}
@media(max-width:600px){.house-city{mask-image:radial-gradient(ellipse 90% 12% at 50% calc(50% - 16px),rgba(0,0,0,.08),rgba(0,0,0,.25)60%,#000 100%);-webkit-mask-image:radial-gradient(ellipse 90% 12% at 50% calc(50% - 16px),rgba(0,0,0,.08),rgba(0,0,0,.25)60%,#000 100%)}}
@media(max-height:500px) and (min-width:601px){.house-city{--art-offset:20px}.house-city picture,.house-city canvas{mask-image:linear-gradient(to bottom,transparent,#000 64px,#000 72%,transparent 98%);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 64px,#000 72%,transparent 98%)}}

/* Centre the breathing space around the welcome, not the asymmetric facades.
   The whole artwork layer shares the crop, including the drawing and static fallback. */
.house-city{left:-3vw;width:104vw;--welcome-space:radial-gradient(ellipse 34% 18% at 53vw calc(50% - var(--art-offset)/2),rgba(0,0,0,.12),rgba(0,0,0,.38) 55%,rgba(0,0,0,.78) 80%,#000 100%);mask-image:var(--welcome-space);-webkit-mask-image:var(--welcome-space)}
@media(max-width:600px){.house-city{left:-4vw;width:106vw;--welcome-space:radial-gradient(ellipse 100% 18% at 54vw calc(50% - var(--art-offset)/2),rgba(0,0,0,.08),rgba(0,0,0,.3) 60%,#000 100%)}}

/* Keep the invitation only on the fully visible cover, independently of its intro fade. */
.house-scroll{transition:visibility 180ms}
.house-scroll > *{transition:opacity 180ms ease-out}
.house-scroll.is-away{visibility:hidden;pointer-events:none}
.house-scroll.is-away > *{opacity:0}
@media(prefers-reduced-motion:reduce){.house-scroll,.house-scroll > *{transition:none}}
