/* ===================== BASE & RESET ===================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
}

::selection {
    background-color: #0d7a5f;
    color: #fefdf8;
}

/* ===================== NAVBAR ===================== */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(13, 122, 95, 0.08);
}

/* ===================== MOBILE MENU ===================== */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

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

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

.menu-line.active:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}
.menu-line.active:nth-child(2) {
    opacity: 0;
}
.menu-line.active:nth-child(3) {
    transform: translateY(-3px) rotate(-45deg);
}

/* ===================== HERO ANIMATIONS ===================== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes floatDelayed {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-15px) rotate(50deg); }
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatDelayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ===================== SCROLL REVEAL ===================== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-float, .animate-float-delayed {
        animation: none;
    }
    .animate-scroll-line {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ===================== SERVICE CARDS ===================== */
.service-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* ===================== BUTTON RIPPLE ===================== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-ripple:hover::after {
    opacity: 1;
}

/* ===================== CUSTOM SELECT ===================== */
select option {
    background-color: #032119;
    color: #fefdf8;
}

/* ===================== IMAGE HOVER ===================== */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================== FORM FOCUS STATES ===================== */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #6fcfb0 !important;
    box-shadow: 0 0 0 3px rgba(111, 207, 176, 0.15);
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #9fd4c3;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d7a5f;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.2;
    }
}
