/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(111, 193, 161, 0.25);
    color: #f0f4f8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0d1218;
}
::-webkit-scrollbar-thumb {
    background: #3a4654;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6fc1a1;
}

/* Navbar */
.navbar-scrolled #navbar {
    background: rgba(13, 18, 24, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(58, 70, 84, 0.4);
}

.navbar-scrolled .nav-link {
    color: #9fb3c8;
}

/* Mobile Menu */
.mobile-menu-open #mobile-menu {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }

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

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

/* Scroll Line Animation */
@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

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

/* Floating Animation for Hero Cards */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

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

.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 5s ease-in-out infinite;
}

/* Focus Styles */
input:focus, textarea:focus, button:focus {
    outline: 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;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    .animate-scroll-line {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 767px) {
    .font-serif {
        font-size: 1.75rem;
    }
}
