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

body {
    overflow-x: hidden;
}

/* === Scroll Reveal === */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal-on-scroll.is-revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Hero Animations === */
@media (prefers-reduced-motion: no-preference) {
    .hero-subtitle-up {
        animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    }
    .hero-headline {
        animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
    }
    .hero-tagline {
        animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
    }
    .hero-cta {
        animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
    }
    .hero-scroll-indicator {
        animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
    }
}

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

/* === Parallax Hero Background === */
@media (prefers-reduced-motion: no-preference) {
    .hero-bg {
        will-change: transform;
        transition: transform 0.1s linear;
    }
}

/* === Navbar transition === */
#navbar.scrolled {
    background: rgba(4, 47, 46, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* === Nav link hover underline === */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* === Menu item hover === */
#menu li:hover {
    background: rgba(20, 184, 166, 0.04);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
    transition: all 0.2s ease;
}

/* === Smooth focus === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Mobile menu animation === */
#mobile-menu {
    animation: menuSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Selection color === */
::selection {
    background: #14b8a6;
    color: white;
}

/* === Image loading === */
img {
    background-color: #e7e5e4;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}
