/* Figma 638:611 is the full-screen end state of this reversible scroll scene. */
.hero-stage { position: relative; height: 100%; }
.hero-slogan, .hero-scroll-cue { visibility: hidden; }
.brand { position: relative; }
.main-nav .active, .contact-button { color: var(--green); }
.contact-button .button-icon { background-color: var(--green); }
.hero-scroll {
  height: 385svh; min-height: 0; overflow: visible;
  --expand: 0; --title-opacity: 1; --title-shift: 0px;
  --retreat: 0; --room-scale: 1.52; --room-opacity: 0; --frame-opacity: 0; --header-opacity: 1;
  --slogan-opacity: 0; --slogan-shift: 28px;
  --media-left: 14%; --media-width: 72%;
  --media-top: calc(452 * var(--v)); --media-height: calc(740 * var(--v));
  --screen-width: calc(887 * var(--u)); --screen-height: calc(500 * var(--v));
}
.hero-scroll .hero-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; }
.hero-scroll .site-header { z-index: 4; opacity: var(--header-opacity); }
.hero-scroll.in-showroom .site-header { visibility: hidden; pointer-events: none; }
.hero-scroll .hero-heading { z-index: 1; opacity: var(--title-opacity); translate: 0 var(--title-shift); }
.hero-scroll.title-dismissed .hero-heading { visibility: hidden; pointer-events: none; }
.hero-scroll .hero-art {
  z-index: 0; bottom: auto; overflow: visible;
  left: calc(var(--media-left) * (1 - var(--expand)));
  top: calc(var(--media-top) * (1 - var(--expand)));
  width: calc(var(--media-width) + (100% - var(--media-width)) * var(--expand));
  height: calc(var(--media-height) + (100% - var(--media-height)) * var(--expand));
  border-radius: calc(10px * (1 - var(--expand)));
  transform-origin: center; will-change: transform; backface-visibility: hidden;
}
.hero-scroll .hero-video { will-change: transform; }
.hero-media {
  position: absolute; inset: 0; overflow: hidden; isolation: isolate;
  border-radius: inherit; transform: translateZ(0); background: #071b1b;
}
.hero-media > .neural-shade { pointer-events: none; }
.hero-scroll .hero-art::after {
  --frame-size: max(6px, calc(12 * var(--u)));
  content: ''; position: absolute; inset: calc(-1 * var(--frame-size)); pointer-events: none;
  z-index: 2; border: var(--frame-size) solid #1c1b20;
  opacity: var(--frame-opacity);
  /* Cover subpixel seams between the room opening and the composited video. */
  box-shadow: inset 0 0 0 3px #1c1b20;
}
.hero-scroll .showroom-layer {
  position: absolute; inset: 0; height: 100%; min-height: 0;
  opacity: var(--room-opacity); pointer-events: none;
  background: #071012; transform: scale(var(--room-scale)); transform-origin: 50% 50%;
  will-change: transform; backface-visibility: hidden;
}
.hero-scroll .hero-stage::after {
  content: ''; position: absolute; z-index: 3; pointer-events: none;
  left: 0; right: 0; bottom: -1px; height: 32%;
  opacity: var(--retreat);
  background: linear-gradient(to bottom, #04242400 0%, #04242426 28%, #04242499 61%, #042424eb 84%, #042424 100%);
}
.showroom-layer .showroom-screen { display: none; }
.showroom-layer .showroom-background {
  /* Uniform cover scale; the framed video uses the same room geometry. */
  inset: auto; left: 50%; top: 50%; max-width: none;
  width: var(--room-width);
  height: var(--room-height);
  transform: translate(-50%, -53.65%); object-fit: cover;
}
.showroom-layer .showroom-floor { display: none; }
.hero-scroll .hero-slogan {
  position: absolute; z-index: 2; left: calc(80 * var(--u)); top: calc(820 * var(--v));
  font-size: calc(64 * var(--u)); line-height: calc(80 * var(--v)); font-weight: 500;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  color: #fff; visibility: visible; opacity: var(--slogan-opacity);
  translate: 0 var(--slogan-shift); pointer-events: none;
}
.hero-scroll .hero-scroll-cue {
  position: absolute; z-index: 2; right: calc(80 * var(--u)); top: calc(960 * var(--v));
  color: #fff9; font-size: calc(16 * var(--u)); line-height: calc(20 * var(--v));
  visibility: hidden; opacity: var(--slogan-opacity); translate: 0 var(--slogan-shift);
}
.hero-scroll.slogan-visible .hero-scroll-cue { visibility: visible; }
@media (max-width: 1023px) {
  .hero-scroll {
    --media-left: 9%; --media-width: 82%;
    --media-top: max(280px, calc(200px + 70 * var(--u)));
    --media-height: calc(100svh - var(--media-top) - 64px);
    --screen-width: 80vw; --screen-height: 35svh;
  }
  .showroom-layer .showroom-background { mask-image: none; }
  .hero-scroll .hero-slogan { left: 22px; top: auto; bottom: 120px; font-size: clamp(32px, 8.2vw, 52px); line-height: 1.25; }
  .hero-scroll .hero-scroll-cue { right: 22px; top: auto; bottom: 64px; font-size: 12px; line-height: 20px; }
}

/* Soft moving light on the floor, fading into the room's existing texture. */
.showroom-reflection {
 position:absolute;z-index:4;left:50%;top:var(--reflection-y,var(--reflection-top));
 width:calc(var(--reflection-width) * var(--room-scale));height:calc(var(--reflection-height) * var(--room-scale));max-width:none;
 transform:translateX(-50%) scaleY(-1);pointer-events:none;
 filter:blur(clamp(4px,.5vw,10px)) saturate(1.2) brightness(1.15) contrast(1.1);
 opacity:calc(var(--reflection-opacity,0) * .70);mix-blend-mode:screen;
 mask-image:linear-gradient(to top,#000b 0%,#000 12%,#000b 42%,#0003 75%,transparent 100%),linear-gradient(to right,transparent,#000 12%,#000 88%,transparent);
 mask-composite:intersect;
}

/* Fade every composited layer, including the reflection, into the next section. */
.hero-scroll .hero-stage::before {
 content:'';position:absolute;z-index:5;pointer-events:none;
 inset:auto 0 -1px;height:18%;opacity:var(--retreat);
 background:linear-gradient(to bottom,#04242400 0%,#04242455 30%,#042424d9 72%,#042424 98%);
}

/* Clip after blur, at the actual wall/floor joint of the scaled room artwork. */
.showroom-reflection-floor {
 position:absolute;inset:0;z-index:4;pointer-events:none;
 clip-path:inset(var(--floor-y,100%) 0 0);mix-blend-mode:screen;
}
.showroom-reflection-floor .showroom-reflection {mix-blend-mode:normal}
/* Feather only the inset entrance; fullscreen and the wall frame stay crisp. */
.hero-scroll .hero-media {
 --edge-feather:calc(16px * (1 - var(--expand)));
 mask-image:linear-gradient(to right,transparent,#000 var(--edge-feather),#000 calc(100% - var(--edge-feather)),transparent),linear-gradient(to bottom,transparent,#000 var(--edge-feather),#000 calc(100% - var(--edge-feather)),transparent);
 mask-composite:intersect;
}

/* Portrait screens retain a full-height room but a viewport-sized display.
   Remove the baked-in opening so it cannot show through beside the smaller video. */
.hero-scroll.compact-screen .showroom-layer {
 background-color:#181c20;
 background-image:linear-gradient(90deg,#0002,transparent 35%,#ffffff03 55%,#0002),
  repeating-linear-gradient(90deg,transparent 0,transparent calc(var(--room-width) * .064 - 2px),#090e11 0,#2b3033 calc(var(--room-width) * .064));
 background-position:center;
}
.compact-screen .showroom-layer .showroom-background {
 clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,25.8% 29.8%,25.8% 78%,74.2% 78%,74.2% 29.8%,25.8% 29.8%);
}
