/* ─── BASE & RESET ─── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(114, 205, 187, 0.3);
    color: #eaf0f6;
}

::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #224e6d;
}

/* ─── NAVBAR ─── */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(4, 13, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(114, 205, 187, 0.06);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #72cdbb !important;
}

/* ─── MOBILE MENU ─── */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobile-menu.closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

#menu-toggle.open #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.open #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.open #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ─── HERO ─── */
#hero {
    position: relative;
}

/* ─── SERVICE CARDS ─── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #72cdbb, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ─── SCROLL REVEAL (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ─── GALLERY HOVER ─── */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ─── FORM FOCUS STATES ─── */
input:focus,
textarea:focus {
    outline: none;
}

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

    html {
        scroll-behaviour: auto;
    }

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

/* ─── FOCUS VISIBLE ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #72cdbb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── RESPONSIVE ADJUSTMENTS ─── */
@media (max-width: 640px) {
    h1 {
        font-size: 2.75rem !important;
    }

    h2 {
        font-size: 2.25rem !important;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    h1 {
        font-size: 4rem !important;
    }

    h2 {
        font-size: 3rem !important;
    }
}
