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

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Hero Animations ===== */
.hero-subtitle {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero-desc {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.9s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Fallback: ensure content is visible without JS */
.no-js .scroll-reveal,
.scroll-reveal {
    opacity: 1;
    transform: none;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-logo {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ===== Mobile Menu ===== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu a {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open a {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu a:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu a:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu a:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu a:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu a:nth-child(5) { transition-delay: 0.3s; }

/* ===== Service Card Hover ===== */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.15);
}

/* ===== Button Focus ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* ===== Selection ===== */
::selection {
    background: rgba(20, 184, 166, 0.2);
    color: #134e4a;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Smooth image loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
