/*
 * Eigenart je Domain: Hero-Varianten der Startseite (templates/book_list/home.html.twig), je Theme eine.
 * Nur Tokens, keine festen Farben. Bewegung: assets/controllers/hero_controller.js (GSAP) und die
 * CSS-Animationen unten – alle aus bei „Bewegung reduzieren“. Ohne JavaScript ist alles sichtbar.
 * Dokumentation: docs/design-system/components/Hero/README.md, Abschnitt „Varianten je Domain“.
 */

/* ===== Gemeinsam: helle Heroes (alle außer dark und krimi) ===== */
.bo-hero--home:not(.bo-night) {
    color: var(--ink-body);
}

.bo-hero--home:not(.bo-night) h1,
.bo-hero--home:not(.bo-night) .bo-hero__book {
    color: var(--ink);
}

.bo-hero--home:not(.bo-night) h1 em {
    color: var(--accent-ink);
}

.bo-hero--home:not(.bo-night) .bo-hero__author,
.bo-hero--home:not(.bo-night) .bo-stand {
    color: var(--ink-muted);
}

.bo-hero--home:not(.bo-night) .bo-btn--link {
    color: var(--accent-ink);
}

.bo-hero--home .bo-hero__text {
    position: relative;
    z-index: 2;
}

.bo-hero--home .bo-hero__stage {
    z-index: 2;
}

.bo-hero--home .bo-hero__stage .bo-cover {
    z-index: 2;
}

/* ===== BuchHero (kinder): Sonne, Sprechblase, Comic-Sterne ===== */
.bo-hero--kinder {
    background: linear-gradient(160deg, var(--surface-300) 0%, var(--surface-200) 55%, var(--surface-100) 100%);
}

.bo-hero--kinder .bo-hero__stage::before {
    width: 320px;
    height: 320px;
    right: -50px;
    top: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--highlight) 0 58%, color-mix(in srgb, var(--highlight) 35%, transparent) 59% 70%, transparent 71%);
}

.bo-hero--kinder .bo-hero__stage .bo-cover {
    transform: rotate(3deg);
}

.bo-hero__bubble {
    position: absolute;
    left: -64px;
    top: 0;
    z-index: 3;
    padding: 10px 18px;
    font-family: var(--font-kinder);
    font-size: 20px;
    line-height: 24px;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface-100);
    border: 3px solid var(--ink);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-pop);
    transform: rotate(-7deg);
    white-space: nowrap;
}

.bo-hero__bubble::after {
    content: "";
    position: absolute;
    right: 22px;
    bottom: -14px;
    width: 18px;
    height: 18px;
    background: var(--surface-100);
    border-right: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
    transform: rotate(45deg) skew(10deg, 10deg);
}

.bo-hero__stars {
    position: absolute;
    left: 2%;
    top: 12px;
    width: 120px;
    height: 120px;
    fill: var(--accent);
    z-index: 1;
}

/* ===== BuchTicker (dark): Laufband, Live-Punkt ===== */
.bo-hero--dark {
    padding-bottom: 72px;
}

.bo-hero--dark .bo-hero__angle {
    display: none;
}

.bo-live {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    flex: none;
}

.bo-live::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--danger);
    animation: bo-pulse 1.6s ease-out infinite;
}

@keyframes bo-pulse {
    from { transform: scale(.5); opacity: 1; }
    to { transform: scale(1.6); opacity: 0; }
}

.bo-ticker {
    display: flex;
    overflow: hidden;
    background: var(--night-200);
    border-block: 1px solid color-mix(in srgb, var(--link-on-night) 30%, transparent);
    color: var(--on-night);
}

.bo-ticker__track {
    flex: none;
    display: flex;
    gap: var(--space-5);
    margin: 0;
    padding: 14px var(--space-4);
    list-style: none;
    white-space: nowrap;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    animation: bo-ticker 38s linear infinite;
}

.bo-ticker__track strong {
    margin-right: 6px;
    font-family: var(--font-mono);
    color: var(--link-on-night);
}

.bo-ticker__track span {
    margin-left: 6px;
    font-weight: 400;
    color: var(--on-night-body);
}

.bo-ticker:hover .bo-ticker__track,
.bo-ticker:focus-within .bo-ticker__track {
    animation-play-state: paused;
}

@keyframes bo-ticker {
    to { transform: translateX(-100%); }
}

/* ===== BuchUno (light): Papier, riesige Eins, Holzbrett ===== */
.bo-hero--light {
    background: linear-gradient(180deg, var(--surface-200), var(--surface-100));
}

.bo-hero--light .bo-hero__stage {
    padding: 24px 56px 0;
}

.bo-hero--light .bo-hero__stage::before {
    display: none;
}

.bo-hero__numeral {
    position: absolute;
    left: -150px;
    bottom: -40px;
    z-index: 1;
    font-family: var(--font-serif);
    font-size: 380px;
    line-height: 1;
    font-weight: 700;
    color: color-mix(in srgb, var(--primary) 22%, transparent);
    pointer-events: none;
    user-select: none;
}

.bo-hero__board {
    position: relative;
    z-index: 2;
    display: block;
    height: 14px;
    margin: 0 -56px;
    border-radius: 2px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--highlight-ink) 80%, var(--surface-100)), var(--highlight-ink));
    box-shadow: 0 10px 18px -8px color-mix(in srgb, var(--ink) 45%, transparent);
}

/* ===== LeseAlarm (krimi): Suchscheinwerfer, Absperrband ===== */
.bo-hero--krimi .bo-hero__angle {
    background: var(--surface-100);
}

.bo-hero__spot {
    position: absolute;
    z-index: 1;
    top: -10%;
    right: 6%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--on-night) 22%, transparent) 0%, transparent 62%);
    mix-blend-mode: screen;
    pointer-events: none;
}

.bo-tape {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: 64px;
    z-index: 4;
    overflow: hidden;
    padding: 8px 0;
    background: var(--highlight);
    color: var(--on-highlight);
    font-family: var(--font-krimi);
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    transform: rotate(-4deg);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--night-100) 60%, transparent);
}

.bo-tape span {
    display: inline-block;
    animation: bo-tape 30s linear infinite;
}

@keyframes bo-tape {
    to { transform: translateX(-50%); }
}

.bo-hero--krimi {
    padding-bottom: 160px;
}

/* ===== LeseCharts (sachbuch): Millimeterpapier, Säulendiagramm ===== */
.bo-hero--sachbuch {
    background: var(--surface-200);
}

.bo-hero__grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(90deg, transparent 0%, black 45%);
}

.bo-hero__chart {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    height: 340px;
    margin: 0;
    padding: 0 8px;
    list-style: none;
    border-bottom: 2px solid var(--ink);
}

.bo-hero__chart li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    height: 100%;
}

.bo-hero__chart .bo-cover {
    width: 52px;
    font-size: 7px;
}

.bo-hero__bar {
    display: flex;
    justify-content: center;
    width: 60px;
    height: calc(var(--share) * 230px);
    padding-top: 8px;
    background: var(--primary);
    transform-origin: bottom;
}

.bo-hero__chart li:first-child .bo-hero__bar {
    background: var(--highlight);
}

.bo-hero__bar strong {
    font-family: var(--font-mono);
    font-size: 18px;
    line-height: 22px;
    font-weight: 500;
    color: var(--on-primary);
}

.bo-hero__chart li:first-child .bo-hero__bar strong {
    color: var(--on-highlight);
}

/* ===== LeseTicker (romance): Rosé-Verlauf, Lesezeichen, Herz ===== */
.bo-hero--romance {
    background:
        radial-gradient(ellipse at 85% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 55%),
        linear-gradient(135deg, var(--surface-100), var(--surface-300));
}

.bo-hero__ribbon {
    position: absolute;
    right: 64px;
    top: 18px;
    z-index: 3;
    width: 22px;
    height: 96px;
    background: var(--primary);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
    transform-origin: top center;
}

.bo-hero__heart {
    position: absolute;
    left: -28px;
    bottom: 28px;
    z-index: 3;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--surface-100);
    color: var(--primary);
    font-family: var(--font-romance);
    font-style: italic;
    font-size: 17px;
    line-height: 22px;
    box-shadow: var(--shadow-cover);
    white-space: nowrap;
}

/* ===== Mobil ===== */
@media (max-width: 760px) {
    .bo-hero__bubble {
        left: 132px;
        top: 24px;
        font-size: 16px;
        padding: 6px 12px;
    }

    .bo-hero--kinder .bo-hero__stage::before {
        width: 180px;
        height: 180px;
        right: auto;
        left: -30px;
        top: -24px;
    }

    .bo-hero__stars {
        left: auto;
        right: 8px;
        width: 80px;
        height: 80px;
    }

    .bo-hero--light .bo-hero__stage {
        padding: 0 0 0 8px;
        justify-self: start;
    }

    .bo-hero__numeral {
        font-size: 200px;
        right: auto;
        left: 120px;
        bottom: -24px;
    }

    .bo-hero__board {
        margin: 0 -24px 0 -16px;
    }

    .bo-hero__spot {
        width: 300px;
        height: 300px;
        right: -60px;
        top: -40px;
    }

    .bo-hero--krimi {
        padding-bottom: 120px;
    }

    .bo-tape {
        bottom: 48px;
        font-size: 14px;
    }

    .bo-hero__chart {
        order: -1;
        height: 200px;
        gap: 10px;
        justify-content: space-between;
    }

    .bo-hero__chart .bo-cover {
        width: 40px;
    }

    .bo-hero__bar {
        width: 44px;
        height: calc(var(--share) * 120px);
    }

    .bo-hero--romance .bo-hero__stage::before {
        display: none;
    }

    .bo-hero__ribbon {
        right: auto;
        left: 88px;
    }

    .bo-hero__heart {
        left: 92px;
        bottom: 12px;
        font-size: 15px;
    }

    .bo-ticker__track {
        font-size: 13px;
        gap: var(--space-4);
    }
}

/* ===== Bewegung reduzieren: Laufbänder stehen und lassen sich wischen ===== */
@media (prefers-reduced-motion: reduce) {
    .bo-live::after,
    .bo-tape span {
        animation: none;
    }

    .bo-ticker {
        overflow-x: auto;
    }

    .bo-ticker__track {
        animation: none;
    }

    .bo-ticker__track[aria-hidden="true"] {
        display: none;
    }
}
