/* ============================================
   SPLASH.CSS — Partikel-Intro der Startseite
   (nur beim ersten Besuch pro Sitzung, Motor: js/splash.js)

   01 / IMAGE        3D-Eule erscheint
   02 / PARTICLE     Eule zerfällt in Partikel, die nach rechts wehen
   03 / POINT CLOUD  Partikel bilden die Eule als drehende Punktwolke
   04 / MARK         Punktwolke dreht weg und wird zur flachen Eulen-Marke
   05 / HALLO        Partikel formen „Purple AI Labs.“, Schrift wird scharf
   Ausgang: Iris öffnet sich aus der Mitte (js/preloader.js)
   ============================================ */

@property --sp-r {
    syntax: '<length>';
    inherits: true;
    initial-value: 0px;
}

:root { --splash-exit-duration: 900ms; }

.sp3 { background: #050509; }
.sp3-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* HUD */
.sp3-hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-display); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: rgba(245, 241, 232, .45); }
.sp3-hud > span { position: absolute; }
.sp3-tl { left: clamp(18px, 3vw, 40px); top: clamp(18px, 3vw, 36px); }
.sp3-tr { right: clamp(18px, 3vw, 40px); top: clamp(18px, 3vw, 36px); color: rgba(245, 241, 232, .7); }
.sp3-bl { left: clamp(18px, 3vw, 40px); bottom: clamp(22px, 3.4vw, 40px); }
.sp3-br { right: clamp(18px, 3vw, 40px); bottom: clamp(22px, 3.4vw, 40px); }
.sp3-tr b { font-weight: 500; transition: opacity .25s; }
.sp3-rings { position: absolute; left: 50%; top: 50%; width: var(--sp-ring, 520px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(255, 255, 255, .06); opacity: 0; animation: sp3-in 1s ease-out .3s forwards; }
.sp3-rings::before { content: ""; position: absolute; inset: 16%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .05); }
.sp3-rings::after { content: ""; position: absolute; left: -40%; right: -40%; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
.sp3-vline { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, rgba(255, 255, 255, .05), transparent); opacity: 0; animation: sp3-in 1s ease-out .3s forwards; }
@keyframes sp3-in { to { opacity: 1; } }

/* Endbild: scharfe Schrift */
.sp3-final { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none; }
.sp3-word { margin: 0; white-space: nowrap; font-family: var(--font-display); font-weight: 700; letter-spacing: -.045em; line-height: .92; color: var(--cream); font-size: var(--sp-fs, 96px); opacity: 0; filter: blur(10px); transition: opacity .5s ease-out, filter .6s ease-out; }
.sp3-sub { margin-top: 26px; font-family: var(--font-display); font-size: 11px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--purple-accent); opacity: 0; transform: translateY(8px); transition: opacity .5s ease-out .15s, transform .5s ease-out .15s; }
.sp3.is-final .sp3-word { opacity: 1; filter: none; }
.sp3.is-final .sp3-sub { opacity: 1; transform: none; }
.sp3-skip { position: absolute; left: 50%; bottom: clamp(22px, 3.4vw, 40px); transform: translateX(-50%); font-family: var(--font-display); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: rgba(245, 241, 232, .35); background: none; border: 0; cursor: pointer; padding: 6px 10px; pointer-events: auto; }
.sp3-skip:hover { color: var(--cream); }

/* Fortschritt: feine Linie unten links wie im Video */
.sp3 .splash-progress { position: absolute; left: clamp(18px, 3vw, 40px); right: clamp(18px, 3vw, 40px); bottom: clamp(14px, 2.2vw, 26px); margin: 0; opacity: 1; animation: none; }
.sp3 .splash-progress-text { display: none; }
.sp3 .splash-progress-bar { width: 100%; height: 1px; background: rgba(255, 255, 255, .07); }
.sp3 .splash-progress-fill { width: var(--sp-prog, 0%); background: #8E44FF; box-shadow: 0 0 10px rgba(142, 68, 255, .8); transition: none; }

/* Ausgang: Iris öffnet sich aus der Mitte */
.sp3-ring { position: absolute; left: 50%; top: 50%; width: calc(var(--sp-r) * 2); height: calc(var(--sp-r) * 2); transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 2px #B57CFF, 0 0 40px 8px rgba(142, 68, 255, .55), inset 0 0 40px 8px rgba(142, 68, 255, .45); opacity: 0; pointer-events: none; z-index: 3; }
.sp3.splash-screen--exiting {
    clip-path: none;
    transition: none;
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--sp-r), #000 calc(var(--sp-r) + 1px));
    mask: radial-gradient(circle at 50% 50%, transparent var(--sp-r), #000 calc(var(--sp-r) + 1px));
    animation: sp3-iris var(--splash-exit-duration) cubic-bezier(.7, 0, .2, 1) forwards;
}
.sp3.splash-screen--exiting .sp3-ring { opacity: 1; }
/* Ausgang */
.sp3.splash-screen--exiting .sp3-final { transition: transform .9s cubic-bezier(.7, 0, .2, 1), opacity .5s; transform: translateY(-50%) scale(1.15); opacity: 0; }
@keyframes sp3-iris { from { --sp-r: 0px; } to { --sp-r: 120vmax; } }
.sp3.splash-screen--finalizing .splash-content { animation: none; }

/* Startseiten-Animationen erst starten, wenn das Intro weg ist */
html.sp-wait .st-hero * { animation-play-state: paused !important; }

@media (max-width: 700px) {
    .sp3-tr { font-size: 9.5px; }
    .sp3-bl, .sp3-br { bottom: clamp(30px, 6vw, 44px); }
    .sp3-skip { bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    .sp3 * { animation: none !important; transition: none !important; }
    .sp3-word, .sp3-sub { opacity: 1; filter: none; transform: none; }
    .sp3.splash-screen--exiting { -webkit-mask: none; mask: none; opacity: 0; transition: opacity .4s !important; }
}
