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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(13, 148, 136, 0.3);
    color: #f0fdfa;
}

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

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

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

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #2dd4bf, #5eead4);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #2dd4bf !important;
}

/* Navbar scrolled state */
nav.scrolled {
    background: rgba(8, 14, 26, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(45, 212, 191, 0.08) !important;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
.mobile-link {
    position: relative;
}

#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Floating Cards Animation */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}

.floating-card:nth-child(3) {
    animation-delay: -3s;
}

.floating-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Menu Tabs */
.menu-tab {
    background: transparent;
    color: #94a3b8;
    border: none;
    cursor: pointer;
    position: relative;
}

.menu-tab.active {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: #f0fdfa;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
}

.menu-tab:not(.active):hover {
    color: #2dd4bf;
    background: rgba(45, 212, 191, 0.08);
}

/* Menu Content Transition */
.menu-content {
    animation: fadeSlideIn 0.5s ease forwards;
}

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

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(32px);
}

.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; }

/* Button hover glow */
button[type="submit"]:hover {
    box-shadow: 0 8px 32px rgba(13, 148, 136, 0.35) !important;
    transform: translateY(-1px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Image hover zoom container */
.group:hover img {
    transform: scale(1.05);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal.hidden-reveal {
        opacity: 1;
        transform: none;
    }
    
    .menu-content {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    #hero {
        min-height: 100vh;
        padding-top: 100px;
    }
}
