/* Base & Resets */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(76, 122, 50, 0.2);
    color: #1f3215;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9dbe7e;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(47, 76, 32, 0.08);
}

#navbar.scrolled .nav-link {
    color: #2f4c20;
}

#navbar.scrolled .font-serif {
    color: #1f3215;
}

#navbar.scrolled .font-sans {
    color: #3a5f26;
}

#navbar.scrolled .menu-line {
    background: #2f4c20;
}

/* Hero Decorations */
.hero-deco {
    animation: float 8s ease-in-out infinite;
}

.hero-deco:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 10s;
}

.hero-deco:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 7s;
}

.hero-deco:nth-child(4) {
    animation-delay: -1s;
    animation-duration: 9s;
}

.hero-glass {
    animation: glassFloat 6s ease-in-out infinite;
}

.hero-glass:nth-child(5) {
    animation-delay: -3s;
    animation-duration: 8s;
}

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

@keyframes glassFloat {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-15px) rotate(14deg); }
}

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Service Cards */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery */
.gallery-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

.mobile-link {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    color: #2f4c20;
    transition: color 0.3s ease;
}

.mobile-link:hover {
    color: #4c7a32;
}

/* Mobile menu animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    #navbar, #hero, .reveal {
        display: block;
        opacity: 1;
    }
    
    .hero-deco, .hero-glass {
        display: none;
    }
}
