*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Hover Effect */
.card-hover {
    transform: translateY(0);
}

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

.card-hover img {
    transform: scale(1);
}

.card-hover:hover img {
    transform: scale(1.08);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-5deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 7s ease-in-out infinite;
    animation-delay: 1s;
}

/* Scroll Down Indicator */
@keyframes scroll-down {
    0% { top: -16px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 40px; opacity: 0; }
}

.animate-scroll-down {
    animation: scroll-down 1.5s ease-in-out infinite;
}

/* Navbar Scrolled State */
.nav-scrolled {
    background: rgba(253, 246, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(61, 43, 31, 0.08);
}

.nav-transparent {
    background: transparent !important;
}

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

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

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

/* Mobile Menu Animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobileMenu.open {
    max-height: 400px;
    padding-top: 0;
}

#mobileMenu.open .mobile-menu-link {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hamburger Animation */
.menu-line {
    transition: all 0.3s ease;
}

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

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

#mobileMenuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 20px;
    margin-left: 0;
}

/* Custom Selection */
::selection {
    background: #E8A98A;
    color: #3D2B1F;
}

/* Smooth focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #C87051;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #E8D5C4 0%, #F5EDE6 100%);
}

/* Subtle pattern overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}
