/*
 * Indító animáció – ugyanaz, mint az appban (src/components/splash.tsx, globals.css .splash), kb. 1,8 s:
 * a logó beugrik → a síp megszólal → elhalványul. A weboldalon a sima Sípszó logó (az appban a kosaras, varratokkal).
 * Munkamenetenként egyszer: a <head> szkriptje a második oldaltól a `splash-done` osztállyal elrejti.
 * Az app arculatával együtt kell frissíteni.
 */
.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  pointer-events: none;
  animation: splash-out 0.45s 1.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.splash-done .splash {
  display: none;
}
.splash-mark {
  position: relative;
  width: 104px;
  height: 104px;
}
.splash-logo {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 18px 36px rgba(240, 96, 28, 0.35));
  animation:
    splash-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25) both,
    splash-blow 0.5s 0.95s ease-in-out;
}
.splash-blow {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: splash-draw 0.25s 1s ease-out forwards;
}
/* Hanghullámok a síp szájától. */
.splash-wave {
  position: absolute;
  inset: 0;
  border: 2.5px solid var(--accent);
  border-radius: 28px;
  opacity: 0;
  animation: splash-wave 0.9s 1s ease-out;
}
.splash-wave + .splash-wave {
  animation-delay: 1.15s;
}
.splash-word {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  font-style: italic;
  font-stretch: 80%;
  letter-spacing: -0.01em;
  color: var(--text);
  animation: splash-word 0.5s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes splash-pop {
  from {
    transform: scale(0.3) rotate(-18deg);
    opacity: 0;
  }
}
@keyframes splash-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes splash-blow {
  25% {
    transform: scale(1.08) rotate(-6deg);
  }
  55% {
    transform: scale(0.97) rotate(3deg);
  }
  80% {
    transform: scale(1.03) rotate(-2deg);
  }
}
@keyframes splash-wave {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
    border-radius: 50%;
  }
}
@keyframes splash-word {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}
@keyframes splash-out {
  to {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  .splash {
    display: none;
  }
}

/* Amíg az indító animáció látszik, a fejléc beúszó mozgásai utána indulnak, hogy ne alatta fussanak le. */
html:not(.splash-done) .hero-title .line {
  animation-delay: 1.45s;
}
html:not(.splash-done) .hero-title .line:nth-child(2) {
  animation-delay: 1.54s;
}
html:not(.splash-done) .hero-title .line:nth-child(3) {
  animation-delay: 1.63s;
}
html:not(.splash-done) .page-rolam .r-in,
html:not(.splash-done) .page-rolam .r-name .r-line {
  animation-delay: calc(1.45s + var(--i, 0) * 0.09s);
}
html:not(.splash-done) .page-rolam .r-portrait-img {
  animation-delay: 1.6s;
}
