/* ── Base & Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(52, 211, 153, 0.2);
    color: #0f2b4c;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f4faf7;
}
::-webkit-scrollbar-thumb {
    background: #8fd4b0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5fbf8c;
}

/* ── Navbar scroll state ── */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 43, 76, 0.06), 0 4px 20px rgba(15, 43, 76, 0.04);
}

.nav-scrolled .nav-link {
    color: #1e3048;
}

.nav-scrolled .mobile-nav-link {
    color: #1e3048;
}

/* ── Reveal animations (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.08s; }
    .reveal:nth-child(3) { transition-delay: 0.16s; }
    .reveal:nth-child(4) { transition-delay: 0.24s; }
    .reveal:nth-child(5) { transition-delay: 0.32s; }
}

/* When JS is disabled, all reveals are visible */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ── Service card hover ── */
.service-card {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ── Mobile menu transitions ── */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ── Button focus states ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 2px;
}

/* ── Gallery hover images ── */
.group img {
    will-change: transform;
}

/* ── Form transitions ── */
#form-success {
    animation: fadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
