/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #052e16;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* ===== Selection ===== */
::selection {
    background: rgba(22, 101, 52, 0.3);
    color: #fefdf8;
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card-delay {
    animation: float 4s ease-in-out 1.5s infinite;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        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.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; }
}

/* ===== Nav Scroll State ===== */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.1);
}

.nav-scrolled .menu-line {
    background: #14532d !important;
}

.nav-scrolled a:not(.bg-emerald-800) {
    color: #14532d !important;
}

/* ===== Button Focus ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* ===== Mobile Menu Animation ===== */
.mobile-menu-open {
    max-height: 400px !important;
}

/* ===== Image Hover ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== Subtle Gradient Borders ===== */
.glass-card {
    background: rgba(254, 253, 248, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Print ===== */
@media print {
    nav, #contactForm, #formSuccess { display: none; }
    body { background: white; color: black; }
    .bg-emerald-900 { background: #14532d !important; }
}
