/* Entry splash + brand lockup. Visual only. */

/* ---------- Brand lockup (mark + wordmark) ---------- */

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup__mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: block;
}

.brand-lockup__word {
  font-family: "Space Grotesk", var(--font-sans);
  font-size: 1.6rem;
  line-height: 1;
  white-space: nowrap;
}

.brand-lockup__word b {
  font-weight: 700;
  color: var(--text);
}

.brand-lockup__word span {
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Splash overlay ---------- */

.splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: #030409;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.splash__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.splash__mark {
  position: relative;
  width: min(38vw, 170px);
  height: min(38vw, 170px);
  display: block;
  overflow: visible;
}

.splash__glow {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(80vw, 380px);
  height: min(80vw, 380px);
  margin-left: calc(min(80vw, 380px) / -2);
  margin-top: calc((min(38vw, 170px) - min(80vw, 380px)) / 2);
  background: radial-gradient(circle, rgba(61, 255, 180, 0.28) 0%, rgba(61, 255, 180, 0) 62%);
  opacity: 0;
  pointer-events: none;
  animation: splash-glow 0.8s ease-out 1.2s both;
}

.splash__word {
  position: relative;
  font-family: "Space Grotesk", var(--font-sans);
  font-size: clamp(1.1rem, 4.4vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  animation: splash-fade 0.5s ease-out 1.5s both;
}

.splash__word b {
  font-weight: 700;
  color: var(--text);
}

/* Candles grow up from their bottom edge. */
.splash .logo-candle {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.splash .logo-candle--l {
  animation: splash-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}

.splash .logo-candle--r {
  animation: splash-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both;
}

.splash .logo-candle--m {
  transform-origin: 50% 50%;
  animation: splash-grow-mid 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s both;
}

/* The tilt group rotates around the mark's centre (24,24). */
.splash .logo-tilt {
  transform-box: view-box;
  transform-origin: 24px 24px;
  animation: splash-tilt 0.5s cubic-bezier(0.3, 0.7, 0.2, 1) 1.2s both;
}

.splash .logo-wick {
  opacity: 0;
  animation: splash-fade 0.4s ease-out 1.3s both;
}

@keyframes splash-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes splash-grow-mid {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes splash-tilt {
  from { transform: rotate(0deg); }
  to { transform: rotate(-28deg); }
}

@keyframes splash-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes splash-glow {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Reduced motion: the finished logo, no movement. */
.splash--still .logo-candle,
.splash--still .logo-tilt,
.splash--still .logo-wick,
.splash--still .splash__glow,
.splash--still .splash__word {
  animation: none;
}

.splash--still .logo-wick,
.splash--still .splash__word {
  opacity: 1;
}

.splash--still .splash__glow {
  opacity: 1;
}

.splash--still .logo-tilt {
  transform: rotate(-28deg);
}

@media (prefers-reduced-motion: reduce) {
  .splash {
    transition-duration: 0.2s;
  }
}
