/* Custom styles for Golden Tea Cafe */

:root {
    --color-cream: #FAFAF7;
    --color-gold-500: #C8A961;
    --color-navy-800: #1B2A4A;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-cream);
}

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(250, 250, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 42, 74, 0.08);
}

.nav-scrolled .nav-link {
    color: #1B2A4A;
}

.nav-scrolled .menu-line {
    background-color: #1B2A4A;
}

.nav-scrolled .font-serif {
    color: #1B2A4A;
}

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

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
    margin-right: 0;
}

/* Reveal animations */
.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);
}

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

/* Default state for scroll-reveal elements (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

    .reveal-image {
        opacity: 0;
        transform: translateX(32px);
    }

    .reveal-image.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero image animation */
@media (prefers-reduced-motion: no-preference) {
    .reveal-image {
        animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        animation-delay: 0.2s;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(32px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered reveal delays */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b3bfd4;
}

/* Selection color */
::selection {
    background-color: rgba(200, 169, 97, 0.2);
    color: #1B2A4A;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #C8A961;
    outline-offset: 2px;
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #C8A961;
    transition: width 0.3s ease;
}

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

/* Button hover lift effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
