/* ==========================================================
   Fundación BioRestaura Colombia - hoja de estilos
   VOZ: viva, cercana y rigurosa, como una guía de campo.
   IDEA: el logo funciona como sello de identidad. Portada con el sello sobre la fotografía.
   COLOR: solo la paleta del logo (carbón, oliva y blanco) y sus matices.
   TIPO: Open Sans, la misma familia del logotipo.
   ========================================================== */
:root {
  /* Paleta del logo */
  --carbon: #1f272b;
  --carbon-2: #2a3338;
  --oliva: #858222;
  --oliva-2: #a19e33;      /* oliva luminoso para fondos oscuros */
  --oliva-3: #6c6a1b;      /* oliva profundo para texto sobre blanco */
  --oliva-tinte: #f3f3e7;  /* fondo suave derivado del oliva */
  --oliva-linea: #dcdbbd;
  --blanco: #ffffff;
  --texto: #2a3236;
  --texto-suave: #5b6468;

  --f: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ancho: 1220px;
  --radio: 28px;
  --hoja: 0 var(--radio) 0 var(--radio);         /* forma de hoja */
  --sombra: 0 18px 50px rgba(31, 39, 43, .16);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --header: 76px;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 10px); }
body { margin: 0; font: 400 17px/1.65 var(--f); color: var(--texto); background: var(--blanco); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oliva-3); }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--carbon); line-height: 1.12; font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.02em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: min(var(--ancho), 90%); margin-inline: auto; }
.sci { font-style: italic; }
:focus-visible { outline: 3px solid var(--oliva-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: .5em; font: 700 1rem var(--f); text-decoration: none; padding: .95em 1.9em; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s; }
.btn:hover { transform: translateY(-2px); }
.btn--olive { background: var(--oliva); color: #fff; }
.btn--olive:hover { background: var(--carbon); }
.btn--line { border-color: var(--carbon); color: var(--carbon); }
.btn--line:hover { background: var(--carbon); color: #fff; }

.kicker { display: inline-flex; align-items: center; gap: .7em; font-weight: 700; color: var(--oliva-3); margin-bottom: 1rem; font-size: 1rem; }
.kicker::before { content: ""; width: 34px; height: 3px; border-radius: 3px; background: currentColor; }
.kicker--light { color: var(--oliva-2); }
.head { margin-bottom: 3rem; max-width: 760px; }
.head--split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.section { padding: clamp(80px, 10vw, 130px) 0; position: relative; }

/* ---------- Animaciones al desplazarse ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Encabezado ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header); background: transparent; transition: background .45s, box-shadow .45s; }
.header.is-scrolled { background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(31, 39, 43, .08); }
.header__inner { height: 100%; width: min(1320px, 94%); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header__brand { opacity: 0; transform: translateY(-8px); transition: opacity .45s, transform .45s var(--ease); pointer-events: none; }
.header.is-scrolled .header__brand { opacity: 1; transform: none; pointer-events: auto; }
.header__brand img { width: 150px; }
.nav { display: flex; align-items: center; gap: .2rem; }
.nav a { white-space: nowrap; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .55em .8em; border-radius: 999px; transition: background .25s, color .25s; }
.nav a:hover, .nav a.is-current { background: rgba(255, 255, 255, .18); }
.header.is-scrolled .nav a { color: var(--carbon); text-shadow: none; }
.header.is-scrolled .nav a:hover, .header.is-scrolled .nav a.is-current { background: var(--oliva-tinte); color: var(--oliva-3); }
.nav .nav__cta, .header.is-scrolled .nav .nav__cta { background: var(--oliva); color: #fff; text-shadow: none; padding: .65em 1.3em; margin-left: .4rem; }
.nav .nav__cta:hover, .header.is-scrolled .nav .nav__cta:hover { background: var(--carbon); color: #fff; }
.header__progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--oliva); transform-origin: left; transform: scaleX(0); }
.nav-toggle { display: none; }

/* ---------- Portada ---------- */
.hero { position: relative; z-index: 2; min-height: 100svh; background: var(--carbon); }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__img { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.1); transition: opacity 1.6s ease, transform 9s linear; }
.hero__img.is-active { opacity: 1; transform: scale(1); }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(31, 39, 43, .82) 0%, rgba(31, 39, 43, .35) 34%, rgba(31, 39, 43, 0) 60%), linear-gradient(180deg, rgba(31, 39, 43, .45) 0%, rgba(31, 39, 43, 0) 18%); }

/* Texto sobre la foto: abajo a la izquierda, la imagen queda libre */
.hero__content { position: absolute; z-index: 2; left: max(5vw, 24px); bottom: calc(clamp(190px, 18vw, 260px) * .45 + 46px + 32px + 42px); width: min(680px, 90vw); color: #fff; animation: subir 1.1s var(--ease) both; }
.hero__title { color: #fff; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -.02em; line-height: 1.08; margin-bottom: .45em; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero__lead { color: rgba(255, 255, 255, .9); font-size: 1.05rem; max-width: 34em; margin-bottom: 1.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--carbon); }
@keyframes subir { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* Sello del logo en forma de hoja, montado sobre el borde de la portada */
.hero__seal { position: absolute; z-index: 3; left: max(5vw, 24px); bottom: 32px; display: block; background: #fff; border-radius: 0 64px 0 64px; padding: 22px 34px 24px 28px; box-shadow: 0 22px 50px rgba(0, 0, 0, .3); transition: transform .5s var(--ease); animation: sello 1.2s .2s var(--ease) both; }
.hero__seal::before { content: ""; position: absolute; inset: 8px; border: 2px solid var(--oliva-linea); border-radius: 0 56px 0 56px; pointer-events: none; }
.hero__seal:hover { transform: translateY(-6px); }
.hero__logo { width: clamp(190px, 18vw, 260px); }
@keyframes sello { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

.hero__meta { position: absolute; z-index: 2; right: max(5vw, 24px); bottom: 44px; width: min(360px, 40vw); color: #fff; }
.hero__species { margin: 0 0 .8rem; display: flex; flex-direction: column; text-align: right; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.hero__species-label { font-size: .8rem; opacity: .8; }
.hero__species-name { font-size: 1rem; font-weight: 600; }
.hero__bars { display: flex; gap: 8px; }
.hero__bars button { flex: 1; height: 4px; border: 0; padding: 0; border-radius: 4px; background: rgba(255, 255, 255, .35); overflow: hidden; cursor: pointer; position: relative; }
.hero__bars button::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero__bars button.is-done::after { transform: scaleX(1); }
.hero__bars button.is-active::after { animation: barra var(--dur, 7s) linear forwards; }
@keyframes barra { to { transform: scaleX(1); } }


/* Pantallas amplias: sello y texto lado a lado en la base de la portada, la foto queda libre */
@media (min-width: 900px) {
  .hero__content { left: calc(max(5vw, 24px) + clamp(190px, 18vw, 260px) + 62px + 44px); bottom: 40px; width: min(620px, calc(100vw - max(5vw, 24px) * 2 - clamp(190px, 18vw, 260px) - 106px)); }
  .hero__title { font-size: clamp(1.8rem, 2.9vw, 2.7rem); }
  .hero__lead { font-size: 1rem; margin-bottom: 1.1rem; }
  .hero__seal { bottom: 40px; }
  .hero__meta { top: 96px; bottom: auto; }
  .hero__shade { background: linear-gradient(0deg, rgba(31, 39, 43, .85) 0%, rgba(31, 39, 43, .4) 26%, rgba(31, 39, 43, 0) 45%), linear-gradient(180deg, rgba(31, 39, 43, .5) 0%, rgba(31, 39, 43, 0) 22%); }
}

/* ---------- Cinta en movimiento ---------- */
.ticker { position: relative; z-index: 1; background: var(--oliva); color: #fff; overflow: hidden; padding: 1.05rem 0 1.05rem; }
.ticker__track { display: flex; align-items: center; gap: 2.2rem; width: max-content; animation: cinta 40s linear infinite; font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.ticker i { width: 26px; height: 17px; background: #fff; -webkit-mask: url("../img/ave-silueta.png") center / contain no-repeat; mask: url("../img/ave-silueta.png") center / contain no-repeat; opacity: .85; }
@keyframes cinta { to { transform: translateX(-50%); } }


/* ---------- Joya de los Andes: gallito de roca ---------- */
.flagship { position: relative; background: var(--carbon); color: #dfe3df; padding: clamp(90px, 11vw, 150px) 0; overflow: hidden; }
.flagship::after { content: ""; position: absolute; right: -6%; bottom: -8%; width: min(720px, 60vw); aspect-ratio: 679 / 439; background: var(--oliva); opacity: .08; -webkit-mask: url("../img/ave-silueta.png") center / contain no-repeat; mask: url("../img/ave-silueta.png") center / contain no-repeat; pointer-events: none; }
.flagship__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.flagship__photo { margin: 0; position: relative; }
.flagship__photo::before { content: ""; position: absolute; inset: 26px -26px -26px 26px; border: 3px solid var(--oliva); border-radius: 0 130px 0 130px; }
.flagship__photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; border-radius: 0 130px 0 130px; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.flagship__photo figcaption { position: absolute; left: 18px; bottom: 18px; color: #fff; background: rgba(31, 39, 43, .65); font-size: .82rem; padding: .35em 1em; border-radius: 999px; backdrop-filter: blur(4px); }
.flagship h2 { color: #fff; font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: .1em; }
.flagship__sci { color: var(--oliva-2); font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 1.8rem; }
.flagship__quote { position: relative; margin: 0 0 1.6rem; padding: 0 0 0 1.6rem; border-left: 4px solid var(--oliva); font-size: clamp(1.35rem, 2.4vw, 1.95rem); line-height: 1.35; font-weight: 300; color: #fff; }
.flagship__quote::before { content: "\201C"; position: absolute; left: 1.1rem; top: -.75em; font-size: 4.5rem; line-height: 1; font-weight: 800; color: var(--oliva-2); opacity: .55; }
.flagship__body { max-width: 34em; margin-bottom: 2rem; }

/* ---------- La Fundación ---------- */
.manifesto { font-size: clamp(1.6rem, 3.3vw, 2.6rem); line-height: 1.3; font-weight: 300; color: var(--carbon); max-width: 23em; margin-bottom: 4rem; letter-spacing: -.01em; }
.manifesto mark { background: linear-gradient(transparent 62%, var(--oliva-linea) 62%); color: var(--carbon); font-weight: 700; padding: 0 .1em; }
.about { overflow-x: clip; }
.about__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about__photo { margin: 0; position: relative; }
.about__photo img { border-radius: var(--hoja); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; box-shadow: var(--sombra); }
.about__photo::after { content: ""; position: absolute; right: -22px; top: -22px; width: 140px; height: 140px; border-radius: 0 50px 0 50px; background: var(--oliva); z-index: -1; }
.about__photo figcaption, .photo-tag { position: absolute; left: 16px; bottom: 16px; color: #fff; background: rgba(31, 39, 43, .6); font-size: .82rem; padding: .35em 1em; border-radius: 999px; backdrop-filter: blur(4px); margin: 0; }
.about__text { display: grid; gap: 1.1rem; }
.about__card { background: var(--oliva-tinte); border-radius: 0 22px 0 22px; padding: 1.5rem 1.7rem; transition: transform .4s var(--ease), background .4s; }
.about__card:hover { transform: translateX(8px); background: #ecebd6; }
.about__card h3 { color: var(--oliva-3); margin-bottom: .35em; }
.about__card p { margin: 0; }

.stats { margin-top: clamp(4rem, 7vw, 6rem); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--carbon); }
.stat { padding: 1.8rem 1.2rem 0; border-right: 1px solid var(--oliva-linea); }
.stat:last-child { border-right: 0; }
.stat__num { display: block; font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 800; color: var(--oliva); line-height: 1; margin-bottom: .4rem; letter-spacing: -.03em; }
.stat__label { color: var(--texto-suave); font-size: .95rem; }

/* ---------- Líneas de trabajo ---------- */
.lines { background: var(--carbon); color: #e9ece9; }
.lines h2 { color: #fff; }
.panels { display: flex; gap: 14px; height: 540px; }
.panel { position: relative; flex: 1; border-radius: var(--radio); overflow: hidden; background: center / cover no-repeat; cursor: pointer; transition: flex 0.8s var(--ease); outline-offset: 4px; }
.panel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 39, 43, .15) 0%, rgba(31, 39, 43, .9) 100%); transition: background .6s; }
.panel.is-open { flex: 3.4; }
.panel.is-open::before { background: linear-gradient(180deg, rgba(31, 39, 43, 0) 30%, rgba(31, 39, 43, .92) 100%); }
.panel__num { position: absolute; top: 22px; left: 22px; font-size: 1rem; font-weight: 800; color: #fff; background: var(--oliva); width: 46px; height: 46px; border-radius: 0 14px 0 14px; display: grid; place-items: center; }
.panel__content { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem; color: #fff; }
.panel__content h3 { color: #fff; font-size: 1.45rem; white-space: nowrap; }
.panel__content p { margin: 0; max-width: 30em; opacity: 0; transform: translateY(16px); transition: opacity .5s .15s, transform .5s .15s var(--ease); }
.panel.is-open .panel__content p { opacity: 1; transform: none; }
.panel:not(.is-open) .panel__content h3 { writing-mode: vertical-rl; transform: rotate(180deg); position: absolute; bottom: 2rem; left: 50%; margin-left: -.6em; }

/* ---------- Cómo trabajamos ---------- */
.method { background: var(--oliva-tinte); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; }
.steps::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 3px; background: var(--oliva-linea); }
.steps::after { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 3px; background: var(--oliva); transform-origin: left; transform: scaleX(var(--avance, 0)); transition: transform 1.6s var(--ease); }
.step { position: relative; z-index: 1; }
.step__dot { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 0 18px 0 18px; background: var(--carbon); color: #fff; font-weight: 800; font-size: 1.25rem; margin-bottom: 1.3rem; transition: background .4s; }
.step:hover .step__dot { background: var(--oliva); }
.step p { color: var(--texto-suave); margin: 0; }

/* ---------- Frase con fondo fijo ---------- */
.quote { position: relative; padding: clamp(110px, 16vw, 200px) 0; background: center / cover no-repeat fixed; color: #fff; overflow: hidden; }
.quote__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(31, 39, 43, .88) 0%, rgba(31, 39, 43, .55) 60%, rgba(31, 39, 43, .25) 100%); }
.quote__inner { position: relative; }
.quote__text { font-size: clamp(1.8rem, 3.8vw, 3rem); font-weight: 300; line-height: 1.25; max-width: 18em; margin: 0; }
.quote__text strong { font-weight: 800; color: var(--oliva-2); }
.quote .photo-tag { left: auto; right: 20px; }

/* ---------- Biodiversidad ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font: 600 .95rem var(--f); border: 2px solid var(--carbon); background: transparent; color: var(--carbon); padding: .5em 1.2em; border-radius: 999px; cursor: pointer; transition: .25s; }
.chip:hover { border-color: var(--oliva); color: var(--oliva-3); }
.chip.is-active { background: var(--carbon); color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 240px; grid-auto-flow: dense; gap: 14px; }
.g-item { position: relative; margin: 0; border-radius: 20px; overflow: hidden; cursor: zoom-in; background: var(--oliva-tinte); transition: opacity .4s, transform .4s var(--ease); }
.g-item:nth-child(3n+1) { border-radius: 0 26px 0 26px; }
.g-item--wide { grid-column: span 2; }
.g-item--tall { grid-row: span 2; }
.g-item--full { grid-column: 1 / -1; }
.g-item--full img { object-position: center 75%; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.g-item:hover img { transform: scale(1.07); }
.g-item figcaption { position: absolute; inset: auto 0 0 0; padding: 2.6rem 1.1rem 1rem; color: #fff; background: linear-gradient(180deg, transparent, rgba(31, 39, 43, .85)); display: flex; flex-direction: column; font-size: .92rem; line-height: 1.35; transform: translateY(6px); transition: transform .4s var(--ease); }
.g-item:hover figcaption { transform: none; }
.g-item figcaption strong { font-size: 1.02rem; }
.g-item.is-hidden { display: none; }

/* ---------- Especies del altiplano ---------- */
.endemic { background: var(--oliva-tinte); }
.endemic__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.sp { background: #fff; border-radius: 0 var(--radio) 0 var(--radio); overflow: hidden; box-shadow: 0 6px 24px rgba(31, 39, 43, .07); transition: transform .5s var(--ease), box-shadow .5s; }
.sp:hover { transform: translateY(-8px); box-shadow: var(--sombra); }
.sp__img { aspect-ratio: 16 / 10; background: center / cover no-repeat; }
.sp__body { padding: 1.6rem 1.7rem 1.9rem; }
.sp__body h3 { margin-bottom: .1em; font-size: 1.35rem; }
.sp__sci { color: var(--oliva-3); font-size: 1.05rem; margin-bottom: .9em; }
.sp__body p:last-child { margin: 0; font-size: .97rem; color: var(--texto-suave); }
.sources { margin: 2.4rem 0 0; font-size: .82rem; color: var(--texto-suave); max-width: 70em; }

/* ---------- Vincúlate ---------- */
.join__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.join__card { position: relative; min-height: 430px; border-radius: var(--radio); overflow: hidden; background: center / cover no-repeat; display: flex; align-items: flex-end; text-decoration: none; color: #fff; }
.join__card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 39, 43, 0) 20%, rgba(31, 39, 43, .55) 55%, rgba(31, 39, 43, .95) 100%); transition: background .5s; }
.join__card:hover::before { background: linear-gradient(180deg, rgba(133, 130, 34, .35) 0%, rgba(31, 39, 43, .95) 100%); }
.join__body { position: relative; padding: 1.8rem; display: flex; flex-direction: column; gap: .4rem; width: 100%; }
.join__body b { font-size: 1.35rem; }
.join__body i { font-style: normal; font-size: 1.6rem; align-self: flex-end; width: 50px; height: 50px; border-radius: 50%; background: var(--oliva); display: grid; place-items: center; transition: transform .4s var(--ease); }
.join__card:hover .join__body i { transform: translateX(6px); }

/* ---------- Contacto ---------- */
.contact { background: var(--oliva); color: #fff; padding: clamp(70px, 9vw, 110px) 0; overflow: hidden; }
.contact__inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.contact__bird { width: clamp(160px, 22vw, 300px); background: #fff; border-radius: 0 60px 0 60px; padding: 28px; box-shadow: 0 20px 50px rgba(31, 39, 43, .25); animation: flotar 6s ease-in-out infinite; }
@keyframes flotar { 50% { transform: translateY(-12px) rotate(-2deg); } }
.contact h2 { color: #fff; }
.contact .kicker { color: #fff; }
.contact__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 1.6rem; }
.contact__address { color: #fff; font-weight: 800; font-size: clamp(1.15rem, 2.4vw, 1.7rem); text-decoration: none; border-bottom: 3px solid rgba(255, 255, 255, .5); overflow-wrap: anywhere; }
.contact__address:hover { border-color: #fff; }
.contact .btn--olive { background: var(--carbon); }
.contact .btn--olive:hover { background: #fff; color: var(--carbon); }

/* ---------- Pie de página ---------- */
.footer { background: #fff; padding-top: 70px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; padding-bottom: 60px; }
.footer__brand img { width: 300px; margin-bottom: 1.2rem; }
.footer__brand p { color: var(--texto-suave); max-width: 26em; }
.footer h4 { color: var(--oliva-3); font-size: 1.05rem; margin-bottom: 1rem; }
.footer__grid a { display: block; color: var(--carbon); text-decoration: none; font-weight: 600; margin-bottom: .7rem; overflow-wrap: anywhere; }
.footer__grid a:hover { color: var(--oliva-3); }
.footer__bottom { background: var(--carbon); color: #c9cfcb; font-size: .88rem; padding: 1.2rem 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 52px; height: 52px; border-radius: 0 16px 0 16px; background: var(--oliva); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 1.3rem; font-weight: 800; box-shadow: var(--sombra); opacity: 0; transform: translateY(20px); pointer-events: none; transition: .4s var(--ease); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--carbon); }

/* ---------- Visor de imágenes ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(31, 39, 43, .96); display: none; align-items: center; justify-content: center; padding: 3rem 4.5rem; }
.lightbox.is-open { display: flex; animation: aparecer .35s ease; }
@keyframes aparecer { from { opacity: 0; } }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-height: 80vh; max-width: 100%; border-radius: 0 24px 0 24px; margin: 0 auto; }
.lightbox figcaption { color: #fff; margin-top: 1rem; display: flex; flex-direction: column; }
.lightbox__close, .lightbox__nav { position: absolute; background: none; border: 0; color: #fff; font-size: 2.8rem; cursor: pointer; line-height: 1; width: 56px; height: 56px; }
.lightbox__close { top: 14px; right: 18px; }
.lightbox__nav--prev { left: 10px; top: calc(50% - 28px); }
.lightbox__nav--next { right: 10px; top: calc(50% - 28px); }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1280px) {
  .nav a { font-size: .88rem; padding: .5em .55em; }
  .header__brand img { width: 130px; }
}
@media (max-width: 1120px) {
  .nav-toggle { display: grid; gap: 6px; place-content: center; width: 48px; height: 48px; border: 0; border-radius: 0 14px 0 14px; background: var(--carbon); cursor: pointer; }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; transition: .3s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav { position: fixed; top: var(--header); left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 1rem 5% 1.6rem; box-shadow: var(--sombra); display: none; }
  .nav.is-open { display: flex; }
  .nav a, .header .nav a { font-size: 1.05rem; padding: .8em 1em; color: var(--carbon); text-shadow: none; }
  .header .nav .nav__cta { margin: .5rem 0 0; text-align: center; color: #fff; }
  .header.menu-open { background: #fff; }
  .header.menu-open .header__brand { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; }
  .panels { flex-direction: column; height: auto; }
  .panel, .panel.is-open { flex: none; min-height: 300px; }
  .panel .panel__content p { opacity: 1; transform: none; }
  .panel:not(.is-open) .panel__content h3 { writing-mode: horizontal-tb; transform: none; position: static; margin-left: 0; }
  .panel::before, .panel.is-open::before { background: linear-gradient(180deg, rgba(31, 39, 43, 0) 20%, rgba(31, 39, 43, .9) 100%); }
  .panel__content h3 { white-space: normal; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }
  .steps::before, .steps::after { display: none; }
  .endemic__grid, .join__grid { grid-template-columns: 1fr; }
  .join__card { min-height: 300px; }
  .flagship__grid { grid-template-columns: 1fr; }
  .flagship__photo { max-width: 520px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 210px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .quote { background-attachment: scroll; }
}

/* ---------- Celulares ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero__content { bottom: 172px; }
  .hero__lead { font-size: .98rem; }
  .hero__seal { left: 50%; transform: translateX(-50%); bottom: 24px; padding: 16px 24px 18px 20px; border-radius: 0 44px 0 44px; animation: none; }
  .hero__seal::before { border-radius: 0 38px 0 38px; inset: 6px; }
  .hero__seal:hover { transform: translateX(-50%); }
  .hero__logo { width: 180px; }
  .hero__meta { left: 5vw; right: 5vw; width: auto; top: 86px; bottom: auto; }
  .hero__species { text-align: left; }
  .hero__species-name { font-size: .92rem; }
  .about__photo figcaption { font-size: .74rem; left: 10px; bottom: 10px; }
  .gallery { grid-template-columns: 1fr; }
  .g-item--wide, .g-item--full { grid-column: auto; }
  .g-item--tall { grid-row: auto; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--oliva-linea); padding-bottom: 1.4rem; }
  .stat:last-child { border-bottom: 0; }
  .stat { padding-inline: .6rem; }
  .flagship__photo::before { inset: 14px -12px -14px 12px; border-radius: 0 80px 0 80px; }
  .flagship__photo img { border-radius: 0 80px 0 80px; }
  .contact__inner { grid-template-columns: 1fr; }
  .contact__bird { width: 150px; padding: 18px; border-radius: 0 40px 0 40px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__brand img { width: 240px; }
  .lightbox { padding: 3rem 1rem; }
  .lightbox__nav { top: auto; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__img { transform: none; }
}
