/* ── Base ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* ── Section Label ── */
.section-label {
    display: block;
}

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

.hero-elem:nth-child(1) { animation-delay: 0.2s; }
.hero-elem:nth-child(2) { animation-delay: 0.4s; }
.hero-elem:nth-child(3) { animation-delay: 0.6s; }
.hero-elem:nth-child(4) { animation-delay: 0.8s; }

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

/* ── Scroll Reveal (below-fold only) ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion: never hide content */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-elem {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .gallery-item img {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ── Service Cards ── */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

/* ── Gallery Items ── */
.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 148, 136, 0);
    transition: background 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(13, 148, 136, 0.1);
}

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

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

#navbar.scrolled .menu-line {
    background: #0d9488;
}

/* ── Mobile Menu ── */
#mobile-menu.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#mobile-menu.open .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ── Testimonial Cards ── */
.testimonial-card {
    transition: transform 0.4s ease, background 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
}

/* ── Focus Styles ── */
input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ── Selection ── */
::selection {
    background: #0d9488;
    color: white;
}
