/* =========================================================
   motion.css – Scroll-Effekte & Hero-Video (Startseite)
   Gesteuert von motion.js. Ohne JS bzw. bei
   prefers-reduced-motion bleibt alles sofort sichtbar.
   ========================================================= */

/* ---------- Scroll-Fortschrittsbalken ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1100;
    background: linear-gradient(90deg, var(--accent-orange), #ffb347);
    transform-origin: 0 50%;
    transform: scaleX(0);
    pointer-events: none;
}

/* ---------- KI-Kennzeichnung (EU AI Act) ---------- */
.ai-label {
    position: absolute;
    z-index: 3;
    right: 16px;
    bottom: 16px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(10, 20, 35, .55);
    color: rgba(255, 255, 255, .92);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.3;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}

/* ---------- Hero mit Video-Hintergrund ---------- */
.hero-cinematic {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #0b1a2c;
    padding: 110px 0 120px;
}
.hero-bg {
    position: absolute;
    inset: -6% 0 0 0;
    z-index: -1;
    will-change: transform;
}
.hero-bg-poster,
.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 60%;
}
.hero-bg-video {
    opacity: 0;
    transition: opacity 1.2s ease;
}
.hero-bg-video.is-playing { opacity: 1; }
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 18, 34, .88) 0%, rgba(6, 18, 34, .72) 38%, rgba(6, 18, 34, .25) 70%, rgba(6, 18, 34, .35) 100%),
        linear-gradient(0deg, rgba(6, 18, 34, .55) 0%, rgba(6, 18, 34, 0) 35%);
}
.hero-cinematic .hero-title .highlight { color: #ff8a3d; }
.hero-cinematic .hero-rating,
.hero-cinematic .hero-rating:hover { color: rgba(255, 255, 255, .85); }
.hero-cinematic .hero-rating-text strong { color: #fff; }
.hero-cinematic .hero-trust li { color: #fff; }
.hero-cinematic .hero-trust li::before { color: #ff8a3d; }
.hero-cinematic .hero-call {
    color: #fff;
    border-color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hero-cinematic .hero-call:hover {
    background: #fff;
    color: var(--primary-blue);
    border-color: #fff;
}
.hero-cinematic .hero-form-card {
    border-color: transparent;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.hero-ai-label { bottom: 18px; right: 20px; }
.motion-band > .ai-label { top: 16px; bottom: auto; }

/* Hero-Inhalte beim Laden gestaffelt einblenden */
.motion-on .hero-cinematic .hero-content > *,
.motion-on .hero-cinematic .hero-aside,
.motion-on .hero-cinematic .hero-form-card {
    animation: motion-rise .9s cubic-bezier(.2, .7, .2, 1) both;
}
.motion-on .hero-cinematic .hero-badge { animation-delay: .05s; }
.motion-on .hero-cinematic .hero-title { animation-delay: .15s; }
.motion-on .hero-cinematic .hero-subtitle { animation-delay: .28s; }
.motion-on .hero-cinematic .hero-aside { animation-delay: .4s; }
.motion-on .hero-cinematic .hero-form-card { animation-delay: .25s; animation-duration: 1.1s; }

@keyframes motion-rise {
    from { opacity: 0; transform: translate3d(0, 28px, 0); }
    to { opacity: 1; transform: none; }
}

/* ---------- Scroll-Reveal (nur kleine Einzelelemente) ---------- */
.motion-on [data-reveal] {
    opacity: 0;
    transition:
        opacity .8s cubic-bezier(.2, .7, .2, 1),
        transform .8s cubic-bezier(.2, .7, .2, 1),
        clip-path 1.1s cubic-bezier(.7, 0, .2, 1);
    transition-delay: var(--reveal-delay, 0s);
}
.motion-on [data-reveal="up"] { transform: translate3d(0, 40px, 0); }
.motion-on [data-reveal="left"] { transform: translate3d(-48px, 0, 0); }
.motion-on [data-reveal="right"] { transform: translate3d(48px, 0, 0); }
.motion-on [data-reveal="zoom"] { transform: scale(.92); }
.motion-on [data-reveal="wipe"] {
    opacity: 1;
    clip-path: inset(0 0 100% 0 round 12px);
}
.motion-on [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0 round 12px);
}

/* Leistungs-Bilder: Ken-Burns beim Einblenden */
.motion-on .service-card[data-reveal] .service-image img {
    transform: scale(1.18);
    transition: transform 1.6s cubic-bezier(.2, .7, .2, 1);
}
.motion-on .service-card[data-reveal].is-visible .service-image img { transform: scale(1); }
.motion-on .service-card[data-reveal].is-visible:hover .service-image img { transform: scale(1.06); transition-duration: .5s; }
/* Hover-Lift der Karte nicht durch Reveal-Transition verzögern */
.motion-on .service-card[data-reveal].is-visible,
.motion-on .testimonial-card[data-reveal].is-visible {
    transition: opacity .8s ease, transform .35s ease, box-shadow .35s ease;
}
.motion-on .service-card[data-reveal].is-visible:hover,
.motion-on .testimonial-card[data-reveal].is-visible:hover {
    transform: translateY(-6px);
}

/* Section-Label: Linie wächst beim Einblenden */
.motion-on .section-header .section-label { position: relative; }
.motion-on .section-header.is-visible .section-label::after {
    transform: scaleX(1);
}
.motion-on .section-header .section-label::after {
    content: "";
    display: block;
    height: 2px;
    width: 36px;
    margin: 6px auto 0;
    background: currentColor;
    transform: scaleX(0);
    transition: transform .8s .3s cubic-bezier(.2, .7, .2, 1);
}
.motion-on .why-us-content .section-label::after { margin-left: 0; }

/* Why-us-Bild: leichte Parallaxe (Wert kommt aus motion.js) */
.motion-on .why-us-image img {
    translate: 0 var(--parallax, 0px);
    will-change: translate;
}

/* ---------- Parallax-Band ---------- */
.motion-band {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 78vh;
    display: flex;
    align-items: center;
    padding: 120px 0;
    color: #fff;
    background: #0b1a2c;
}
.motion-band-media {
    position: absolute;
    inset: -18% 0;
    z-index: -1;
    will-change: transform;
}
.motion-band-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 50%;
}
.motion-band-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(6, 18, 34, .82) 0%, rgba(6, 18, 34, .55) 45%, rgba(6, 18, 34, .1) 100%);
}
.motion-band-inner { width: 100%; }
.motion-band .section-label { color: #ff8a3d; }
.motion-band-title {
    max-width: 16ch;
    margin: 0 0 32px;
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.01em;
}
.motion-band-title .word {
    display: inline-block;
    opacity: .18;
    transition: opacity .25s linear;
}
.motion-band-title .word.is-lit { opacity: 1; }

/* ---------- Städte-Laufband ---------- */
.city-marquee {
    overflow: hidden;
    padding: 46px 0 40px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    user-select: none;
}
.city-marquee-row {
    display: flex;
    width: max-content;
    gap: 0;
    white-space: nowrap;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--primary-blue);
    will-change: transform;
}
.city-marquee-row span::after {
    content: "\2022";
    margin: 0 .45em;
    color: var(--accent-orange);
}
.city-marquee-row--outline { color: #d6e6f7; }
.city-marquee-row--outline span::after { color: #ffd2b3; }

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
    .hero-cinematic { padding: 70px 0 80px; }
    .hero-bg::after {
        background: linear-gradient(180deg, rgba(6, 18, 34, .78) 0%, rgba(6, 18, 34, .7) 45%, rgba(6, 18, 34, .88) 100%);
    }
    .motion-band { min-height: 0; padding: 90px 0; }
}
@media (max-width: 640px) {
    .hero-cinematic { padding: 44px 0 64px; }
    .ai-label { font-size: 10px; right: 10px; bottom: 10px; }
    .motion-band > .ai-label { top: 10px; }
    .city-marquee { padding: 30px 0 26px; }
}

/* ---------- Reduzierte Bewegung: alles statisch ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero-bg-video { display: none; }
    .hero-bg,
    .motion-band-media,
    .city-marquee-row { transform: none !important; }
    .why-us-image img { translate: none !important; }
    .motion-band-title .word { opacity: 1; }
}
