/* =========================================================
   KUBISSEYA / BloteK portal gateway
   Isolated transition used only when entering BloteK from the navbar.
========================================================= */

html.blotek-gateway-pending {
  background: #050505;
}
html.blotek-gateway-pending::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: #050505;
}

.blotek-gateway {
  --gateway-orange: #f59a00;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050505;
  color: #fff;
  opacity: 0;
  pointer-events: all;
  transition: opacity .42s cubic-bezier(.22,.61,.36,1);
  isolation: isolate;
}
.blotek-gateway::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(245,154,0,.055), transparent 26%),
    #050505;
  opacity: .7;
  pointer-events: none;
}
.blotek-gateway.is-visible { opacity: 1; }
.blotek-gateway.is-leaving { opacity: 0; pointer-events: none; }

.blotek-gateway__stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(92vw, 980px);
  min-height: 220px;
}

.blotek-gateway__brand {
  --gateway-word-width: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .035em;
  max-width: 94vw;
  font-family: var(--display, Arial, Helvetica, sans-serif);
  font-size: clamp(5rem, 13vw, 11.5rem);
  font-weight: 760;
  line-height: .72;
  letter-spacing: -.09em;
  white-space: nowrap;
  transform: scale(.92);
  opacity: 0;
  transition:
    transform .58s cubic-bezier(.22,.61,.36,1),
    opacity .42s ease;
}
.blotek-gateway.is-k-visible .blotek-gateway__brand {
  transform: scale(1);
  opacity: 1;
}

.blotek-gateway__word {
  position: relative;
  display: block;
  width: 0;
  height: .82em;
  overflow: hidden;
  opacity: 0;
  transition:
    width .92s cubic-bezier(.65,0,.16,1),
    opacity .28s ease .08s;
}
.blotek-gateway__word > span {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  white-space: nowrap;
  color: #fff;
}
.blotek-gateway.is-building .blotek-gateway__word,
.blotek-gateway.is-complete .blotek-gateway__word {
  width: var(--gateway-word-width);
  opacity: 1;
}

.blotek-gateway__k {
  flex: 0 0 auto;
  width: .82em;
  height: .82em;
  object-fit: contain;
  object-position: center;
  transform: translateY(.012em);
  filter: drop-shadow(0 0 30px rgba(245,154,0,.05));
}

.blotek-gateway__trace {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,154,0,.62), transparent);
  transform: translateX(-50%);
  opacity: 0;
  transition: width .8s ease, opacity .3s ease;
}
.blotek-gateway.is-building .blotek-gateway__trace,
.blotek-gateway.is-complete .blotek-gateway__trace {
  width: min(42vw, 460px);
  opacity: .45;
}

@media (max-width: 680px) {
  .blotek-gateway__stage { width: calc(100vw - 32px); min-height: 180px; }
  .blotek-gateway__brand { font-size: clamp(4.2rem, 22vw, 7rem); }
  .blotek-gateway__k { width: .8em; height: .8em; }
  .blotek-gateway__trace { bottom: 12%; }
}

@media (prefers-reduced-motion: reduce) {
  .blotek-gateway,
  .blotek-gateway__brand,
  .blotek-gateway__word,
  .blotek-gateway__trace {
    transition-duration: .01ms !important;
  }
}


/* v1.6.5 — destination hand-off is intentionally logo-free so the portal
   identity animation is perceived once, never replayed after navigation. */
.blotek-gateway.is-destination .blotek-gateway__stage {
  visibility: hidden;
}

/* Optical safety space for the final glyph while the word-width animates. */
.blotek-gateway__word > span {
  padding-right: .08em;
}
