/* ===== Custom Styles for Ma Tea House ===== */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(138, 24, 44, 0.15);
    color: #571523;
}

/* ===== Navbar ===== */
#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(138, 24, 44, 0.08), 0 4px 30px rgba(138, 24, 44, 0.04);
}

#navbar.scrolled .nav-link {
    color: #6e1727;
}

#navbar.scrolled .nav-link:hover {
    color: #a71b33;
}

#navbar.scrolled .font-serif {
    color: #6e1727;
}

#navbar.scrolled .font-serif:hover {
    color: #a71b33;
}

#navbar.scrolled svg.text-burgundy-600 {
    color: #a71b33;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #c42740, #e46f7f);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Mobile Menu ===== */
.mobile-nav-link {
    position: relative;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.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) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .group img {
        transition: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* ===== Image hover ===== */
.group img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Button focus ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #c42740;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Smooth image loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c42740, #8a182c);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d64358, #a71b33);
}
