/* =====================================================================
   Fundación Intégrate México A.C. — Hoja de estilos principal
   Estructura:
   1.  Variables (paleta de marca, tipografías, espaciados)
   2.  Reset y base
   3.  Utilidades y layout (container, grids)
   4.  Confetti decorativo
   5.  Fotos con duotono de marca
   6.  Botones
   7.  Header / navegación
   8.  Footer
   9.  Hero
   10. Secciones y encabezados
   11. Componentes (stats, tarjetas, pilares, ODS, pasos, aliados, etc.)
   12. Páginas específicas (donaciones, contacto)
   13. Animaciones (reveal) y accesibilidad
   14. Responsive
   ===================================================================== */

/* 1. VARIABLES ======================================================= */
:root {
  /* Colores de marca (muestreados del logo y la presentación) */
  --navy:        #30306c;
  --navy-700:    #262656;
  --navy-900:    #1c1c44;
  --magenta:     #e40084;
  --magenta-600: #c4006f;
  --verde:       #3cb43c;
  --verde-claro: #84cc90;
  --amarillo:    #f0c024;
  --coral:       #f4a79a;

  --bg:          #faf8f5;   /* fondo general cálido */
  --bg-gris:     #f0f0f0;   /* secciones alternas */
  --surface:     #ffffff;
  --texto:       #2a2a3c;
  --texto-suave: #5a5a6e;
  --linea:       #e6e3df;

  /* Tipografías */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Medidas */
  --container: 1180px;
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  /* Sombras */
  --shadow-sm: 0 4px 14px rgba(48, 48, 108, .08);
  --shadow:    0 14px 40px rgba(48, 48, 108, .12);
  --shadow-lg: 0 26px 60px rgba(48, 48, 108, .18);

  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 2. RESET Y BASE ==================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--texto);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--magenta); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--magenta-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  color: var(--navy);
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
strong { color: var(--navy); font-weight: 600; }
/* En fondos oscuros el texto en negrita debe ir claro (si no, queda invisible) */
.section--navy strong, .page-hero strong, .cta-band strong, .site-footer strong { color: #fff; }

::selection { background: var(--magenta); color: #fff; }

/* 3. UTILIDADES Y LAYOUT ============================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
}
.container--narrow { max-width: 820px; }

.section { position: relative; padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--gris { background: var(--bg-gris); }
.section--navy { background: var(--navy); color: #eceaf5; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.grid { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.lead { font-size: 1.18rem; color: var(--texto-suave); }
.muted { color: var(--texto-suave); }

/* 4. CONFETTI DECORATIVO ============================================ */
/* Formas que evocan la presentación. Decorativas: aria-hidden + no clics. */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.confetti > * { position: absolute; opacity: .9; }
.dot   { border-radius: 50%; }
.ring  { border-radius: 50%; background: transparent; }
.c-navy     { background: var(--navy); }
.c-magenta  { background: var(--magenta); }
.c-verde    { background: var(--verde); }
.c-amarillo { background: var(--amarillo); }
.c-coral    { background: var(--coral); }
.ring.c-navy     { border: 6px solid var(--navy); }
.ring.c-magenta  { border: 6px solid var(--magenta); }
.ring.c-verde    { border: 6px solid var(--verde); }
.ring.c-amarillo { border: 6px solid var(--amarillo); }
.half { border-radius: 100px 100px 0 0; }
/* contenido por encima del confetti */
.section > .container { position: relative; z-index: 1; }

/* 5. FOTOS CON DUOTONO ============================================== */
.media { position: relative; overflow: hidden; border-radius: var(--radius); isolation: isolate; }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Duotono de marca: la foto en grises se tiñe con un color de marca (multiply),
   manteniéndose perfectamente visible — el mismo estilo de la presentación. */
.duotone { position: relative; overflow: hidden; isolation: isolate; background: #ece9f3; }
.duotone img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(1.06); }
.duotone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--tone, var(--navy)); mix-blend-mode: multiply; opacity: var(--tone-op, .55);
}

.duotone--navy    { --tone: #30306c; --tone-op: .58; }
.duotone--magenta { --tone: #e40084; --tone-op: .5; }
.duotone--mixto   { --tone: #b3006b; --tone-op: .5; }
.duotone--amarillo{ --tone: #f0a800; --tone-op: .5; }
.duotone--verde   { --tone: #2e9e3c; --tone-op: .5; }

/* 6. BOTONES ======================================================== */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  line-height: 1; text-align: center;
  padding: .92em 1.7em; border-radius: 100px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--magenta); color: #fff; box-shadow: 0 10px 24px rgba(228, 0, 132, .32); }
.btn--primary:hover { background: var(--magenta-600); color: #fff; box-shadow: 0 14px 30px rgba(228, 0, 132, .4); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #fff; color: var(--magenta); }
.btn--lg { font-size: 1.08rem; padding: 1.05em 2.1em; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* 7. HEADER / NAVEGACIÓN ============================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--linea);
  transition: box-shadow .25s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.nav__logo { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.nav__logo img { height: 44px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-block; color: var(--navy); font-weight: 500; font-size: .97rem;
  padding: .5rem .8rem; border-radius: 100px; transition: background .2s, color .2s;
}
.nav__link:hover { background: var(--bg-gris); color: var(--navy); }
.nav__link.is-active { color: var(--magenta); }
.nav__cta { margin-left: .4rem; }
.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer; border-radius: 10px;
}
.nav__toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 3px; transition: .3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 8. FOOTER ========================================================= */
.site-footer { background: var(--navy-900); color: #c9c7e0; padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; position: relative; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.2rem; }
.footer__logo img { height: 88px; width: auto; margin-bottom: 1rem; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1rem; }
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: .55rem; }
.footer__list a { color: #c9c7e0; }
.footer__list a:hover { color: #fff; }
.footer__contact a { color: #c9c7e0; }
.footer__contact a:hover { color: var(--coral); }
.footer__social { display: flex; gap: .7rem; margin-top: 1rem; }
.footer__social a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s, transform .2s;
}
.footer__social a:hover { background: var(--magenta); transform: translateY(-2px); }
.footer__social svg { width: 20px; height: 20px; fill: currentColor; }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: space-between; font-size: .88rem; color: #9b99bb; }

/* 9. HERO =========================================================== */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #fff 0%, var(--bg) 60%, #f3ecf6 100%); }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(3rem, 7vw, 5.5rem); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--magenta);
  background: #ffe6f3; padding: .45rem 1rem; border-radius: 100px; margin-bottom: 1.2rem;
}
.hero h1 { margin-bottom: .5rem; }
.hero h1 .accent { color: var(--magenta); }
.hero__text { font-size: 1.18rem; color: var(--texto-suave); max-width: 34ch; margin-bottom: 1.8rem; }
.hero__media { position: relative; }
.hero__media .duotone { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 4.4; }
.hero__badge {
  position: absolute; bottom: -22px; left: -22px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.3rem; display: flex; align-items: center; gap: .8rem; z-index: 2;
}
.hero__badge .num { font-family: var(--font-display); font-size: 2rem; color: var(--magenta); font-weight: 600; line-height: 1; }
.hero__badge .lbl { font-size: .85rem; color: var(--texto-suave); line-height: 1.2; max-width: 14ch; }

/* 10. SECCIONES Y ENCABEZADOS ====================================== */
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .82rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--magenta); margin-bottom: .8rem;
}
.section--navy .eyebrow { color: var(--coral); }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--texto-suave); font-size: 1.1rem; margin-bottom: 0; }
.section--navy .section-head p { color: #c9c7e0; }

/* 11. COMPONENTES ================================================== */
/* --- Stats / contadores --- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat { text-align: center; padding: 1.4rem 1rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); border-top: 4px solid var(--magenta); }
.stat:nth-child(2) { border-top-color: var(--verde); }
.stat:nth-child(3) { border-top-color: var(--amarillo); }
.stat:nth-child(4) { border-top-color: var(--navy); }
.stat:nth-child(5) { border-top-color: var(--coral); }
.stat__num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 600; color: var(--navy); line-height: 1; }
.stat__num .plus { color: var(--magenta); }
.stat__label { margin-top: .5rem; font-size: .95rem; color: var(--texto-suave); }
.section--navy .stat { background: rgba(255,255,255,.06); box-shadow: none; }
.section--navy .stat__num { color: #fff; }
.section--navy .stat__label { color: #c9c7e0; }

/* --- Tarjetas genéricas --- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.8rem; transition: transform .25s var(--ease), box-shadow .25s var(--ease); height: 100%; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1rem; background: #ffe6f3; color: var(--magenta); }
.card__icon svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card--verde .card__icon { background: #e4f6e6; color: var(--verde); }
.card--amarillo .card__icon { background: #fdf2cf; color: #b8860b; }
.card--navy .card__icon { background: #e6e6f5; color: var(--navy); }

/* --- Tarjeta de programa con foto --- */
.programa { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); display: flex; flex-direction: column; height: 100%; }
.programa:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.programa .media { border-radius: 0; aspect-ratio: 16 / 10; }
.programa__body { padding: 1.6rem; flex: 1; display: flex; flex-direction: column; }
.programa__tag { display: inline-block; align-self: flex-start; font-size: .76rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--magenta); background: #ffe6f3; padding: .3rem .7rem; border-radius: 100px; margin-bottom: .7rem; }
.programa__body p:last-child { margin-bottom: 0; }

/* --- Bloque misión/visión --- */
.mv-card { background: var(--surface); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); border-left: 6px solid var(--magenta); }
.mv-card.vis_ion, .mv-card--verde { border-left-color: var(--verde); }
.mv-card h3 { display: flex; align-items: center; gap: .6rem; }

/* --- Valores --- */
.valor { display: flex; gap: 1rem; align-items: flex-start; }
.valor__dot { flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%; margin-top: .5rem; background: var(--magenta); }
.valor:nth-child(2n) .valor__dot { background: var(--verde); }
.valor:nth-child(3n) .valor__dot { background: var(--amarillo); }
.valor h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.valor p { margin-bottom: 0; font-size: .98rem; }

/* --- Pasos de metodología --- */
.steps { counter-reset: step; display: grid; gap: 1.1rem; }
.step { display: flex; gap: 1.2rem; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: var(--shadow-sm); }
.step__num { counter-increment: step; flex-shrink: 0; width: 50px; height: 50px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; display: grid; place-items: center; }
.step:nth-child(2) .step__num { background: var(--magenta); }
.step:nth-child(3) .step__num { background: var(--verde); }
.step:nth-child(4) .step__num { background: var(--amarillo); color: var(--navy); }
.step:nth-child(5) .step__num { background: var(--coral); }
.step h3 { margin-bottom: .25rem; font-size: 1.2rem; }
.step p { margin-bottom: 0; font-size: .98rem; color: var(--texto-suave); }

/* --- Pilares (chips) --- */
.pilares { display: flex; flex-wrap: wrap; gap: .9rem; }
.pilar { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 2px solid var(--linea); border-radius: 100px; padding: .7rem 1.3rem; font-weight: 600; color: var(--navy); }
.pilar .b { width: 12px; height: 12px; border-radius: 50%; background: var(--magenta); }
.pilar:nth-child(2) .b { background: var(--verde); }
.pilar:nth-child(3) .b { background: var(--amarillo); }
.pilar:nth-child(4) .b { background: var(--navy); }
.pilar:nth-child(5) .b { background: var(--coral); }

/* --- ODS / lista con check --- */
.checklist { list-style: none; padding: 0; display: grid; gap: .8rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; }
.checklist svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 3px; color: var(--verde); }
.section--navy .checklist svg { color: var(--verde-claro); }

/* --- Muro de aliados (tarjetas blancas uniformes) --- */
.aliados { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: stretch; }
.aliados img {
  height: 104px; width: 100%; object-fit: contain;
  background: #fff; border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.aliados img:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* --- Bloque texto + imagen (split) --- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 4rem); }
.split--reverse .split__media { order: -1; }
.split__media .duotone, .split__media .media { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 5 / 4; }
.split h2 { margin-bottom: 1rem; }

/* --- CTA banda --- */
.cta-band { background: linear-gradient(120deg, var(--magenta) 0%, #a3006a 100%); color: #fff; border-radius: var(--radius-lg); padding: clamp(2.2rem, 5vw, 3.5rem); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 50ch; margin-inline: auto; }

/* 12. PÁGINAS ESPECÍFICAS ========================================== */
/* --- Sub-hero de páginas internas --- */
.page-hero { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--navy) 0%, var(--navy-900) 100%); color: #fff; padding-block: clamp(3rem, 7vw, 5rem); }
.page-hero h1 { color: #fff; }
.page-hero p { color: #d6d4ec; font-size: 1.15rem; max-width: 60ch; margin-bottom: 0; }
.breadcrumb { font-size: .9rem; color: #b9b7d8; margin-bottom: 1rem; }
.breadcrumb a { color: #b9b7d8; }
.breadcrumb a:hover { color: #fff; }

/* --- Donaciones --- */
.donate-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.donorbox-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }
.donorbox-placeholder {
  border: 2px dashed var(--magenta); border-radius: var(--radius-sm); background: #fff6fb;
  padding: 2.5rem 1.5rem; text-align: center; color: var(--texto-suave);
}
.donorbox-placeholder .ico { font-size: 2.5rem; }
.impact-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.impact-list li { display: flex; gap: 1rem; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); }
.impact-list .amount { font-family: var(--font-display); font-weight: 600; color: var(--magenta); font-size: 1.3rem; flex-shrink: 0; min-width: 80px; }

/* --- Contacto --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-info { display: grid; gap: 1.3rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item .ic { flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: #ffe6f3; color: var(--magenta); display: grid; place-items: center; }
.contact-item .ic svg { width: 24px; height: 24px; }
.contact-item h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.contact-item p, .contact-item a { margin: 0; color: var(--texto-suave); }
.contact-item a:hover { color: var(--magenta); }

.form { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.2rem); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; color: var(--navy); margin-bottom: .4rem; }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--texto);
  padding: .8rem 1rem; border: 2px solid var(--linea); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(228,0,132,.12); }
.field textarea { resize: vertical; min-height: 130px; }
.form__note { font-size: .85rem; color: var(--texto-suave); }

.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); line-height: 0; }
.map-embed iframe { width: 100%; height: 320px; border: 0; }

/* Aviso / callouts */
.note { border-left: 4px solid var(--amarillo); background: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.3rem; box-shadow: var(--shadow-sm); }

/* 13. ANIMACIONES Y ACCESIBILIDAD ================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 0; z-index: 200; }
.skip-link:focus { left: 0; color: #fff; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

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

/* 14. RESPONSIVE =================================================== */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { max-width: 460px; margin-inline: auto; }
  .hero__text { max-width: none; }
  .split, .donate-grid, .contact-grid { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .aliados { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--linea);
    padding: .6rem 1.1rem 1.2rem; box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .35s var(--ease);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav__menu.is-open { transform: translateY(0); }
  .nav__link { padding: .85rem 1rem; border-radius: 12px; font-size: 1.05rem; }
  .nav__cta { margin: .6rem 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  /* En móvil el texto es grande y el espacio es justo: ocultamos el confetti
     de los encabezados para que nunca se encime con los títulos. */
  .hero .confetti, .page-hero .confetti { display: none; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__badge { left: 50%; transform: translateX(-50%); bottom: -28px; }
  .aliados { grid-template-columns: repeat(2, 1fr); }
  body { font-size: 1rem; }
}
