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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(94, 234, 212, 0.3);
    color: #0A2540;
}

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

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-up {
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
    animation: fade-in 1s ease forwards;
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Navbar ─── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #5EEAD4;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #5EEAD4;
}

/* ─── Navbar Scroll State ─── */
.navbar-scrolled {
    background-color: rgba(6, 26, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar-transparent {
    background-color: transparent;
}

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

.mobile-link {
    position: relative;
}

/* ─── Product Cards ─── */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background-color: rgba(13, 43, 69, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
    border-color: rgba(94, 234, 212, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-card .card-image {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .card-image {
    transform: scale(1.1);
}

/* ─── Buttons ─── */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

/* ─── Input Styles ─── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3DD9C0 !important;
    box-shadow: 0 0 0 3px rgba(61, 217, 192, 0.15) !important;
}

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

::-webkit-scrollbar-track {
    background: #0A2540;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #1a3d5c;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
