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

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

::selection {
    background-color: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #F8F6F0;
}
::-webkit-scrollbar-thumb {
    background: #b2c0b8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #839d8e;
}

/* === Navbar scroll state === */
nav.scrolled {
    background-color: rgba(248, 246, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.06);
}

nav.scrolled .logo-text {
    color: #1B4332;
}

/* === Menu item hover line === */
.group:hover::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #839d8e;
    transition: width 0.4s ease;
    margin-top: 2px;
}

.group:hover::after {
    width: 100%;
}

/* === Mobile link transitions === */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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.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; }

/* === Scroll reveal animations (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* === Image hover zoom === */
.aspect-\[4\/5\] > img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.aspect-\[4\/5\]:hover > img {
    transform: scale(1.03);
}

/* === Button focus states === */
button:focus-visible,
a:focus-visible {
    outline: 1px solid #1B4332;
    outline-offset: 4px;
}

/* === Form focus states === */
input:focus,
textarea:focus {
    background-color: rgba(241, 250, 238, 0.5);
}

/* === Print styles === */
@media print {
    nav, #contact, .animate-pulse {
        display: none;
    }
    body {
        color: #1B4332;
        background: white;
    }
}
