/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.reveal-up.delay-100 {
    transition-delay: 0.1s;
}

.reveal-up.delay-200 {
    transition-delay: 0.2s;
}

/* Navbar */
#navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#navbar.scrolled {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.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.open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Hamburger */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 1.5rem;
}

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

/* Focus styles */
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Form transitions */
input:focus,
textarea:focus {
    border-color: #2dd4bf !important;
}

/* Subtle hover on menu items */
.group:hover h3 {
    transform: translateX(4px);
    transition: transform 0.3s ease;
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .reveal-up {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
