/* =============================================================================
   RENACER · RED COMUNITARIA — Landing
   Mobile-first. Paleta e identidad según manual de marca.
   ============================================================================= */

/* ---------- Tokens de diseño ---------------------------------------------- */
:root {
    --navy:   #155E75;
    --teal:   #0E9FAD;
    --teal-d: #0b8592;
    --light:  #67C8D4;
    --amber:  #F4B942;
    --amber-d:#e0a72e;
    --bg:     #F7F8F5;
    --ink:    #263238;
    --muted:  #5b6b70;
    --white:  #ffffff;
    --border: #e2e8ea;

    --radius:   10px;
    --radius-lg:16px;
    --shadow:   0 2px 10px rgba(21, 94, 117, .06);
    --shadow-md:0 8px 28px rgba(21, 94, 117, .10);

    --container: 1200px;
    --font: 'Montserrat', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
}

/* ---------- Reset acotado ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; color: var(--navy); font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--light); outline-offset: 2px; border-radius: 4px; }

/* ---------- Utilidades ---------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }
.text-center { text-align: center; }
.teal { color: var(--teal); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Botones ------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font); font-weight: 700; font-size: 14px; letter-spacing: .3px;
    text-transform: uppercase; text-decoration: none; cursor: pointer;
    padding: 13px 24px; border-radius: var(--radius); border: 2px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--teal   { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-d); }
.btn--amber  { background: var(--amber); color: var(--navy); }
.btn--amber:hover { background: var(--amber-d); }
.btn--ghost  { background: transparent; color: var(--navy); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn--block { width: 100%; }

/* ---------- Header / navegación ------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--white); border-bottom: 1px solid var(--border);
}
.nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 12px 20px; max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 46px; height: 46px; flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-weight: 800; font-size: 20px; color: var(--navy); letter-spacing: .5px; }
.brand__sub  { font-weight: 700; font-size: 10px; color: var(--teal); letter-spacing: 2px; }
.brand__loc  { font-weight: 600; font-size: 8px; color: var(--muted); letter-spacing: 1px; margin-top: 2px; }

.nav__links { display: none; }
.nav__cta { display: none; }
.nav__toggle {
    display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
    width: 44px; height: 44px; padding: 10px; background: none; border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer;
}
.nav__toggle span { height: 2px; background: var(--navy); border-radius: 2px; transition: .2s; }

.nav__mobile {
    display: none; flex-direction: column; gap: 4px; padding: 10px 20px 18px;
    border-top: 1px solid var(--border); background: var(--white);
}
.nav__mobile.is-open { display: flex; }
.nav__mobile a { padding: 10px 8px; color: var(--navy); font-weight: 600; border-radius: 8px; }
.nav__mobile a:hover { background: var(--bg); text-decoration: none; }
.nav__mobile .btn { margin-top: 8px; }

/* ---------- Hero ---------------------------------------------------------- */
.hero { background: linear-gradient(180deg, #eef7f8 0%, var(--bg) 100%); overflow: hidden; }
.hero__grid { display: grid; gap: 28px; padding: 40px 0 44px; }
.hero__title { font-size: 34px; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.hero__title span { color: var(--teal); display: block; }
.hero__lead { font-size: 17px; color: var(--muted); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 24px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 18px 26px; }
.hero__badge { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.hero__badge svg { width: 20px; height: 20px; color: var(--teal); flex: 0 0 auto; }
.hero__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* ---------- Qué es -------------------------------------------------------- */
.about__grid { display: grid; gap: 28px; }
.about__lead p { color: var(--muted); }
.about__cards { display: grid; gap: 16px; }
.mini-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 26px 22px; text-align: center; box-shadow: var(--shadow);
}
.mini-card svg { width: 40px; height: 40px; color: var(--teal); margin: 0 auto 14px; }
.mini-card h3 { font-size: 17px; margin-bottom: 8px; }
.mini-card p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Campaña activa ------------------------------------------------ */
.campaign {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); overflow: hidden;
}
.campaign__grid { display: grid; gap: 0; }
.campaign__main { padding: 30px 26px; }
.campaign__tag {
    display: inline-block; background: var(--teal); color: #fff; font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.campaign__title { font-size: 26px; margin-bottom: 6px; }
.campaign__sub { color: var(--muted); font-weight: 600; margin-bottom: 20px; }
.campaign__items { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.campaign__item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 72px; text-align: center; }
.campaign__item .ico {
    width: 58px; height: 58px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.campaign__item .ico svg { width: 26px; height: 26px; color: var(--teal); }
.campaign__item span { font-size: 12px; color: var(--muted); font-weight: 600; }
.campaign__aside { background: #f2f8fa; padding: 26px; display: grid; gap: 18px; align-content: start; }
.campaign__info { display: flex; gap: 12px; }
.campaign__info svg { width: 22px; height: 22px; color: var(--teal); flex: 0 0 auto; margin-top: 2px; }
.campaign__info strong { display: block; color: var(--navy); font-size: 14px; }
.campaign__info span { font-size: 13px; color: var(--muted); }

/* ---------- Pilares ------------------------------------------------------- */
.pillars__grid { display: grid; gap: 26px; }
.pillar { text-align: center; }
.pillar svg { width: 46px; height: 46px; color: var(--teal); margin: 0 auto 12px; }
.pillar h3 { font-size: 17px; margin-bottom: 8px; }
.pillar p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Acciones / campañas (cards) ----------------------------------- */
.actions__grid { display: grid; gap: 20px; }
.action-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.action-card__media { position: relative; aspect-ratio: 16 / 10; background: #dfeaec; }
.action-card__media img { width: 100%; height: 100%; object-fit: cover; }
.action-card__badge {
    position: absolute; top: 12px; left: 12px; font-size: 10px; font-weight: 700; letter-spacing: .6px;
    text-transform: uppercase; color: #fff; background: var(--teal); padding: 4px 10px; border-radius: 999px;
}
.action-card__badge--soon { background: var(--amber); color: var(--navy); }
.action-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.action-card__body h3 { font-size: 16px; margin: 0; }
.action-card__body p { font-size: 14px; color: var(--muted); margin: 0; flex: 1; }
.action-card__link { font-weight: 700; font-size: 14px; color: var(--teal); }

/* ---------- Métricas ------------------------------------------------------ */
.stats { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.stats__grid { display: grid; gap: 0; }
.stats__intro { padding: 26px; }
.stats__intro h2 { font-size: 22px; }
.stats__intro p { color: var(--muted); font-size: 14px; margin: 0; }
.stats__items { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat {
    text-align: center; padding: 24px 12px; border-top: 1px solid var(--border); border-left: 1px solid var(--border);
}
.stat svg { width: 30px; height: 30px; color: var(--teal); margin: 0 auto 10px; }
.stat b { display: block; font-size: 28px; color: var(--teal); font-weight: 800; }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- Formularios --------------------------------------------------- */
.form-block { display: grid; gap: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.form-block__intro { background: var(--teal); color: #fff; padding: 32px 28px; }
.form-block__intro h2 { color: #fff; font-size: 24px; }
.form-block__intro p { color: rgba(255,255,255,.9); margin: 0; }
.form-block__intro .btn { margin-top: 18px; }
.form-block__body { background: var(--white); padding: 28px; }

.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--navy); }
.field .req { color: var(--teal); }
.field input, .field select, .field textarea {
    font-family: var(--font); font-size: 15px; color: var(--ink);
    padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--white); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(14,159,173,.15);
}
.field textarea { resize: vertical; min-height: 110px; }
.field--error input, .field--error select, .field--error textarea { border-color: #c0392b; }
.field__error { color: #c0392b; font-size: 12px; }
/* Honeypot antispam: oculto para humanos, visible para bots. */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 14px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert--success { background: #e6f6ee; color: #1c7a4a; border: 1px solid #b6e3ca; }
.alert--error   { background: #fdecea; color: #b93a2b; border: 1px solid #f4c7c1; }
.alert--info    { background: #eaf6f8; color: var(--navy); border: 1px solid #bfe4ea; }

/* ---------- Formas de ayudar --------------------------------------------- */
.help__grid { display: grid; gap: 22px; }
.help__item { text-align: center; }
.help__item svg { width: 40px; height: 40px; color: var(--teal); margin: 0 auto 10px; }
.help__item h3 { font-size: 15px; margin-bottom: 6px; }
.help__item p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- Boletín (suscripción) ---------------------------------------- */
.newsletter { background: var(--teal); color: #fff; border-radius: var(--radius-lg); }
.newsletter__grid { display: grid; gap: 20px; padding: 32px 28px; align-items: center; }
.newsletter h2 { color: #fff; font-size: 22px; }
.newsletter p { color: rgba(255,255,255,.9); margin: 0; font-size: 14px; }
.newsletter__form { display: grid; gap: 10px; }
.newsletter__form input {
    padding: 13px 15px; border-radius: var(--radius); border: none; font-size: 15px; font-family: var(--font);
}

/* ---------- Contacto / footer -------------------------------------------- */
.site-footer { background: var(--navy); color: #cfe6ec; }
.site-footer a { color: #fff; }
.footer__grid { display: grid; gap: 26px; padding: 40px 0 28px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand .brand__name { color: #fff; }
.footer__contact { display: grid; gap: 14px; }
.footer__contact .row { display: flex; gap: 12px; align-items: center; }
.footer__contact svg { width: 22px; height: 22px; color: var(--light); flex: 0 0 auto; }
.footer__social { display: flex; gap: 12px; }
.footer__social a {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
    display: flex; align-items: center; justify-content: center;
}
.footer__social svg { width: 18px; height: 18px; color: #fff; }
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0; font-size: 12px; color: #9fc6d0;
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}

/* =============================================================================
   BREAKPOINTS
   ============================================================================= */
@media (min-width: 600px) {
    .form-row { grid-template-columns: 1fr 1fr; }
    .stats__items { grid-template-columns: repeat(3, 1fr); }
    .newsletter__form { grid-template-columns: 1fr auto; }
}

@media (min-width: 768px) {
    .hero__title { font-size: 42px; }
    .about__grid { grid-template-columns: 1fr 1.2fr; align-items: center; }
    .about__cards { grid-template-columns: repeat(3, 1fr); }
    .pillars__grid { grid-template-columns: repeat(4, 1fr); }
    .actions__grid { grid-template-columns: repeat(2, 1fr); }
    .help__grid { grid-template-columns: repeat(5, 1fr); }
    .campaign__grid { grid-template-columns: 1.4fr 1fr; }
    .stats__grid { grid-template-columns: 260px 1fr; align-items: stretch; }
    .stats__items { grid-template-columns: repeat(5, 1fr); }
    .form-block { grid-template-columns: 1fr 1.3fr; }
    .newsletter__grid { grid-template-columns: 1.2fr 1fr; }
    .footer__grid { grid-template-columns: 1.2fr 1.4fr auto; align-items: start; }
}

@media (min-width: 960px) {
    .hero__grid { grid-template-columns: 1.05fr 1fr; align-items: center; padding: 56px 0 60px; }
    .actions__grid { grid-template-columns: repeat(4, 1fr); }
    .nav__toggle { display: none; }
    .nav__links { display: flex; gap: 26px; align-items: center; }
    .nav__links a { color: var(--navy); font-weight: 600; font-size: 14px; }
    .nav__links a:hover { color: var(--teal); text-decoration: none; }
    .nav__cta { display: inline-flex; }
    .nav__mobile { display: none !important; }
}

/* Respeta la preferencia de menos movimiento. */
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
