/* ========================================
   BAD LAB - Custom Animations & Parallax
   Dark Theme with Gold Accent
   ======================================== */

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111111;
}

::-webkit-scrollbar-thumb {
    background: #c8a45c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4b06a;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #c8a45c #111111;
}

/* === PARALLAX SECTIONS === */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    inset: -20% 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    z-index: 0;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
}

/* === SCROLL REVEAL ANIMATIONS === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.revealed > *:nth-child(8) { transition-delay: 0.4s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* === HERO PARALLAX === */
.hero-parallax {
    position: relative;
    overflow: hidden;
}

.hero-parallax .hero-bg {
    position: absolute;
    inset: -30% 0;
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: 0;
}

.hero-parallax .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-parallax .hero-content {
    position: relative;
    z-index: 2;
}

/* Hero text animation */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === PRODUCT CARD ENHANCEMENTS === */
.product-card-enhanced {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(200, 164, 92, 0.2);
    border-color: rgba(200, 164, 92, 0.3);
}

.product-card-enhanced .product-image-wrap {
    overflow: hidden;
}

.product-card-enhanced .product-image-wrap img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-enhanced:hover .product-image-wrap img {
    transform: scale(1.08);
}

/* === DIVIDER PARALLAX === */
.parallax-divider {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.parallax-divider .parallax-bg {
    inset: -50% 0;
    height: 200%;
}

@media (min-width: 768px) {
    .parallax-divider {
        height: 400px;
    }
}

/* === FLOATING PARTICLES (decorative) === */
.particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(200, 164, 92, 0.4);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* === TEXT GRADIENT ANIMATION === */
.text-gradient-animated {
    background: linear-gradient(
        90deg,
        #c8a45c,
        #f0d78c,
        #c8a45c,
        #a08040,
        #c8a45c
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 4s linear infinite;
}

@keyframes textGradient {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* === NOISE TEXTURE OVERLAY === */
.noise-overlay {
    position: relative;
}

.noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* === SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
}

/* === LOADING SCREEN === */
.page-loader {
    position: fixed;
    inset: 0;
    background: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.3em;
    color: #c8a45c;
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* === MARQUEE SCROLLING TEXT === */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 20s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === FLOATING IMAGE === */
.float-image {
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

/* === MANIFESTO SECTION === */
.manifesto-text .highlight {
    color: #c8a45c;
    font-weight: 700;
}

/* === MOST POPULAR PRODUCT GRID === */
.popular-product-card {
    position: relative;
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    transition: all 0.4s ease;
}

.popular-product-card:hover {
    border-color: rgba(200, 164, 92, 0.3);
    transform: translateY(-4px);
}

.popular-product-card .pop-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #111;
}

.popular-product-card .pop-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.popular-product-card:hover .pop-image img {
    transform: scale(1.1);
}

.popular-product-card .pop-info {
    padding: 1.5rem;
    text-align: center;
}

.popular-product-card .pop-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: white;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.popular-product-card:hover .pop-name {
    color: #c8a45c;
}

.popular-product-card .pop-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Exception: Keep marquee scrolling */
    .marquee-track {
        animation-duration: 20s !important;
        animation-iteration-count: infinite !important;
        animation-direction: normal !important;
    }
    
    .parallax-bg,
    .hero-parallax .hero-bg {
        transform: none !important;
    }
    
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}
