/* 50 años de abundancia — Compassion El Salvador
   Paleta y reglas: CI Visual Identity Guidelines 2024.

   FUENTES DE MARCA: si tienes licencia web de Neighbour Sans y Quincy CF,
   sube los .woff2 a assets/fonts/ con estos nombres y quita el comentario
   del bloque siguiente. Mientras tanto se usan Figtree y Fraunces.

@font-face { font-family: "Neighbour Sans"; src: url("../fonts/NeighbourSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neighbour Sans"; src: url("../fonts/NeighbourSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Neighbour Sans"; src: url("../fonts/NeighbourSans-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Quincy CF"; src: url("../fonts/QuincyCF-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
*/

@font-face { font-family: "Figtree"; src: url("../fonts/figtree-var.woff2") format("woff2-variations"), url("../fonts/figtree-var.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-var.woff2") format("woff2-variations"), url("../fonts/fraunces-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --blue: #2a5eec;        /* Nana's Pool Blue */
  --blue-low: #1d42a5;    /* School Uniform */
  --night: #11265e;       /* Night Time */
  --rainy: #6a8ef2;
  --mist: #aabff7;
  --torch: #fdb518;
  --madeline: #ffd257;
  --wheat: #fff2ad;
  --gecko: #499e57;
  --chalk: #235339;
  --pistachio: #c2e189;
  --cotton: #ee828d;
  --lipstick: #a50f25;
  --cricket: #fb513a;
  --log: #914a22;
  --choco: #6c3813;
  --ink: #121a1a;
  --slate: #494f61;
  --wolf: #7c8399;
  --fence: #d2d5df;
  --snow: #eae4df;
  --meringue: #f7f0eb;
  --egg: #fcf8f4;

  --sans: "Neighbour Sans", "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Quincy CF", "Fraunces", Georgia, serif;
  --pad: clamp(24px, 5vw, 64px);
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--egg); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--blue-low); }
a:hover { color: var(--night); }
:focus-visible { outline: 3px solid var(--torch); outline-offset: 3px; }
input, textarea, select, button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--torch); color: var(--night); padding: 10px 16px; border-radius: 8px; font-weight: 800; }
.skip:focus { top: 12px; }

/* Hilo de marca: vertical, a la izquierda */
.thread { position: fixed; left: 0; top: 0; bottom: 0; width: 12px; z-index: 40; pointer-events: none;
  background: linear-gradient(var(--blue) 0 16%, var(--torch) 16% 38%, var(--gecko) 38% 58%, var(--cotton) 58% 78%, var(--rainy) 78% 100%); }
.thread i { position: absolute; left: 0; top: 0; width: 100%; background: rgba(17, 38, 94, .35); height: 0; }
@media (max-width: 640px) { .thread { width: 7px; } }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: calc(var(--pad) + 6px); padding-right: var(--pad); }
section { scroll-margin-top: 16px; }

/* Tipografía */
.eyebrow { margin: 0; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.display { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.04; letter-spacing: -.01em; }
.h1 { font-size: clamp(50px, 7.4vw, 104px); line-height: .98; letter-spacing: -.02em; }
.h2 { font-size: clamp(34px, 3.8vw, 52px); }
.h3 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; }
.lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; margin: 0; }
.muted { color: var(--slate); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); }
.split > * { flex: 1 1 400px; min-width: 0; }
.section { padding-top: clamp(64px, 8vw, 112px); padding-bottom: clamp(64px, 8vw, 112px); }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.head-row > div { max-width: 740px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 24px; border-radius: 999px; border: 2px solid transparent; font-weight: 800; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sun { background: var(--torch); color: var(--night); }
.btn-sun:hover { background: var(--madeline); color: var(--night); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-low); color: #fff; }
.btn-night { background: var(--night); color: #fff; }
.btn-night:hover { background: var(--blue-low); color: #fff; }
.btn-green { background: var(--chalk); color: #fff; }
.btn-green:hover { background: #1a3f2b; color: #fff; }
.btn-line-white { border-color: #fff; color: #fff; background: transparent; }
.btn-line-white:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-line { border-color: currentColor; color: var(--night); background: #fff; }
.btn-sm { min-height: 44px; padding: 9px 18px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.link-strong { font-weight: 800; padding: 10px 0; display: inline-block; }

/* Chips (botones con aria-pressed) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--c, var(--night)); background: #fff; color: var(--c, var(--night)); font-weight: 700; font-size: 16px; cursor: pointer; }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--c, var(--night)); color: #fff; }
.chip.square { border-radius: 8px; min-width: 76px; }

/* Encabezado */
.site-header { background: var(--blue); color: #fff; }
.site-header.night { background: var(--night); }
.site-header.green { background: var(--chalk); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; }
.brand img { width: 168px; height: auto; display: block; }
.brand span { border-left: 1.5px solid rgba(255, 255, 255, .5); padding-left: 16px; line-height: 1.15; font-weight: 800; font-size: 16px; }
.brand span small { display: block; font-weight: 500; font-size: 13px; opacity: .9; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-weight: 600; font-size: 16px; }
.menu a { color: #fff; text-decoration: none; padding: 10px 0; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--wheat); text-decoration: underline; text-underline-offset: 6px; }
.menu .btn { padding: 11px 20px; min-height: 44px; text-decoration: none; color: var(--night); }
.menu-toggle { display: none; background: transparent; border: 2px solid #fff; color: #fff; border-radius: 999px; min-height: 44px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .menu { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0 4px; border-top: 1px solid rgba(255, 255, 255, .3); }
  .menu.open { display: flex; }
  .menu a { width: 100%; padding: 12px 0; }
  .menu .btn { width: auto; margin-top: 8px; }
  .brand img { width: 128px; }
  .brand span { display: none; }
}

/* Portada */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: clamp(32px, 6vw, 88px); padding-bottom: clamp(56px, 8vw, 112px); }
.hero-text { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-blocks { flex: 1 1 340px; max-width: 460px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hero-blocks > div { aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.hero-blocks .big { grid-column: span 2; grid-row: span 2; background: var(--egg); }
.hero-blocks .big b { font-family: var(--serif); font-size: clamp(90px, 10vw, 150px); color: var(--blue); line-height: 1; font-weight: 800; }
.hero-blocks .wide { grid-column: span 2; aspect-ratio: 2; align-items: flex-end; justify-content: flex-start; padding: 14px; font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.15; }
.hero-blocks img { width: 46%; height: 46%; }
@media (max-width: 640px) { .hero-blocks { max-width: 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-blocks > div { animation: pop .6s cubic-bezier(.2, .8, .2, 1) both; }
  .hero-blocks > div:nth-child(2) { animation-delay: .08s } .hero-blocks > div:nth-child(3) { animation-delay: .16s }
  .hero-blocks > div:nth-child(4) { animation-delay: .24s } .hero-blocks > div:nth-child(5) { animation-delay: .32s }
  .hero-blocks > div:nth-child(6) { animation-delay: .4s } .hero-blocks > div:nth-child(7) { animation-delay: .48s }
  .hero-blocks > div:nth-child(8) { animation-delay: .56s }
}
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

.player { display: flex; align-items: center; gap: 14px; background: transparent; border: 0; color: #fff; padding: 4px 0; cursor: pointer; text-align: left; align-self: flex-start; }
.player .disc { width: 54px; height: 54px; flex: none; border-radius: 999px; background: var(--night); display: flex; align-items: center; justify-content: center; }
.player strong { display: block; }
.player small { font-size: 15px; opacity: .92; }
.player[disabled] { cursor: default; opacity: .9; }

/* Cifras */
.stats { background: var(--night); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; padding-top: 36px; padding-bottom: 36px; }
.stat b { display: block; font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 700; }
.stat span { display: block; margin-top: 6px; font-size: 15px; color: var(--fence); }
.stat.live b { color: var(--torch); }

/* Tarjetas */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--snow); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
a.card { text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(17, 38, 94, .1); color: var(--ink); }
.card .kicker { font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.card .title { font-family: var(--serif); font-size: 25px; font-weight: 700; color: var(--night); line-height: 1.15; }
.card p { margin: 0; font-size: 16px; color: var(--slate); }
.card svg { flex: none; }

blockquote.verse { margin: 8px 0 0; padding: 22px 26px; background: var(--meringue); border-radius: 10px; }
blockquote.verse p { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.3; color: var(--night); }
blockquote.verse cite { display: block; margin-top: 8px; font-size: 15px; font-style: normal; color: var(--slate); }

/* Línea del tiempo (portada) */
.tl-panel { display: flex; flex-wrap: wrap; gap: 32px; background: #fff; border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); }
.tl-panel .yr { flex: 1 1 240px; min-width: 0; }
.tl-panel .yr b { display: block; font-family: var(--serif); font-size: clamp(56px, 6vw, 84px); font-weight: 800; color: var(--blue); line-height: 1; }
.tl-panel .txt { flex: 2 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tl-panel ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Sostén */
.dark { background: var(--night); color: #fff; }
.dark .muted { color: var(--fence); }
.tile { background: var(--blue-low); border-radius: 10px; padding: 22px; }
.tile b { color: var(--wheat); }
.tile p { margin: 8px 0 0; font-size: 16px; }

/* Testimonios */
.tcard { background: #fff; border: 1px solid var(--snow); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tcard::before { content: ""; height: 8px; background: var(--c, var(--blue)); }
.tcard .in { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tcard .who { display: flex; gap: 14px; align-items: center; }
.tcard .who img, .tcard .who .ph { width: 56px; height: 56px; border-radius: 999px; object-fit: cover; flex: none; }
.tcard .who .ph { background: var(--meringue); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--night); }
.tcard .who strong { display: block; line-height: 1.25; }
.tcard .who span { font-size: 15px; color: var(--slate); }
.tcard q { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--night); quotes: "“" "”"; }
.tcard .where { margin: 0; font-size: 14px; color: var(--slate); }
.empty-note { padding: 24px; background: var(--wheat); border-radius: 10px; font-weight: 600; margin: 0; }

/* CDI */
.blue { background: var(--blue); color: #fff; }
.blue .card { border: 0; }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--blue-low); border-radius: var(--radius); padding: 24px 28px; }
.band p { margin: 0; font-weight: 700; max-width: 680px; }

/* Formularios */
.form { background: #fff; border: 1px solid var(--snow); border-radius: 14px; padding: clamp(24px, 3.2vw, 40px); display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 16px; }
.field small { font-weight: 400; color: var(--slate); }
.field input, .field textarea, .field select { min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--wolf); border-radius: 8px; font-weight: 400; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.fields { display: flex; flex-wrap: wrap; gap: 16px; }
.fields > .field { flex: 1 1 240px; min-width: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 16px; padding: 0 0 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--slate); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; padding: 12px 14px; border-radius: 8px; font-weight: 700; display: none; }
.status.ok { display: block; background: var(--pistachio); color: var(--chalk); }
.status.err { display: block; background: #fdf0f2; color: var(--lipstick); }
.drop { border: 2px dashed var(--rainy); border-radius: 12px; padding: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: #f3f6fe; }
.drop.green { border-color: var(--gecko); background: #f4f9ee; }
.drop input[type=file] { font-size: 15px; max-width: 100%; }
.counter { font-size: 14px; color: var(--slate); font-weight: 400; text-align: right; }

/* Muro */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.note { background: var(--bg, #e8eefd); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.note .rel { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--night); }
.note .msg { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.42; color: var(--ink); white-space: pre-line; }
.note .by { margin: 0; font-size: 15px; color: var(--slate); }
.note .by b { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .note.new { animation: pop .5s ease both; } }

/* Celebración */
.sun { background: var(--wheat); }

/* Historia: línea vertical */
.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: clamp(14px, 3vw, 36px); }
.tl-item .y { flex: none; width: clamp(70px, 10vw, 120px); text-align: right; padding-top: 18px; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); font-weight: 800; color: var(--blue); line-height: 1.05; }
.tl-item .rail { flex: none; display: flex; flex-direction: column; align-items: center; }
.tl-item .dot { width: 20px; height: 20px; border-radius: 999px; background: var(--c); border: 4px solid var(--egg); box-shadow: 0 0 0 2px var(--c); margin-top: 22px; }
.tl-item .line { flex: 1; width: 3px; background: var(--fence); }
.tl-item .box { flex: 1 1 auto; min-width: 0; padding: 12px 0 28px; }
.tl-item .box .card { gap: 8px; }
.tl-item .tag { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.tl-item .ask { margin: 4px 0 0; padding: 10px 14px; background: var(--wheat); border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--choco); }
.tl-item .ask a { color: var(--choco); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery .card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.gallery .card video, .gallery .card audio { width: 100%; }

/* Alumni: pasos */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.steps li { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 700; color: var(--slate); }
.steps li::before { content: ""; height: 6px; border-radius: 999px; background: var(--snow); }
.steps li.done::before, .steps li.on::before { background: var(--chalk); }
.steps li.on { color: var(--chalk); }
@media (max-width: 560px) { .steps li span { display: none; } }
.step[hidden] { display: none; }
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.perks div { border-radius: 10px; padding: 18px; }
.perks b { display: block; }
.perks span { font-size: 15px; }
.nav-steps { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--snow); }

/* Pie */
.site-footer { background: var(--ink); color: var(--fence); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 36px; padding-top: 56px; padding-bottom: 56px; }
.site-footer img { width: 170px; height: auto; display: block; }
.site-footer a { color: var(--fence); }
.site-footer a:hover { color: #fff; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 44px; }
.site-footer .cols div { display: flex; flex-direction: column; gap: 6px; }
.site-footer .cols b { color: #fff; }
.site-footer .legal { width: 100%; border-top: 1px solid #2b3434; padding-top: 20px; font-size: 13px; color: var(--wolf); }

/* Texto legal */
.prose { max-width: 780px; }
.prose h2 { font-family: var(--serif); color: var(--night); font-size: 28px; margin: 36px 0 8px; }
.prose p, .prose li { color: #2b3133; }
