/**
 * Cinematic Hero Section - Netflix-Style Floating Collage
 * Pure CSS + minimal JS for image loading
 * Responsive, accessible, performance-optimized
 */

/* ============================================
   HERO SECTION CONTAINER
   ============================================ */

.hero-cinematic {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 1000px;
    overflow: hidden;
    background:
        /* Grain texture overlay */
        url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.03"/></svg>'),
        /* Radial glows */
        radial-gradient(ellipse at 20% 30%, rgba(214, 93, 177, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 60%),
        /* Base gradient */
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0a1a 100%);
    background-size: 200px 200px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

/* Animated glow effect */
.hero-cinematic::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 40%, rgba(214, 93, 177, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 40%);
    animation: glowMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes glowMove {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.6;
    }
    33% {
        transform: translate(5%, 5%) rotate(120deg);
        opacity: 0.8;
    }
    66% {
        transform: translate(-5%, 3%) rotate(240deg);
        opacity: 0.7;
    }
}

/* ============================================
   FLOATING COLLAGE BACKGROUND
   ============================================ */

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

/* No overlay - images remain fully visible */
.collage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* Removed all gradients to keep images clear */
}

/* Individual floating image tiles */
.collage-tile {
    position: absolute;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(214, 93, 177, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
    opacity: 0.9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.collage-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(214, 93, 177, 0.05) 0%,
        transparent 50%,
        rgba(168, 85, 247, 0.05) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.collage-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Depth layers with different animation speeds */
.collage-tile.depth-1 {
    animation: float-slow 35s ease-in-out infinite;
    z-index: 1;
}

.collage-tile.depth-2 {
    animation: float-medium 28s ease-in-out infinite;
    z-index: 2;
}

.collage-tile.depth-3 {
    animation: float-fast 22s ease-in-out infinite;
    z-index: 3;
}

/* Floating animations - subtle movement */
@keyframes float-slow {
    0%, 100% {
        transform: translate(0, 0) rotate(var(--tile-rotation));
    }
    50% {
        transform: translate(-15px, -10px) rotate(calc(var(--tile-rotation) + 1deg));
    }
}

@keyframes float-medium {
    0%, 100% {
        transform: translate(0, 0) rotate(var(--tile-rotation));
    }
    50% {
        transform: translate(12px, -15px) rotate(calc(var(--tile-rotation) - 1deg));
    }
}

@keyframes float-fast {
    0%, 100% {
        transform: translate(0, 0) rotate(var(--tile-rotation));
    }
    50% {
        transform: translate(-10px, 18px) rotate(calc(var(--tile-rotation) + 2deg));
    }
}

/* ============================================
   CONTENT OVERLAY
   ============================================ */

.hero-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content-cinematic {
    position: relative;
    max-width: 700px;
    padding: var(--spacing-xl);
    animation: fadeInUp 1s ease-out;
    text-align: center;
    z-index: 100;
    background: radial-gradient(ellipse at center, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.4) 50%, transparent 70%);
    backdrop-filter: blur(8px);
    border-radius: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content-cinematic .hero-title {
    position: relative;
    z-index: 101;
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    color: #ffffff;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.6),
        0 8px 24px rgba(0, 0, 0, 0.4);
}

.hero-content-cinematic .highlight {
    color: #D65DB1;
    text-shadow:
        0 0 20px rgba(214, 93, 177, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.6);
}

.hero-content-cinematic .hero-subtitle {
    position: relative;
    z-index: 101;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-xl);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.6);
}

.hero-content-cinematic .hero-cta {
    position: relative;
    z-index: 101;
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet - reduce tiles */
@media (max-width: 1024px) {
    .hero-cinematic {
        min-height: 500px;
    }

    .hero-content-cinematic {
        max-width: 600px;
    }

    /* Show fewer tiles on tablet */
    .collage-tile:nth-child(n+16) {
        display: none;
    }
}

/* Mobile - hide collage completely */
@media (max-width: 768px) {
    .hero-cinematic {
        min-height: 600px;
        height: auto;
        padding: var(--spacing-xl) 0;
    }

    .hero-collage {
        display: none;
    }

    .collage-overlay {
        display: none;
    }

    .hero-content-cinematic {
        max-width: 100%;
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .hero-content-cinematic .hero-title {
        font-size: 2.25rem;
    }

    .hero-content-cinematic .hero-subtitle {
        font-size: 1rem;
    }

    .hero-content-cinematic .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-content-cinematic .hero-cta .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .collage-tile {
        animation: none !important;
    }

    .hero-content-cinematic {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   PARALLAX SUPPORT (optional)
   ============================================ */

.hero-collage.parallax-active .collage-tile {
    transition: transform 0.2s ease-out;
}
