/* Gateway artwork, particles and controls share the same optical center. */
.glimmer-home .gateway-hero {
  isolation:isolate;
  overflow:clip;
  min-height:min(960px,100svh);
  padding-block:108px 96px;
}
.gateway-hero .hero-grid {
  width:min(76%,1280px);
  max-width:none;
  padding-inline:0;
  grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);
  gap:clamp(28px,3vw,54px);
}
.gateway-copy { position:relative; z-index:2; translate:0 -40px; }
.gateway-hero h1 { font-size:clamp(2.35rem,5.3vw,5.55rem); white-space:nowrap; }
.gateway {
  --gateway-pivot:55%;
  --gateway-scene-light:1;
  position:relative;
  min-width:0;
  height:clamp(450px,46vw,715px);
  translate:0 -12px;
}
.gateway-visual {
  position:absolute;
  z-index:0;
  width:clamp(730px,78vw,1300px);
  aspect-ratio:3/2;
  left:var(--gateway-pivot);
  top:50%;
  translate:-58% -50%;
  pointer-events:none;
  transform-origin:58% 50%;
  transform:translate3d(var(--gateway-x,0px),var(--gateway-y,0px),0) scale(var(--gateway-scale,1));
  opacity:var(--gateway-opacity,1);
  mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent),
    linear-gradient(180deg,transparent,#000 12%,#000 86%,transparent);
  mask-composite:intersect;
}
.gateway-visual picture, .gateway-texture, .gateway-canvas {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.gateway-texture {
  display:block;
  filter:hue-rotate(calc(var(--sky-hue,0deg) * .74)) brightness(var(--gateway-scene-light));
  transition:filter .68s var(--ease);
}
[data-light-scene="morning"] .gateway { --gateway-scene-light:1.04; }
[data-light-scene="evening"] .gateway { --gateway-scene-light:.85; }
.gateway-canvas { opacity:0; }
[data-gateway-mode="webgl"] .gateway-canvas { opacity:1; }
[data-gateway-texture="gpu"] .gateway-texture { opacity:0; }
[data-gateway-mode="texture"] .gateway-visual::after {
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle 7px at 66% 20%,#c2d7fe7a,transparent),
    radial-gradient(circle 5px at 75% 59%,#bdceff77,transparent),
    radial-gradient(circle 4px at 37% 68%,#d1c5ff7c,transparent);
  animation:gateway-starlight 8s ease-in-out infinite alternate paused;
}
[data-gateway-in-view][data-gateway-mode="texture"] .gateway-visual::after { animation-play-state:running; }
@keyframes gateway-starlight { from { opacity:.22; } to { opacity:.68; } }

.gateway-core, .gateway-enter {
  position:absolute;
  left:var(--gateway-pivot);
  top:50%;
  translate:-50% -50%;
  z-index:1;
}
.gateway-core {
  width:83px;
  height:83px;
  display:grid;
  place-items:center;
  isolation:isolate;
  pointer-events:none;
  color:#e7fbff;
  opacity:var(--gateway-controls-opacity,1);
}
.gateway-core::before {
  content:"";
  position:absolute;
  z-index:-1;
  width:174%;
  height:174%;
  border-radius:50%;
  background:radial-gradient(circle,#6addff75,#539ff838 27%,#557de714 53%,transparent 73%);
  opacity:var(--gateway-glow,.84);
  transform:scale(var(--gateway-glow-scale,1));
}
.gateway-core svg { width:100%; height:100%; filter:drop-shadow(0 0 7px #64deff) drop-shadow(0 0 17px #539dff96); }
.gateway-enter {
  top:calc(50% + clamp(41px,4vw,70px));
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:46px;
  width:max-content;
  max-width:calc(100vw - 42px);
  padding:10px 19px;
  border:1px solid #a3d8fbc0;
  border-radius:999px;
  background:var(--material-action) #0b182ddc;
  box-shadow:inset 0 1px 0 #e0f3ff44,0 0 22px -8px #61b9faaf,0 10px 25px -13px #02070f;
  color:#ecf5ff;
  font:630 clamp(.74rem,1.1vw,.94rem)/1.25 var(--text);
  cursor:pointer;
  transition:border-color .22s ease, box-shadow .22s ease, opacity .22s ease;
  opacity:var(--gateway-controls-opacity,1);
  -webkit-tap-highlight-color:transparent;
}
.gateway-enter svg { flex:none; transition:transform .28s var(--ease); }
.gateway-enter:focus-visible { outline:2px solid var(--material-focus); outline-offset:4px; }
.gateway-enter:disabled { cursor:default; }
@media (hover:hover) {
  .gateway-enter:not(:disabled):hover {
    border-color:#c4edff;
    box-shadow:inset 0 1px 0 #e5f5ff59,0 0 30px -8px #6abcfac5,0 12px 25px -13px #02070f;
  }
  .gateway-enter:hover svg { transform:translateX(2px); }
}
[data-gateway-flight] .gateway-enter svg { transform:rotate(180deg); }
[data-gateway-mode="texture"] .gateway-core::before {
  animation:gateway-core-pulse 9s ease-in-out infinite paused;
}
[data-gateway-in-view][data-gateway-mode="texture"] .gateway-core::before { animation-play-state:running; }
@keyframes gateway-core-pulse { 50% { opacity:.63; transform:scale(.94); } }

@media (max-width:900px) {
  .glimmer-home .gateway-hero { min-height:0; padding-block:112px 34px; }
  .gateway-hero .hero-grid { width:calc(100% - 2 * var(--gutter)); max-width:660px; grid-template-columns:1fr; gap:0; }
  .gateway-copy { translate:none; }
  .gateway-hero h1 { font-size:clamp(2.6rem,7.2vw,4.6rem); }
  .gateway { --gateway-pivot:51%; height:clamp(298px,67vw,480px); translate:none; }
  .gateway-visual { width:clamp(530px,118vw,900px); }
  .gateway-core { width:60px; height:60px; }
  .gateway-enter { min-height:43px; padding-inline:15px; }
}
@media (prefers-reduced-motion:reduce) {
  .gateway-texture,.gateway-enter,.gateway-enter svg { transition:none; }
  [data-gateway-mode="texture"] .gateway-core::before,
  [data-gateway-mode="texture"] .gateway-visual::after { animation:none; }
}
@media (forced-colors:active) {
  .gateway-visual,.gateway-core::before { display:none; }
  .gateway-enter { color:ButtonText; background:ButtonFace; border-color:ButtonText; }
}

.astra-stage { display:none; }
[data-gateway-variant="astra"] {
  --astra-opacity:1;
}
[data-gateway-variant="astra"] .hero-grid { position:static; }
[data-gateway-variant="astra"] .gateway {
  position:static;
  translate:none;
  --gateway-pivot:67.6%;
  --gateway-controls-opacity:var(--astra-opacity);
}
[data-gateway-variant="astra"] .astra-stage {
  --core-x:55%;
  display:block;
  position:absolute;
  inset:0 0 0 28%;
  pointer-events:none;
}
[data-gateway-variant="astra"] :is(.astra-stage,.gateway-visual) {
  opacity:var(--astra-opacity);
  transition:opacity .2s ease-out;
}
.astra-canvas {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  filter:hue-rotate(calc(var(--sky-hue,0deg) * .74)) brightness(var(--gateway-scene-light,1));
  transition:filter var(--wallpaper-light-time,.68s) var(--scene-light-ease,ease);
}
/* Skip the compositor's identity color filter in the neutral lighting state. */
.glimmer-home:not([data-light-scene], [data-wallpaper-light]) .astra-canvas { filter:none; }
[data-astra-rendered] :is(.gateway-visual,.gateway-core::before) { display:none; }
[data-gateway-variant="astra"] .gateway-core { width:75px; height:75px; }
[data-gateway-variant="astra"] .gateway-enter { top:calc(50% + 50px); }
@media (max-width:900px) {
  [data-gateway-variant="astra"] .gateway {
    position:relative;
    --gateway-pivot:50%;
    height:clamp(330px,96vw,550px);
  }
  [data-gateway-variant="astra"] .astra-stage {
    --core-x:50%;
    inset:0 calc((100% - 100vw) / 2);
  }
  [data-gateway-variant="astra"] .gateway-core { width:61px; height:61px; }
  [data-gateway-variant="astra"] .gateway-enter { top:calc(50% + 40px); }
}
.no-anim [data-gateway-variant="astra"] :is(.astra-stage,.gateway-visual,.astra-canvas) {
  transition:none;
}
@media (prefers-reduced-motion:reduce) {
  [data-gateway-variant="astra"] :is(.astra-stage,.gateway-visual,.astra-canvas) { transition:none; }
}
@media (forced-colors:active) {
  [data-gateway-variant="astra"] .astra-stage { display:none; }
}
