/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

.reveal.reveal-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar */
#nav {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: rgba(204, 251, 241, 0.5);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

#nav.scrolled #nav-logo {
    color: #0d9488;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #0d9488;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line:last-child {
    width: 1.5rem;
}

body.menu-open {
    overflow: hidden;
}

/* Buttons & Links */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Form */
input::placeholder,
textarea::placeholder {
    color: #cbd5e1;
    font-weight: 300;
}

/* Divider Animation */
.divider-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.divider-line.reveal-visible {
    stroke-dashoffset: 0;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Selection */
::selection {
    background: rgba(13, 148, 136, 0.12);
}

/* Print styles */
@media print {
    #nav,
    .animate-bounce,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        color: #0f172a;
        background: white;
    }
    
    section {
        page-break-inside: avoid;
    }
}
