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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Smooth selection */
::selection {
    background-color: rgba(20, 184, 166, 0.2);
    color: #0f766e;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Navbar transitions */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-scrolled .font-serif {
    color: #0f172a !important;
}

.nav-scrolled a:not(.bg-teal-600) {
    color: #475569 !important;
}

.nav-scrolled a:not(.bg-teal-600):hover {
    color: #0d9488 !important;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* Hamburger animation */
.menu-open #menu-line-1 {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-open #menu-line-2 {
    opacity: 0;
}

.menu-open #menu-line-3 {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Scroll reveal base - content is always visible by default */
.scroll-reveal {
    /* Default state: visible, no animation */
}

/* Animated state only when JS adds the class */
.scroll-reveal.revealed {
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal.revealed {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .group:hover img {
        transform: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem !important;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #contact-form, .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
