/* ============================================================
   Jaime Chávez · Cayma, Arequipa
   1. Tokens
   2. Reset y base
   3. Utilidades y componentes
   4. Header y navegación
   5. Hero
   6. Indicadores
   7. Introducción
   8. Bloque Cayma
   9. Propuestas
   10. Obras
   11. Trayectoria
   12. Prevención de riesgos
   13. Revolución verde
   14. Actividades
   15. Redes sociales
   16. Contacto
   17. Footer
   18. Modal, lightbox y WhatsApp
   19. Animaciones
   20. Responsive
   ============================================================ */

/* 1. Tokens ------------------------------------------------- */
:root {
  --primary-green:   #14532D;
  --primary-deep:    #0E3A20;
  --secondary-green: #1E7A46;
  --green-soft:      #E8F0E9;
  --accent-yellow:   #E0A80D;   /* rellenos, lineas y texto sobre verde oscuro */
  --accent-ink:      #8A6200;   /* mismo dorado, legible como TEXTO sobre claro (5.3:1) */
  --accent-soft:     #FBF0D2;

  --dark:            #14181A;
  --muted:           #5C665F;
  --line:            #DEDCD2;
  --light:           #F5F3EC;
  --light-2:         #EAE7DC;
  --white:           #FFFFFF;

  --sillar: repeating-linear-gradient(
      115deg, #EAE7DC 0 22px, #E3DFD2 22px 44px);

  --ff-title: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ff-body:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1:  clamp(1.18rem, 1.1rem + .4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + .9vw, 2.1rem);
  --step-3:  clamp(2rem, 1.6rem + 1.9vw, 3.2rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 5rem);

  --gap:    clamp(1.5rem, 1rem + 2vw, 3rem);
  --pad-y:  clamp(4rem, 3rem + 5vw, 8rem);
  --radius: 4px;
  --arch:   48% 48% 6px 6px / 34% 34% 2% 2%;

  --shadow-s: 0 1px 2px rgba(20,24,26,.05), 0 6px 18px -12px rgba(20,24,26,.25);
  --shadow-m: 0 2px 6px rgba(20,24,26,.06), 0 22px 48px -28px rgba(20,24,26,.4);

  --ease: cubic-bezier(.22,.68,.32,1);
}

/* 2. Reset y base ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--dark);
  font-family: var(--ff-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--ff-title);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.028em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); text-transform: uppercase; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -.015em; line-height: 1.2; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img { max-width: 100%; height: auto; display: block; }
/* El estilo de autor gana al del navegador: sin esto, [hidden] deja de funcionar. */
[hidden] { display: none !important; }

a { color: var(--primary-green); text-underline-offset: 3px; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent-yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

svg:not(.sprite) {
  width: 1em; height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.sprite { display: none; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--primary-green); color: var(--white);
  padding: .7rem 1.1rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* 3. Utilidades y componentes ------------------------------- */
.wrap {
  width: min(100% - 2.5rem, 1240px);
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--ff-title);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--secondary-green);
  margin: 0 0 .9rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--accent-yellow);
}

.display { text-transform: uppercase; }
.display em { font-style: normal; color: var(--secondary-green); }

.sec-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 4vw, 4rem); }
.sec-head--row {
  max-width: none;
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1.5rem;
}
.sec-lead { color: var(--muted); font-size: var(--step-1); margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem;
  padding: .95rem 1.7rem;
  min-height: 52px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--ff-title);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}
.btn--primary { background: var(--primary-green); color: var(--white); border-color: var(--primary-green); }
.btn--primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); transform: translateY(-2px); }

.btn--accent { background: var(--accent-yellow); color: var(--dark); border-color: var(--accent-yellow); }
.btn--accent:hover { background: #C9950A; border-color: #C9950A; transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--primary-green); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--primary-green); background: var(--green-soft); transform: translateY(-2px); }

.btn--block { width: 100%; }

/* Marco tipo arco de sillar arequipeño */
.arch { border-radius: var(--arch); overflow: hidden; }

/* Marcador de imagen ausente: el diseño nunca se rompe */
.ph { position: relative; overflow: hidden; background: var(--sillar); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph::after {
  content: attr(data-ph);
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
  font-family: var(--ff-body);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9A9384;
  text-align: center;
}
/* En público el hueco queda neutro; el nombre del archivo solo se revela
   abriendo la web con ?editar=1 (ver js/main.js). */
.editar .ph:has(img[hidden])::after { display: flex; }

/* 4. Header y navegación ------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-s);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  min-height: 84px;
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--white); }
.site-header.is-scrolled .brand { color: var(--dark); }

.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--primary-green);
  color: var(--white);
  font-family: var(--ff-title);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .04em;
  border-radius: 3px;
  border-bottom: 3px solid var(--accent-yellow);
}
/* Símbolo de la organización política */
.brand-logo {
  width: 40px;
  height: 38px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(20,24,26,.12);
}
.brand-logo--pie {
  width: 56px;
  height: 53px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.2);
}

.hero-sello {
  position: absolute;
  left: clamp(-.5rem, 1vw, 1rem);
  bottom: -10px;
  width: clamp(54px, 5.2vw, 70px);
  height: auto;
  aspect-ratio: 334 / 314;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-m);
  z-index: 3;
}

.social-logo {
  width: 58px;
  height: 55px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(20,24,26,.1);
}

.brand-name { display: grid; font-family: var(--ff-title); line-height: 1; }
.brand-name b { font-size: .92rem; font-weight: 800; letter-spacing: .13em; }
.brand-name b:last-child { color: var(--accent-yellow); }
.site-header.is-scrolled .brand-name b:last-child { color: var(--secondary-green); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.2rem); }
.nav-list { display: flex; align-items: center; gap: clamp(.9rem, 1.6vw, 1.9rem); }
.nav-list a {
  color: var(--white);
  font-family: var(--ff-title);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .4rem 0;
  position: relative;
}
.site-header.is-scrolled .nav-list a { color: var(--dark); }
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent-yellow);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-list a:hover::after, .nav-list a.is-current::after { transform: scaleX(1); }

.nav-cta { padding: .7rem 1.2rem; min-height: 44px; }

.burger {
  display: none;
  width: 46px; height: 46px;
  background: none; border: 0; cursor: pointer;
  padding: 11px 9px;
}
.burger span {
  display: block; height: 2px; width: 100%;
  background: var(--white);
  transition: transform .3s var(--ease), opacity .2s var(--ease), background .3s var(--ease);
}
.burger span + span { margin-top: 6px; }
.site-header.is-scrolled .burger span, .nav-open .burger span { background: var(--dark); }
.nav-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 5. Hero --------------------------------------------------- */
.hero {
  position: relative;
  background: var(--primary-deep);
  color: var(--white);
  padding-top: 84px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 85% 15%, rgba(30,122,70,.5), transparent 60%),
    linear-gradient(160deg, #0E3A20 0%, #123F25 55%, #0B2F1A 100%);
}

.hero-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 6rem);
  min-height: calc(100svh - 84px);
}

.hero-text .eyebrow { color: var(--accent-yellow); }
.hero-text h1 { color: var(--white); }

.hero-claim {
  font-family: var(--ff-title);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 1.2rem 0 1.4rem;
  color: rgba(255,255,255,.9);
}
.hero-claim i { color: var(--accent-yellow); font-style: normal; padding-inline: .25rem; }

.hero-lead {
  max-width: 34rem;
  color: rgba(255,255,255,.78);
  font-size: var(--step-1);
  margin-bottom: 2.2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-actions .btn--primary { background: var(--accent-yellow); border-color: var(--accent-yellow); color: var(--dark); }
.hero-actions .btn--primary:hover { background: #C9950A; border-color: #C9950A; }
.hero-actions .btn--ghost { color: var(--white); border-color: rgba(255,255,255,.4); }
.hero-actions .btn--ghost:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.hero-media { position: relative; }
.arch--hero {
  aspect-ratio: 3 / 4;
  max-height: 74svh;
  margin-inline: auto;
  max-width: 460px;
  box-shadow: var(--shadow-m);
  background: rgba(255,255,255,.06);
}
.arch--hero::after { color: rgba(255,255,255,.5); }
.arch-deco {
  position: absolute; left: 50%; bottom: -18px;
  transform: translateX(-50%);
  width: min(78%, 380px); height: 6px;
  background: var(--accent-yellow);
}


/* 6. Indicadores -------------------------------------------- */
.stats { background: var(--primary-green); color: var(--white); }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.stat {
  padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1rem, 2vw, 2rem);
  border-bottom: 1px solid rgba(255,255,255,.14);
  text-align: center;
}
.stat:last-child { border-bottom: 0; }

.stat-num, .stat-word {
  display: block;
  font-family: var(--ff-title);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat-num { font-size: clamp(2.6rem, 5vw, 4rem); color: var(--accent-yellow); }
.stat-word { font-size: clamp(1.8rem, 3.4vw, 2.8rem); text-transform: uppercase; }
.stat-label {
  display: block;
  margin-top: .6rem;
  font-size: var(--step--1);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}

.stats-source {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem clamp(1.4rem, 3vw, 2rem);
  text-align: center;
  font-size: .78rem;
  line-height: 1.5;
  color: rgba(255,255,255,.6);
}

/* 7. Introducción ------------------------------------------- */
.intro { padding-block: var(--pad-y); background: var(--white); }
.intro-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: center; }
.intro-media .arch { aspect-ratio: 4 / 5; box-shadow: var(--shadow-m); }
.intro-text h2 { margin-bottom: 1.4rem; }
.intro-text p { color: var(--muted); font-size: var(--step-1); }

.pull {
  margin: 1.8rem 0 2rem;
  padding: 1.2rem 0 1.2rem 1.5rem;
  border-left: 3px solid var(--accent-yellow);
  font-family: var(--ff-title);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.35;
  color: var(--dark);
  letter-spacing: -.01em;
}

.pull cite {
  display: block;
  margin-top: .8rem;
  font-family: var(--ff-body);
  font-size: .8rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
}

/* 8. Bloque Cayma ------------------------------------------- */
.cayma { padding-block: var(--pad-y); background: var(--light); }
.cayma-head { max-width: 52rem; margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.cayma-head h2 { font-size: var(--step-4); }
.cayma-lead { margin-top: 1.4rem; color: var(--muted); font-size: var(--step-1); max-width: 42rem; }

.cayma-mosaic { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.cayma-mosaic figure { position: relative; margin: 0; border-radius: var(--radius); }
.cayma-a { aspect-ratio: 16 / 10; }
.cayma-b { aspect-ratio: 4 / 5; }
.cayma-c { aspect-ratio: 1 / 1; }
.cayma-mosaic figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--primary-green);
  color: var(--white);
  padding: .5rem 1rem;
  font-family: var(--ff-title);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* 9. Propuestas --------------------------------------------- */
.propuestas { padding-block: var(--pad-y); background: var(--white); }
.prop-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }

.prop {
  position: relative;
  display: flex; flex-direction: column;
  gap: .55rem;
  padding: clamp(1.6rem, 2.4vw, 2.2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.prop:hover { border-color: var(--secondary-green); transform: translateY(-4px); box-shadow: var(--shadow-m); }

.prop-num {
  font-family: var(--ff-title);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.prop-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin-bottom: .4rem;
  background: var(--green-soft);
  color: var(--primary-green);
  border-radius: 3px;
}
.prop-icon svg { width: 26px; height: 26px; stroke-width: 1.5; }
.prop h3 { color: var(--dark); }
.prop > p { color: var(--muted); font-size: var(--step-0); flex-grow: 1; }

.prop-link {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .6rem;
  padding: .5rem 0;
  background: none; border: 0;
  color: var(--primary-green);
  font-family: var(--ff-title);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.prop-link svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.prop-link:hover svg { transform: translateX(5px); }
.prop-link::before { content: ""; position: absolute; inset: 0; }

.detail-intro { font-size: var(--step-1); color: var(--dark); margin-bottom: 1.4rem; }
.detail-list { display: flex; flex-direction: column; gap: .9rem; }
.detail-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--muted);
}
.detail-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 10px; height: 10px;
  background: var(--accent-yellow);
  border-radius: 1px;
}

/* 10. Obras ------------------------------------------------- */
.obras { padding-block: var(--pad-y); background: var(--light); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter {
  padding: .6rem 1.1rem;
  min-height: 44px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--ff-title);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.filter:hover { border-color: var(--secondary-green); }
.filter.is-active { background: var(--primary-green); color: var(--white); border-color: var(--primary-green); }

.obras-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }

.obra {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .3s var(--ease);
}
.obra:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.obra.is-hidden { display: none; }
.obra > figure { margin: 0; aspect-ratio: 16 / 9; }
.obra img { transition: transform .5s var(--ease); }
.obra:hover img { transform: scale(1.05); }

.obra-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .45rem; }
.obra-cat {
  font-family: var(--ff-title);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--secondary-green);
}
.obra-place { color: var(--accent-ink); font-size: var(--step--1); font-weight: 600; }
.obra-body > p:last-child { color: var(--muted); font-size: var(--step--1); }

.obra-open {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(14,58,32,.72);
  border: 0; cursor: pointer;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.obra-open span {
  padding: .8rem 1.5rem;
  border: 2px solid var(--white);
  color: var(--white);
  font-family: var(--ff-title);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.obra:hover .obra-open, .obra-open:focus-visible { opacity: 1; }

/* Numeración de las obras */

.obra-num {
  display: block;
  font-family: var(--ff-title);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--light-2);
  font-variant-numeric: tabular-nums;
  margin-bottom: .5rem;
}
.obras-note {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent-yellow);
  font-size: var(--step--1);
  color: #6B5A1F;
}
.obras-note code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

/* 11. Trayectoria ------------------------------------------- */
.trayectoria { padding-block: var(--pad-y); background: var(--white); }
.tray-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
.tray-media .arch { aspect-ratio: 4 / 5; box-shadow: var(--shadow-m); }
.tray-text h2 { margin-bottom: 1.3rem; }
.tray-text > p { color: var(--muted); font-size: var(--step-1); margin-bottom: 2.6rem; }

.timeline { position: relative; padding-left: 2.2rem; display: flex; flex-direction: column; gap: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: .4rem; bottom: .4rem;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -2.2rem; top: .35rem;
  width: 16px; height: 16px;
  background: var(--white);
  border: 3px solid var(--accent-yellow);
  border-radius: 50%;
}
.tl-year {
  display: block;
  font-family: var(--ff-title);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--secondary-green);
  margin-bottom: .3rem;
}
.tl-item h3 { margin-bottom: .35rem; }
.tl-item p { color: var(--muted); font-size: var(--step--1); }

[data-editable] { position: relative; }

/* 12. Prevención de riesgos --------------------------------- */
.riesgos { position: relative; padding-block: var(--pad-y); color: var(--white); isolation: isolate; background: var(--primary-deep); }
.riesgos-bg { position: absolute; inset: 0; z-index: -2; }
.riesgos-bg img { width: 100%; height: 100%; object-fit: cover; }
.riesgos::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,32,20,.9) 0%, rgba(11,32,20,.78) 50%, rgba(11,32,20,.94) 100%);
}
.riesgos .eyebrow { color: var(--accent-yellow); }
.riesgos-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.riesgos-head p { color: rgba(255,255,255,.8); font-size: var(--step-1); margin-top: 1.2rem; }

.riesgos-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.rcard {
  padding: 1.6rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}
.rcard h3 { color: var(--accent-yellow); margin-bottom: .5rem; font-size: var(--step-0); text-transform: uppercase; letter-spacing: .1em; }
.rcard p { color: rgba(255,255,255,.8); font-size: var(--step--1); }

.video-slot {
  margin-top: 2rem;
  max-width: 900px;
  margin-inline: auto;
  display: grid; place-items: center;
  aspect-ratio: 16 / 9;
  border: 2px dashed rgba(255,255,255,.3);
  border-radius: var(--radius);
  color: rgba(255,255,255,.6);
  font-size: var(--step--1);
  text-align: center;
  padding: 1rem;
}

/* 13. Revolución verde -------------------------------------- */
.verde { padding-block: var(--pad-y); background: var(--green-soft); }
.verde-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: center; }
.verde-text > p { color: var(--muted); font-size: var(--step-1); margin-bottom: 2.2rem; }

.verde-metas { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.verde-metas li {
  padding: 1.2rem 1.4rem;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 3px solid var(--secondary-green);
}
.meta-num, .meta-word {
  display: block;
  font-family: var(--ff-title);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--primary-green);
  font-variant-numeric: tabular-nums;
}
.meta-num { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.meta-word { font-size: clamp(1.1rem, 2vw, 1.4rem); text-transform: uppercase; }
.meta-label { display: block; margin-top: .4rem; font-size: var(--step--1); color: var(--muted); }
.meta-label em { font-style: normal; color: var(--secondary-green); font-weight: 600; }

.verde-media figure { margin: 0; aspect-ratio: 9 / 11; border-radius: var(--radius); box-shadow: var(--shadow-m); }

/* 14. Actividades ------------------------------------------- */
.actividades { padding-block: var(--pad-y); background: var(--white); }
.posts { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }

.post { display: flex; flex-direction: column; }
.post > figure {
  margin: 0 0 1.1rem;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
}
.post img { transition: transform .5s var(--ease); }
.post:hover img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; gap: .5rem; }
.post time {
  font-family: var(--ff-title);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.post-body p { color: var(--muted); font-size: var(--step--1); }

/* 15. Redes sociales ---------------------------------------- */
.social { padding-block: clamp(3rem, 5vw, 5rem); background: var(--light); border-top: 1px solid var(--line); }
.social-inner { display: flex; flex-direction: column; align-items: center; gap: 1.8rem; text-align: center; }
.social h2 { font-size: var(--step-2); text-transform: uppercase; }
.social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.social-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.5rem;
  min-height: 52px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--dark);
  font-family: var(--ff-title);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.social-btn svg { width: 20px; height: 20px; }
.social-btn:hover { background: var(--primary-green); color: var(--white); border-color: var(--primary-green); transform: translateY(-3px); }

/* 16. Contacto ---------------------------------------------- */
.contacto { padding-block: var(--pad-y); background: var(--white); }
.contacto-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
.contacto-text > p { color: var(--muted); font-size: var(--step-1); margin-bottom: 2rem; }

.contacto-data { display: flex; flex-direction: column; gap: 1rem; }
.contacto-data li { display: flex; align-items: center; gap: .9rem; }
.contacto-data svg { width: 22px; height: 22px; color: var(--secondary-green); }
.contacto-data a { color: var(--dark); text-decoration: none; font-weight: 500; }
.contacto-data a:hover { color: var(--primary-green); text-decoration: underline; }

.form {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.field label {
  font-family: var(--ff-title);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dark);
}
.field label span[aria-hidden] { color: var(--accent-yellow); }
.field .opt { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }

.field input, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  min-height: 52px;
  font: inherit;
  font-size: var(--step-0);
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: #C3C0B4; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--secondary-green);
  box-shadow: 0 0 0 3px rgba(30,122,70,.16);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #B23B22;
  box-shadow: 0 0 0 3px rgba(178,59,34,.14);
}
.error { margin: 0; font-size: .82rem; color: #9E3117; font-weight: 500; }

.form-status { margin: 0; font-size: var(--step--1); font-weight: 600; min-height: 1.2em; }
.form-status.is-ok { color: var(--secondary-green); }
.form-status.is-error { color: #9E3117; }
.form-note { margin: 0; font-size: .78rem; color: var(--muted); }

/* 17. Footer ------------------------------------------------ */
.site-footer { background: var(--primary-deep); color: rgba(255,255,255,.76); padding-top: clamp(3rem, 5vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.4rem; padding-bottom: 2.5rem; }
.footer-brand { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.footer-brand .brand-name b { color: var(--white); }
.footer-brand .brand-name b:last-child { color: var(--accent-yellow); }
.footer-brand p { color: rgba(255,255,255,.6); font-size: var(--step--1); max-width: 22rem; }

.site-footer h2 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  margin-bottom: 1rem;
}
.site-footer ul { display: flex; flex-direction: column; gap: .6rem; }
.site-footer a { color: rgba(255,255,255,.76); text-decoration: none; font-size: var(--step--1); }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

.footer-social ul { flex-direction: row; gap: .7rem; }
.footer-social a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 3px;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.footer-social a:hover { background: rgba(255,255,255,.12); border-color: var(--accent-yellow); }
.footer-social svg { width: 20px; height: 20px; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  justify-content: space-between;
  padding-block: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .8rem;
}
.footer-bottom p { margin: 0; }

/* 18. Modal, lightbox y WhatsApp ---------------------------- */
.modal, .lightbox { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; }
.modal[hidden], .lightbox[hidden] { display: none; }

.modal-backdrop { position: absolute; inset: 0; background: rgba(11,32,20,.62); backdrop-filter: blur(3px); }

.modal-panel {
  position: relative;
  width: min(100% - 2rem, 620px);
  max-height: min(86svh, 760px);
  overflow-y: auto;
  padding: clamp(1.8rem, 4vw, 3rem);
  background: var(--white);
  border-radius: var(--radius);
  border-top: 5px solid var(--accent-yellow);
  box-shadow: var(--shadow-m);
  animation: modalIn .28s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.modal-close, .lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.modal-close:hover { background: var(--line); }
.modal-close svg, .lightbox-close svg { width: 20px; height: 20px; }

.modal-num {
  font-family: var(--ff-title);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--accent-yellow);
}
.modal-title { margin: .4rem 0 1.4rem; font-size: var(--step-2); text-transform: uppercase; }

.lightbox { background: rgba(11,32,20,.94); padding: 1.5rem; }
.lightbox figure { margin: 0; max-width: min(100%, 1100px); }
.lightbox img { width: 100%; max-height: 78svh; object-fit: contain; border-radius: var(--radius); }
.lightbox figcaption {
  margin-top: 1rem; text-align: center;
  color: rgba(255,255,255,.85);
  font-family: var(--ff-title);
  font-size: .84rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lightbox-close { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: var(--white); top: 1.5rem; right: 1.5rem; }
.lightbox-close:hover { background: rgba(255,255,255,.26); }

.wa-float {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 120;
  display: grid; place-items: center;
  width: 58px; height: 58px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,.45);
  transition: transform .22s var(--ease);
}
.wa-float svg { width: 30px; height: 30px; stroke-width: 1.4; }
.wa-float:hover { transform: scale(1.07); }

body.no-scroll { overflow: hidden; }

/* 19. Animaciones ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

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

/* 20. Responsive -------------------------------------------- */
@media (max-width: 900px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 84px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.2rem 1.25rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-m);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility .35s var(--ease);
    max-height: calc(100svh - 84px);
    overflow-y: auto;
  }
  .nav-open .nav { transform: none; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a {
    color: var(--dark);
    display: block;
    padding: 1rem .3rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-list a::after { display: none; }
  .nav-cta { margin-top: 1.2rem; width: 100%; }
  .nav-open .site-header { background: var(--white); border-bottom-color: transparent; }
  .nav-open .brand { color: var(--dark); }
  .nav-open .brand-name b:last-child { color: var(--secondary-green); }
}

@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat { border-bottom: 0; border-right: 1px solid rgba(255,255,255,.14); }
  .stat:last-child { border-right: 0; }
  .prop-grid { grid-template-columns: repeat(2, 1fr); }
  .obras-grid { grid-template-columns: repeat(2, 1fr); }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .riesgos-cards { grid-template-columns: repeat(2, 1fr); }
  .verde-metas { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 901px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .intro-grid { grid-template-columns: .85fr 1.15fr; }
  .tray-grid { grid-template-columns: .8fr 1.2fr; }
  .verde-grid { grid-template-columns: 1.1fr .9fr; }
  .contacto-grid { grid-template-columns: .9fr 1.1fr; }
  .prop-grid { grid-template-columns: repeat(3, 1fr); }
  .obras-grid { grid-template-columns: repeat(3, 1fr); }
  .posts { grid-template-columns: repeat(3, 1fr); }
  .riesgos-cards { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr .8fr; }

  .cayma-mosaic {
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.2rem;
  }
  .cayma-a { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; min-height: 480px; }
  .cayma-b { grid-column: 2 / span 2; grid-row: 1; aspect-ratio: 21 / 9; }
  .cayma-c { grid-column: 2; grid-row: 2; aspect-ratio: 1 / 1; }
}

@media (min-width: 1400px) {
  .hero-grid { gap: 5rem; }
}
