/* ===== Custom Styles for Sophia's Tea Room ===== */

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

/* ===== Hero Animations ===== */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.2s; }
.hero-elem:nth-child(2) { animation-delay: 0.4s; }
.hero-elem:nth-child(3) { animation-delay: 0.6s; }
.hero-elem:nth-child(4) { animation-delay: 0.8s; }
.hero-elem:nth-child(5) { animation-delay: 1.0s; }

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

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ===== Navbar Transition ===== */
.navbar-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(44, 77, 52, 0.08);
}

.navbar-scrolled #navbar a:not([href^="tel"]) {
    color: #2c4d34 !important;
}

/* ===== Reveal Animations (below fold only) ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

/* ===== Card Hover Effects ===== */
.card-hover {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
}

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    overflow: hidden;
}

#mobile-menu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6ba372;
}

/* ===== Selection Color ===== */
::selection {
    background: #c5dfc9;
    color: #1c3122;
}

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

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

/* ===== 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;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    header, .scroll-indicator {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
