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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== NAVBAR ========== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 252, 249, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.nav-scrolled {
    background: rgba(253, 252, 249, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-link {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ========== HERO BLOBS ========== */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #52a36c;
    top: -100px;
    right: -50px;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #86c296;
    bottom: -50px;
    left: 10%;
    animation-delay: -3s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: #b7dbbe;
    top: 30%;
    left: 40%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* ========== SERVICE CARDS ========== */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Default state for revealed elements — visible from the start */
.reveal[data-reveal] {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .reveal.revealed[data-reveal] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays */
.reveal[data-reveal] { transition-delay: 0ms; }
.reveal[data-reveal="1"] { transition-delay: 80ms; }
.reveal[data-reveal="2"] { transition-delay: 160ms; }
.reveal[data-reveal="3"] { transition-delay: 240ms; }
.reveal[data-reveal="4"] { transition-delay: 320ms; }
.reveal[data-reveal="5"] { transition-delay: 400ms; }

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #166534;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(22, 101, 52, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #14532d;
    transform: translateY(-2px);
}

/* ========== SELECT STYLING ========== */
select {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M6 9l6 6 6-6"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
}

/* ========== FORM FOCUS STATES ========== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 640px) {
    .hero-blob {
        filter: blur(60px);
        opacity: 0.25;
    }
    .blob-1 { width: 250px; height: 250px; }
    .blob-2 { width: 180px; height: 180px; }
    .blob-3 { width: 120px; height: 120px; }
}
