/* ── 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(13, 148, 136, 0.2);
    color: #0f766e;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }

    /* Stagger children */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ── Scroll Indicator Animation ── */
@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

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

#menu-btn.active #menu-line-1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active #menu-line-2 {
    opacity: 0;
}

#menu-btn.active #menu-line-3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ── Navbar Scrolled State ── */
.navbar-scrolled {
    background: rgba(4, 47, 46, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #99f6e4;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* ── Image Loading ── */
img {
    display: block;
    max-width: 100%;
}

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

/* ── Link Underline Hover ── */
a {
    text-decoration: none;
}
