
.gate { display: none; }

.gate.gate--section {
  display: block;
  position: sticky;
  top: 0;
  z-index: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: #050506;
}

html.gate-open body { overflow: hidden; }

html.gate-open .gate {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  z-index: 8;
  background: #050506;
  transform-origin: 50% 46%;
  transition:
    opacity 900ms cubic-bezier(0.3, 0, 0.1, 1),
    transform 1300ms cubic-bezier(0.3, 0, 0.1, 1),
    filter 900ms cubic-bezier(0.3, 0, 0.1, 1);
}

.gate__stage { position: absolute; inset: 0; overflow: hidden; }
.gate__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.gate.is-leaving {
  pointer-events: none;
  opacity: 0;
  transform: scale(1.14);
  filter: blur(20px);
  transition:
    opacity 900ms cubic-bezier(0.4, 0, 0.1, 1),
    transform 1300ms cubic-bezier(0.4, 0, 0.1, 1),
    filter 900ms cubic-bezier(0.4, 0, 0.1, 1);
}

.gate__hint {
  --gate-in-dur: 1100ms;
  --gate-in-delay: 260ms;

  position: absolute;
  left: 50%;
  bottom: clamp(26px, 6svh, 60px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.78);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: calc(0.22em + var(--ls-bump, 0em));
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.5s ease, color 0.3s ease;
}
.gate__hint-arrow {
  display: block;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
}
.gate.is-ready .gate__hint {
  opacity: 1;
  transition: opacity var(--gate-in-dur) cubic-bezier(0.22, 1, 0.36, 1) var(--gate-in-delay);
}
.gate.is-armed .gate__hint { pointer-events: auto; }
.gate.is-armed .gate__hint-arrow { animation: gate-hint-arrow 1.9s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes gate-hint-arrow {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%      { transform: translateY(6px); opacity: 1; }
}
@media (hover: hover) and (pointer: fine) {
  .gate.is-armed .gate__hint:hover { color: #fff; }
}
.gate.is-leaving .gate__hint { opacity: 0; transition: opacity 200ms linear; }

.hero.hero--fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  z-index: 9;
}

.hero--opening {
  z-index: 9;
  --gate-cx: 50%;
  --gate-cy: 88%;
  --gate-bw: 240px;
  --gate-bh: 56px;
  --gate-mw: var(--gate-bw);
  --gate-mh: var(--gate-bh);

  -webkit-mask-image: radial-gradient(closest-side, #000 40%, rgba(0, 0, 0, 0) 100%);
          mask-image: radial-gradient(closest-side, #000 40%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: var(--gate-mw) var(--gate-mh);
          mask-size: var(--gate-mw) var(--gate-mh);
  -webkit-mask-position: calc(var(--gate-cx) - var(--gate-mw) / 2) calc(var(--gate-cy) - var(--gate-mh) / 2);
          mask-position: calc(var(--gate-cx) - var(--gate-mw) / 2) calc(var(--gate-cy) - var(--gate-mh) / 2);
  will-change: mask-size, mask-position;
}
.hero--opening .hero__bg {
  transform: scale(1.72);
  filter: blur(18px);
  will-change: transform, filter;
}
.hero--opening.is-open {
  --gate-mw: 520vmax;
  --gate-mh: 520vmax;
}
.hero--opening.is-open .hero__bg {
  transform: scale(1);
  filter: blur(0px);
}
.hero--opening.is-open {
  transition: -webkit-mask-size 1000ms cubic-bezier(0.4, 0, 0.1, 1),
              mask-size 1000ms cubic-bezier(0.4, 0, 0.1, 1),
              -webkit-mask-position 1000ms cubic-bezier(0.4, 0, 0.1, 1),
              mask-position 1000ms cubic-bezier(0.4, 0, 0.1, 1);
}
.hero--opening.is-open .hero__bg {
  transition: transform 1400ms cubic-bezier(0.4, 0, 0.1, 1),
              filter 1000ms cubic-bezier(0.4, 0, 0.1, 1);
}
.gate.gate--instant { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .gate__hint { opacity: 1; transition: none; }
  .gate__hint-arrow { animation: none !important; }
  html.gate-open .gate, .gate.is-leaving { transition: none; }
  .hero--opening { -webkit-mask-image: none; mask-image: none; transition: none; }
  .hero--opening .hero__bg { transform: none; filter: none; transition: none; }
}
