/* Aaqua, Ayudar a Quien Ayuda. Reversion 2026.
   Direccion: el logo es un dibujo a mano de figuras de palitos.
   El sitio le hace eco a eso: menos tarjeta-con-sombra, mas trazo,
   numeros grandes a mano y composicion que cambia de seccion a seccion. */

@font-face {
  font-family: 'Onest';
  src: url('../assets/fonts/onest-variable.woff2') format('woff2-variations'),
       url('../assets/fonts/onest-variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Caveat';
  src: url('../assets/fonts/caveat-variable.woff2') format('woff2-variations'),
       url('../assets/fonts/caveat-variable.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b4c7c;
  --navy-dark: #082f4d;
  /* Fondos que deben verse siempre oscuros (footer, banner, etiqueta sobre foto),
     sin invertir en modo oscuro como si hacen --navy y --navy-dark cuando se usan como texto. */
  --navy-surface: #0b4c7c;
  --navy-surface-dark: #082f4d;
  --navy-soft: #e7eef4;
  --green: #1a8f3c;
  --red: #c22f28;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --ink: #191714;
  --ink-soft: #524c44;
  --ink-faint: #85796d;
  --line: rgba(25, 23, 20, 0.16);
  --line-strong: rgba(25, 23, 20, 0.7);
  --radius: 6px;
  --radius-sm: 4px;
  --sketch: 4px 4px 0 0 var(--line-strong);
  --sketch-navy: 4px 4px 0 0 var(--navy-surface-dark);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;
  --nav-h: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #5aa3da;
    --navy-dark: #bcdcf7;
    --navy-soft: #16283a;
    --green: #3fbf68;
    --red: #e2695f;
    --paper: #14181b;
    --surface: #1c2226;
    --ink: #f1ede4;
    --ink-soft: #c8c1b5;
    --ink-faint: #8f887c;
    --line: rgba(255, 255, 255, 0.16);
    --line-strong: rgba(255, 255, 255, 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }

h2.section-title {
  font-size: clamp(1.7rem, 1.35rem + 1.5vw, 2.5rem);
  max-width: 24ch;
}

p { margin: 0; color: var(--ink-soft); }
.lede { font-size: 1.1rem; max-width: 62ch; }

/* Trazo a mano: numeros y palabras de enfasis, nunca texto corrido */
.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  line-height: 1;
}

/* Garabato horizontal, motivo recurrente del logo dibujado a mano */
.squiggle { display: block; height: 14px; }
.squiggle path { fill: none; stroke-width: 3.5; stroke-linecap: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.4em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--sketch);
}
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy-surface-dark); box-shadow: var(--sketch-navy); }
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--navy-surface-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--line-strong); }
.btn-on-navy { background: #fff; color: var(--navy-surface-dark); border-color: #fff; box-shadow: 4px 4px 0 0 rgba(255,255,255,0.35); }
.btn-on-navy:hover { transform: translate(-1px, -1px); }

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 2px solid var(--ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; color: var(--navy-dark); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 0.94rem; color: var(--ink-soft); position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--navy); border-radius: 2px;
}

.nav-dropdown { position: relative; }
.nav-dropdown > button {
  background: none; border: none; font: inherit; font-weight: 500; font-size: 0.94rem; color: var(--ink-soft);
  display: flex; align-items: center; gap: 5px; cursor: pointer; padding: 6px 0;
}
.nav-dropdown > button:hover { color: var(--navy); }
.nav-dropdown svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.nav-dropdown[data-open="true"] svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(-6px);
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: var(--sketch); padding: 8px; min-width: 200px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-dropdown[data-open="true"] .nav-dropdown-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-dropdown-menu a {
  display: block; padding: 9px 12px; border-radius: 3px; font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); text-decoration: none;
}
.nav-dropdown-menu a:hover { background: var(--navy-soft); color: var(--navy); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; color: var(--navy-dark); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-primary { display: none; }
}

.mobile-cta { margin-bottom: 8px; }

.mobile-panel {
  position: fixed; inset: var(--nav-h) 0 0 0; background: var(--paper); z-index: 55;
  padding: 20px 24px 40px; display: none; overflow-y: auto;
}
.mobile-panel[data-open="true"] { display: block; }
.mobile-panel a { display: block; padding: 14px 4px; font-size: 1.1rem; font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-panel .mobile-sub { padding-left: 14px; }
.mobile-panel .mobile-sub a { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); border-bottom: none; padding: 10px 4px; }

/* ---------- Hero ---------- */
.hero { padding: 44px 0 clamp(48px, 8vw, 88px); }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 64px); align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
}
.hero h1 {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.3rem);
  color: var(--navy-dark);
}
/* Staggered Text (reactbits.dev), reimplementado en CSS puro: cada palabra
   entra con blur + desplazamiento desde arriba, en cascada de 80ms. */
@keyframes stagger-in {
  from { opacity: 0; transform: translateY(-0.28em); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.stagger-word {
  display: inline-block;
  animation: stagger-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.stagger-text .stagger-word:nth-child(1) { animation-delay: 0ms; }
.stagger-text .stagger-word:nth-child(2) { animation-delay: 160ms; }
.stagger-text .stagger-word:nth-child(3) { animation-delay: 320ms; }
.stagger-text .stagger-word:nth-child(4) { animation-delay: 480ms; }
@media (prefers-reduced-motion: reduce) {
  .stagger-word { animation: none; opacity: 1; filter: none; transform: none; }
}

.hero h1 .accent { position: relative; color: var(--green); font-style: normal; }
.hero h1 .accent svg { position: absolute; left: 0; bottom: -0.14em; width: 100%; height: 10px; }
.hero-quote {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  color: var(--ink);
  max-width: 22ch;
  line-height: 1.15;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--sketch-navy); border: 2px solid var(--navy-surface-dark); aspect-ratio: 4 / 5; transform: rotate(-1deg); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media-tag {
  position: absolute; left: 16px; bottom: 16px; background: color-mix(in srgb, var(--navy-surface-dark) 88%, transparent);
  color: #fff; padding: 9px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; backdrop-filter: blur(6px);
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { order: -1; aspect-ratio: 16 / 10; transform: none; }
}

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-alt { background: var(--surface); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

/* Quienes somos: asymmetric split, foto ligeramente inclinada */
.split { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.reverse { grid-template-columns: 1.08fr 0.92fr; }
.split.reverse .split-media { order: 2; }
.split-media { border-radius: var(--radius); overflow: hidden; border: 2px solid var(--ink); box-shadow: var(--sketch); transform: rotate(0.8deg); }
.split.reverse .split-media { transform: rotate(-0.8deg); }
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.split-copy { display: flex; flex-direction: column; gap: 16px; }
.split-copy p + p { margin-top: -4px; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .split-media, .split.reverse .split-media { transform: none; }
}

/* Donamos / Recibimos: bloque estadistica + narrativa, sin tarjetas */
.stat-block { display: grid; grid-template-columns: 0.55fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
.stat-block + .stat-block { margin-top: clamp(40px, 6vw, 64px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px dashed var(--line-strong); }
.stat-num { font-family: var(--font-hand); font-weight: 700; font-size: clamp(4rem, 3rem + 5vw, 7rem); line-height: 0.85; color: var(--navy); }
.stat-copy h3 { font-size: 1.4rem; color: var(--navy-dark); margin-bottom: 10px; }
@media (max-width: 720px) { .stat-block { grid-template-columns: 1fr; } .stat-num { font-size: 4.5rem; } }

/* Comedores: lista tipografica separada por un trazo, no cajas */
.centers-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem); font-weight: 600; }
.centers-list li { display: flex; align-items: center; }
.centers-list li:not(:last-child)::after {
  content: ""; display: inline-block; width: 34px; height: 10px; margin: 0 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 10'%3E%3Cpath d='M1 5 Q 6 1, 11 5 T 21 5 T 31 5' fill='none' stroke='%23c22f28' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .centers-list { flex-direction: column; align-items: flex-start; gap: 14px; }
  .centers-list li:not(:last-child)::after { display: none; }
}

/* Cómo donar: lista conectada con numeros grandes a mano, sin tarjetas */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 84px 1fr; gap: 20px; align-items: start;
  padding: clamp(20px, 3vw, 32px) 0; border-top: 1px dashed var(--line-strong);
}
.steps .step:last-child { border-bottom: 1px dashed var(--line-strong); }
.step-num { font-family: var(--font-hand); font-weight: 700; font-size: 3.6rem; line-height: 0.8; color: var(--red); }
.step h3 { font-size: 1.2rem; color: var(--ink); margin-bottom: 8px; }
.step-detail { font-size: 0.92rem; margin-top: 10px; color: var(--navy-dark); font-weight: 600; }
@media (max-width: 560px) { .step { grid-template-columns: 56px 1fr; } .step-num { font-size: 2.6rem; } }

/* Campañas timeline */
.campaigns { display: flex; flex-direction: column; }
.campaign-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.campaign-row:last-child { border-bottom: 1px solid var(--line); }
.campaign-row h3 { font-size: 1.15rem; color: var(--navy-dark); }
.campaign-date { font-family: var(--font-hand); font-weight: 600; font-size: 1.3rem; color: var(--ink-faint); }

/* Empresas que ayudan: texto que fluye, no grilla de celdas */
.logo-flow { font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem); font-weight: 600; color: var(--ink-soft); line-height: 2; }
.logo-flow span { color: var(--navy-dark); }
.sep { color: var(--red); margin: 0 0.5em; font-family: var(--font-hand); font-size: 1.2em; font-style: normal; }

/* CTA banner */
.cta-banner {
  background: var(--navy-surface-dark);
  border: 2px solid var(--ink);
  border-radius: var(--radius); padding: clamp(36px, 6vw, 64px); color: #fff;
  display: grid; grid-template-columns: 1.3fr auto; gap: 28px; align-items: center;
  box-shadow: var(--sketch);
}
.cta-banner h2 { color: #fff; font-family: var(--font-hand); font-weight: 700; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); }
.cta-banner p { color: rgba(255,255,255,0.82); margin-top: 10px; max-width: 52ch; }
@media (max-width: 760px) { .cta-banner { grid-template-columns: 1fr; text-align: left; } }

/* Contacto: lista de definicion tipografica, sin tarjetas */
.contact-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.contact-list > div, .contact-list > a { padding-top: 16px; border-top: 2px solid var(--ink); text-decoration: none; display: block; }
.contact-list .label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 8px; }
.contact-list a .value, .contact-list .value { font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.contact-list a:hover .value { color: var(--navy); }
@media (max-width: 640px) { .contact-list { grid-template-columns: 1fr; } }

/* Directorio (ayudas.html): parrafo que fluye en vez de nube de pastillas */
.directory-group { margin-bottom: 48px; }
.directory-group h3 { font-size: 1.2rem; color: var(--navy-dark); margin-bottom: 6px; }
.directory-group .directory-note { max-width: 60ch; margin-bottom: 18px; }
.flow-text { font-size: 1.02rem; line-height: 2; color: var(--ink-soft); }
.flow-text .hi { color: var(--navy-dark); font-weight: 700; }
.directory-featured { font-family: var(--font-hand); font-weight: 600; font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem); color: var(--navy-dark); line-height: 1.9; margin-bottom: 10px; }
.flow-text { word-spacing: 0.05em; }

/* Footer */
.site-footer { background: var(--navy-surface-dark); color: rgba(255,255,255,0.86); padding: 64px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand img { height: 42px; }
.footer-brand p { color: rgba(255,255,255,0.68); max-width: 34ch; font-size: 0.92rem; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 16px; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,0.86); text-decoration: none; font-size: 0.94rem; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 24px; flex-wrap: wrap; }
.footer-bottom p { color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.24);
  display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, border-color 0.2s ease;
}
.social-row a:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); }
.social-row svg { width: 16px; height: 16px; color: #fff; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; align-items: flex-start; } }

/* Page hero (subpages) */
.page-hero { padding: 48px 0 8px; }
.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.8rem); color: var(--navy-dark); max-width: 20ch; }
.page-hero .lede { margin-top: 14px; }

/* Lista con marca de trazo en vez de icono en caja */
.hand-list { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.hand-list li { display: flex; gap: 14px; align-items: flex-start; }
.hand-list .mark { font-family: var(--font-hand); font-weight: 700; font-size: 1.6rem; color: var(--green); line-height: 1.1; flex-shrink: 0; }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2.5px solid var(--navy); outline-offset: 2px; }
