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

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

::selection {
    background-color: #0d9488;
    color: white;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        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-section.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger children */
    .reveal-section:nth-child(2) { transition-delay: 0.1s; }
    .reveal-section:nth-child(3) { transition-delay: 0.2s; }
    .reveal-section:nth-child(4) { transition-delay: 0.3s; }
    .reveal-section:nth-child(5) { transition-delay: 0.4s; }
}

/* Default visible state (no-JS fallback) */
.reveal-section {
    opacity: 1;
    transform: none;
}

/* ─── Hero Animations ─── */
@media (prefers-reduced-motion: no-preference) {
    .hero-subtitle {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
    }
    .hero-headline {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
    }
    .hero-desc {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
    }
    .hero-ctas {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
    }
}

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

/* ─── Navbar ─── */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo {
    color: #0f172a;
}

#navbar.scrolled a:not(.bg-teal-700):not(.bg-white\/10) {
    color: #475569;
}

#navbar.scrolled a:not(.bg-teal-700):not(.bg-white\/10):hover {
    color: #0d9488;
}

/* ─── Service Cards ─── */
.service-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ─── Custom Select Arrow ─── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ─── Scroll Indicator ─── */
.scroll-indicator {
    animation: pulse-down 2s ease-in-out infinite;
}

@keyframes pulse-down {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* ─── Mobile Menu ─── */
#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); }
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #0d9488;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* ─── Gallery Hover ─── */
.rounded-2xl.overflow-hidden {
    cursor: pointer;
}

/* ─── Focus Styles ─── */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal-section {
        opacity: 1;
        transform: none;
    }
}
