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

img {
    max-width: 100%;
    height: auto;
}

/* Scroll Reveal - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Navbar transitions */
.nav-logo {
    transition: color 0.3s ease;
}

/* Mobile menu transitions */
.mobile-link {
    transition: all 0.3s ease;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: #99f6e4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* Selection */
::selection {
    background: #99f6e4;
    color: #134e4a;
}

/* Image hover smoothness */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    
    .scroll-line {
        animation: none;
        opacity: 0.5;
    }
    
    img, .rounded-2xl {
        transition: none;
    }
    
    .rounded-2xl:hover img {
        transform: none;
    }
}

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

/* Button hover lift */
button, a {
    transition: all 0.3s ease;
}
