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

body {
    overflow-x: hidden;
}

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

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

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #2dd4bf;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* === Floating Cards === */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-0.5deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.3deg); }
}

.floating-card-1 {
    animation: float-1 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-2 7s ease-in-out infinite;
}

.floating-card-3 {
    animation: float-3 5.5s ease-in-out infinite;
}

/* === Menu Cards === */
.menu-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
}

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(45, 212, 191, 0.15);
}

/* === Scroll Animations === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
    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; }

/* === Mobile Menu === */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* === Divider line animation === */
.divider-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.divider-line.visible {
    stroke-dashoffset: 0;
}

/* === Image hover === */
img {
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* === Smooth focus === */
*:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

/* === 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;
}

/* === Responsive === */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }
}
