/* ─── Birthday splash — cascading waves + full-width type ─────────────────── */

html.bn-skip-birthday-splash .birthday-splash {
  display: none !important;
}

html.bn-birthday-splash-active {
  height: 100%;
  overflow: hidden;
}

html.bn-skip-birthday-splash .site-app {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: static !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  z-index: auto !important;
}

body.birthday-splash-active {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  max-width: none;
  overflow: hidden;
  overscroll-behavior: none;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  background: #08080c;
}

body.birthday-splash-active .hero-bg,
body.birthday-splash-active .lightshow,
body.birthday-splash-active .grain {
  visibility: hidden;
  pointer-events: none;
}

body.birthday-splash-active .site-app {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  z-index: -1 !important;
}

.site-app {
  transition: opacity 0.9s var(--ease-out);
}

body:not(.birthday-splash-active) .site-app {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: auto;
}

.birthday-splash {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  max-width: none;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-width: 100vw;
  min-width: 100dvw;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  background: #08080c;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  transition: opacity 1s ease;
  background-color: #08080c;
  background-image: image-set(
    url("/images/jessu-b-day.webp") type("image/webp"),
    url("/images/jessu-b-day.jpg") type("image/jpeg")
  );
  background-position: top right;
  background-size: cover;
  background-repeat: no-repeat;
}

.birthday-splash::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.69);
  pointer-events: none;
}

.birthday-splash[hidden] {
  display: none !important;
}

.birthday-splash__canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-width: 100vw;
  min-width: 100dvw;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: block;
  z-index: 0;
  transition: opacity 2.4s ease;
}

.birthday-splash__canvas--fade {
  opacity: 0;
}

.birthday-splash__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  pointer-events: none;
}

.birthday-splash__type-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0;
}

.birthday-splash__line {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  will-change: transform, opacity;
}

.birthday-splash__word {
  width: 90vw;
  max-width: none;
  margin: 0;
  padding: 0;
  line-height: 0;
  text-align: center;
  animation:
    birthday-word-in 1.1s var(--ease-out) both,
    birthday-neon-flicker 3.6s ease-in-out infinite;
}

.birthday-splash__word-svg {
  display: block;
  width: 90vw;
  max-width: 90vw;
  height: auto;
  margin: 0 auto;
}

.birthday-splash__word--happy {
  filter:
    drop-shadow(0 0 24px var(--pink-glow))
    drop-shadow(0 0 80px rgba(255, 45, 106, 0.45));
  animation-delay: 0.15s, 0s;
}

.birthday-splash__word--birthday {
  filter:
    drop-shadow(0 0 24px var(--cyan-glow))
    drop-shadow(0 0 80px rgba(0, 232, 255, 0.45));
  animation-delay: 0.35s, 0s;
}

.birthday-splash__word--jessu {
  filter:
    drop-shadow(0 0 24px rgba(255, 230, 0, 0.5))
    drop-shadow(0 0 80px rgba(255, 230, 0, 0.3));
  animation-delay: 0.55s, 0s;
}

.birthday-splash__marquee {
  width: 90vw;
  overflow: hidden;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 28px rgba(0, 232, 255, 0.25),
    inset 0 0 24px rgba(255, 45, 106, 0.1);
}

.birthday-splash__marquee--top {
  background: var(--cyan);
  color: var(--bg);
}

.birthday-splash__marquee--bottom {
  background: var(--pink);
  color: var(--bg);
}

.birthday-splash__marquee-track {
  display: flex;
  width: max-content;
  font-family: 'Archivo Black', 'Arial Black', sans-serif;
  font-size: clamp(0.9rem, 2.6vw, 1.5rem);
  letter-spacing: 0.35em;
  font-weight: 900;
  padding: 0.6rem 0;
  white-space: nowrap;
}

.birthday-splash__marquee--top .birthday-splash__marquee-track {
  animation: birthday-marquee-left 14s linear infinite;
}

.birthday-splash__marquee--bottom .birthday-splash__marquee-track {
  animation: birthday-marquee-right 14s linear infinite;
}

.birthday-splash__marquee-track span {
  padding-right: 2.5rem;
}

/* ─── Exit: each line slides off, alternating direction ─────────────────── */

.birthday-splash--exit {
  cursor: default;
  pointer-events: none;
}

.birthday-splash--fade-out {
  opacity: 0;
}

.birthday-splash--exit .birthday-splash__word {
  animation: none;
  filter: none;
}

.birthday-splash--exit .birthday-splash__marquee-track {
  animation-play-state: paused;
}

.birthday-splash--exit .birthday-splash__line--exit-left {
  animation: birthday-exit-left var(--exit-duration, 2.75s) cubic-bezier(0.45, 0.05, 0.25, 1) var(--exit-delay, 0ms) forwards;
}

.birthday-splash--exit .birthday-splash__line--exit-right {
  animation: birthday-exit-right var(--exit-duration, 2.75s) cubic-bezier(0.45, 0.05, 0.25, 1) var(--exit-delay, 0ms) forwards;
}

.birthday-splash-replay {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: var(--pink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.birthday-splash-replay:hover {
  color: var(--text);
}

.birthday-splash-replay[hidden] {
  display: none !important;
}

@keyframes birthday-word-in {
  0% {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes birthday-neon-flicker {
  0%, 100% { filter: brightness(1); }
  41% { filter: brightness(1.08); }
  42% { filter: brightness(0.92); }
  43% { filter: brightness(1.12); }
  44% { filter: brightness(1); }
  88% { filter: brightness(1.05); }
}

@keyframes birthday-marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes birthday-marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@keyframes birthday-exit-left {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(-108vw);
    opacity: 0;
  }
}

@keyframes birthday-exit-right {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(108vw);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-splash__word,
  .birthday-splash__marquee-track {
    animation: none !important;
  }

  .birthday-splash__word {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .birthday-splash--exit .birthday-splash__line {
    animation: birthday-exit-fade var(--exit-duration, 2.75s) ease var(--exit-delay, 0ms) forwards !important;
  }
}

@keyframes birthday-exit-fade {
  to {
    opacity: 0;
  }
}
