/* ── Base & Utilities ── */
*, *::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(94, 234, 212, 0.3);
    color: #0A2540;
}

/* ── Hero Background Pattern ── */
.hero-bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(94, 234, 212, 0.15) 1px, transparent 0);
    background-size: 40px 40px;
}

/* ── Hero Orbs ── */
.hero-orb {
    will-change: transform;
}

.hero-orb-1 {
    animation: float-slow 8s ease-in-out infinite;
}

.hero-orb-2 {
    animation: float-slow 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
    animation: float-slow 12s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

/* ── Hero Animations ── */
.hero-badge {
    animation: fade-up 0.8s ease-out both;
}

.hero-badge { animation-delay: 0.1s; }

h1 {
    animation: fade-up 0.8s ease-out both;
    animation-delay: 0.2s;
}

.hero p {
    animation: fade-up 0.8s ease-out both;
    animation-delay: 0.35s;
}

.hero > div > div:first-child > div {
    animation: fade-up 0.8s ease-out both;
    animation-delay: 0.5s;
}

.hero > div > div:last-child {
    animation: fade-left 0.8s ease-out both;
    animation-delay: 0.4s;
}

.hero > div > div:last-child > div {
    animation: fade-up 0.8s ease-out both;
    animation-delay: 0.55s;
}

.hero > div > div:last-child > div > div:last-child {
    animation: fade-up 0.8s ease-out both;
    animation-delay: 0.65s;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-left {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Scroll Reveal ── */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 0;
    }

    .reveal-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-left.visible {
        opacity: 1;
        transform: translateX(0);
    }

    .reveal-right.visible {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(10, 37, 64, 0.06);
}

.nav-link {
    position: relative;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ── Mobile Menu ── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 5px;
}

.mobile-nav-link {
    display: block;
}

/* ── Smooth Image Loading ── */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5EEAD4;
    outline-offset: 2px;
    border-radius: 8px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}
