/* Base styles & custom properties */
:root {
    --terracotta: #C0603A;
    --terracotta-light: #f3bda8;
    --sand: #e5a055;
    --bark: #3D2517;
    --cream: #FDF8EE;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terracotta);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--terracotta) !important;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 248, 238, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(61, 37, 23, 0.08);
}

nav.scrolled .nav-logo-text {
    color: var(--bark) !important;
}

nav:not(.scrolled) .nav-logo-text {
    color: var(--bark) !important;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Form styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(192, 96, 58, 0.1);
}

/* Image hover effects */
img {
    display: block;
    max-width: 100%;
}

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

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--terracotta-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--terracotta);
}

/* Selection color */
::selection {
    background: rgba(192, 96, 58, 0.2);
    color: var(--bark);
}
