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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(212, 168, 75, 0.3);
    color: #F9F0FD;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #23102C;
}
::-webkit-scrollbar-thumb {
    background: #5C2E7C;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B3FA8;
}

/* === Floating Animations === */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

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

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 4.5s ease-in-out infinite;
}

.animate-float-fast {
    animation: float-fast 3.5s ease-in-out infinite;
}

/* === Scroll Line Animation === */
@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* === Service Cards === */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.4s ease,
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(74, 35, 90, 0.5);
}

.service-card:hover .w-14 {
    transform: scale(1.1);
}

/* === Testimonial Cards === */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 75, 0.2);
    box-shadow: 0 20px 60px -20px rgba(74, 35, 90, 0.5);
}

/* === Scroll Reveal (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

/* === Nav transition === */
.nav-scrolled {
    background: rgba(35, 16, 44, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(92, 46, 124, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .nav-link {
    color: rgba(243, 224, 251, 0.8);
}

.nav-scrolled .nav-link:hover {
    color: #D4A84B;
}

/* === Mobile Nav Links === */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(92, 46, 124, 0.3);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* === Form Select Arrow === */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%239B4DCA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* === Focus Visible === */
:focus-visible {
    outline: 2px solid #D4A84B;
    outline-offset: 2px;
}

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