/* ==========================================================================
   UMBRAL · Hacia el Buen Vivir — sistema de diseño compartido
   Usado por todas las vistas públicas (inicio, donar, termómetro, lista,
   botonera y páginas legales).
   ========================================================================== */

:root {
    /* Paleta: monte serrano, tierra y sol */
    --forest-900: #14281c;
    --forest-800: #1d3a28;
    --forest-700: #26503a;
    --forest-600: #2f6a47;
    --leaf-500: #4f8a3c;
    --leaf-400: #6fa84f;
    --leaf-200: #cfe3bf;
    --leaf-100: #e9f2e1;
    --sun-500: #e5a33a;
    --sun-100: #fbefd6;
    --clay-600: #b4532a;
    --clay-500: #c8693c;
    --clay-100: #f7e3d6;
    --cream-50: #fdfbf6;
    --cream-100: #f8f4ea;
    --cream-200: #efe8d8;
    --ink-900: #1c1f1a;
    --ink-700: #3c4238;
    --ink-500: #646b5f;
    --ink-300: #a3a99c;
    --white: #ffffff;
    --danger: #b3261e;
    --danger-100: #fbe4e2;
    --warning: #9a6200;
    --warning-100: #fdf0d3;

    --bg: var(--cream-50);
    --surface: var(--white);
    --surface-muted: var(--cream-100);
    --border: #e6dfcf;
    --text: var(--ink-900);
    --text-muted: var(--ink-500);
    --primary: var(--forest-700);
    --primary-hover: var(--forest-800);
    --accent: var(--clay-500);

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(20, 40, 28, 0.06), 0 1px 3px rgba(20, 40, 28, 0.08);
    --shadow: 0 6px 18px rgba(20, 40, 28, 0.08), 0 2px 6px rgba(20, 40, 28, 0.06);
    --shadow-lg: 0 24px 48px rgba(20, 40, 28, 0.14), 0 8px 16px rgba(20, 40, 28, 0.08);

    --container: 1180px;
    --container-narrow: 820px;
    --header-h: 72px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img,
svg,
video,
iframe {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

h1, h2, h3, h4, h5 {
    margin: 0 0 0.5em;
    line-height: 1.15;
    color: var(--forest-900);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    font-variation-settings: 'SOFT' 50, 'opsz' 72;
}

h4, h5 {
    font-weight: 600;
}

p {
    margin: 0 0 1em;
}

ul, ol {
    margin: 0 0 1em;
    padding-left: 1.25em;
}

a {
    color: var(--forest-600);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: var(--clay-600);
}

strong {
    font-weight: 600;
    color: var(--ink-900);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

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

::selection {
    background: var(--leaf-200);
    color: var(--forest-900);
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute !important;
    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: 16px;
    top: -60px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--forest-900);
    color: var(--white);
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
    color: var(--white);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: 88px 0;
}

.section--tight {
    padding: 56px 0;
}

.section--muted {
    background: var(--surface-muted);
}

.section--forest {
    background: var(--forest-800);
    color: var(--cream-100);
}

.section--forest h2,
.section--forest h3,
.section--forest h4 {
    color: var(--white);
}

.section-head {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-head--left {
    margin-left: 0;
    text-align: left;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--clay-600);
}

.section--forest .eyebrow {
    color: var(--sun-500);
}

.section-title {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    margin-bottom: 0.4em;
}

.section-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

.section--forest .section-lead {
    color: rgba(248, 244, 234, 0.82);
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 960px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .section { padding: 64px 0; }
    .section--tight { padding: 44px 0; }
    .section-head { margin-bottom: 32px; }
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 24px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: var(--white);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    white-space: nowrap;
}

.btn:hover {
    background: var(--primary-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled,
.btn[aria-disabled='true'] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn--accent {
    background: var(--clay-500);
}

.btn--accent:hover {
    background: var(--clay-600);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: currentColor;
}

.btn--outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn--light {
    background: var(--white);
    color: var(--forest-800);
}

.btn--light:hover {
    background: var(--cream-100);
    color: var(--forest-900);
}

.btn--ghost-light {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(4px);
}

.btn--ghost-light:hover {
    background: var(--white);
    color: var(--forest-900);
    border-color: var(--white);
}

.btn--soft {
    background: var(--leaf-100);
    color: var(--forest-700);
}

.btn--soft:hover {
    background: var(--leaf-200);
    color: var(--forest-900);
}

.btn--sm {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 0.88rem;
}

.btn--lg {
    min-height: 56px;
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn--block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   Header / navegación
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    background: rgba(253, 251, 246, 0.88);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-header.is-scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 4px 20px rgba(20, 40, 28, 0.06);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--forest-900);
}

.brand:hover {
    color: var(--forest-900);
}

.brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--white);
    box-shadow: 0 0 0 1px var(--border);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-tag {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.93rem;
    font-weight: 500;
    color: var(--ink-700);
    text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
    background: var(--leaf-100);
    color: var(--forest-800);
}

.site-nav .btn {
    margin-left: 8px;
    padding: 10px 20px;
    min-height: 42px;
    color: var(--white);
}

.site-nav .btn:hover {
    background: var(--clay-600);
    color: var(--white);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--forest-900);
    font-size: 1.1rem;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px 20px 24px;
        background: var(--cream-50);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .site-nav a {
        padding: 12px 14px;
        font-size: 1rem;
    }

    .site-nav .btn {
        margin: 8px 0 0;
        min-height: 50px;
    }

    .brand-tag {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Encabezado de páginas internas
   -------------------------------------------------------------------------- */
.page-hero {
    position: relative;
    padding: 64px 0 96px;
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(229, 163, 58, 0.22), transparent 60%),
        radial-gradient(800px 380px at -10% 120%, rgba(111, 168, 79, 0.28), transparent 60%),
        var(--forest-800);
    color: var(--cream-100);
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 48px;
    background: var(--bg);
    clip-path: ellipse(75% 100% at 50% 100%);
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 4.6vw, 3.2rem);
    margin-bottom: 12px;
}

.page-hero p {
    max-width: 640px;
    font-size: 1.08rem;
    color: rgba(248, 244, 234, 0.85);
    margin: 0;
}

.page-hero .eyebrow {
    color: var(--sun-500);
}

.page-hero--center {
    text-align: center;
}

.page-hero--center p {
    margin: 0 auto;
}

.page-body {
    position: relative;
    margin-top: -56px;
    padding-bottom: 88px;
}

/* --------------------------------------------------------------------------
   Tarjetas
   -------------------------------------------------------------------------- */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 32px;
}

.card--elevated {
    box-shadow: var(--shadow);
}

.card--muted {
    background: var(--surface-muted);
}

.card + .card {
    margin-top: 24px;
}

.grid > .card,
.grid > .card + .card {
    margin-top: 0;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.card-title i {
    color: var(--leaf-500);
    font-size: 1.1rem;
}

.card-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .card {
        padding: 24px 20px;
        border-radius: var(--radius);
    }
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--leaf-100);
    color: var(--forest-600);
    font-size: 1.2rem;
}

.icon-badge--clay {
    background: var(--clay-100);
    color: var(--clay-600);
}

.icon-badge--sun {
    background: var(--sun-100);
    color: var(--warning);
}

.feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature h4 {
    margin-bottom: 4px;
    font-size: 1.02rem;
}

.feature p {
    margin: 0;
    font-size: 0.94rem;
    color: var(--text-muted);
}

.callout {
    padding: 18px 22px;
    border-radius: var(--radius);
    background: var(--leaf-100);
    border-left: 4px solid var(--leaf-500);
    color: var(--ink-700);
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout--warning {
    background: var(--warning-100);
    border-left-color: var(--sun-500);
}

.callout--danger {
    background: var(--danger-100);
    border-left-color: var(--danger);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--leaf-100);
    color: var(--forest-700);
    white-space: nowrap;
}

.badge--pending { background: var(--warning-100); color: var(--warning); }
.badge--rejected,
.badge--cancelled { background: var(--danger-100); color: var(--danger); }
.badge--refunded { background: var(--cream-200); color: var(--ink-700); }

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.field label,
.field-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-700);
}

.field small,
.field-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.input,
.field input[type='text'],
.field input[type='email'],
.field input[type='number'],
.field input[type='password'],
.field input[type='date'],
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    font-size: 1rem;
    color: var(--ink-900);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23646b5f' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--leaf-500);
    box-shadow: 0 0 0 4px rgba(111, 168, 79, 0.18);
}

.field input::placeholder {
    color: var(--ink-300);
}

.input-prefix {
    position: relative;
}

.input-prefix span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.input-prefix input {
    padding-left: 34px !important;
    font-size: 1.15rem !important;
    font-weight: 600;
}

/* Chips de monto */
.amount-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.amount-chip {
    min-height: 46px;
    padding: 10px 8px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--forest-700);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.amount-chip:hover {
    border-color: var(--leaf-400);
    background: var(--leaf-100);
}

.amount-chip.is-active,
.amount-chip[aria-pressed='true'] {
    border-color: var(--forest-600);
    background: var(--forest-700);
    color: var(--white);
}

@media (max-width: 480px) {
    .amount-chips {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Opciones radio tipo tarjeta */
.choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.choice {
    position: relative;
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    height: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    font-weight: 400;
}

.choice label::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 2px solid var(--ink-300);
    border-radius: 50%;
    background: var(--white);
    transition: all 0.15s var(--ease);
}

.choice label strong {
    display: block;
    font-size: 0.98rem;
    color: var(--ink-900);
}

.choice label span {
    display: block;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.choice label:hover {
    border-color: var(--leaf-400);
}

.choice input:checked + label {
    border-color: var(--forest-600);
    background: var(--leaf-100);
}

.choice input:checked + label::before {
    border-color: var(--forest-600);
    background: radial-gradient(circle, var(--forest-600) 0 45%, var(--white) 50%);
}

.choice input:focus-visible + label {
    outline: 3px solid var(--sun-500);
    outline-offset: 2px;
}

@media (max-width: 420px) {
    .choice-group {
        grid-template-columns: minmax(0, 1fr);
    }
}

.form-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

.form-error {
    display: none;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--danger-100);
    color: var(--danger);
    font-size: 0.92rem;
}

.form-error.is-visible {
    display: block;
}

/* --------------------------------------------------------------------------
   Termómetro de la campaña
   -------------------------------------------------------------------------- */
.thermo-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.thermo-head h3 {
    margin: 0 0 4px;
    font-size: 1.35rem;
}

.thermo-status {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.thermo-percent {
    text-align: right;
    flex-shrink: 0;
}

.thermo-percent span {
    display: block;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--forest-700);
}

.thermo-percent small {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.thermo-bar {
    position: relative;
    height: 16px;
    border-radius: var(--radius-pill);
    background: var(--cream-200);
    overflow: hidden;
}

.thermo-fill {
    width: 0;
    min-width: 16px;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--leaf-400), var(--forest-600) 60%, var(--sun-500));
    background-size: 200% 100%;
    transition: width 1.2s var(--ease);
}

.thermo-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.thermo-metric strong {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.thermo-metric span {
    display: block;
    margin-top: 2px;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ink-900);
}

.thermo-metric small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 720px) {
    .thermo-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Variante sobre fondo oscuro */
.thermo--dark .thermo-head h3,
.thermo--dark .thermo-percent span,
.thermo--dark .thermo-metric span {
    color: var(--white);
}

.thermo--dark .thermo-status,
.thermo--dark .thermo-percent small,
.thermo--dark .thermo-metric strong,
.thermo--dark .thermo-metric small {
    color: rgba(248, 244, 234, 0.72);
}

.thermo--dark .thermo-bar {
    background: rgba(255, 255, 255, 0.14);
}

/* --------------------------------------------------------------------------
   Lista de donaciones
   -------------------------------------------------------------------------- */
.donor-list {
    display: grid;
    gap: 10px;
}

.donor {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.donor:hover {
    border-color: var(--leaf-200);
    box-shadow: var(--shadow-sm);
}

.donor-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--leaf-100);
    color: var(--forest-700);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
}

.donor-avatar--anon {
    background: var(--cream-200);
    color: var(--ink-500);
}

.donor-main {
    flex: 1;
    min-width: 0;
}

.donor-name {
    font-weight: 600;
    color: var(--ink-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donor-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.donor-amount {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--forest-700);
    white-space: nowrap;
}

.list-state {
    padding: 36px 16px;
    text-align: center;
    color: var(--text-muted);
}

.list-state i {
    display: block;
    margin-bottom: 10px;
    font-size: 1.6rem;
    color: var(--leaf-400);
}

.list-state--error i {
    color: var(--clay-500);
}

.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.list-head h2,
.list-head h3 {
    margin: 0;
}

/* --------------------------------------------------------------------------
   Estadísticas
   -------------------------------------------------------------------------- */
.stat {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.stat-value {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--forest-700);
}

.stat-label {
    margin-top: 4px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Contenido largo (legales)
   -------------------------------------------------------------------------- */
.prose {
    font-size: 1rem;
    color: var(--ink-700);
}

.prose h2 {
    margin: 2em 0 0.6em;
    font-size: 1.5rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin: 1.6em 0 0.5em;
    font-size: 1.18rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.prose li {
    margin-bottom: 0.45em;
}

.prose li::marker {
    color: var(--leaf-500);
}

.prose .callout {
    margin: 1.4em 0;
}

.meta-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.legal-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.legal-aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
}

.legal-aside h4 {
    margin-bottom: 12px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.legal-aside nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-aside a {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    color: var(--ink-700);
    text-decoration: none;
}

.legal-aside a:hover,
.legal-aside a[aria-current='page'] {
    background: var(--leaf-100);
    color: var(--forest-800);
}

@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .legal-aside {
        position: static;
        order: 2;
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    padding: 72px 0 32px;
    background: var(--forest-900);
    color: rgba(248, 244, 234, 0.78);
    font-size: 0.94rem;
}

.site-footer a {
    color: rgba(248, 244, 234, 0.85);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--sun-500);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.footer-brand .brand {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand .brand-tag {
    display: block;
    color: rgba(248, 244, 234, 0.6);
}

.site-footer h4 {
    margin-bottom: 16px;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sun-500);
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.footer-list i {
    width: 18px;
    margin-right: 8px;
    color: var(--leaf-400);
}

.social-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    font-size: 1.05rem;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.social-row a:hover {
    background: var(--clay-500);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.84rem;
    color: rgba(248, 244, 234, 0.55);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Modal / lightbox
   -------------------------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 40, 28, 0.72);
    backdrop-filter: blur(4px);
}

.modal.is-open {
    display: flex;
    animation: fade-in 0.2s var(--ease);
}

.modal-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    animation: pop-in 0.25s var(--ease);
}

.modal-dialog--wide {
    width: min(1100px, 100%);
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--cream-100);
    color: var(--ink-700);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
}

.modal-close:hover {
    background: var(--cream-200);
}

.lightbox {
    background: rgba(10, 20, 14, 0.92);
}

.lightbox figure {
    position: relative;
    margin: 0;
    max-width: min(920px, 100%);
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lightbox img {
    max-height: calc(100vh - 140px);
    width: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.lightbox figcaption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    text-align: center;
}

.lightbox .modal-close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.26);
}

.lightbox-nav--prev { left: 16px; }
.lightbox-nav--next { right: 16px; }

body.has-modal {
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 4000;
    display: grid;
    gap: 10px;
    max-width: min(380px, calc(100vw - 40px));
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--forest-900);
    color: var(--white);
    font-size: 0.92rem;
    box-shadow: var(--shadow-lg);
    animation: slide-up 0.25s var(--ease);
}

.toast--error {
    background: var(--danger);
}

/* --------------------------------------------------------------------------
   Animaciones
   -------------------------------------------------------------------------- */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pop-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Utilidades */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 24px; }
.hidden { display: none !important; }

@media (min-width: 901px) {
    .legal-aside {
        padding-top: 72px;
    }
}

.prose .btn {
    white-space: normal;
    text-align: center;
}

.stat-value--sm {
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.thermo-source {
    margin: 14px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.thermo-source i {
    margin-right: 4px;
    color: var(--leaf-500);
}

.thermo--dark .thermo-source,
.section--forest .thermo-source {
    color: rgba(248, 244, 234, 0.75);
}

.thermo--dark .thermo-source a,
.section--forest .thermo-source a {
    color: var(--white);
}

/* --------------------------------------------------------------------------
   GoFundMe (principal vía de donación)
   -------------------------------------------------------------------------- */
:root {
    --gfm: #02a95c;
    --gfm-dark: #01834a;
    --gfm-100: #e3f6ec;
}

.gfm-logo {
    display: inline-block;
    width: auto;
    height: 1.35em;
    aspect-ratio: 105 / 36;
    vertical-align: middle;
    fill: currentColor;
    flex-shrink: 0;
}

.btn--gfm {
    background: var(--gfm);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(2, 169, 92, 0.32);
}

.btn--gfm:hover {
    background: var(--gfm-dark);
    color: var(--white);
}

.btn--gfm-light {
    background: var(--white);
    color: var(--forest-900);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.btn--gfm-light .gfm-logo {
    color: var(--gfm);
}

.btn--gfm-light:hover {
    background: var(--gfm-100);
    color: var(--forest-900);
}

.btn--gfm .gfm-logo,
.btn--gfm-light .gfm-logo {
    height: 1.45em;
    margin-top: -0.2em;
}

.btn--lg.btn--gfm,
.btn--lg.btn--gfm-light {
    font-size: 1.1rem;
}

.gfm-card {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--gfm);
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(2, 169, 92, 0.12), transparent 70%),
        var(--white);
}

.gfm-card .gfm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: var(--gfm-100);
    color: var(--gfm-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gfm-card .gfm-brand {
    display: block;
    height: 46px;
    width: auto;
    margin: 4px 0 14px;
    color: var(--gfm);
}

.gfm-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.gfm-points i {
    margin-right: 6px;
    color: var(--gfm);
}

.site-nav .btn--gfm {
    background: var(--gfm);
}

.site-nav .btn--gfm:hover {
    background: var(--gfm-dark);
}

.btn--gfm .gfm-logo,
.btn--gfm-light .gfm-logo {
    height: 1.75em;
    margin-top: -0.3em;
}

.site-nav .btn--gfm .gfm-logo {
    height: 1.7em;
}

/* --------------------------------------------------------------------------
   Selector de idioma
   -------------------------------------------------------------------------- */
.site-header .site-nav {
    margin-left: auto;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--white);
    flex-shrink: 0;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-500);
    text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-switch a:hover {
    color: var(--forest-800);
    background: var(--cream-100);
}

.lang-switch a[aria-current='true'] {
    background: var(--forest-700);
    color: var(--white);
}

.lang-switch svg {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .site-header .container {
        gap: 10px;
    }

    .lang-switch {
        margin-left: auto;
    }
}

@media (max-width: 380px) {
    .lang-switch a {
        padding: 5px 7px;
        gap: 4px;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    .brand img {
        width: 38px;
        height: 38px;
    }
}

/* --------------------------------------------------------------------------
   Video
   -------------------------------------------------------------------------- */
.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--forest-900);
    box-shadow: var(--shadow-lg);
}

.video-frame iframe,
.video-facade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-facade {
    display: block;
    padding: 0;
    cursor: pointer;
    background: var(--forest-900);
}

.video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease), opacity 0.3s var(--ease);
}

.video-facade::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(14, 28, 19, 0.55), transparent 55%);
}

.video-facade:hover img {
    transform: scale(1.03);
}

.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--clay-500);
    font-size: 1.7rem;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.video-play i {
    margin-left: 5px;
}

.video-facade:hover .video-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: var(--white);
}

.video-label {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
}

@media (max-width: 1100px) {
    .site-header .lang-switch { order: 2; }
    .site-header .nav-toggle { order: 3; }
}

/* Header: que nada se corte ni pase a dos líneas */
.site-nav a,
.brand-text,
.lang-switch a {
    white-space: nowrap;
}

.site-nav,
.lang-switch,
.brand {
    flex-shrink: 0;
}

@media (min-width: 1101px) and (max-width: 1320px) {
    .brand-tag {
        display: none;
    }

    .site-nav a {
        padding: 8px 9px;
        font-size: 0.9rem;
    }

    .site-nav .btn {
        margin-left: 4px;
        padding: 10px 16px;
    }
}

.video-player,
.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Panel al terminar el video */
.video-end {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    text-align: center;
    background:
        radial-gradient(500px 260px at 50% 30%, rgba(2, 169, 92, 0.25), transparent 70%),
        rgba(14, 28, 19, 0.88);
    backdrop-filter: blur(3px);
    animation: fade-in 0.35s var(--ease);
}

.video-end[hidden] {
    display: none !important;
}

.video-end-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.6vw, 1.7rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--white);
}

.video-end-text {
    margin: -4px 0 4px;
    max-width: 380px;
    font-size: 0.92rem;
    color: rgba(248, 244, 234, 0.82);
}

.video-end .btn-row {
    justify-content: center;
}

@media (max-width: 480px) {
    .video-end {
        gap: 10px;
        padding: 14px;
    }

    .video-end-text {
        display: none;
    }

    .video-end .btn {
        min-height: 42px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
