/* === Custom Font Imports === */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Lato:wght@300;400;500;600;700&display=swap');

/* === Custom Properties === */
:root {
    --color-emerald-50: #f2fcf5;
    --color-emerald-100: #e1f5e8;
    --color-emerald-200: #c3e9cd;
    --color-emerald-300: #93d4a8;
    --color-emerald-400: #5fb878;
    --color-emerald-500: #3a9d5c;
    --color-emerald-600: #267a44;
    --color-emerald-700: #1c6136;
    --color-emerald-800: #174e2b;
    --color-emerald-900: #123f23;
    --color-emerald-950: #0a2314;
    --color-cream-50: #fefdf8;
    --color-cream-100: #fdf9ec;
    --color-cream-200: #faf3d6;
    --color-cream-300: #f5e8b4;
}

/* === Base Styles === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #123f23;
    background-color: #fefdf8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-cormorant {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-lato {
    font-family: 'Lato', sans-serif;
}

/* === Navbar === */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(28, 97, 54, 0.08);
}

#navbar.scrolled .font-cormorant {
    color: #1c6136 !important;
}

#navbar.scrolled .text-emerald-600 {
    color: #267a44 !important;
}

#navbar.scrolled a:not(.bg-emerald-700):not(.bg-cream-100) {
    color: #1c6136 !important;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

/* === Scroll Reveal === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    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; }

/* === Mobile Menu === */
#mobile-menu {
    animation: fadeIn 0.3s ease;
}

.mobile-link {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-link:nth-child(4) { animation-delay: 0.2s; }

/* === Hero Section === */
#inicio {
    position: relative;
}

#inicio::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0a2314 0%, #1c6136 40%, #267a44 70%, #3a9d5c 100%);
    z-index: 0;
}

/* === Buttons === */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* === Selection === */
::selection {
    background: #c3e9cd;
    color: #123f23;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fdf9ec;
}

::-webkit-scrollbar-thumb {
    background: #c3e9cd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #93d4a8;
}

/* === Focus States === */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
}

/* === Image Loading === */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* === Responsive Adjustments === */
@media (max-width: 640px) {
    html {
        scroll-padding-top: 70px;
    }
}

@media (min-width: 1024px) {
    .card-hover {
        transition: transform 0.4s ease, box-shadow 0.4s ease;
    }
    .card-hover:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 60px rgba(28, 97, 54, 0.12);
    }
}

/* === Print Styles === */
@media print {
    nav, #contact-form, #form-success {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
