/* ============================================
   Mia's Corner — Custom Styles
   Plum + Amber Editorial Design System
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1A0816;
}
::-webkit-scrollbar-thumb {
    background: #4A1942;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8C3A80;
}

/* --- Selection --- */
::selection {
    background: #F5C518;
    color: #1A0816;
}

/* --- Floating card animations --- */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
}

.floating-card {
    animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float3 4.5s ease-in-out infinite;
}

/* --- Scroll Reveal Animations --- */
.reveal-up {
    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);
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    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 {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* --- Navbar transitions --- */
#navbar.scrolled {
    background: rgba(26, 8, 22, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 25, 66, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Mobile menu transitions --- */
.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.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* --- Menu button animation --- */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 20px;
}

/* --- Product card hover effect --- */
.group:hover .group-hover\:scale-110 {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Button ripple-like glow --- */
button:hover,
a:hover {
    outline: none;
}

/* --- Image lazy loading fallback --- */
img {
    background-color: #2D0F28;
}

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

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .floating-card {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        max-width: 100%;
        animation: none;
    }
    .floating-card-2 {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 1rem;
        max-width: 100%;
        animation: none;
    }
    .floating-card-3 {
        position: relative;
        bottom: auto;
        left: auto;
        max-width: 100%;
        animation: none;
    }
}
