/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(154, 39, 48, 0.08);
}

.nav-logo-text {
    color: #3a0e12;
    transition: color 0.3s;
}

#navbar.scrolled .nav-logo-text {
    color: #7d1f28;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d4464a;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

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

#navbar.scrolled .nav-link {
    color: #7d1f28;
}

/* Hero */
.hero-bg {
    position: relative;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(58, 14, 18, 0.82) 0%,
        rgba(125, 31, 40, 0.72) 50%,
        rgba(154, 39, 48, 0.65) 100%
    );
}

.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.5; }
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #9a2730, #d4464a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    border-radius: 3px 3px 0 0;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Gallery */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(58, 14, 18, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Mobile Menu */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

#mobileMenu.open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Menu button animations */
.menu-line {
    display: block;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
    .gallery-item img { transition: none; }
    .gallery-item:hover img { transform: none; }
    .service-card::before { display: none; }
    .scroll-indicator { animation: none; }
}

/* Mobile menu overlay */
#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #d4464a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9a2730;
}
