/* ============================================
   ESPACIO TRES — GLOBAL DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&family=Antonio:wght@400;700&display=swap');

:root {
    /* Color Palette */
    --primary: #2C5F2E;
    /* Deep forest green */
    --primary-light: #3d7a40;
    --primary-dark: #1a3d1c;
    --accent: #C8A96E;
    /* Warm gold */
    --accent-light: #dfc08f;
    --accent-dark: #a07c45;
    --surface: #F7F3EC;
    /* Warm white */
    --surface-2: #EDE8DF;
    /* Slightly darker card bg */
    --surface-3: #E0D9CE;
    --text-dark: #1E2A1F;
    --text-mid: #4A5C4B;
    --text-light: #7A8C7B;
    --text-on-dark: #F0EDE5;

    /* Gradient */
    --grad-primary: linear-gradient(135deg, #2C5F2E 0%, #3d7a40 100%);
    --grad-accent: linear-gradient(135deg, #C8A96E 0%, #dfc08f 100%);
    --grad-bg: linear-gradient(180deg, #F7F3EC 0%, #EDE8DF 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(44, 95, 46, 0.08);
    --shadow-md: 0 6px 24px rgba(44, 95, 46, 0.14);
    --shadow-lg: 0 16px 48px rgba(44, 95, 46, 0.18);
    --shadow-glow: 0 0 30px rgba(200, 169, 110, 0.25);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Antonio', sans-serif;

    /* Transitions */
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
    --trans-fast: 0.2s var(--ease-out);
    --trans-med: 0.35s var(--ease-out);
    --trans-slow: 0.6s var(--ease-out);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--surface);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   HEADER / NAV
   ============================================ */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 2.5rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(247, 243, 236, 0.82);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid rgba(200, 169, 110, 0.25);
    box-shadow: 0 2px 24px rgba(44, 95, 46, 0.08);
    transition: background var(--trans-med), box-shadow var(--trans-med);
}

header.scrolled {
    background: rgba(247, 243, 236, 0.96);
    box-shadow: 0 4px 32px rgba(44, 95, 46, 0.12);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    user-select: none;
}

.logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(44, 95, 46, 0.2));
    transition: transform var(--trans-med);
}

.logo-link:hover .logo img {
    transform: rotate(-5deg) scale(1.08);
}

.logo-link h1 {
    font-family: var(--font-accent);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--primary);
    pointer-events: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

nav a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    color: var(--text-mid);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    transition: color var(--trans-fast), background var(--trans-fast);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform var(--trans-med);
}

nav a:hover {
    color: var(--primary);
    background: rgba(44, 95, 46, 0.07);
}

nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

nav .nav-cta {
    background: var(--grad-primary);
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

nav .nav-cta::after {
    display: none;
}

nav .nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #3d7a40 0%, #4e9152 100%);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--primary-dark);
    color: var(--text-on-dark);
    padding: 3rem 2rem 1.5rem;
    margin-top: 0;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand .footer-logo {
    font-family: var(--font-accent);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
}

.footer-brand .footer-tagline {
    font-size: 0.9rem;
    color: rgba(240, 237, 229, 0.6);
    font-style: italic;
    text-align: center;
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.6;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: rgba(240, 237, 229, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: color var(--trans-fast);
}

.footer-nav a:hover {
    color: var(--accent-light);
}

.footer-copy {
    font-size: 0.78rem;
    color: rgba(240, 237, 229, 0.35);
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

/* ============================================
   LEAF PARTICLES (Background)
   ============================================ */
.leaf-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Per-section leaf layer — sits above section bg, below section content */
.section-leaf-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.section-leaf {
    position: absolute;
    top: 0;
    opacity: 0;
    display: block;
    height: auto;
    animation: sectionLeafFall linear infinite;
    will-change: transform, opacity;
    overflow: visible;
}

@keyframes sectionLeafFall {
    0% {
        opacity: 0;
        transform: translateY(-15%) rotate(0deg) scale(0.8);
    }

    8% {
        opacity: 0.55;
    }

    88% {
        opacity: 0.45;
    }

    100% {
        opacity: 0;
        transform: translateY(115%) rotate(500deg) scale(1.1);
    }
}

.leaf {
    position: absolute;
    width: 60px;
    height: auto;
    display: block;
    opacity: 0;
    animation: leafFall linear infinite;
    will-change: transform, opacity;
    overflow: visible;
}

@keyframes leafFall {
    0% {
        opacity: 0;
        transform: translateY(-10vh) rotate(0deg) scale(0.8);
    }

    5% {
        opacity: 0.55;
    }

    90% {
        opacity: 0.45;
    }

    100% {
        opacity: 0;
        transform: translateY(105vh) rotate(540deg) scale(1.1);
    }
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   RESPONSIVE — MOBILE NAV
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background var(--trans-fast);
}

.hamburger:hover {
    background: rgba(44, 95, 46, 0.08);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    header {
        padding: 0 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    nav {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(247, 243, 236, 0.98);
        backdrop-filter: blur(20px);
        padding: 1.5rem 2rem;
        gap: 0.5rem;
        transform: translateY(-110%);
        opacity: 0;
        transition: transform 0.4s var(--ease-out), opacity 0.4s;
        border-bottom: 1px solid rgba(200, 169, 110, 0.2);
        box-shadow: 0 8px 32px rgba(44, 95, 46, 0.12);
        z-index: 999;
    }

    nav.open {
        transform: translateY(0);
        opacity: 1;
    }

    nav a {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }

    nav .nav-cta {
        text-align: center;
        margin-top: 0.5rem;
    }

    footer {
        padding: 2rem 1.5rem 1rem;
    }
}