/* ===== Base & Utilities ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fefdf8; }
::-webkit-scrollbar-thumb { background: #047857; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #065f46; }

/* ===== Selection ===== */
::selection { background: #047857; color: #ecfdf5; }

/* ===== Floating Animations ===== */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(1deg); }
}
@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes float-fast {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(1.5deg); }
}

.animate-float-slow    { animation: float-slow   6s ease-in-out infinite; }
.animate-float-medium  { animation: float-medium 4.5s ease-in-out infinite; }
.animate-float-fast    { animation: float-fast   3.5s ease-in-out infinite; }

/* Stagger animation delays */
.z-30 { animation-delay: 0s; }
.z-20 { animation-delay: 0.8s; }
.z-10 { animation-delay: 1.6s; }

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Navbar Shrink ===== */
.navbar-scrolled {
    box-shadow: 0 1px 12px rgba(4, 78, 59, 0.08);
}
.navbar-scrolled header > div > div:first-child {
    /* padding adjustment handled via JS class on header */
}

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

/* ===== Service Card Image Hover ===== */
.group:hover .group-hover\:rotate-3 {
    transform: rotate(3deg);
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

/* ===== 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='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ===== Print Styles ===== */
@media print {
    header, footer, #contact-form, .reveal { display: none; }
    body { background: white; color: black; }
}
