/* ============================================================================
   MOBILE PERFORMANCE OPTIMIZATIONS - NUR PERFORMANCE, KEIN DESIGN
   ============================================================================ */

/* Smooth Scrolling mit GPU */
html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Optimiere nur animierte Elemente für 60fps */
.hero-section,
.services-section,
.about-section,
.feature-card,
.cta-button {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Lazy Loading für Sections */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Touch Optimierungen */
button,
a,
.cta-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Performance: Reduziere Repaints */
section {
    contain: layout style;
}

/* Schnelleres Rendering für Cards */
.feature-card,
.service-card {
    contain: layout style paint;
}

/* Verhindere Layout-Shifts */
img {
    content-visibility: auto;
}

/* iPhone Scroll Momentum */
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
    body,
    .modal-content {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
}

/* Retina Display Optimierungen */
@media (-webkit-min-device-pixel-ratio: 3),
       (min-resolution: 3dppx) {
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    button:active,
    .cta-button:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}
