/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #0d9488;
    color: #f0fdfa;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ===== Hero Animations ===== */
.hero-anim {
    opacity: 0;
    transform: translateY(24px);
    animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }

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

/* ===== Navbar ===== */
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(45, 212, 191, 0.1);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.mobile-link {
    display: block;
    font-size: 1.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image aspect ratios ===== */
img {
    display: block;
    max-width: 100%;
}

/* ===== Smooth image loading ===== */
img {
    transition: opacity 0.3s ease;
}
