/* ─── BASE ─── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(123, 45, 59, 0.15);
    color: #7B2D3B;
}

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

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

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

/* ─── HERO ANIMATIONS ─── */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

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

.hero-card {
    opacity: 0;
    transform: translateX(40px);
    animation: cardSlideIn 0.7s ease forwards;
}

.hero-card:nth-child(1) { animation-delay: 0.6s; }
.hero-card:nth-child(2) { animation-delay: 0.9s; }
.hero-card:nth-child(3) { animation-delay: 1.2s; }

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

/* ─── SCROLL LINE ─── */
@keyframes scrollLine {
    0% { top: -16px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ─── REVEAL ANIMATIONS ─── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

/* Staggered delays for grid items */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal:nth-child(3) { transition-delay: 0.25s; }
.reveal:nth-child(4) { transition-delay: 0.35s; }

/* ─── MOBILE MENU ─── */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    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; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* ─── FOCUS STYLES ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

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