/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(45, 212, 191, 0.3);
    color: #f0fdf9;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f1e;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d3a4f;
}

/* ===== HERO ANIMATIONS ===== */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 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; }
.hero-elem:nth-child(5) { animation-delay: 1.0s; }

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

/* ===== SCROLL DOT ===== */
@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}
.scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.service-card {
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease;
}
.service-card[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}
.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card {
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease;
}
.testimonial-card[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}
.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item {
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.gallery-item[data-reveal] {
    opacity: 0;
    transform: scale(0.97);
}
.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== NAVBAR ===== */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #2dd4bf;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}
.nav-link:hover {
    color: #2dd4bf;
}

/* ===== MOBILE MENU ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Menu lines animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 24px;
    margin-left: 0;
}

/* ===== PARALLAX ===== */
#hero-img {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-elem {
        transform: translateY(20px);
    }
    @keyframes heroReveal {
        to { opacity: 1; transform: translateY(0); }
    }
}
