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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #faf0fc;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #220a28;
}
::-webkit-scrollbar-thumb {
    background: #7B2D8B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a030e0;
}

/* ===== Navbar ===== */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #fbbf24;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

nav.scrolled {
    background: rgba(34, 10, 40, 0.95);
    backdrop-blur-xl;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}
#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* ===== Floating Cards ===== */
.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); }
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 1;
}

.service-card:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 20px 60px rgba(123, 45, 139, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.1);
}

/* ===== Gallery ===== */
.gallery-item {
    cursor: pointer;
}

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

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

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
    .floating-card {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ===== Mobile hamburger animation ===== */
#mobile-toggle.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-toggle.active #bar2 {
    opacity: 0;
}
#mobile-toggle.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* ===== Button hover glow ===== */
button:hover, a:hover {
    transition: all 0.3s ease;
}

/* ===== Selection focus ===== */
input:focus, select:focus, textarea:focus {
    outline: none;
}

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