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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #9bb89b;
    color: #0f170f;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0f170f;
}
::-webkit-scrollbar-thumb {
    background: #314b31;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #527a52;
}

/* Header transition states */
#site-header.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(49, 75, 49, 0.08);
}

#site-header.scrolled .font-serif,
#site-header.scrolled a {
    color: #223222 !important;
}

#site-header.scrolled .menu-line {
    background: #223222 !important;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: transform 0.4s cubic-bezier(.22,.61,.36,1), opacity 0.3s ease;
}

.menu-btn.active .menu-line:first-child {
    transform: translateY(4px) rotate(45deg);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Fade-in animation for hero elements */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-reveal {
    animation: fadeUp 0.9s cubic-bezier(.22,.61,.36,1) both;
}

.hero-reveal-delay-1 {
    animation-delay: 0.15s;
}

.hero-reveal-delay-2 {
    animation-delay: 0.3s;
}

.hero-reveal-delay-3 {
    animation-delay: 0.45s;
}

/* Subtle line decoration */
.section-line {
    position: relative;
}
.section-line::after {
    content: '';
    display: block;
    width: 48px;
    height: 1px;
    background: #9bb89b;
    margin-top: 1.5rem;
}

/* Image hover overlay */
.gallery-item {
    position: relative;
    overflow: hidden;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 15, 0);
    transition: background 0.4s ease;
    pointer-events: none;
}
.gallery-item:hover::after {
    background: rgba(15, 23, 15, 0.15);
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #9bb89b;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Print styles */
@media print {
    #site-header, #mobile-menu, .reveal { display: none; }
    body { color: #000; background: #fff; }
}
