.cover #entrance {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
}

.scene-stage {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
  transition: filter 700ms var(--ease-out), opacity 700ms var(--ease-out);
  animation: stage-in 1400ms var(--ease-out) both;
}

@keyframes stage-in {
  from { opacity: 0; filter: blur(6px); }
  to { opacity: 1; filter: blur(0); }
}

.scene-stage > canvas,
.reference-frame,
#reference {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.reference-frame { margin: 0; }

#reference { object-fit: fill; }

.logo-clear {
  position: absolute;
  left: 46.4%;
  top: 33.4%;
  width: 7.4%;
  height: 14.7%;
  border-radius: 18px;
  background: #fcfdff;
  box-shadow: 0 0 16px 14px #fcfdff;
}

.wordmark-clear {
  position: absolute;
  left: 42.5%;
  top: 48.3%;
  width: 15.3%;
  height: 6.1%;
  border-radius: 18px;
  background: #fcfdff;
  box-shadow: 0 0 15px 14px #fcfdff;
}

.entry-clear {
  position: absolute;
  left: 45.9%;
  top: 66.4%;
  width: 10%;
  height: 4.5%;
  border-radius: 16px;
  background: #fcfdff;
  box-shadow: 0 0 14px 12px #fcfdff;
}

.brand-halo {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 28%;
  height: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .54), rgba(244, 244, 255, .16) 44%, transparent 71%);
}

.brand-emblem {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 22.5%;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: visible;
  filter: drop-shadow(0 12px 15px #15203220);
  animation: emblem-in 1200ms var(--ease-out) both, emblem-breathe 9s ease-in-out 1200ms infinite;
  display: block;
}

.brand-emblem img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes emblem-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes emblem-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.012); }
}

#flow-canvas {
  opacity: 0;
  transition: opacity 500ms ease;
}

body.scene-ready #flow-canvas { opacity: 1; }
body.no-webgl #flow-canvas { opacity: 0; }

#light-canvas { pointer-events: none; }

.entry-hit {
  position: absolute;
  z-index: 3;
  border: 0;
  cursor: pointer;
  background: transparent;
  padding: 0;
  outline: none;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(22px * var(--scene-scale, 1));
  text-decoration: none;
  opacity: 1;
  animation: entry-in 800ms var(--ease-out) 260ms both;
}

@keyframes entry-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.entry-type {
  display: block;
  width: calc(105px * var(--scene-scale, 1));
  height: auto;
  transition: filter .4s;
}

.entry-arrow {
  width: calc(35px * var(--scene-scale, 1));
  height: calc(21px * var(--scene-scale, 1));
  fill: none;
  stroke: #6c4b9c;
  stroke-width: 1.15;
  transition: transform .6s var(--ease-out);
  overflow: visible;
}

.arrow-echo {
  opacity: .28;
  transition: opacity .4s;
}

.entry-hit:hover .entry-arrow,
.entry-hit:focus-visible .entry-arrow { transform: translateX(5px); }

.entry-hit:hover .arrow-echo,
.entry-hit:focus-visible .arrow-echo { opacity: .7; }

.entry-hit::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 7%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8954ff, transparent);
  opacity: 0;
  box-shadow: 0 0 10px #9e75ff80;
  transform: scaleX(.55);
  transition: opacity .3s, transform .55s var(--ease-out);
}

.entry-hit:hover::after,
.entry-hit:focus-visible::after {
  opacity: .8;
  transform: scaleX(1);
}

.entry-hit:focus-visible {
  outline: 1px solid #7a51cc80;
  outline-offset: 7px;
  border-radius: 4px;
}

.entry-hit:active::after {
  transform: scaleX(.8);
  opacity: 1;
}

.scene-hint {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  font-size: 11px;
  letter-spacing: .22em;
  color: #6b628f;
  opacity: 0;
  transition: opacity 1.2s ease 600ms;
}

body.scene-ready .scene-hint { opacity: .5; }

/* Entrance timeline ------------------------------------------------------- */
/* The stage fade runs in CSS so the brand and CTA appear before the WebGL
   renderer and the 2.4MB key visual have finished decoding. */

/* Page transition to the ecosystem ---------------------------------------- */
.transition {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, .96) 0%, rgba(248, 245, 255, .92) 22%, rgba(236, 229, 255, .85) 48%, rgba(253, 253, 255, .96) 100%);
  transition: opacity 560ms var(--ease-out);
}

.transition[data-active="true"] { opacity: 1; }

body.is-leaving .scene-stage {
  transform: scale(1.04);
  filter: blur(3px) brightness(1.06);
}

body.is-leaving .entry-hit { opacity: 0; transition: opacity 260ms ease; }

@media (max-width: 620px) {
  .scene-hint { font-size: 10px; letter-spacing: .16em; }
}
