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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #c47347;
    color: #faf8f5;
}

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

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

::-webkit-scrollbar-thumb {
    background: #ddb093;
    border-radius: 3px;
}

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

/* Navbar transitions */
.nav-link {
    position: relative;
}

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

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

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Mobile menu animations */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Image hover effects */
.group img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover img {
    transform: scale(1.03);
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-line {
        animation: none;
    }
    
    .reveal.hidden-reveal {
        opacity: 1;
        transform: none;
    }
    
    .group img {
        transition: none;
    }
    
    #menu-btn .menu-line {
        transition: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* Print styles */
@media print {
    nav,
    #contact,
    .scroll-line,
    .group img {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
