/* Effekte der Werbe-/Regelseite (Outbreak.Promo).
   Farben: Brand #4A9EFF · Toxisch #84CC16/#10B981 · Chat/Alarm #F43F5E */

html {
    scroll-behavior: smooth;
    color-scheme: dark;
    background: #0B1628;
}

[id] {
    scroll-margin-top: 5rem;
}

/* ---------- Hintergrund ---------- */

/* Taktisches Raster, zur Mitte hin sichtbar, zu den Rändern ausblendend */
.tactical-grid {
    background-image:
        linear-gradient(rgba(74, 158, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 158, 255, .07) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

/* Giftwolken-Canvas: unten dicht, nach oben ausfadend */
.toxic-mask {
    -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 92%);
    mask-image: linear-gradient(to top, #000 30%, transparent 92%);
}

.toxic-mask-soft {
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .6) 25%, transparent 55%);
    mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .6) 25%, transparent 55%);
}

.bio-spin {
    animation: bioSpin 120s linear infinite;
}

/* ---------- Reveal (nur mit JS, Klasse "js" setzt ein Inline-Skript im Head) ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* Kinder nacheinander einblenden – Reihenfolge über style="--i:n" */
.js .stagger > * {
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
    transition-delay: calc(var(--i, 0) * 110ms);
}

.js .stagger.in > * {
    opacity: 1;
    transform: none;
}

/* Akzentlinie unter Überschriften wächst beim Einblenden */
.line-grow {
    transform-origin: left;
    transform: scaleX(.15);
    transition: transform 1.2s cubic-bezier(.2, .7, .2, 1) .2s;
}

.in .line-grow,
html:not(.js) .line-grow {
    transform: scaleX(1);
}

/* ---------- Karten ---------- */

/* Lichtschein folgt der Maus (--mx/--my setzt regeln.js) */
.spotlight {
    position: relative;
    isolation: isolate;
    --spot: 74, 158, 255;
}

.spotlight::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--spot), .16), transparent 45%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.spotlight:hover::before {
    opacity: 1;
}

.spot-toxic {
    --spot: 132, 204, 22;
}

.spot-rose {
    --spot: 244, 63, 94;
}

/* "Infizierte" Überschrift: grüner Schimmer zieht durch das Brand-Blau */
.text-infect {
    background: linear-gradient(100deg, #4A9EFF 0%, #4A9EFF 38%, #34d399 50%, #4A9EFF 62%, #4A9EFF 100%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: infectShimmer 7s ease-in-out infinite;
}

/* VS-Abzeichen im Duell */
.vs-pulse {
    animation: vsPulse 2.4s ease-in-out infinite;
}

/* Alarm-Rand der Zeitregel */
.alarm {
    animation: alarm 2.2s ease-in-out infinite;
}

/* Button mit pulsierendem Ring */
.btn-pulse {
    position: relative;
}

.btn-pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(74, 158, 255, .55);
    animation: btnPulse 2.4s ease-out infinite;
    pointer-events: none;
}

/* ---------- Karte ---------- */

/* Farbe (--c als "r,g,b") und Startverzögerung (--d) setzt das HTML pro Herd */
.infect-core {
    background: radial-gradient(circle, rgba(var(--c), .85) 0%, rgba(var(--c), .35) 45%, transparent 70%);
    animation: infectCore 4s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

.infect-ring {
    border-color: rgba(var(--c), .9);
    animation: infectRing 4s ease-out infinite;
    animation-delay: var(--d, 0s);
}

/* Lagebericht: neue Meldung rutscht oben rein */
.ticker-in {
    animation: tickerIn .6s cubic-bezier(.2, .7, .2, 1) both;
}

/* ---------- Handy-Mockup: Stimmbalken bewegen sich ---------- */

.mock-bar {
    animation: mockBar 6s ease-in-out infinite;
    transform-origin: left;
}

.mock-bar-1 { --from: .35; --to: .82; animation-duration: 5.2s; }
.mock-bar-2 { --from: .55; --to: .4; animation-duration: 6.4s; }
.mock-bar-3 { --from: .2; --to: .6; animation-duration: 4.6s; }
.mock-bar-4 { --from: .1; --to: .3; animation-duration: 7s; }

.tap-ripple {
    animation: tapRipple 2.6s ease-out infinite;
}

/* Spritzen-Icons leuchten nacheinander auf */
.syringe-glow {
    animation: syringeGlow 2.8s ease-in-out infinite;
    animation-delay: calc(var(--s, 0) * 220ms);
}

/* ---------- Keyframes ---------- */

@keyframes bioSpin {
    to { transform: rotate(360deg); }
}

@keyframes infectShimmer {
    0%, 100% { background-position: 100% 0; }
    50% { background-position: 0 0; }
}

@keyframes infectCore {
    0%, 100% { opacity: .55; transform: scale(.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes infectRing {
    0% { opacity: .9; transform: scale(.4); }
    80%, 100% { opacity: 0; transform: scale(2.2); }
}

@keyframes vsPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(132, 204, 22, .45), 0 0 40px rgba(132, 204, 22, .25); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(132, 204, 22, 0), 0 0 60px rgba(132, 204, 22, .4); }
}

@keyframes alarm {
    0%, 100% { box-shadow: 0 0 0 1px rgba(244, 63, 94, .35), 0 0 0 0 rgba(244, 63, 94, 0); }
    50% { box-shadow: 0 0 0 1px rgba(244, 63, 94, .8), 0 0 36px 2px rgba(244, 63, 94, .25); }
}

@keyframes btnPulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 158, 255, .55); }
    70%, 100% { box-shadow: 0 0 0 16px rgba(74, 158, 255, 0); }
}

@keyframes tickerIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: none; }
}

@keyframes mockBar {
    0%, 100% { transform: scaleX(var(--from)); }
    50% { transform: scaleX(var(--to)); }
}

@keyframes tapRipple {
    0%, 55% { opacity: 0; transform: scale(.3); }
    60% { opacity: .9; transform: scale(.5); }
    100% { opacity: 0; transform: scale(1.8); }
}

@keyframes syringeGlow {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(132, 204, 22, 0)); opacity: .75; }
    50% { filter: drop-shadow(0 0 6px rgba(132, 204, 22, .8)); opacity: 1; }
}

/* ---------- FAQ-Akkordeon ---------- */

.faq-item > summary {
    list-style: none;
}

.faq-item > summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .bio-spin, .text-infect, .infect-core, .vs-pulse, .alarm, .btn-pulse::after,
    .mock-bar, .syringe-glow, .ticker-in {
        animation: none;
    }

    .infect-ring, .tap-ripple {
        display: none;
    }

    .js .reveal, .js .stagger > *, .line-grow {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
