/* Desktop gallery moves left during normal vertical page scrolling. */
@keyframes home-hero-scroll-progress{
 from{transform:translate3d(0,0,0)}
 to{transform:translate3d(var(--hero-scroll-end-x),0,0)}
}
:is(.hero,.projects-opening,.contact-opening)::before{content:"";display:block;height:var(--home-opening-top,0px)}
.home-opening-stage{display:contents}
.home-opening-content{display:flow-root}
.home-opening-space{
 position:relative;
 height:var(--home-opening-bottom,100vh);
 height:var(--home-opening-bottom,100lvh);
}
/* Hide the gallery until the opening and slider settle. Reveal it if setup is unavailable. */
.hero-scroll-gallery:not(.home-gallery-positioned){
 visibility:hidden;
 animation:home-gallery-startup-fallback 0s 1s forwards;
}
@keyframes home-gallery-startup-fallback{to{visibility:visible}}
.home-opening-active{overflow-anchor:none}
.home-action-blur-pad{pointer-events:none}
.home-action-blur-pad>a{pointer-events:auto}
.home-scroll-cue:not([hidden]){
 position:fixed;top:var(--home-opening-cue-offset,24px);left:50%;translate:-50% 0;
 display:grid;place-items:center;width:46px;height:46px;padding:0;border:0;border-radius:50%;
 background:none;color:var(--ink);cursor:pointer;touch-action:manipulation;
}
.home-scroll-cue:focus-visible{outline:2px solid #0071e3;outline-offset:2px}
.home-scroll-cue::before{
 content:"";width:17px;height:17px;border:solid currentColor;border-width:0 1.5px 1.5px 0;
 rotate:45deg;translate:0 -2px;
}
@media(max-width:760px){
 .home-opening-stage{display:flow-root}
 .home-opening-space{min-height:max(0px,calc(100lvh + 56px + env(safe-area-inset-bottom,0px) - var(--home-opening-space-start,100lvh)))}
 .home-opening-compact .home-scroll-cue::before{animation-play-state:paused}
}
@media(max-width:760px) and (prefers-reduced-motion:no-preference){
 .home-opening-content{position:sticky;top:var(--home-mobile-opening-pin-top,auto)}
 .home-scroll-cue{transition:opacity .18s ease-out,visibility .18s}
}
@media(min-width:761px){
 .home-opening-active :is(.hero,.projects-opening,.contact-opening){overflow-x:clip}
 .home-opening-content{
  position:relative;z-index:2;scale:var(--home-opening-scale,none);
 }
 .hero-scroll-gallery{margin-top:var(--hero-button-gap,26px)}
 .hero-page-scroll-rail{position:relative;display:flow-root}
 .hero-page-scroll-rail>main{position:sticky;top:var(--hero-page-pin-top,0px)}
 .hero-scroll-gallery .gallery-controls{display:none}
 .hero-scroll-active .gallery-window.native-slider-window,
 .hero-scroll-active .gallery-window{overflow:hidden;scroll-snap-type:none;touch-action:pan-y;cursor:auto}
 .hero-scroll-active.hero-scroll-gallery .gallery-window.native-slider-centered .gallery-track.native-slider-track.native-slider-track,
 .hero-scroll-active .gallery-window .gallery-track{left:0;transition:none;will-change:transform;backface-visibility:hidden;padding-inline:var(--hero-side-start,0px) var(--hero-side-end,0px);box-sizing:content-box}
 .hero-scroll-active .hero-slide{contain:paint}
 @supports (animation-timeline:scroll(root block)) and (animation-range:0px 1px){
  .hero-scroll-native .gallery-track{
   animation:home-hero-scroll-progress 1s linear both;
   animation-timeline:scroll(root block);
   animation-range:var(--hero-scroll-start) var(--hero-scroll-end);
  }
 }
}

/* Projects share the homepage opening while their cards remain a vertical grid. */
#main .projects-opening>.home-opening-stage>.architecture-hero{
 width:var(--site-content-width);padding:0 0 72px;overflow:visible;
}
.projects-opening .architecture-title-line{white-space:normal;text-wrap:balance}
@media(min-width:761px){
 #main .projects-opening .architecture-hero{
  max-width:calc(var(--site-content-width) / 1.27);
  scale:var(--home-opening-scale,1);
 }
 .projects-opening+.projects-collection{padding-top:clamp(56px,5vw,76px)}
}
@media(max-width:760px){
 #main .projects-opening>.home-opening-stage>.architecture-hero{padding-block:12px 78px}
}
@media(prefers-reduced-motion:no-preference){
 .home-scroll-cue::before{animation:home-scroll-pulse 1.65s ease-in-out infinite}
}
@keyframes home-scroll-pulse{
 0%,100%{translate:0 -3px;opacity:.6}
 50%{translate:0 9px;opacity:1}
}

/* Match the opening photograph's width, side margins and rounded corners. */
@media(min-width:761px){
 .hero-scroll-gallery .hero-slide.photo-slide.photo-ending{width:auto;aspect-ratio:var(--hero-max-ratio);border-radius:24px}
 .hero-scroll-gallery .photo-ending img{object-fit:contain;object-position:center;background:#d7dadd}
}

/* The final frame pairs the two selected details in the chosen order. */
.hero-scroll-gallery .hero-slide.photo-slide.photo-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:var(--slide-gap);border-radius:0;background:transparent;overflow:visible}
.hero-pair-image{position:relative;min-width:0;min-height:0;width:100%;height:100%;border-radius:24px;overflow:hidden;background:#f4f5f6}
.hero-scroll-gallery .photo-pair img{position:static;display:block;width:100%;height:100%;object-fit:cover;object-position:center;background:#f4f5f6}
@media(max-width:760px){.hero-pair-image{border-radius:18px}}

@media(max-width:760px){
 .hero-scroll-gallery .hero-slide.photo-slide.photo-ending{border-radius:18px}
 .hero-scroll-active .gallery-window{overscroll-behavior:auto;touch-action:pan-y}
}

/* Keep both opening headline lines black, with the original blue full stop. */
.hero .hero-title .hero-scroll-first-line,
.hero .hero-title .hero-scroll-trigger{color:#000}
.hero .hero-title .hero-scroll-trigger>.hero-primary-dot{color:#0071e3}
