/* Custom styles for Young and the Restless */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar transitions */
.nav-text {
    color: #284622;
    transition: color 0.3s ease;
}

.nav-subtext {
    color: #528a42;
    transition: color 0.3s ease;
}

.nav-icon {
    color: #284622;
    transition: color 0.3s ease;
}

/* Navbar scrolled state */
nav.scrolled .nav-text {
    color: #284622;
}

nav.scrolled .nav-subtext {
    color: #528a42;
}

nav.scrolled .nav-icon {
    color: #284622;
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile link hover */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* Hero floating cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.hero-card-1 { animation: float 6s ease-in-out infinite; }
.hero-card-2 { animation: float 7s ease-in-out infinite 0.5s; }
.hero-card-3 { animation: float 5.5s ease-in-out infinite 1s; }
.hero-card-4 { animation: float 6.5s ease-in-out infinite 0.3s; }

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Form focus styles */
input:focus, textarea:focus {
    outline: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FAFAF6;
}

::-webkit-scrollbar-thumb {
    background: #c5dfb9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9cc58a;
}

/* Selection color */
::selection {
    background: #c5dfb9;
    color: #284622;
}
