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

body {
    overflow-x: hidden;
}

/* Smooth scroll for Safari */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: #f9d0d9;
    color: #7e1f34;
}

/* ===== NAVBAR ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 251, 245, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(154, 36, 61, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

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

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

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

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

/* ===== HERO ===== */
.hero-elem {
    opacity: 0;
    transform: translateY(24px);
    animation: heroIn 0.7s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-img {
    opacity: 0;
    transform: translateX(40px) scale(0.97);
    animation: heroImgIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes heroImgIn {
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.hero-float {
    animation: heroFloat 3.5s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-img-accent {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
    animation: heroAccentIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

@keyframes heroAccentIn {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* ===== SECTION HEADER ANIMATIONS ===== */
.section-header {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-header.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-header.revealed:nth-child(2) { transition-delay: 0.1s; }
.section-header.revealed:nth-child(3) { transition-delay: 0.2s; }

/* ===== SERVICE CARDS ===== */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1).revealed { transition-delay: 0.05s; }
.service-card:nth-child(2).revealed { transition-delay: 0.1s; }
.service-card:nth-child(3).revealed { transition-delay: 0.15s; }
.service-card:nth-child(4).revealed { transition-delay: 0.2s; }
.service-card:nth-child(5).revealed { transition-delay: 0.25s; }
.service-card:nth-child(6).revealed { transition-delay: 0.3s; }

/* ===== MOBILE LINKS ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .max-w-7xl {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ===== 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;
    }
    
    .hero-elem,
    .hero-img,
    .hero-float,
    .hero-img-accent,
    .section-header,
    .service-card {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }
    
    .hero-float {
        animation: none;
    }
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #9a243d;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

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