/* ===== Custom Styles for Scoops of Joy ===== */

:root {
    --navy-900: #0a1628;
    --navy-800: #0f1f3a;
    --navy-700: #152d52;
    --gold-500: #c9a84c;
    --gold-400: #d4b85e;
    --cream-50: #faf8f4;
    --cream-100: #f5f0e8;
}

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

/* Selection color */
::selection {
    background: var(--gold-500);
    color: var(--navy-900);
}

/* ===== Navbar ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(250, 248, 244, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 31, 58, 0.08);
}

.navbar-scrolled .nav-link {
    color: var(--navy-800) !important;
}

.navbar-dark .nav-link {
    color: rgba(250, 248, 244, 0.7) !important;
}

.navbar-dark .nav-link::after {
    background: var(--gold-500);
}

.navbar-dark .nav-link:hover {
    color: var(--cream-50) !important;
}

/* ===== Hero Animation ===== */
.hero-tagline {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-tagline {
    animation-delay: 0.2s;
}

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

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.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.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu toggle animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuToggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hero-tagline {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .mobile-link {
        opacity: 1;
        transform: none;
    }
    
    img {
        transition: none;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: 4px;
}

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

::-webkit-scrollbar-track {
    background: var(--cream-50);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy-800);
}

/* ===== Image hover effects ===== */
img {
    transition: transform 0.7s ease;
}

/* ===== Menu item hover ===== */
#menu li {
    transition: transform 0.2s ease;
}

#menu li:hover {
    transform: translateX(4px);
}

/* ===== Button micro-interactions ===== */
button, a {
    transition: all 0.3s ease;
}

/* ===== Contact form select ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .navbar-scrolled {
        background: rgba(250, 248, 244, 0.98) !important;
    }
}
