/* ==========================================================================
   Reserva Nacional El Ajial — Sistema visual global
   ========================================================================== */

:root {
  /* Paleta */
  --verde-bosque: #003D31;
  --verde-bosque-2: #244342;
  --verde-teal: #44756F;
  --verde-salvia: #72B19C;
  --verde-menta: #C2E6D3;
  --crema: #FFF1E6;
  --crema-claro: #FAF6EF;
  --gris-piedra: #768481;
  --gris-claro: #C1CAC2;
  --negro-tinta: #1E2438;
  --blanco: #FFFFFF;
  --tierra: #8B6F47;

  /* Conservación */
  --cat-en: #E84A3F;
  --cat-vu: #E69500;
  --cat-nt: #C2A93D;
  --cat-lc: #72B19C;

  /* Tipografía */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', Menlo, monospace;

  /* Espaciado */
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad-y: clamp(60px, 9vw, 120px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--negro-tinta);
  background: var(--crema-claro);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--verde-bosque); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--verde-teal); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--verde-bosque); letter-spacing: 0.005em; line-height: 1.15; margin: 0; }
.h-display { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.h-1 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.h-2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.h-3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verde-teal);
  margin-bottom: 14px;
  display: block;
}
.kicker.kicker-light { color: var(--verde-menta); }
.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.65;
  color: var(--verde-bosque-2);
  max-width: 65ch;
}
p { margin: 0 0 1em; max-width: 70ch; }
.caption { font-size: 0.85rem; color: var(--gris-piedra); font-style: italic; }
.mono { font-family: var(--mono); font-size: 0.92rem; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(250, 246, 239, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 61, 49, 0.08);
  z-index: 100;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-brand img { height: 50px; width: auto; }
.nav-brand-text {
  display: flex;
  align-items: center;
}
.nav-brand-main {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verde-bosque);
  font-weight: 500;
}
.nav-menu {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--verde-bosque-2);
  letter-spacing: 0.02em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all .2s ease;
}
.nav-menu a:hover, .nav-menu a.is-active { color: var(--verde-bosque); border-bottom-color: var(--verde-salvia); }
.lang-toggle {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde-teal);
  padding: 8px 14px;
  border: 1px solid var(--verde-salvia);
  border-radius: 2px;
}
.lang-toggle:hover { background: var(--verde-bosque); color: white; }

.nav-burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--verde-bosque);
  cursor: pointer;
  padding: 4px 8px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: white;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 61, 49, 0.15) 0%, rgba(0, 61, 49, 0.5) 60%, rgba(0, 61, 49, 0.92) 100%);
}
.hero-content {
  position: relative;
  padding: 0 0 80px 0;
  max-width: 800px;
}
.hero h1 {
  color: white;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero p {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
  max-width: 60ch;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all .2s ease;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
}
.btn-primary { background: var(--verde-bosque); color: white; }
.btn-primary:hover { background: var(--verde-bosque-2); color: white; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--verde-bosque); border-color: var(--verde-bosque); }
.btn-secondary:hover { background: var(--verde-bosque); color: white; }
.btn-on-dark { background: white; color: var(--verde-bosque); }
.btn-on-dark:hover { background: var(--verde-menta); }
.btn-ghost-light { background: transparent; color: white; border-color: white; }
.btn-ghost-light:hover { background: white; color: var(--verde-bosque); }

/* ---------- Secciones generales ---------- */
section { padding: var(--section-pad-y) 0; }
.section-header { margin-bottom: 60px; max-width: 820px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header h2 { margin-bottom: 16px; }
.divider {
  width: 60px;
  height: 2px;
  background: var(--verde-salvia);
  margin: 28px 0;
}
.section-header.center .divider { margin-left: auto; margin-right: auto; }

/* ---------- Cifras ---------- */
.stats {
  background: var(--verde-bosque);
  color: white;
  position: relative;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
}
.stat {
  text-align: center;
  border-top: 2px solid var(--verde-salvia);
  padding-top: 28px;
}
.stat-num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4.4vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  color: white;
  margin-bottom: 12px;
}
.stat-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--verde-menta);
}

/* ---------- Bloque foto + texto ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.feature.reverse .feature-text { order: 2; }
.feature-media {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/5;
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media .caption-overlay {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(0,0,0,0.55);
  color: white;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* ---------- Tarjetas de programa ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.program-card {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,61,49,0.07);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.program-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,61,49,0.12); }
.program-card-media { aspect-ratio: 4/3; overflow: hidden; }
.program-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.program-card:hover .program-card-media img { transform: scale(1.04); }
.program-card-body { padding: 28px; }
.program-card h3 { margin-bottom: 12px; font-size: 1.35rem; }
.program-card p { font-size: 0.95rem; color: var(--verde-bosque-2); margin-bottom: 16px; }
.program-card-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde-teal);
  border-bottom: 1px solid var(--verde-salvia);
  padding-bottom: 2px;
}

/* ---------- Especies destacadas ---------- */
.species-section { background: var(--verde-bosque-2); color: white; }
.species-section h2, .species-section .kicker { color: white; }
.species-section .kicker { color: var(--verde-menta); }
.species-section .lead { color: rgba(255,255,255,0.85); }
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.species-card {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(194,230,211,0.18);
}
.species-card-media { aspect-ratio: 1/1; overflow: hidden; }
.species-card-media img { width: 100%; height: 100%; object-fit: cover; }
.species-card-body { padding: 22px; }
.species-card-cat {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: white;
  border-radius: 2px;
  margin-bottom: 12px;
}
.cat-en { background: var(--cat-en); }
.cat-vu { background: var(--cat-vu); }
.cat-nt { background: var(--cat-nt); }
.cat-lc { background: var(--cat-lc); }
.species-card h4 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: white;
  margin-bottom: 4px;
}
.species-card-common {
  font-size: 0.85rem;
  color: var(--verde-menta);
}

/* ---------- Video institucional ---------- */
.video-section {
  background: var(--verde-bosque-2);
  color: white;
  padding: var(--section-pad-y) 0;
}
.video-section .section-header h2 { color: white; }
.video-section .kicker { color: var(--verde-menta); }
.video-section .lead { color: rgba(255,255,255,0.85); }
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Sección noticia destacada ---------- */
.feature-news {
  background: var(--crema);
  border-radius: 6px;
  padding: clamp(40px, 6vw, 70px);
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 50px;
  align-items: center;
}
.feature-news-meta { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--tierra); text-transform: uppercase; margin-bottom: 14px; }
.feature-news h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 16px; }
.feature-news p { font-size: 1rem; line-height: 1.6; color: var(--verde-bosque-2); }

/* ---------- Aliados ---------- */
.partners {
  background: var(--crema-claro);
  border-top: 1px solid rgba(0,61,49,0.08);
  border-bottom: 1px solid rgba(0,61,49,0.08);
  padding: 60px 0;
}
.partners-title {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gris-piedra);
  margin-bottom: 36px;
}
.partners-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 50px;
}
.partner-name {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--verde-bosque-2);
  text-align: center;
  font-weight: 500;
  max-width: 180px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--verde-bosque);
  color: white;
  padding: 80px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}
.footer-brand img { height: 64px; margin-bottom: 18px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.92rem; color: rgba(255,255,255,0.78); }
.footer h5 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verde-menta);
  margin: 0 0 18px 0;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: rgba(255,255,255,0.85); font-size: 0.92rem; }
.footer ul a:hover { color: var(--verde-menta); }
.footer-contact-line {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
}
.footer-contact-line a { color: rgba(255,255,255,0.95); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
.footer-bottom a { color: rgba(255,255,255,0.7); }

.footer-notice {
  background: rgba(255,255,255,0.06);
  border-left: 3px solid var(--verde-salvia);
  padding: 18px 22px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.86);
  margin-bottom: 50px;
  border-radius: 0 4px 4px 0;
}
.footer-notice a { color: var(--verde-menta); border-bottom: 1px solid var(--verde-menta); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-menu { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--crema-claro); flex-direction: column; padding: 20px var(--gutter); gap: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
  .nav-menu.is-open { display: flex; }
  .nav-burger { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .feature { grid-template-columns: 1fr; gap: 30px; }
  .feature.reverse .feature-text { order: 1; }
  .feature-media { aspect-ratio: 16/10; }
  .programs-grid { grid-template-columns: 1fr; }
  .feature-news { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .hero { min-height: 78vh; }
}
