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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #7B2D3B;
    color: #FAF7F4;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F4;
}
::-webkit-scrollbar-thumb {
    background: #c9a87c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b8944f;
}

/* Navbar transitions */
.nav-text {
    transition: color 0.3s ease;
}
.nav-subtext {
    transition: color 0.3s ease;
}
.nav-logo-path {
    transition: stroke 0.3s ease;
}

/* Dark navbar state */
nav.dark .nav-text { color: #FAF7F4; }
nav.dark .nav-subtext { color: #d4c4a0; }
nav.dark .nav-logo-path { stroke: #FAF7F4; }
nav.dark .menu-line { background: #FAF7F4; }
nav.dark .nav-link { color: #d4c4a0; }
nav.dark .nav-link:hover { color: #FAF7F4; }

/* Scroll line animation */
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

/* Service card hover */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: #7B2D3B;
    transition: width 0.4s ease;
}
.service-card:hover::after {
    width: 100%;
}

/* Gallery hover */
.gallery-item {
    cursor: pointer;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(123, 45, 59, 0);
    transition: background 0.4s ease;
    border-radius: inherit;
}
.gallery-item:hover::after {
    background: rgba(123, 45, 59, 0.1);
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Scroll reveal base state (progressive enhancement) */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .scroll-reveal.delay-1 { transition-delay: 0.1s; }
    .scroll-reveal.delay-2 { transition-delay: 0.2s; }
    .scroll-reveal.delay-3 { transition-delay: 0.3s; }
    .scroll-reveal.delay-4 { transition-delay: 0.4s; }
    .scroll-reveal.delay-5 { transition-delay: 0.5s; }
    .scroll-reveal.delay-6 { transition-delay: 0.6s; }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .service-card {
        padding: 2rem !important;
    }
}
