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

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

::selection {
    background-color: #1B4332;
    color: #FEFAE0;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FEFAE0;
}
::-webkit-scrollbar-thumb {
    background: #a8bda8;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7b9b7b;
}

/* ===== Marquee Animation ===== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

/* ===== Navbar Transition ===== */
.navbar-scrolled {
    background-color: rgba(254, 250, 224, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

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

.navbar-scrolled .nav-link {
    color: #1B4332 !important;
}

.navbar-scrolled .mobile-link {
    color: #1B4332 !important;
}

/* ===== Button Focus ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ===== Image Loading ===== */
img {
    image-rendering: auto;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Hover Card Glow ===== */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* ===== Print Styles ===== */
@media print {
    nav, #back-to-top, .animate-marquee {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
