:root {
    --ink: #121418;
    --ink-soft: #3c3f46;
    --paper: #f3efe6;
    --paper-2: #e7e1d4;
    --heat: #c2410c;
    --heat-deep: #7c2d12;
    --park: #1d5c45;
    --park-deep: #12382b;
    --mist: rgba(255, 255, 255, 0.12);
    --nav-h: 72px;
    --serif: "Source Serif 4", Georgia, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.kicker {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 0 0.7rem;
    opacity: 0.78;
}

.lead { font-size: 1.15rem; max-width: 42rem; }

/* Navigation */
.site-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.site-nav.is-scrolled,
.product-page .site-nav {
    background: rgba(18, 20, 24, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
.site-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
}
.site-brand {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff !important;
    text-decoration: none;
}
.nav-collapse {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.site-links {
    display: flex;
    gap: 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-links a {
    color: #f4f1ea;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}
.site-links a:hover { color: #f0c27a; }
.lang-switch .btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 2rem;
    height: 1.4rem;
    position: relative;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    margin: 6px 0;
}

.chapter-rail {
    display: none;
}

.nav-collapse.collapse { display: flex !important; }

@media (max-width: 991px) {
    .nav-collapse.collapse:not(.show) { display: none !important; }
    .nav-collapse.collapse.show { display: flex !important; }
}

@media (min-width: 1100px) {
    .chapter-rail {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        position: fixed;
        right: 1.2rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 30;
        background: rgba(12, 12, 12, 0.55);
        padding: 0.85rem 0.75rem;
        border-radius: 999px;
        backdrop-filter: blur(8px);
    }
    .chapter-rail a {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        color: #fff;
        text-decoration: none;
        font-size: 0.72rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        opacity: 0.45;
        writing-mode: horizontal-tb;
    }
    .chapter-rail a span { font-variant-numeric: tabular-nums; }
    .chapter-rail a:hover,
    .chapter-rail a.is-active { color: #f0c27a; opacity: 1; }
}

/* Chapters */
.chapter {
    position: relative;
    min-height: 100vh;
    scroll-margin-top: 0;
    overflow: hidden;
}
.chapter-body {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 2.5rem) 1.5rem 4rem;
}
.chapter-heading { max-width: 46rem; margin-bottom: 2.2rem; }
.chapter-heading h2 { font-size: clamp(2.1rem, 4vw, 3.4rem); margin-bottom: 0.8rem; }
.chapter-actions { margin-top: 2rem; }

.btn-site {
    display: inline-flex;
    align-items: center;
    background: var(--heat);
    color: #fff !important;
    text-decoration: none;
    padding: 0.8rem 1.3rem;
    border-radius: 999px;
    font-weight: 600;
    border: 0;
}
.btn-site:hover { background: var(--heat-deep); color: #fff; }
.btn-site-light { background: #fff; color: var(--ink) !important; }
.btn-site-ghost {
    background: transparent;
    color: var(--ink) !important;
    border: 1px solid var(--ink);
}

/* Hero */
.chapter-hero { color: #fff; display: flex; align-items: center; }
.hero-media {
    position: absolute;
    inset: 0;
    background: url("GiFs/20240924-Laguna-de-Chapala-Este.gif") center/cover no-repeat;
}
.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 12, 16, 0.35) 0%, rgba(10, 12, 16, 0.72) 100%);
}
.hero-body { text-align: left; max-width: 760px; margin-left: 6vw; }
.hero-logo { width: min(220px, 50vw); margin-bottom: 1.4rem; }
.chapter-hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); color: #fff; margin-bottom: 1rem; }
.scroll-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    z-index: 2;
}

/* Heat islands */
.chapter-heat { color: #f7f4ef; background: #140d0a; }
.chapter-heat h2, .chapter-heat .lead { color: #f7f4ef; }
.chapter-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}
.chapter-bg-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 8, 5, 0.88) 0%, rgba(16, 8, 5, 0.55) 55%, rgba(16, 8, 5, 0.3) 100%);
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(10px);
    min-height: 100%;
}
.product-card:hover { transform: translateY(-4px); transition: transform 0.25s ease; }
.product-card-image {
    min-height: 220px;
    background-size: cover;
    background-position: center;
}
.product-card-body { padding: 1.2rem 1.25rem 1.4rem; }
.product-card-body h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin: 1rem 0 0.4rem;
}
.stat-row dt { font-family: var(--serif); font-size: 1.35rem; }
.stat-row dd { margin: 0; font-size: 0.78rem; opacity: 0.75; }
.card-cta { display: inline-block; margin-top: 0.8rem; font-weight: 600; color: #f0c27a; }

/* Parks */
.chapter-parks { background: var(--paper); }
.country-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}
.country-card {
    position: relative;
    min-height: 420px;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: flex-end;
}
.country-card-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: transform 0.5s ease;
}
.country-card:hover .country-card-image { transform: scale(1.1); }
.country-card-body {
    position: relative;
    z-index: 1;
    padding: 1.4rem;
    background: linear-gradient(180deg, transparent, rgba(10, 22, 16, 0.88));
    width: 100%;
}
.country-card h3 { color: #fff; font-size: 1.6rem; }
.country-card .card-cta { color: #d7f3e4; }

/* Blog */
.chapter-blog { background: #fff; min-height: auto; }
.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
}
.blog-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1rem;
    background: var(--paper);
    border-radius: 16px;
    overflow: hidden;
}
.blog-card img { height: 100%; object-fit: cover; min-height: 220px; }
.blog-card div { padding: 1.1rem 1.1rem 1.2rem 0; }
.blog-card a { font-weight: 600; color: var(--heat); text-decoration: none; }

/* Team */
.chapter-who { background: var(--paper-2); min-height: auto; }
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.team-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.2rem;
}
.team-card img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.8rem;
}
.team-card h3 { font-size: 1.15rem; }
.team-card p { font-size: 0.9rem; color: var(--ink-soft); }

.chapter-contact {
    min-height: auto;
    background: var(--ink);
    color: #f3efe6;
}
.chapter-contact h2 { color: #fff; }
.chapter-contact a { color: #f0c27a; }

.site-footer { background: #0b0d10; color: #cfc9bd; }
.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.4rem 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-links { display: flex; gap: 1rem; align-items: center; }
.footer-links a { color: #cfc9bd; text-decoration: none; }

/* Product / city pages */
.page-hero {
    position: relative;
    min-height: 58vh;
    display: flex;
    align-items: flex-end;
    color: #fff;
}
.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 8, 6, 0.15), rgba(12, 8, 6, 0.82));
}
.page-hero-body {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 4rem) 1.5rem 2.5rem;
}
.page-main, .report {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}
.page-main .product-grid { max-width: 1280px; }
.product-page .page-main { max-width: 1280px; }
.product-page .heat-card {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--paper-2);
}
.product-page .heat-card .card-cta { color: var(--heat); }

.crumb { font-size: 0.9rem; margin-bottom: 1.5rem; }
.crumb a { color: var(--heat); text-decoration: none; }
.intro-split {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 1.4rem;
    align-items: start;
}
.intro-split img, .report-figure img {
    width: 100%;
    background: #111;
    border-radius: 10px;
}
.finding {
    font-family: var(--serif);
    font-size: 1.2rem;
    background: #fff;
    border-left: 4px solid var(--heat);
    padding: 1rem 1.1rem;
    margin: 1.4rem 0 0;
}
.method {
    background: #fff;
    padding: 1.1rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--paper-2);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}
.stat-grid div {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
}
.stat-grid dt { font-family: var(--serif); font-size: 1.5rem; }
.stat-grid dd { margin: 0; color: var(--ink-soft); font-size: 0.85rem; }
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.92rem;
}
.data-table th, .data-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--paper-2);
    text-align: left;
}
.data-table th { background: var(--ink); color: #fff; }
.data-table td:nth-child(n+2), .data-table th:nth-child(n+2) { text-align: right; }
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}
.gallery img { width: 100%; background: #050505; border-radius: 8px; }
.gallery figcaption { font-size: 0.8rem; text-align: center; margin-top: 0.35rem; color: var(--ink-soft); }
.credits { color: var(--ink-soft); font-size: 0.88rem; margin-top: 2.5rem; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 8, 0.92);
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 95vw; max-height: 90vh; }
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: 0;
    color: #fff;
    font-size: 2.4rem;
}

html.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 1199px) {
    .team-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 991px) {
    .nav-toggle { display: block; }
    .nav-collapse {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .site-nav-inner { flex-wrap: wrap; }
    .site-links { flex-direction: column; padding: 0.6rem 0 1rem; }
    .product-grid, .country-grid, .blog-grid, .team-grid, .gallery, .stat-grid, .intro-split {
        grid-template-columns: 1fr;
    }
    .blog-card { grid-template-columns: 1fr; }
    .hero-body { margin-left: 0; }
    .country-card { min-height: 320px; }
}
