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

body {
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, #0d9488 25%, transparent);
    color: #1e293b;
}

/* ── Hero Animations ── */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }
.hero-content > *:nth-child(5) { animation-delay: 0.7s; }

.hero-image {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeLeft 0.8s ease 0.3s forwards;
}

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

@keyframes fadeLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Service Card Hover ── */
.service-card {
    opacity: 0;
    transform: translateY(20px);
}

.service-card.visible {
    animation: fadeUpCard 0.5s ease forwards;
}

.service-card:nth-child(1).visible { animation-delay: 0.05s; }
.service-card:nth-child(2).visible { animation-delay: 0.1s; }
.service-card:nth-child(3).visible { animation-delay: 0.15s; }
.service-card:nth-child(4).visible { animation-delay: 0.2s; }
.service-card:nth-child(5).visible { animation-delay: 0.25s; }
.service-card:nth-child(6).visible { animation-delay: 0.3s; }

@keyframes fadeUpCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── About Image Animation ── */
.about-image {
    opacity: 0;
    transform: translateX(-20px);
}

.about-image.visible {
    animation: slideRight 0.7s ease forwards;
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Navbar ── */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .font-serif {
    color: #1e293b;
}

/* ── Mobile Menu ── */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    width: 5px;
    transform: rotate(-45deg) translate(4px, -4px);
    margin-left: 0;
}

/* ── Smooth section reveals ── */
.section-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2rem !important;
    }

    .about-image {
        transform: translateY(20px);
    }

    .about-image.visible {
        animation-name: fadeUp;
    }
}
