/* ===================================
   Crazy Beautiful Formal Wear
   Custom Styles
=================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* ===================================
   Hero Animations
=================================== */
.hero-badge {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-title {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-ctas {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-trust {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

.hero-image-container {
    animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate(32px, -50%);
    }
    to {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

/* Hero Decorations Float */
.hero-decoration {
    animation: float 8s ease-in-out infinite;
}
.hero-decoration:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 10s;
}
.hero-decoration:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 15px) scale(0.95); }
}

/* ===================================
   Marquee
=================================== */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===================================
   Collection Cards
=================================== */
.collection-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.collection-card:hover {
    transform: translateY(-6px);
}

/* ===================================
   Scroll Reveal
=================================== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Navbar
=================================== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

/* ===================================
   Mobile Menu
=================================== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu Button Animation */
.menu-line {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* ===================================
   Utility
=================================== */
::selection {
    background-color: #065f46;
    color: #fefdf8;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===================================
   Responsive Adjustments
=================================== */
@media (max-width: 1024px) {
    .hero-image-container {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-title .italic {
        display: block;
        font-size: 2.5rem;
    }
}
