/* ===================================================================
   PHARMASPEKTRUM-HERO.CSS - Hero-Animation der Startseite
   =================================================================== */

.visual-title {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 3px;
    margin: 0;
    color: var(--home-blue-fine-text);
    font-size: var(--fs-sm);
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Problem-Überschrift pro Szene: kleiner Kicker + Question als Titelzeile */
.visual-kicker {
    font-size: 0.68rem;
    opacity: 0.85;
}

.visual-question {
    color: var(--ui-white);
    font-size: 0.98rem;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
}

.hero-scene {
    position: absolute;
    inset: var(--sp-5);
    z-index: 2;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: var(--sp-3);
    opacity: 0;
}

.hero-scene-stage {
    position: relative;
    min-height: 214px;
}

.hero-scene-cta,
.hero-scene-fallback {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: 100%;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: none;
}

.hero-scene-cta {
    display: grid;
    padding: 0.6rem 0.9rem;
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.hero-scene-cta > * {
    grid-area: 1 / 1;
}

.hero-scene-cta.is-empty {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    box-shadow: none;
    pointer-events: none;
}

.hero-scene-cta.is-filled {
    color: var(--home-blue-dark);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--hero-line-bright);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
    pointer-events: auto;
}

.hero-cursor {
    position: absolute;
    z-index: 5;
    opacity: 0;
    color: var(--ui-white);
    font-size: 1.15rem;
    line-height: 1;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
    pointer-events: none;
}

/* Der globale Icon-Default (.fa-solid) nimmt Groesse und Deckkraft zurueck. */
.hero-cursor i {
    font-size: 1em;
    opacity: 1;
}

/* Gefüllter Inhalt: Icon + Kicker / Titel / Verb-Zeile (Fade via GSAP) */
.hero-cta-content {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.68rem;
    opacity: 0;
}

.hero-cta-content i {
    grid-row: 1 / 4;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--ui-white);
    background: var(--home-blue);
    border-radius: 50%;
    opacity: 1;
}

.hero-cta-kicker {
    grid-column: 2;
    color: var(--home-faint);
    font-size: 0.64rem;
    line-height: 1.2;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hero-cta-content strong {
    grid-column: 2;
    color: var(--home-ink);
    font-size: 0.92rem;
    line-height: 1.2;
}

.hero-cta-verb {
    grid-column: 2;
    margin-top: 2px;
    color: var(--home-blue);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

/* noscript-Fallback: statisch im gefüllten Look */
.hero-scene-fallback {
    display: inline-grid;
    align-items: center;
    padding: 0.78rem 0.9rem;
    color: var(--home-blue-dark);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--hero-line-bright);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.hero-scene-cta.is-filled:hover,
.hero-scene-cta.is-filled:focus-visible,
.hero-scene-fallback:hover {
    color: var(--home-blue-dark);
    background: var(--ui-white);
    border-color: var(--ui-white);
}

.hero-scene-dots {
    position: relative;
    z-index: 1;
    grid-column: 2;
    justify-self: center;
    align-self: start;
    display: flex;
    gap: 0.45rem;
    margin-top: calc(0.7rem - var(--sp-6));
}

.hero-scene-dot {
    appearance: none;
    padding: 0;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.38);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.hero-scene-dot:hover,
.hero-scene-dot:focus-visible {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
    outline: none;
}

.hero-scene-dot.is-active {
    width: 24px;
    background: var(--ui-white);
    border-radius: 999px;
}

.hero-case-file,
.hero-zone,
.hero-doc,
.hero-workflow-step,
.hero-cloud,
.hero-matrix-cell,
.hero-party {
    color: rgba(255, 255, 255, 0.92);
    background: var(--hero-surface);
    border: 1px solid var(--hero-line);
    border-radius: var(--r-sm);
}

.hero-case-file {
    position: absolute;
    left: calc(50% - 84px);
    top: 6px;
    width: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.14rem;
    padding: 0.42rem 0.55rem 0.5rem;
    white-space: nowrap;
    background-image: radial-gradient(rgba(210, 232, 240, 0.14) 1px, transparent 1.5px);
    background-size: 11px 11px;
    background-position: 5px 6px;
    opacity: 0;
}

.hero-case-file::before,
.hero-case-file::after {
    content: '';
    position: absolute;
    left: -4px;
    right: -4px;
    height: 10px;
    background-image:
        linear-gradient(var(--hero-ink), var(--hero-ink)),
        linear-gradient(var(--hero-ink), var(--hero-ink)),
        linear-gradient(var(--hero-ink), var(--hero-ink)),
        linear-gradient(var(--hero-ink), var(--hero-ink));
    background-size: 10px 1px, 1px 10px, 10px 1px, 1px 10px;
    background-repeat: no-repeat;
    pointer-events: none;
}

.hero-case-file::before {
    top: -4px;
    background-position: left top, left top, right top, right top;
}

.hero-case-file::after {
    bottom: -4px;
    background-position: left bottom, left bottom, right bottom, right bottom;
}

.hero-case-head {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.hero-case-meta {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: rgba(210, 232, 240, 0.68);
}

.hero-case-scanline {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background:
        repeating-linear-gradient(180deg, rgba(210, 232, 240, 0.16) 0 1px, transparent 1px 3px),
        linear-gradient(180deg, rgba(140, 220, 245, 0.12), rgba(140, 220, 245, 0.04));
    opacity: 0;
    pointer-events: none;
}

.hero-zone span,
.hero-doc span {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hero-case-file strong,
.hero-zone strong,
.hero-doc strong {
    display: block;
    color: var(--ui-white);
    line-height: 1.22;
}

.hero-case-file strong {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.hero-case-file i {
    color: var(--hero-ink-strong);
    font-size: 0.95rem;
    opacity: 0.9;
}

.hero-scanner {
    position: absolute;
    left: calc(50% - 112px);
    top: 6px;
    width: 28px;
    height: 44px;
    border-right: 2px solid rgba(224, 247, 255, 0.95);
    background: linear-gradient(90deg, transparent, rgba(199, 228, 237, 0.03) 35%, rgba(199, 228, 237, 0.3));
    box-shadow: 3px 0 12px rgba(140, 220, 245, 0.45), 0 0 22px rgba(140, 220, 245, 0.16);
    opacity: 0;
    pointer-events: none;
}

/* Tick-Marke oben an der Beam-Kante */
.hero-scanner::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -2px;
    width: 7px;
    height: 2px;
    background: rgba(224, 247, 255, 0.9);
}

.hero-crit-chips {
    position: absolute;
    left: 0;
    right: 0;
    top: 74px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.hero-crit-chip {
    padding: 0.24rem 0.6rem;
    color: rgba(255, 255, 255, 0.88);
    background: var(--hero-surface);
    border: 1px solid var(--hero-line);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
}

.hero-zone-stack {
    position: absolute;
    left: 0;
    right: 0;
    top: 124px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.hero-zone {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 0.3rem;
    min-height: 88px;
    padding: 0.8rem 0.4rem;
    text-align: center;
    opacity: 0;
}

/* Sublabel: GMP-Wirkung der Zone (Systematik aus dem Zonen-Modell-Artikel) */
.hero-zone .zone-sub {
    display: block;
    font-size: 0.58rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: rgba(210, 232, 240, 0.66);
}

.hero-zone-selector {
    position: absolute;
    z-index: 3;
    left: 0;
    top: 124px;
    height: 88px;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: var(--r-sm);
    box-shadow:
        0 0 0 1px rgba(199, 228, 237, 0.24),
        0 0 26px rgba(199, 228, 237, 0.28);
    opacity: 0;
    pointer-events: none;
}

/* „?"-Badge am Selektor: bleibt im Schwebezustand sichtbar (kein Einrasten) */
.hero-zone-selector .selector-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    transform: translateX(-50%);
    color: var(--ui-white);
    background: rgba(16, 48, 69, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1;
}

.hero-zone > i {
    color: var(--hero-ink-strong);
    font-size: 1.1rem;
}

.hero-zone strong {
    font-size: 0.8rem;
}

.hero-zone-1 { border-top: 4px solid var(--home-violet); }
.hero-zone-2 { border-top: 4px solid var(--home-amber); }
.hero-zone-3 { border-top: 4px solid var(--home-teal); }

.hero-zone-lines {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    top: 213px;
    width: 100%;
    height: calc(100% - 213px + var(--sp-3));
    pointer-events: none;
}

.hero-zone-lines path,
.hero-connector path {
    fill: none;
    stroke: rgba(199, 228, 237, 0.9);
    stroke-width: 2.5;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0;
    transition: stroke-dashoffset 0.58s ease, opacity 0.2s ease;
}

.hero-zone-lines path.is-visible,
.hero-connector path.is-visible {
    stroke-dashoffset: 0;
    opacity: 1;
}

.hero-connector {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    width: 100%;
    pointer-events: none;
}

.hero-scene-workflow .hero-connector {
    top: calc(100% - 34px);
    height: calc(34px + var(--sp-3));
}

.hero-scene-cloud .hero-connector {
    top: 150px;
    height: calc(100% - 150px + var(--sp-3));
}

.hero-docs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.hero-doc {
    position: relative;
    z-index: 2;
    padding: 0.5rem 0.55rem;
    background: rgba(255, 255, 255, 0.17);
    border-color: rgba(255, 255, 255, 0.38);
    opacity: 0;
}

.hero-doc i {
    color: var(--hero-ink-strong);
    margin-bottom: 0.3rem;
}

.hero-doc span {
    height: 5px;
    margin-top: 0.34rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 999px;
}

.hero-doc span:last-child {
    width: 72%;
}

.hero-problem-row {
    position: absolute;
    left: 0;
    right: 0;
    top: 152px;
    z-index: 3;
    display: flex;
    justify-content: center;
}

.hero-problem-chip {
    font-size: 0.7rem;
}

.hero-workflow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 34px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.5rem;
    background: rgba(18, 54, 77, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--r-sm);
    opacity: 0;
}

.hero-workflow-step {
    padding: 0.5rem 0.3rem;
    color: var(--ui-white);
    font-size: 0.68rem;
    font-weight: 850;
    text-align: center;
    opacity: 0;
}

.hero-workflow-step strong {
    display: block;
    margin-top: 2px;
    line-height: 1.18;
}

.hero-workflow-step i {
    color: var(--hero-ink-strong);
}

.hero-workflow-step.is-open {
    display: grid;
    place-items: center;
    background: transparent;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.4);
}

/* „?"-Badge: Kreis-Optik wie .selector-badge in Szene 1 */
.hero-q-badge {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--ui-white);
    background: rgba(16, 48, 69, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1;
}

.hero-party {
    position: absolute;
    top: 64px;
    bottom: 4px;
    width: 28%;
    padding: 0.5rem 0.4rem;
    opacity: 0;
}

.hero-party-provider { left: 0; }
.hero-party-user { right: 0; }

.hero-party-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--home-blue-soft-text);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hero-party-head i {
    color: var(--hero-ink-strong);
}

.hero-cloud {
    position: absolute;
    left: calc(50% - 74px);
    top: 0;
    width: 148px;
    padding: 0.5rem;
    text-align: center;
    opacity: 0;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    background: none;
    border: 0;
}

.hero-cloud i {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--hero-ink-strong);
    font-size: 1.4rem;
}

.hero-matrix-cell i {
    color: var(--hero-ink-strong);
}

.hero-matrix {
    position: absolute;
    left: 30%;
    right: 30%;
    top: 66px;
    z-index: 2;
    display: grid;
    gap: 0.32rem;
    justify-items: center;
    align-content: start;
}

.hero-matrix-cell {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.64rem;
    font-weight: 850;
    white-space: nowrap;
    opacity: 0;
}

/* Kleines „?"-Badge an den unzugeordneten Kontrollfeldern */
.hero-matrix-cell .hero-q-badge {
    position: absolute;
    top: -9px;
    right: -9px;
    width: 19px;
    height: 19px;
    font-size: 0.6rem;
}

@media (max-width: 960px) {

    /* Ein-Spalten-Layout: Dots bleiben zentriert direkt unter dem Visual */
    .hero-scene-dots {
        grid-column: 1;
    }}


@media (max-width: 720px) {

    .hero-scene-dots {
        margin-top: calc(-1 * var(--sp-4));
        align-self: start;
        justify-self: stretch;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        padding: var(--sp-3) var(--sp-5) var(--sp-4);
        background:
            linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
            linear-gradient(135deg, rgba(16, 48, 69, 0.97), rgba(31, 88, 118, 0.95));
        border: 1px solid var(--home-blue-hero-border);
        border-top: 0;
        border-bottom-left-radius: var(--r-md);
        border-bottom-right-radius: var(--r-md);
        box-shadow: 0 14px 34px rgba(20, 33, 43, 0.12);
    }

    /* Beschriftung der Pill-Leiste; die Dots erzeugt site.js, daher per CSS. */
    .hero-scene-dots::before {
        content: "Top-Themen";
        flex: 0 0 100%;
        margin-bottom: var(--sp-2);
        color: var(--hero-line-bright);
        font-size: 0.7rem;
        font-weight: 850;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        text-align: center;
    }}


@media (prefers-reduced-motion: reduce) {
    .hero-zone-lines path,
    .hero-connector path,
    .hero-scene-cta {
        transition: none !important;
        animation: none !important;
    }}
