/* ======================================================================
   Traperos de Emaús San Felipe — Código Puro (HTML5 + CSS3 + Vanilla JS)
   Sin frameworks, sin build, sin runtime. Estilo AgencyOS (patrón Mariachi).
   Paleta: marrón Emaús (#4A2F1D), crema (#F9F1E7), dorado (#B98A4B).
   ====================================================================== */

/* -------- Tokens -------- */
:root {
  --brown: #4A2F1D;
  --brown-2: #5C3D26;
  --brown-deep: #33200F;
  --gold: #B98A4B;
  --gold-soft: #E3C79E;
  --ink: #2A1B11;
  --muted: #6E5745;
  --skin: #F9F1E7;
  --skin-2: #F2E5D4;
  --line: #E6D6C3;
  --white: #fff;
  --ok: #1F6B3B;
  --error: #A1261C;

  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Open Sans", ui-sans-serif, system-ui, sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;

  --shadow-sm: 0 1px 2px rgba(42, 27, 17, .06), 0 2px 8px rgba(42, 27, 17, .04);
  --shadow-md: 0 10px 30px -12px rgba(42, 27, 17, .25);
  --shadow-lg: 0 30px 60px -30px rgba(42, 27, 17, .35);

  --container: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
::selection { background: rgba(185, 138, 75, .3); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brown); color: #fff; padding: .75rem 1.25rem;
}
.skip:focus { left: 1rem; top: 1rem; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

/* -------- Tipografía -------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brown);
  letter-spacing: -.025em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(2rem, 3.6vw, 3.15rem); line-height: 1.06; font-weight: 800; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 700; }
h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* -------- Botones -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform .18s var(--ease), background-color .18s ease, color .18s ease,
              border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brown); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brown-2); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--brown); border-color: rgba(74, 47, 29, .22); }
.btn-ghost:hover { background: rgba(74, 47, 29, .06); border-color: rgba(74, 47, 29, .4); }
.btn-skin { background: var(--skin); color: var(--brown); }
.btn-skin:hover { background: #fff; }
.btn-outline { background: transparent; color: var(--brown); border-color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: #fff; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-sm { padding: .65rem 1.2rem; font-size: .85rem; }
.btn-block { width: 100%; }

.link-btn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--brown);
  text-decoration: underline; text-underline-offset: 3px; font-weight: 600; cursor: pointer;
}

/* -------- Eyebrow decorativo -------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-size: .74rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brown);
  margin-bottom: 1.1rem;
}
.eyebrow::after {
  content: ""; width: 26px; height: 1px; background: currentColor; opacity: .45;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.eyebrow-light { color: #F0DCC4; }

/* ======================================================================
   HEADER
   ====================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brown), var(--gold), var(--brown));
  opacity: .9;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(42, 27, 17, .35); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 76px; }
.brand { display: flex; align-items: center; }
.brand img { width: 158px; height: auto; }

.nav { display: flex; gap: 1.75rem; }
.nav a {
  position: relative; font-family: var(--font-display); font-size: .86rem; font-weight: 600;
  color: var(--brown); text-decoration: none; opacity: .78; padding: .35rem 0;
  transition: opacity .15s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .75rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; position: relative;
}
.nav-toggle-open, .nav-toggle-close {
  position: absolute; inset: 50% auto auto 50%; width: 22px; height: 2px;
  background: var(--brown); transition: transform .25s var(--ease), opacity .2s ease;
}
.nav-toggle-open { box-shadow: 0 -7px 0 var(--brown), 0 7px 0 var(--brown); transform: translate(-50%, -50%); }
.nav-toggle-close { transform: translate(-50%, -50%) rotate(45deg); opacity: 0; }
.nav-toggle-close::after {
  content: ""; position: absolute; inset: 0; background: var(--brown); transform: rotate(90deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-open { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { opacity: 1; }

.nav-panel {
  position: fixed; inset: 76px 0 auto 0; z-index: 55;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.75rem;
  display: none; flex-direction: column;
  transform: translateY(-12px); opacity: 0; visibility: hidden;
  transition: transform .28s var(--ease), opacity .2s ease, visibility .2s;
  max-height: calc(100dvh - 76px); overflow-y: auto;
  box-shadow: 0 30px 40px -30px rgba(42, 27, 17, .4);
}
.nav-panel.is-open { transform: none; opacity: 1; visibility: visible; }
.nav-panel nav { display: flex; flex-direction: column; }
.nav-panel a {
  text-decoration: none; font-family: var(--font-display); font-weight: 600;
  color: var(--brown); padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.nav-panel a.btn { margin-top: 1.1rem; border-bottom: 0; color: #fff; padding: 1rem 1.5rem; }
.nav-panel-foot { margin-top: 1rem; font-size: .8rem; color: var(--muted); text-align: center; }

/* ======================================================================
   HERO
   ====================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -12%, #F7E9D7 0%, transparent 62%),
    radial-gradient(700px 380px at -5% 105%, #F5E6D2 0%, transparent 60%),
    var(--skin);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero-copy h1 em { font-style: normal; color: #8A5B33; }
.lead { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin: 1.9rem 0 2.4rem; }

.hero-facts {
  display: flex; gap: 2.2rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(74, 47, 29, .14);
}
.hero-facts li { display: flex; flex-direction: column; gap: .1rem; }
.hero-facts strong {
  font-family: var(--font-display); font-size: 1.65rem; font-weight: 800;
  color: var(--brown); line-height: 1; position: relative; padding-bottom: .3rem;
}
.hero-facts strong::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 18px; height: 2px; background: var(--gold);
}
.hero-facts span { font-size: .78rem; color: var(--muted); line-height: 1.35; max-width: 8.5rem; }

.hero-media { position: relative; }
.hero-media > img {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.hero-frame {
  position: absolute; inset: 14px -14px -14px 14px; z-index: 0;
  border: 1.5px solid rgba(185, 138, 75, .55); border-radius: var(--r-xl);
}
.hero-note {
  position: absolute; z-index: 2; left: -1.25rem; bottom: -1.25rem;
  display: flex; gap: .85rem; align-items: center;
  background: #fff; border-radius: var(--r-md); padding: .9rem 1.15rem;
  box-shadow: var(--shadow-md); max-width: 17rem;
}
.hero-note p { font-size: .8rem; line-height: 1.4; color: var(--muted); }
.hero-note strong { color: var(--brown); font-family: var(--font-display); }
.hero-note-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  background: var(--skin-2); color: var(--brown); display: grid; place-items: center;
}
.hero-note-icon svg { width: 22px; height: 22px; }

.seal {
  position: absolute; z-index: 2; right: -1.5rem; top: -1.5rem;
  width: 92px; height: 92px; display: grid; place-items: center;
  color: var(--brown); background: var(--skin);
  border: 1px solid rgba(185, 138, 75, .5); border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.seal svg { width: 100%; height: 100%; animation: seal-spin 40s linear infinite; }
.seal text {
  font-family: var(--font-display); font-size: 8px; font-weight: 700;
  letter-spacing: .1em; fill: var(--brown);
}
.seal > span { position: absolute; font-size: 1rem; color: var(--gold); }
@keyframes seal-spin { to { transform: rotate(360deg); } }

/* -------- Trust -------- */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; flex-wrap: wrap; }
.trust p { font-family: var(--font-display); font-size: .82rem; font-weight: 700; color: var(--brown); }
.trust ul { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.trust li { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.trust li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* ======================================================================
   SECCIONES
   ====================================================================== */
.section { position: relative; padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-skin {
  background-color: var(--skin);
  background-image: radial-gradient(rgba(74, 47, 29, .055) 1px, transparent 1px);
  background-size: 22px 22px;
}
.section-dark { background: var(--brown); color: #F6EBDD; }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::after { display: none; }
.section-sub { color: var(--muted); margin-top: .9rem; }
.section-head.center .section-sub { margin-inline: auto; max-width: 34rem; }

/* -------- Cards -------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.5rem 1.4rem;
  transition: transform .28s var(--ease), box-shadow .28s ease, border-color .28s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brown), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #D9C4AC; }
.card:hover::before { transform: scaleX(1); }
.card-ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--skin); color: var(--brown); margin-bottom: 1.1rem;
  transition: background-color .25s ease, color .25s ease, transform .25s var(--ease);
}
.card:hover .card-ico { background: var(--brown); color: #fff; transform: rotate(-4deg); }
.card-ico svg { width: 23px; height: 23px; }
.card h3 { margin-bottom: .35rem; }
.card p { font-size: .86rem; color: var(--muted); }
.cards-foot { margin-top: 1.6rem; font-size: .9rem; color: var(--muted); }

/* -------- Cómo funciona -------- */
.steps-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.lead-light { color: rgba(249, 241, 231, .78); }
.steps { display: grid; gap: 1.5rem; margin: 2.2rem 0; }
.steps li { display: flex; gap: 1.1rem; }
.step-n {
  font-family: var(--font-display); font-weight: 800; font-size: .82rem;
  color: #F0DCC4; border: 1px solid rgba(249, 241, 231, .28);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  transition: background-color .25s ease, color .25s ease;
}
.steps li:hover .step-n { background: var(--gold-soft); color: var(--brown-deep); border-color: transparent; }
.steps h3 { margin-bottom: .25rem; }
.steps p { font-size: .9rem; color: rgba(249, 241, 231, .72); }
.steps-media { position: relative; }
.steps-media img { position: relative; z-index: 1; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-xl); }
.steps-media::after {
  content: ""; position: absolute; z-index: 0; inset: auto -12px -12px 12px; height: 60%;
  border: 1.5px solid rgba(249, 241, 231, .22); border-radius: var(--r-xl);
}
.steps-media figcaption {
  position: absolute; left: 1rem; top: 1rem;
  background: rgba(255, 255, 255, .94); color: var(--brown);
  font-family: var(--font-display); font-weight: 700; font-size: .82rem;
  padding: .55rem .95rem; border-radius: 999px;
}

/* -------- Donar -------- */
.donate-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.contact-list { display: grid; gap: 1.1rem; margin: 2rem 0 1.5rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.c-ico {
  width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--brown);
  display: grid; place-items: center; flex: 0 0 auto; box-shadow: var(--shadow-sm);
  transition: background-color .2s ease, color .2s ease;
}
.contact-list li:hover .c-ico { background: var(--brown); color: #fff; }
.c-ico svg { width: 20px; height: 20px; }
.contact-list span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--muted); margin-bottom: .1rem; }
.contact-list a, .contact-list p { font-family: var(--font-display); font-weight: 700; color: var(--brown); text-decoration: none; font-size: .95rem; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

.socials { display: flex; gap: .5rem; flex-wrap: wrap; }
.socials a {
  font-family: var(--font-display); font-size: .78rem; font-weight: 700;
  padding: .45rem .85rem; border-radius: 999px; border: 1px solid rgba(74, 47, 29, .2);
  text-decoration: none; color: var(--brown);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.socials a:hover { background: var(--brown); color: #fff; border-color: var(--brown); }

.form-card {
  position: relative; background: #fff; border-radius: var(--r-xl);
  padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: var(--shadow-lg);
}
.form-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: linear-gradient(90deg, var(--brown), var(--gold), var(--brown));
}
.form-card h3 { font-size: 1.5rem; margin-bottom: .35rem; }
.form-sub { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field { margin-bottom: .9rem; }
.field label, .consent label {
  display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brown); margin-bottom: .35rem;
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--skin); border: 1.5px solid transparent; border-radius: var(--r-sm);
  padding: .8rem .9rem;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #9A8471; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--brown); box-shadow: 0 0 0 3px rgba(74, 47, 29, .1);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--error); background: #FFF7F6; }

.phone { display: flex; align-items: center; background: var(--skin); border: 1.5px solid transparent; border-radius: var(--r-sm); overflow: hidden; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.phone:focus-within { background: #fff; border-color: var(--brown); box-shadow: 0 0 0 3px rgba(74, 47, 29, .1); }
.phone span { padding: 0 .1rem 0 .9rem; font-size: .92rem; font-weight: 700; color: var(--brown); }
.phone input { background: transparent; border: 0; box-shadow: none; padding-left: .45rem; }
.phone input:focus { background: transparent; box-shadow: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: .6rem; align-items: flex-start; margin: .35rem 0 1.1rem; }
.consent input { margin-top: .28rem; width: 17px; height: 17px; accent-color: var(--brown); flex: 0 0 auto; }
.consent label { margin: 0; text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 500; color: var(--muted); line-height: 1.5; }

.form-error, .form-ok { font-size: .85rem; border-radius: var(--r-sm); padding: .7rem .9rem; margin: 0 0 .9rem; }
.form-error { background: #FDF0EE; color: var(--error); border: 1px solid #F3C9C3; }
.form-ok { background: #EFF8F1; color: var(--ok); border: 1px solid #BDE3C7; }
.form-ok a { color: inherit; font-weight: 600; text-decoration: underline; }
.form-foot { font-size: .72rem; color: var(--muted); margin: .9rem 0 0; text-align: center; }

/* -------- Nosotros -------- */
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-media { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.about-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); transition: transform .5s var(--ease); }
.about-media img:hover { transform: scale(1.015); }
.about-media .a1 { grid-row: span 2; aspect-ratio: 3 / 4.4; }
.about-media .a2 { aspect-ratio: 1 / 1; }
.about-media .a3 { aspect-ratio: 1 / 1.05; }
.about-badge {
  grid-column: 1 / -1; justify-self: start;
  background: var(--brown); color: #fff; border-radius: var(--r-md);
  padding: .85rem 1.15rem; display: inline-flex; align-items: center; gap: .7rem;
  box-shadow: var(--shadow-md);
}
.about-badge strong { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.about-badge span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; line-height: 1.3; opacity: .85; }

.about-copy h2 span { color: #A9825A; }
.about-copy blockquote {
  position: relative; margin: 1.4rem 0; padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--gold);
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--brown);
}
.about-copy blockquote::before {
  content: "“"; position: absolute; left: .55rem; top: -1.35rem;
  font-size: 2.6rem; line-height: 1; color: var(--gold); opacity: .3;
}
.about-copy > p { color: var(--muted); font-size: .95rem; }
.pillars { display: grid; gap: .55rem; margin: 1.4rem 0; }
.pillars li { display: flex; gap: .6rem; font-size: .9rem; }
.pillars span { color: var(--ok); font-weight: 800; }
.mission { background: var(--skin); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; }
.mission h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: .5rem; }
.mission p { font-size: .9rem; color: var(--muted); }

/* -------- Galería -------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.gallery li {
  position: relative; overflow: hidden; border-radius: var(--r-md);
  background: var(--skin-2);
}
.gallery li.is-featured { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s var(--ease); }
.gallery li.is-featured img { aspect-ratio: 1 / 1; }
.gallery li::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(42, 27, 17, .55), transparent 55%);
  opacity: 0; transition: opacity .3s ease;
}
.gallery li span {
  position: absolute; left: .9rem; bottom: .8rem; z-index: 1;
  font-family: var(--font-display); font-size: .74rem; font-weight: 700;
  color: #fff; letter-spacing: .04em;
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s ease, transform .3s var(--ease);
}
.gallery li:hover img { transform: scale(1.05); }
.gallery li:hover::after, .gallery li:hover span { opacity: 1; }
.gallery li:hover span { transform: none; }
.gallery-actions { display: flex; justify-content: center; margin-top: 2rem; }

/* -------- FAQ -------- */
.faq-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary {
  font-family: var(--font-display); font-weight: 700; color: var(--brown); font-size: 1rem;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: 0 0 auto;
  background:
    linear-gradient(var(--brown), var(--brown)) center/12px 2px no-repeat,
    linear-gradient(var(--brown), var(--brown)) center/2px 12px no-repeat;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after {
  background: linear-gradient(var(--brown), var(--brown)) center/12px 2px no-repeat;
  transform: rotate(180deg);
}
.faq details p { margin-top: .7rem; font-size: .92rem; color: var(--muted); }

/* -------- CTA final -------- */
.final-cta {
  position: relative; overflow: hidden;
  background: var(--brown); color: #F6EBDD;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}
.final-cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(249, 241, 231, .12) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5;
}
.final-cta::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.final-inner { position: relative; z-index: 1; text-align: center; max-width: 46rem; }
.final-inner h2 { color: #fff; }
.final-inner p { color: rgba(249, 241, 231, .78); margin: 1rem auto 2rem; max-width: 36rem; }
.final-inner .hero-actions { justify-content: center; margin: 0; }

/* -------- Footer -------- */
.site-footer { position: relative; background: #fff; padding: 3.5rem 0 1.5rem; }
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.footer-inner { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 2.5rem; }
.footer-brand img { width: 180px; margin-bottom: 1rem; }
.footer-brand p { font-size: .85rem; color: var(--muted); max-width: 24rem; overflow-wrap: anywhere; }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav h4, .footer-contact h4 { color: var(--brown); margin-bottom: .4rem; }
.footer-nav a, .footer-contact a { font-size: .86rem; color: var(--muted); text-decoration: none; transition: color .15s ease; overflow-wrap: anywhere; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }
.footer-contact p { font-size: .86rem; color: var(--muted); margin: .2rem 0 .6rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.25rem;
}
.footer-bottom p { font-size: .74rem; color: #8C7767; }

/* -------- FAB + barra móvil -------- */
.fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: var(--brown); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 28px -10px rgba(42, 27, 17, .6);
  transition: transform .2s var(--ease), background-color .2s ease;
}
.fab:hover { transform: scale(1.06); background: var(--brown-2); }
.fab svg { width: 28px; height: 28px; }

.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; gap: .6rem; padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -20px rgba(42, 27, 17, .5);
  transform: translateY(110%); visibility: hidden;
  transition: transform .3s var(--ease), visibility .3s;
}
.mobile-bar.is-visible { transform: none; visibility: visible; }
.mobile-bar .btn { flex: 1; padding: .8rem 1rem; font-size: .9rem; }
.mobile-bar .btn-ghost { background: #fff; }

/* -------- Modal -------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(42, 27, 17, .55); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; background: #fff; width: min(100%, 460px); max-height: 92dvh; overflow-y: auto;
  border-radius: var(--r-lg); padding: 1.75rem; box-shadow: var(--shadow-lg);
  animation: modal-in .22s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-x {
  position: absolute; top: .8rem; right: .9rem; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--skin); color: var(--brown); font-size: 1.3rem; line-height: 1;
}
.modal-head img { width: 128px; margin-bottom: .9rem; }
.modal-head h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.modal-head p { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }

/* ======================================================================
   RESPONSIVE
   ====================================================================== */
@media (max-width: 1024px) {
  .nav { display: none; }
  .header-actions .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-panel { display: flex; }
  .hero-grid, .steps-grid, .donate-grid, .about-grid, .faq-grid { grid-template-columns: 1fr; }
  .hero-media { margin-top: 1rem; }
  .hero-frame { inset: 12px -12px -12px 12px; }
  .seal { right: .75rem; top: -1.75rem; width: 78px; height: 78px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about-media { max-width: 540px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .steps-media { max-width: 460px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery li.is-featured { grid-column: span 2; grid-row: span 2; }
  body { padding-bottom: 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 78px; }
  .container { width: min(100% - 1.75rem, var(--container)); }
  .header-inner { height: 68px; }
  .brand img { width: 122px; }
  .nav-panel { inset: 68px 0 auto 0; max-height: calc(100dvh - 68px); }

  h1 { font-size: clamp(2.15rem, 9vw, 2.9rem); }
  h2 { font-size: clamp(1.85rem, 7.4vw, 2.4rem); }

  .hero { padding: 2rem 0 2.5rem; }
  .hero-actions { margin: 1.5rem 0 1.8rem; }
  .hero-actions .btn { width: 100%; }
  .hero-facts { gap: 1rem; flex-wrap: wrap; }
  .hero-facts li { flex: 1 1 30%; }
  .hero-facts strong { font-size: 1.45rem; }
  .hero-facts span { font-size: .72rem; }
  .hero-media > img { aspect-ratio: 16 / 11; border-radius: var(--r-lg); }
  .hero-frame { display: none; }
  .hero-note {
    position: relative; left: auto; bottom: auto; margin: -1.25rem auto 0;
    width: calc(100% - 1.5rem); max-width: none;
  }
  .seal { display: none; }

  .trust-inner { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .trust ul { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; width: 100%; align-items: start; }

  .section { padding: 2.9rem 0; }
  .section-head { margin-bottom: 1.8rem; }
  .cards { grid-template-columns: 1fr; gap: .75rem; }
  .card { padding: 1.2rem 1.1rem; }
  .card-ico { width: 40px; height: 40px; margin-bottom: .8rem; }

  .steps-media { max-width: none; }
  .steps-media::after { display: none; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field input, .field select, .field textarea, .phone input { font-size: 16px; }

  .gallery { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .gallery li.is-featured { grid-column: span 2; grid-row: auto; }
  .gallery li.is-featured img { aspect-ratio: 16 / 10; }
  .gallery li span { opacity: 1; transform: none; }
  .gallery li::after { opacity: .55; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .final-inner .hero-actions .btn { width: 100%; }

  .mobile-bar { display: flex; }
  .fab { display: none; }
  .modal-card { border-radius: var(--r-md); padding: 1.35rem; }
}

@media (max-width: 380px) {
  .hero-facts li { flex: 1 1 100%; }
  .gallery { grid-template-columns: 1fr; }
  .gallery li.is-featured { grid-column: auto; }
}

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