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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

/* Loader */
#loader {
    opacity: 1;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

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

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

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

.nav-logo {
    transition: color 0.3s ease;
}

.nav-logo-sub {
    transition: color 0.3s ease;
}

/* Mobile menu */
#mobile-menu {
    opacity: 0;
    pointer-events: none;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-link {
    animation: menuLinkIn 0.4s ease forwards;
    opacity: 0;
}

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

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

.menu-line {
    transition: all 0.3s ease;
}

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Hero animations */
.hero-line {
    display: inline-block;
    transform: translateY(100%);
    animation: heroLineIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.2s; }
.hero-line:nth-child(2) { animation-delay: 0.35s; }
.hero-line:nth-child(3) { animation-delay: 0.5s; }
.hero-line:nth-child(4) { animation-delay: 0.65s; }

@keyframes heroLineIn {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.hero-subtitle {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

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

/* Service cards */
.service-card {
    border-top: 1px solid #f5d0d0;
    transition: all 0.3s ease;
}

.service-card:last-child {
    border-bottom: 1px solid #f5d0d0;
}

.service-arrow {
    transform: translateX(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.service-card:hover .service-arrow {
    transform: translateX(0);
    opacity: 1;
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(58, 12, 12, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #b82e2e !important;
}

input::placeholder,
textarea::placeholder {
    color: #f3a8a8;
}

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

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

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

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

/* Selection color */
::selection {
    background-color: #f9d0d0;
    color: #3a0c0c;
}
