/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
}

.font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

/* Fallback: ensure content is visible even without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Scroll Indicator Animation ===== */
@keyframes scroll-indicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

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

/* ===== Navbar Scroll State ===== */
.navbar-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 38, 56, 0.08);
}

/* ===== Selection Color ===== */
::selection {
    background: #3dd193;
    color: #1a2638;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8ea6c0;
}

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* ===== Button Focus States ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3dd193;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image Placeholder Fallback ===== */
img {
    background: linear-gradient(135deg, #d8e2ec 0%, #b3c4d6 100%);
}

/* ===== Subtle Hover Lift for Cards ===== */
.group:hover {
    transform: translateY(-2px);
}

.group {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
