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

body {
    overflow-x: hidden;
}

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

/* ── Floating Card Animations ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

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

.floating-card-2 {
    animation: float-medium 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* ── Service Card Hover ── */
.service-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}

.service-card:hover {
    box-shadow: 0 20px 60px -20px rgba(251, 191, 36, 0.15);
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                    transform 0.8s cubic-bezier(0.23, 1, 0.32, 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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ── Navbar Transition ── */
.nav-scrolled {
    background-color: rgba(58, 10, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

::-webkit-scrollbar-track {
    background: #3a0a1a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #96173e;
}

/* ── Form Focus Styles ── */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ── Mobile Menu Transition ── */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive Adjustments ── */
@media (max-width: 768px) {
    .floating-card-1 {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 1rem;
        display: inline-block;
    }

    .floating-card-2 {
        position: relative;
        bottom: auto;
        left: auto;
        margin-left: 1rem;
        display: inline-block;
    }

    .floating-card-1,
    .floating-card-2 {
        animation: none;
    }
}

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