/* Base styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Floating card animations */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

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

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

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

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

.service-card:hover {
    transform: translateY(-6px);
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-link {
    color: #475569;
}

.nav-scrolled .nav-link:hover {
    color: #0d9488;
    background: #f0fdfa;
}

.nav-scrolled .logo-text {
    color: #1e293b;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 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; }

/* Mobile menu transition */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Spinner animation for form submit */
@keyframes dash {
    to { stroke-dashoffset: 0; }
}

.animate-dash {
    animation: dash 1s linear infinite;
}

/* Selection color */
::selection {
    background: #99f6e4;
    color: #042f2e;
}

/* Smooth focus outlines */
:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* 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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Large screen adjustments */
@media (min-width: 1280px) {
    .font-serif {
        font-size: clamp(2.25rem, 4vw, 3.75rem);
    }
}
