/* ============ FUNDACIÓN ACCIÓN SOLIDARIA — Brand Aligned Design System ============ */

:root {
  /* Paleta oficial — extraída del logo Acción Solidaria */
  --coral:        #E63558;
  --coral-dark:   #C8284C;
  --coral-light:  #FF5A6E;
  --purple:       #8B6FE6;
  --purple-dark:  #6E51C5;
  --teal:         #2ABFA5;
  --teal-dark:    #1F9C86;
  --yellow:       #F8C534;
  --yellow-dark:  #D9A91D;
  --green:        #5BBA47;
  --green-dark:   #3F9B2D;

  --ink:          #2D2D2D;
  --ink-soft:     #4A4A4A;
  --ink-mute:     #717171;
  --ink-light:    #A8A8A8;
  --rule:         #ECECEC;

  --bg:           #FFFFFF;
  --bg-soft:      #FAFAF7;
  --bg-warm:      #FFF8EE;
  --bg-tint:      #F4F1FF;

  --display:      "Poppins", -apple-system, system-ui, sans-serif;
  --sans:         "Inter", -apple-system, system-ui, sans-serif;
  --mono:         "JetBrains Mono", ui-monospace, monospace;

  --maxw:         1320px;
  --gutter:       clamp(20px, 4vw, 56px);
  --ease:         cubic-bezier(.2,.7,.2,1);

  /* Compatibilidad con clases legacy */
  --green-900: var(--ink); --green-800: var(--ink-soft); --green-700: var(--ink-soft);
  --green-600: var(--ink-mute); --green-50: var(--bg-soft);
  --terra-700: var(--coral-dark); --terra-600: var(--coral); --terra-500: var(--coral-light);
  --gold-600: var(--yellow-dark); --gold-500: var(--yellow);
  --gold-300: #FCE8A0; --gold-100: #FFF6D6;
  --cream-50: var(--bg); --cream-100: var(--bg-soft); --cream-200: var(--bg-warm);
  --ink-900: var(--ink); --ink-700: var(--ink-soft); --ink-500: var(--ink-mute); --ink-300: var(--ink-light);
  --serif: var(--display);
}

html[data-theme="terracotta"] { --coral: #FF6B47; --coral-dark: #E04A2A; --coral-light: #FF8569; }
html[data-theme="moss"] { --coral: #5BBA47; --coral-dark: #3F9B2D; --coral-light: #7DCC6B; }
html[data-serif="fraunces"]  { --display: "Poppins", sans-serif; }
html[data-serif="lora"]      { --display: "Nunito", sans-serif; }
html[data-serif="playfair"]  { --display: "Plus Jakarta Sans", sans-serif; }
html[data-serif="dmserif"]   { --display: "Poppins", sans-serif; }

html[data-anim="off"] *, html[data-anim="off"] *::before, html[data-anim="off"] *::after {
  transition: none !important; animation: none !important;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--yellow); color: var(--ink); }

.eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--coral);
}
.eyebrow-light { color: var(--yellow); }

h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.02em;
  margin: 0; color: var(--ink); text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 80px); line-height: 1.05; font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 56px); line-height: 1.1; font-weight: 700; }
h3 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; font-weight: 600; }
h4 { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.3; font-weight: 600; }

h1 em, h2 em, h3 em { font-style: normal; color: var(--coral); font-weight: inherit; }
h1 em.alt-1, h2 em.alt-1 { color: var(--purple); }
h1 em.alt-2, h2 em.alt-2 { color: var(--teal); }
h1 em.alt-3, h2 em.alt-3 { color: var(--yellow-dark); }

p { margin: 0; text-wrap: pretty; }

.lead {
  font-family: var(--sans); font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55; color: var(--ink-soft); font-weight: 400;
}
.body-lg { font-size: 19px; line-height: 1.65; color: var(--ink-soft); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  letter-spacing: 0.005em; border: 2px solid transparent;
  cursor: pointer; transition: all .25s var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 18px -8px rgba(230,53,88,.55); }
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(230,53,88,.6); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-lg { padding: 18px 32px; font-size: 16px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--coral);
  cursor: pointer; border-bottom: 2px solid currentColor; padding-bottom: 4px;
  transition: gap .25s var(--ease);
}
.arrow-link:hover { gap: 14px; }
.arrow-link svg { transition: transform .25s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

.nav {
  position: sticky; top: 0; z-index: 50; background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--rule); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; }
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 700; font-size: 17px;
  color: var(--ink); letter-spacing: -0.01em; line-height: 1.05;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .mono {
  display: grid; place-items: center;
  width: 48px; height: 48px; flex-shrink: 0;
  background: transparent; border-radius: 0;
}
.nav-logo .mono svg { width: 100%; height: 100%; }
.nav-logo small {
  display: block; font-family: var(--sans); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; margin-top: 2px;
}

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-soft); position: relative; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: -8px; left: 0; right: 0;
  height: 3px; background: var(--coral); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; font-family: var(--sans); font-size: 12px; font-weight: 600; }
.lang-toggle button { background: transparent; border: none; color: var(--ink-mute); padding: 7px 14px; cursor: pointer; transition: all .2s; }
.lang-toggle button.active { background: var(--ink); color: #fff; }

.menu-toggle { display: none; background: transparent; border: none; color: var(--ink); font-size: 24px; cursor: pointer; }

.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 10vw, 120px); background: var(--bg); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.hero-text { max-width: 720px; }
.hero h1 { margin-top: 24px; }
.hero-art { position: relative; aspect-ratio: 4 / 5; max-width: 520px; margin-left: auto; }

.photo-frame {
  position: relative; width: 100%; height: 100%;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, var(--purple), var(--teal));
}
.photo-frame::after {
  content: "FOTO DOCUMENTAL · PLACEHOLDER"; position: absolute;
  bottom: 16px; left: 16px; background: rgba(255,255,255,.92);
  color: var(--ink); padding: 6px 12px; border-radius: 4px;
  font-size: 10px; font-family: var(--mono); letter-spacing: 0.1em; font-weight: 600;
}
.photo-frame .photo-shapes { position: absolute; inset: 0; display: grid; place-items: center; }
.photo-frame .photo-shapes::before, .photo-frame .photo-shapes::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.18);
}
.photo-frame .photo-shapes::before { width: 50%; height: 30%; top: 25%; }
.photo-frame .photo-shapes::after { width: 60%; height: 35%; bottom: 0; border-radius: 50% 50% 0 0; }

.hero-badge {
  position: absolute; top: -16px; left: -16px;
  background: var(--coral); color: #fff;
  padding: 8px 18px; border-radius: 999px;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; z-index: 2;
  box-shadow: 0 8px 20px -6px rgba(230,53,88,.4);
}

.hero-caption { margin-top: 16px; font-family: var(--sans); font-size: 13px; font-style: italic; color: var(--ink-mute); line-height: 1.5; }
.hero-cta-row { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-sublead { margin-top: 28px; font-family: var(--sans); font-size: 18px; line-height: 1.55; color: var(--ink-soft); font-weight: 400; max-width: 560px; }

.allies-strip { background: var(--bg-warm); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.allies-strip-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.allies-label { font-family: var(--sans); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--coral); white-space: nowrap; }
.allies-list { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 36px); align-items: center; font-family: var(--display); font-size: clamp(14px, 1.4vw, 18px); color: var(--ink-soft); font-weight: 600; }
.allies-list span:nth-child(2n) { font-style: italic; font-weight: 500; color: var(--ink); }

.dashboard { background: var(--ink); color: #fff; padding: clamp(64px, 10vw, 128px) 0; overflow: hidden; }
.dashboard h2 { color: #fff; }
.dashboard .eyebrow { color: var(--yellow); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px); margin-top: 48px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 48px; }
.metric { display: flex; flex-direction: column; gap: 8px; }
.metric-num { font-family: var(--display); font-size: clamp(48px, 6vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--yellow); }
.metric-label { font-family: var(--sans); font-size: 13px; color: rgba(255,255,255,.75); font-weight: 500; line-height: 1.4; }
.metric:nth-child(2) .metric-num { color: var(--coral-light); }
.metric:nth-child(3) .metric-num { color: var(--teal); }
.metric:nth-child(4) .metric-num { color: var(--purple); }

.big-stat { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; margin-top: clamp(48px, 6vw, 88px); }
.big-stat-num { font-family: var(--display); font-size: clamp(72px, 12vw, 168px); font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; color: var(--yellow); }
.big-stat-text { font-family: var(--sans); font-size: clamp(20px, 2vw, 28px); font-weight: 400; line-height: 1.35; color: rgba(255,255,255,.92); padding-bottom: 18px; max-width: 560px; }

.donate-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 12px 12px 12px 24px; border-radius: 999px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: 0 16px 48px -12px rgba(0,0,0,.35);
  z-index: 40; font-family: var(--sans); font-size: 14px; font-weight: 500;
}
.donate-bar-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; flex-shrink: 0; animation: pulse 2.5s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(91,186,71,.5); }
  50% { opacity: .6; box-shadow: 0 0 0 8px rgba(91,186,71,0); }
}

.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.story-photo { aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, var(--coral), var(--purple)); position: relative; }
.story-photo::after { content: "FOTO DOCUMENTAL · PLACEHOLDER"; position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.9); color: var(--ink); padding: 5px 12px; border-radius: 4px; font-size: 10px; font-family: var(--mono); letter-spacing: 0.08em; font-weight: 600; white-space: nowrap; }

.section-head { margin-bottom: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.section-head h2 { max-width: 12ch; }
.section-head .lead { padding-bottom: 6px; }
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; } }

.programs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.program-card { padding: clamp(28px, 3vw, 44px) clamp(20px, 2vw, 32px); border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); transition: background .25s var(--ease); position: relative; }
.program-card:hover { background: var(--bg-soft); }
.program-card:hover .program-num { transform: translateX(4px); }
.program-card:last-child { border-right: 0; }
.program-num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--coral); letter-spacing: 0.1em; margin-bottom: 16px; display: inline-block; transition: transform .25s var(--ease); }
.program-card:nth-child(6n+2) .program-num { color: var(--purple); }
.program-card:nth-child(6n+3) .program-num { color: var(--teal); }
.program-card:nth-child(6n+4) .program-num { color: var(--yellow-dark); }
.program-card:nth-child(6n+5) .program-num { color: var(--green); }
.program-card:nth-child(6n+6) .program-num { color: var(--coral-light); }
.program-card h3 { margin-bottom: 12px; }
.program-card p { color: var(--ink-soft); font-size: 15px; }

.donut-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.donut-svg { width: 100%; max-width: 360px; aspect-ratio: 1; margin: 0 auto; }
.donut-center { font-family: var(--display); font-weight: 800; text-anchor: middle; }
.donut-center-num { font-size: 44px; fill: var(--ink); }
.donut-center-label { font-size: 13px; fill: var(--ink-mute); font-weight: 500; letter-spacing: 0.1em; }

.donut-legend { display: flex; flex-direction: column; gap: 12px; }
.donut-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.donut-label { font-family: var(--sans); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.donut-label::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--coral); flex-shrink: 0; }
.donut-row:nth-child(2) .donut-label::before { background: var(--purple); }
.donut-row:nth-child(3) .donut-label::before { background: var(--teal); }
.donut-row:nth-child(4) .donut-label::before { background: var(--yellow); }
.donut-row:nth-child(5) .donut-label::before { background: var(--green); }
.donut-row:nth-child(6) .donut-label::before { background: var(--coral-light); }
.donut-amount { font-family: var(--display); font-weight: 700; color: var(--ink); }
.donut-pct { font-family: var(--mono); font-size: 13px; color: var(--ink-mute); min-width: 40px; text-align: right; }

.tiers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border-top: 2px solid var(--ink); margin-top: 32px; }
.tier { padding: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); border-top: 4px solid var(--coral); position: relative; }
.tier:nth-child(2) { border-top-color: var(--yellow); }
.tier:nth-child(3) { border-top-color: var(--teal); }
.tier:nth-child(4) { border-top-color: var(--purple); }
.tier:last-child { border-right: 0; }
.tier-num { font-family: var(--mono); font-size: 11px; font-style: italic; color: var(--ink-mute); margin-bottom: 24px; display: block; }
.tier-amount { font-family: var(--display); font-size: clamp(36px, 4vw, 56px); font-weight: 800; color: var(--coral); letter-spacing: -0.02em; line-height: 1; margin-bottom: 12px; }
.tier:nth-child(2) .tier-amount { color: var(--yellow-dark); }
.tier:nth-child(3) .tier-amount { color: var(--teal-dark); }
.tier:nth-child(4) .tier-amount { color: var(--purple-dark); }
.tier h4 { margin-bottom: 12px; font-size: 18px; }
.tier p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }

footer.site-footer, footer.footer { background: var(--ink); color: rgba(255,255,255,.78); padding: clamp(56px, 7vw, 96px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-bottom: 56px; }
.footer-grid h5, .footer-grid h4 { font-family: var(--sans); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: #fff; margin: 0 0 18px; }
.footer-grid ul, .footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-grid a, .footer-list a { color: rgba(255,255,255,.78); transition: color .2s; }
.footer-grid a:hover, .footer-list a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: rgba(255,255,255,.55); }

.transparency-table { width: 100%; border-collapse: collapse; margin-top: 32px; font-family: var(--sans); }
.transparency-table th { text-align: left; padding: 16px 12px; border-bottom: 2px solid var(--ink); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); }
.transparency-table td { padding: 16px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-soft); vertical-align: top; }
.transparency-table tbody tr:hover { background: var(--bg-soft); }
.transparency-table .num { font-family: var(--display); font-weight: 700; color: var(--coral); white-space: nowrap; }

.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .hero-grid, .story, .donut-wrap, .contacto-grid { grid-template-columns: 1fr; }
  .hero-art { margin: 0 auto; max-width: 380px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .big-stat { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: #fff;
    padding: 24px; border-top: 1px solid var(--rule); gap: 18px;
  }
  .donate-bar { left: 16px; right: 16px; transform: none; padding: 10px 10px 10px 18px; font-size: 13px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .program-card { border-right: 0; }
  .tiers-grid { grid-template-columns: 1fr 1fr; }
  .tier:nth-child(2n) { border-right: 0; }
}
