:root {
    color-scheme: light;
    --ink: #173e33;
    --muted: #4d625a;
    --green: #175d45;
    --paper: #fafbf7;
    --line: #d9e2d7;
    --soft: #eef3e9;
}

/* Fuera del flujo visual y de foco; solo el formulario público operativo lo incluye. */
.form-honeypot { display: none; }

* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
a { color: var(--green); text-underline-offset: 0.25em; }
a:hover { text-decoration-thickness: 0.15em; }
a:focus-visible, [tabindex="-1"]:focus-visible {
    outline: 3px solid #8b410b;
    outline-offset: 5px;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.18; text-wrap: balance; }
h1 { margin-bottom: 1.5rem; font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; line-height: 1.35; }
p { margin-bottom: 1rem; }
.container { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    z-index: 2;
    padding: 0.75rem 1rem;
    background: white;
    transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.25rem; }
.brand { display: inline-flex; text-decoration: none; }
.brand-logo { display: block; width: 6rem; height: 6rem; object-fit: contain; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; font-weight: 600; }
.hero { padding-block: 3.5rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.eyebrow { margin-bottom: 1rem; color: var(--green); font-size: 0.8rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.intro { max-width: 40rem; font-size: 1.125rem; color: var(--muted); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 1.5rem; min-height: 48px; padding: 0.9rem 1.5rem; margin-top: 0.75rem; border-radius: 0.5rem; background: var(--green); color: white; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--ink); }
.availability-note { margin-top: 0.85rem; color: var(--muted); font-size: 0.875rem; }
.hero-card { padding: 2rem; border: 1px solid var(--line); border-radius: 1.5rem; background: var(--soft); }
.card-mark { display: flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; margin-bottom: 2rem; border-radius: 1rem; background: var(--ink); color: #d5e7b8; font-size: 2rem; font-weight: 800; }
.hero-card h2 { font-size: 1.9rem; }
.hero-card > p:not(.eyebrow) { color: var(--muted); }
.space-list { margin: 1.5rem 0 0; padding-left: 1.25rem; }
.space-list li { padding-block: 0.4rem; }
.space-list li::marker { color: var(--green); }
.section { padding-block: 3.5rem; }
.section-intro { color: var(--muted); max-width: 42rem; }
.steps-section { background: white; border-block: 1px solid var(--line); }
.steps { display: grid; gap: 2rem; margin: 2.5rem 0 0; padding-left: 1.5rem; }
.step { padding-left: 0.5rem; }
.step::marker { color: var(--green); font-weight: 700; }
.step-number { display: block; margin-bottom: 1.25rem; color: var(--green); font-size: 1.75rem; font-weight: 400; }
.step p { margin-bottom: 0; color: var(--muted); }
.connection-grid { display: grid; gap: 1rem; }
.connection-copy { color: var(--muted); }
.community-section { padding-top: 0; }
.community-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.community-logo { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: white; }
.community-logo img { display: block; width: 100%; max-width: 12.5rem; height: 7.5rem; object-fit: contain; }
.request-section { padding-top: 0; }
.request-panel { padding: 2rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--soft); }
.request-panel h2 { max-width: 44rem; }
.request-panel > p:not(.eyebrow) { max-width: 43rem; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; font-weight: 650; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.5rem; }
.footer-inner p { margin-bottom: 0; }

@media (min-width: 48rem) {
    .container { width: min(100% - 4rem, 72rem); }
    .hero, .section { padding-block: 5rem; }
    .community-section { padding-top: 0; }
    .community-logos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
    .connection-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
    .request-section { padding-top: 0; }
    .request-panel { padding: 3rem; }
}

@media (min-width: 64rem) {
    .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 4rem; }
    .hero-card { padding: 2.5rem; }
    .community-logos { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Formulario y administración exclusivamente locales. */
[hidden] { display: none !important; }
.local-banner { position: sticky; top: 0; z-index: 10; padding: .65rem 1rem; background: #173e33; color: white; text-align: center; font-size: .875rem; font-weight: 650; }
html { scroll-padding-top: 6rem; }
.brand { align-items: center; gap: .75rem; }
.brand-name { color: var(--ink); font-size: 1.2rem; font-weight: 800; line-height: 1.3; }
.brand-name small { display: block; font-size: .8rem; font-weight: 500; }
.skip-link { z-index: 20; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .table-scroll:focus-visible { outline: 3px solid #8b410b; outline-offset: 4px; }
.button { border: 2px solid transparent; line-height: 1.4; }
.button.secondary { color: var(--green); background: white; border-color: var(--green); }
.button:disabled { background: #59675e; color: white; cursor: not-allowed; }
.text-button { background: transparent; color: var(--green); text-decoration: underline; padding: .75rem; border: 0; min-height: 48px; }
.form-shell { max-width: 52rem; background: white; border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; margin-bottom: 3rem; }
.form-shell h1 { font-size: clamp(1.8rem, 4vw, 2.65rem); }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 1rem 0; margin: 2rem 0; min-width: 0; }
legend { font-size: 1.3rem; padding-right: .75rem; font-weight: 750; }
.field label { display: block; margin-bottom: .5rem; font-weight: 650; }
.field { margin: 1.25rem 0; min-width: 0; }
input, select, textarea { width: 100%; min-height: 50px; padding: .75rem; border: 1px solid #72867b; border-radius: .5rem; background: white; color: var(--ink); }
textarea { resize: vertical; }
.field-help { color: var(--muted); font-size: .875rem; margin-top: .65rem; }
.notice, .geo-panel { border-left: 4px solid var(--green); padding: 1rem; background: var(--soft); border-radius: .25rem; }
.geo-panel { margin-top: 1.5rem; }
.geo-panel h3 { margin-bottom: .5rem; }
.error-summary, .field-error { color: #872c21; }
.error-summary { border: 2px solid #872c21; background: #fff5f2; padding: 1rem; border-radius: .5rem; }
.field-error { font-size: .9rem; margin-top: .5rem; font-weight: 600; }
[aria-invalid=true] { border-color: #872c21; }
.form-actions { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
.admin-shell { padding-block: 2rem 4rem; }
.admin-shell h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 1rem; }
.table-scroll { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; background: white; text-align: left; }
th, td { padding: .9rem; border-bottom: 1px solid var(--line); min-width: 7rem; }
th { background: var(--soft); }
td a { display: inline-flex; align-items: center; min-height: 44px; }
.detail-grid { display: grid; gap: 1rem; }
.detail-grid > div { min-width: 0; background: white; border: 1px solid var(--line); padding: 1rem; border-radius: .5rem; }
dt { font-weight: 650; }
dd { margin: .5rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 48rem) {
    .form-shell { padding: 2.5rem; }
    .field-row, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .form-actions { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* Solo portada: reservar una franja para que el contacto nunca cubra contenido. */
.has-whatsapp-contact {
    --contact-size: 3.5rem;
    --contact-gap: .75rem;
    --contact-inset: max(var(--contact-gap), env(safe-area-inset-right, 0px));
    padding-right: calc(var(--contact-size) + var(--contact-gap) + var(--contact-inset));
}
.whatsapp-contact {
    position: fixed;
    right: var(--contact-inset);
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: 9;
    display: grid;
    place-items: center;
    width: var(--contact-size);
    height: var(--contact-size);
    border: 2px solid #fff;
    border-radius: 50%;
    background: #12843d;
    color: #fff;
    box-shadow: 0 3px 12px rgb(23 62 51 / 20%);
    text-decoration: none;
}
.whatsapp-contact:hover { background: #0d652e; }
.whatsapp-contact:focus-visible { outline: 3px solid #8b410b; outline-offset: 4px; }
.whatsapp-contact svg { display: block; }
@media (max-width: 30rem) {
    .has-whatsapp-contact { --contact-gap: .5rem; }
    .has-whatsapp-contact .form-shell { padding: 1rem; }
    .has-whatsapp-contact .hero-card { padding: 1.25rem; }
}
@media print {
    .has-whatsapp-contact { padding-right: 0; }
    .whatsapp-contact { display: none; }
}

.privacy-consent { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: .75rem; margin: 1.5rem 0; align-items: start; }
.privacy-consent input { width: 24px; min-height: 24px; height: 24px; padding: 0; }
.privacy-consent .field-error { grid-column: 2; }
