/* ===========================================
   PARALLAX HERO - Scroll Animation
   U-Integrator UniFi Store
   =========================================== */

/* Container for scroll tracking */
.parallax-container {
    position: relative;
    height: 400vh; /* Scroll space for animation */
}

/* Sticky hero section */
.parallax-hero {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
    z-index: 1;
}

/* Canvas for frame animation */
.parallax-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback image (first frame) */
.parallax-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Dark overlay for better text readability */
.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Content wrapper */
.parallax-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Text content - starts hidden, fades in */
.parallax-text {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.parallax-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Logo */
.parallax-logo {
    width: 200px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 20px rgba(0, 111, 255, 0.3));
}

/* Main heading */
.parallax-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

/* Subtitle */
.parallax-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 40px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* Buttons container */
.parallax-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Primary button */
.parallax-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 160px;
}

.parallax-btn--primary {
    background: #006FFF;
    color: #fff;
    border: 2px solid #006FFF;
}

.parallax-btn--primary:hover {
    background: #0059CC;
    border-color: #0059CC;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 111, 255, 0.4);
}

.parallax-btn--secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.parallax-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Scroll indicator */
.parallax-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.parallax-scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.parallax-scroll-arrow {
    width: 24px;
    height: 24px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
}

.parallax-scroll-arrow svg {
    width: 12px;
    height: 12px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(6px);
    }
    60% {
        transform: translateY(3px);
    }
}

/* Progress bar (optional) */
.parallax-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #006FFF, #00D4FF);
    z-index: 1000;
    transition: width 0.1s linear;
}

/* Gradient transition to white content */
.parallax-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent 0%, #fff 100%);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.parallax-gradient.visible {
    opacity: 1;
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 1200px) {
    .parallax-title {
        font-size: 3rem;
    }

    .parallax-subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .parallax-container {
        height: 300vh; /* Less scroll on mobile */
    }

    .parallax-title {
        font-size: 2.25rem;
    }

    .parallax-subtitle {
        font-size: 1.125rem;
        margin-bottom: 32px;
    }

    .parallax-btn {
        padding: 14px 24px;
        font-size: 0.9375rem;
        min-width: 140px;
    }

    .parallax-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .parallax-scroll-indicator {
        bottom: 24px;
    }
}

@media (max-width: 480px) {
    .parallax-title {
        font-size: 1.875rem;
    }

    .parallax-subtitle {
        font-size: 1rem;
    }

    .parallax-logo {
        width: 150px;
    }
}

/* ===========================================
   Prefers reduced motion
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    .parallax-container {
        height: auto;
    }

    .parallax-hero {
        position: relative;
    }

    .parallax-text {
        opacity: 1;
        transform: none;
    }

    .parallax-scroll-arrow {
        animation: none;
    }
}

/* ===========================================
   FIX: Center buttons on mobile
   =========================================== */
.parallax-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

@media (max-width: 768px) {
    .parallax-buttons {
        margin: 0 auto;
        align-items: center;
    }
    
    .parallax-btn {
        width: 100%;
        text-align: center;
    }
}

/* ===========================================
   UI.com Style Typography
   =========================================== */
.parallax-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.parallax-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.4;
    opacity: 0.9;
}

.parallax-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}
