/* Base resets & custom properties */
:root {
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* Selection color */
::selection {
    background: rgba(15, 118, 110, 0.2);
    color: var(--slate-900);
}

/* Nav transitions */
.nav-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active .nav-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .nav-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

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

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

#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; }

/* Hero animations */
.hero-sub { animation: slideUp 0.8s ease forwards; }
.hero-headline { animation: slideUp 0.8s 0.15s ease forwards; opacity: 0; }
.hero-desc { animation: slideUp 0.8s 0.3s ease forwards; opacity: 0; }
.hero-cta { animation: slideUp 0.8s 0.45s ease forwards; opacity: 0; }
.hero-img-wrap { animation: fadeIn 1s 0.3s ease forwards; opacity: 0; }

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll reveal — only below the fold, with reduced-motion gate */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service card hover underline */
.service-card::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: currentColor;
    margin-top: 0;
    transition: width 0.4s ease;
    opacity: 0.3;
}

/* Image hover zoom */
.service-card img,
#gallery img {
    transition: transform 0.7s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #0f766e;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #115e59;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--teal-700);
    outline-offset: 2px;
}

/* Form select arrow */
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='1.5'%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;
}
