/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', Georgia, serif;
    background-color: #faf9f6;
    color: #1f2d1f;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ed;
}
::-webkit-scrollbar-thumb {
    background: #9db89d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #527352;
}

/* Selection color */
::selection {
    background: #314431;
    color: #faf9f6;
}

/* Smooth focus for accessibility */
:focus-visible {
    outline: 2px solid #314431;
    outline-offset: 2px;
}

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

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

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

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-link {
    position: relative;
}

/* Button hover effects */
button[type="submit"],
a[href="#services"],
a[href="#contact"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before,
a[href="#services"]::before,
a[href="#contact"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

button[type="submit"]:hover::before,
a[href="#services"]:hover::before,
a[href="#contact"]:hover::before {
    left: 100%;
}

/* Input focus styles */
input:focus,
textarea:focus,
select:focus {
    border-color: #314431 !important;
    box-shadow: 0 0 0 3px rgba(49, 68, 49, 0.1);
}

/* Image hover container */
overflow-hidden {
    position: relative;
}

overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(31, 45, 31, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.overflow-hidden:hover::after {
    background: rgba(31, 45, 31, 0.05);
}

/* 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 !important;
        transform: none !important;
    }
}

/* Print styles */
@media print {
    nav,
    #contact-form,
    .reveal {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }
}
