/* Putzfuchs: Bildwelten, Lichtreflexe und sanfte Tiefe */

.hero {
    position: relative;
    isolation: isolate;
    --pf-light-x: 50%;
    --pf-light-y: 30%;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse 650px 440px at var(--pf-light-x) var(--pf-light-y),
            rgba(185, 225, 237, .20),
            transparent 75%
        ),
        radial-gradient(
            ellipse at 15% 70%,
            rgba(248, 211, 168, .13),
            transparent 55%
        );
}

.hero-grid {
    position: relative;
}

/* Ersetzt die abstrakte Grafik nur nach erfolgreicher JS-Einrichtung. */

.hero-visual.pf-gallery {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    isolation: isolate;
}

.hero-visual.pf-gallery::before,
.hero-visual.pf-gallery::after {
    display: none;
}

.pf-scene {
    position: relative;
    height: clamp(300px, 43vw, 570px);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(8, 44, 92, .12);
    border-radius: 14px;
    background: #dceaf0;
    box-shadow: 0 28px 65px -40px rgba(8, 44, 92, .45);
    --pf-x: 0px;
    --pf-y: 0px;
    --pf-mx: 50%;
    --pf-my: 45%;
}

.pf-scene .pf-scene-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transform: translate3d(var(--pf-x), var(--pf-y), 0) scale(1.065);
    transition: transform .65s cubic-bezier(.2, .65, .2, 1);
}

/* Licht bleibt dezent und verdeckt keine Bedienelemente. */

.pf-scene::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle 220px at var(--pf-mx) var(--pf-my),
            rgba(255, 255, 255, .24),
            transparent 75%
        ),
        linear-gradient(
            180deg,
            rgba(5, 24, 42, .10),
            transparent 40%,
            rgba(5, 24, 42, .12) 65%,
            rgba(5, 24, 42, .80)
        );
}

.pf-scene-caption {
    position: absolute;
    z-index: 3;
    right: 30px;
    bottom: 27px;
    left: 30px;
    max-width: 610px;
    pointer-events: none;
    color: white;
}

.pf-scene-caption span {
    display: block;
    margin-bottom: 9px;
    color: #e7f2f7;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pf-scene-caption strong {
    display: block;
    color: #fff;
    font-size: clamp(1.45rem, 3.2vw, 2.65rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.04em;
    text-wrap: balance;
}

.pf-gallery-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 19px;
}

.pf-scene-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.pf-scene-option,
.pf-motion-button {
    padding: 10px 15px;
    border: 1px solid #deded8;
    border-radius: 100px;
    color: #3b454b;
    background: #fff;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
}

.pf-scene-option:hover {
    border-color: #9eafb9;
    background: #f2f7f9;
}

.pf-scene-option[aria-pressed="true"] {
    border-color: #132d42;
    color: #fff;
    background: #132d42;
}

.pf-motion-button {
    border-color: transparent;
    color: #676e73;
    background: transparent;
}

.pf-motion-button:hover {
    background: #f2f3f1;
}

/* Wenige vierstrahlige Reflexe statt Partikelregen. */

.pf-sparkles {
    position: absolute;
    z-index: 2;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.pf-spark {
    position: absolute;
    left: var(--sx);
    top: var(--sy);
    width: var(--ss);
    height: var(--ss);
    opacity: 0;
    background: #fff;
    clip-path: polygon(
        50% 0%,
        61% 36%,
        100% 50%,
        61% 62%,
        50% 100%,
        38% 62%,
        0% 50%,
        38% 36%
    );
    animation: pf-polished-glint var(--sd) ease-in-out var(--delay) infinite;
}

@keyframes pf-polished-glint {
    0%, 18%, 74%, 100% {
        opacity: 0;
        transform: scale(.4) rotate(-8deg);
    }

    40% {
        opacity: .85;
        transform: scale(1) rotate(0deg);
    }

    56% {
        opacity: .38;
        transform: scale(.75) rotate(8deg);
    }
}

/* Bildstrecken innerhalb der Leistungen. */

.service-card .pf-service-media {
    position: relative;
    order: -1;
    margin: 0 0 25px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 9px;
    background: #e9f0f2;
}

.pf-service-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.2, .65, .2, 1);
}

.pf-service-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255,255,255,.26) 49%,
        transparent 68%
    );
    transform: translateX(-65%);
    transition: transform .9s ease, opacity .5s ease;
}

@media (hover: hover) and (pointer: fine) {
    html:not(.pf-effects-paused) .service-card:hover .pf-service-media img {
        transform: scale(1.035);
    }

    html:not(.pf-effects-paused) .service-card:hover .pf-service-media::after {
        opacity: 1;
        transform: translateX(60%);
    }
}

/* Logo: vollstaendig zeigen, nicht kreisfoermig abschneiden. */

.site-header .brand img.pf-brand-image {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
}

.pf-footer-logo {
    width: 115px;
    height: 115px;
    margin-bottom: 18px;
    object-fit: contain;
}

/* Bewegung pausieren / Systempraeferenz respektieren. */

html.pf-effects-paused .pf-spark,
html.pf-effects-hidden .pf-spark,
.pf-gallery.pf-out-of-view .pf-spark {
    animation-play-state: paused;
}

html.pf-effects-paused .pf-spark {
    opacity: 0 !important;
}

html.pf-effects-paused .pf-scene-image {
    transform: scale(1.065);
    transition: none;
}

html.pf-effects-paused .pf-service-media img,
html.pf-effects-paused .pf-service-media::after {
    transition: none;
}

html.pf-effects-paused .hero-orbit {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .pf-spark {
        display: none;
        animation: none;
    }

    .pf-scene .pf-scene-image {
        transform: scale(1.065);
        transition: none;
    }

    .pf-service-media img,
    .pf-service-media::after {
        transform: none !important;
        transition: none;
    }
}

@media (max-width: 760px) {
    .pf-scene {
        height: 390px;
        border-radius: 10px;
    }

    .pf-scene-caption {
        right: 20px;
        bottom: 23px;
        left: 20px;
    }

    .pf-scene-image {
        object-position: 58% center;
    }

    .pf-gallery-controls {
        gap: 8px;
    }

    .site-header .brand img.pf-brand-image {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .pf-scene {
        height: 330px;
    }

    .pf-scene-option {
        padding: 9px 12px;
        font-size: .72rem;
    }

    .pf-motion-button {
        padding-left: 0;
    }
}