/* ==========================================================================
   Asociación Justicia Poética
   Sistema de diseño. Un solo archivo, sin dependencias externas.

   Reglas fijadas para todo el sitio:
   - Un tema por página: claro por defecto, oscuro si el sistema lo pide.
   - Paleta tomada del logotipo: verde profundo, dorado y papel hueso.
   - El dorado nunca se usa para texto pequeño sobre fondo claro: no da contraste.
     Vive sobre el verde oscuro y en detalles.
   - Serif (Cormorant Garamond) en titulares, para hablar el idioma del logotipo.
     Sans (Public Sans) en texto corrido, botones y formularios, donde manda la
     legibilidad.
   - Radios: pastilla en botones, 12px en tarjetas, 8px en campos de formulario.
   - Movimiento mínimo. Este sitio lo visita gente en crisis.
   ========================================================================== */

/* --- Tipografías autoalojadas (nada sale hacia servidores de terceros) --- */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-var.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../fonts/public-sans-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../fonts/public-sans-var-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Colores muestreados del logotipo:
     verde #124a48, verde de fondo #0c3c36, dorado #c69636,
     papel #f2efe9, negro #171717 */
  --paper: #f2efe9;
  --surface: #ffffff;
  --surface-sunken: #e9e5db;
  --ink: #171717;
  --ink-soft: #56534d;
  --line: #ddd8cc;
  --line-strong: #c3bdae;

  --brand: #124a48;
  --accent: #1c6b64;
  --accent-ink: #124a48;
  --accent-flat: #124a48;
  --accent-wash: #e6edeb;

  --gold: #c69636;
  --gold-ink: #7d5c13;
  --gold-wash: #f7f0df;
  --olive-ink: #14514c;
  --olive-wash: #e8f0ec;

  --alert: #8f1d1d;
  --alert-wash: #fbeaea;

  --on-accent: #ffffff;
  --deep: #0c3c36;
  --deep-ink: #f2efe9;
  --deep-soft: #b3c2be;
  --deep-line: #23514a;

  --r-pill: 999px;
  --r-card: 12px;
  --r-input: 8px;

  --shadow-card: 0 1px 2px rgba(12, 60, 54, .05), 0 8px 24px -12px rgba(12, 60, 54, .16);
  --shadow-lift: 0 2px 4px rgba(12, 60, 54, .07), 0 16px 32px -14px rgba(12, 60, 54, .26);

  --wrap: 1180px;
  --wrap-narrow: 720px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121f1d;
    --surface: #192a27;
    --surface-sunken: #0d1817;
    --ink: #f0ede6;
    --ink-soft: #a8b2ae;
    --line: #2a3d39;
    --line-strong: #3d534e;

    --brand: #3f8d84;
    --accent: #3f8d84;
    --accent-ink: #86c0b6;
    --accent-flat: #1c6b64;
    --accent-wash: #17302c;

    --gold: #d9a94a;
    --gold-ink: #d9a94a;
    --gold-wash: #2a2214;
    --olive-ink: #8fcabf;
    --olive-wash: #1e3a35;

    --alert: #f0a1a1;
    --alert-wash: #2c1717;

    --deep: #0a2b27;
    --deep-ink: #f2efe9;
    --deep-soft: #b3c2be;
    --deep-line: #1d443e;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .45), 0 16px 32px -14px rgba(0, 0, 0, .7);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  text-wrap: balance;
}
/* La serif habla el idioma del logotipo. Se reserva a los titulares grandes:
   a tamaños pequeños pierde legibilidad y ahí manda la sans. */
h1, h2 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.14;
}
h3, h4 {
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); }
h4 { font-size: 1.05rem; letter-spacing: -.01em; }

p { margin: 0 0 1.1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 3px;
}

img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.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-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--accent-flat); color: var(--on-accent);
  padding: .7rem 1.1rem; border-radius: var(--r-input); font-weight: 600;
  transition: top .15s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--on-accent); }

section { padding-block: clamp(3rem, 2rem + 5vw, 5.5rem); }
section.tight { padding-block: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }

/* --- Botones ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 1rem;
  line-height: 1; white-space: nowrap;
  padding: .95rem 1.6rem; border-radius: var(--r-pill);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .12s var(--ease),
              box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent-flat); color: var(--on-accent); box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lift); }

.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn-on-deep { background: #f2f1ed; color: #1e211d; }
.btn-on-deep:hover { background: #b23f26; color: #ffffff; }

.btn-ghost-deep { background: transparent; color: var(--deep-ink); border-color: var(--deep-line); }
.btn-ghost-deep:hover { background: var(--deep-ink); color: var(--deep); border-color: var(--deep-ink); }

.btn-block { width: 100%; }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.075rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* --- Cabecera ----------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .masthead { background: var(--paper); } }

.masthead-inner {
  display: flex; align-items: center; gap: 1.25rem;
  height: 72px; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: 0 0 auto; }
.brand picture, .brand img { display: block; }
.brand img { height: 40px; width: auto; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  font-size: .95rem; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: .35rem 0; border-bottom: 2px solid transparent;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav .btn { padding: .65rem 1.15rem; font-size: .92rem; border-bottom: 0; }
.nav .btn:hover { border-bottom: 1.5px solid transparent; }
/* .nav a define color, y su especificidad gana a .btn-primary. Hay que
   devolverle al boton su propio color o queda texto oscuro sobre terracota. */
.nav a.btn-primary { color: var(--on-accent); }
.nav a.btn-primary:hover { color: var(--paper); }

.nav-toggle {
  margin-left: auto; display: none; align-items: center; gap: .5rem;
  background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink);
  border-radius: var(--r-pill); padding: .55rem 1rem;
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: .9rem; cursor: pointer;
}

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.5rem; box-shadow: var(--shadow-lift);
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  /* El :not(.btn) es necesario: sin él esta regla pisa el color del botón
     principal y, en la página actual, queda verde sobre verde. */
  .nav a:not(.btn) { border-bottom: 1px solid var(--line); }
  .nav a:not(.btn):hover,
  .nav a:not(.btn)[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent-ink); }
  .nav .btn { margin-top: 1rem; justify-content: center; }
}

/* --- Salida rápida ------------------------------------------------------ */
.exit-bar {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 150;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #8f1d1d; color: #ffffff; border: 0;
  border-radius: var(--r-pill); padding: .8rem 1.3rem;
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: .95rem;
  cursor: pointer; box-shadow: var(--shadow-lift);
}
.exit-bar:hover { background: #5e1212; }
.exit-note { font-size: .85rem; color: var(--ink-soft); }

/* --- Aviso de emergencia ------------------------------------------------ */
.emergency {
  background: var(--alert-wash);
  border-block: 1px solid color-mix(in srgb, var(--alert) 25%, transparent);
}
.emergency .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: baseline; padding-block: 1rem; }
.emergency strong { font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; color: var(--alert); }
.emergency ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin: 0; padding: 0; font-size: .95rem; }
.emergency a { color: var(--ink); font-weight: 600; }

/* Variante para la franja de contacto directo: mismo peso visual, sin la
   carga de alarma del rojo. */
.emergency.is-directo {
  background: var(--accent-wash);
  border-block-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.emergency.is-directo strong { color: var(--accent-ink); }

/* --- Portada ------------------------------------------------------------ */
.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(3rem, 2rem + 4vw, 4.5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }

.hero h1 { margin-bottom: .35em; }
.hero .lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); margin-bottom: 1.75rem; }
.hero-mark { color: var(--accent-ink); }

.hero-actions { display: grid; gap: .75rem; max-width: 34rem; }
@media (min-width: 560px) { .hero-actions { grid-template-columns: 1fr 1fr; } }

.hero-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  box-shadow: var(--shadow-card);
}
.hero-panel h2 { font-size: 1.3rem; }

/* --- Rejillas ----------------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px) { .split-aside { grid-template-columns: 1.35fr .65fr; } }

/* --- Tarjetas ----------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.card h3 { margin-bottom: .15em; }
.card p { font-size: .98rem; }

a.card {
  text-decoration: none; color: inherit;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
a.card .more { margin-top: auto; padding-top: .75rem; font-weight: 600; color: var(--accent-ink); font-size: .95rem; }

.card-wash { background: var(--olive-wash); border-color: transparent; }
.card-accent { background: var(--accent-wash); border-color: transparent; }

/* --- Caminos de ayuda --------------------------------------------------- */
.paths { display: grid; gap: 1rem; }
@media (min-width: 760px) { .paths { grid-template-columns: 1fr 1fr; } }
.path {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--r-card); padding: 1.4rem 1.5rem;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-left-color .18s var(--ease);
}
.path:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-left-color: var(--ink); }
.path strong { display: block; font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 1.08rem; margin-bottom: .3rem; }
.path span { color: var(--ink-soft); font-size: .97rem; }

/* --- Bloque oscuro ------------------------------------------------------ */
.deep { background: var(--deep); color: var(--deep-ink); }
.deep h2, .deep h3 { color: var(--deep-ink); }
.deep p { color: var(--deep-soft); }
.deep a:not(.btn) { color: #fff; }
.deep .card { background: color-mix(in srgb, var(--deep-ink) 5%, transparent); border-color: var(--deep-line); }
.deep .card p { color: var(--deep-soft); }

/* --- Cifras ------------------------------------------------------------- */
.figures { display: grid; gap: 1.75rem 1rem; }
@media (min-width: 640px) { .figures { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .figures { grid-template-columns: repeat(4, 1fr); } }
.figure .n {
  display: block; font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-weight: 600;
  font-size: clamp(2.1rem, 1.6rem + 2vw, 2.9rem); line-height: 1; letter-spacing: -.03em;
  color: var(--accent-ink);
}
.deep .figure .n { color: var(--gold); }
.figure p { font-size: .95rem; margin: .5rem 0 0; }

/* --- Niveles de aportación ---------------------------------------------- */
.tiers { display: grid; gap: 1.25rem; align-items: stretch; }
@media (min-width: 860px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.75rem; display: flex; flex-direction: column;
}
.tier-featured { border-color: var(--gold); border-width: 2px; box-shadow: var(--shadow-lift); }
.tier .amount {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-weight: 600; letter-spacing: -.01em;
  font-size: 2.4rem; line-height: 1; margin: .35rem 0 .1rem;
}
.tier .per { font-size: .95rem; color: var(--ink-soft); }
.tier ul { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .6rem; font-size: .97rem; }
.tier ul li { padding-left: 1.6rem; position: relative; }
.tier ul li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .7rem; height: .7rem; border-radius: 2px;
  background: var(--gold);
}
.tier .btn { margin-top: auto; }
.tier-flag {
  align-self: flex-start; background: var(--accent-flat); color: var(--on-accent);
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: .78rem;
  letter-spacing: .04em; padding: .3rem .7rem; border-radius: var(--r-pill);
}

/* --- Casos -------------------------------------------------------------- */
.case-list { display: grid; gap: 1rem; }
@media (min-width: 800px) { .case-list { grid-template-columns: 1fr 1fr; } }
.case {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.5rem;
}
.case h2, .case h3 { font-size: 1.15rem; margin-bottom: .4rem; letter-spacing: -.015em; }
.case p { font-size: .97rem; margin-bottom: .75rem; }
.case-state {
  display: inline-block; font-size: .82rem; font-weight: 600;
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; letter-spacing: .02em;
  padding: .25rem .7rem; border-radius: var(--r-pill);
  background: var(--olive-wash); color: var(--olive-ink);
}
.case-state.is-won { background: var(--gold-wash); color: var(--gold-ink); }
/* Ficha sin descripción: el estado necesita el aire que daba el párrafo. */
.case > :is(h2, h3) + .case-state { margin-top: .35rem; }
/* Una causa puede estar en dos situaciones a la vez: condena firme y un
   juicio pendiente, sentencia dictada y apelación. */
/* La separación va a la derecha, no a la izquierda: así, cuando la segunda
   etiqueta baja de línea en un móvil, queda alineada y no sangrada. */
.case-state { margin-right: .4rem; }
.case-state + .case-state { margin-top: .35rem; }

/* --- Formularios -------------------------------------------------------- */
.form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: .4rem; }
.field > label { font-weight: 600; font-size: .97rem; }
.field .help { font-size: .88rem; color: var(--ink-soft); }
.field .req { color: var(--accent-ink); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-input); padding: .8rem .9rem;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: .85; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink) 22%, transparent);
  outline: none;
}
textarea { min-height: 9rem; resize: vertical; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

fieldset { border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.25rem; margin: 0; }
legend { font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; padding-inline: .5rem; font-size: 1.02rem; }

.choice { display: grid; gap: .75rem; margin-top: .75rem; }
.choice label {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r-input);
  cursor: pointer; font-size: .98rem;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.choice label:hover { border-color: var(--ink-soft); background: var(--surface); }
.choice input { margin-top: .3rem; accent-color: var(--accent-flat); flex: 0 0 auto; width: 1.05rem; height: 1.05rem; }
.choice input:checked + span { font-weight: 600; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.consent input { margin-top: .35rem; accent-color: var(--accent-flat); width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

.form-error {
  display: none; gap: .6rem; align-items: flex-start;
  background: var(--alert-wash); color: var(--alert);
  border: 1px solid color-mix(in srgb, var(--alert) 30%, transparent);
  border-radius: var(--r-input); padding: .9rem 1rem; font-size: .95rem; font-weight: 600;
}
.form-error[data-visible="true"] { display: flex; }
.field-error { color: var(--alert); font-size: .88rem; font-weight: 600; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--alert); }

.form-note {
  background: var(--olive-wash); border-radius: var(--r-card);
  padding: 1.25rem 1.4rem; font-size: .97rem;
}
.form-note p { max-width: none; }

/* --- Importes (Poeta Guerrero) ------------------------------------------ */
.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .7rem; }
.amounts-sm { grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr)); }
.amounts-sm .amount-option span { padding: .8rem .3rem; font-size: 1.05rem; }
.amount-option { position: relative; }
.amount-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.amount-option span {
  display: block; text-align: center; padding: 1rem .5rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-input);
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 1.15rem;
  transition: border-color .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease);
}
.amount-option input:hover + span { border-color: var(--ink-soft); }
.amount-option input:checked + span { border-color: var(--accent-flat); background: var(--accent-flat); color: var(--on-accent); }
.amount-option input:focus-visible + span { outline: 3px solid var(--accent-ink); outline-offset: 2px; }

/* --- Detalles / preguntas ----------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 500; color: var(--accent-ink); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > *:not(summary) { margin-bottom: 1.15rem; }

/* --- Cita --------------------------------------------------------------- */
.pull {
  border-left: 3px solid var(--gold); padding-left: 1.5rem; margin: 2.5rem 0;
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-weight: 500; font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem);
  line-height: 1.35; letter-spacing: -.015em;
}
.pull cite { display: block; margin-top: .75rem; font-family: 'Public Sans', sans-serif; font-size: .95rem; font-style: normal; color: var(--ink-soft); letter-spacing: 0; }
.deep .pull { color: var(--deep-ink); }
.deep .pull cite { color: var(--deep-soft); }

/* --- Cronología --------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 1.75rem 1.75rem; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .45em;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent);
}
.timeline .when { display: block; font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 700; color: var(--accent-ink); font-size: .95rem; }
.timeline p { margin: .25rem 0 0; font-size: .98rem; }

/* --- Retrato ------------------------------------------------------------ */
.retrato { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); align-items: center; }
@media (min-width: 800px) { .retrato { grid-template-columns: minmax(0, 300px) 1fr; } }

.retrato figure { margin: 0; }
.retrato img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top;
  border-radius: var(--r-card); background: var(--surface-sunken);
}
.retrato .img-slot { aspect-ratio: 4 / 5; }
.retrato figcaption {
  margin-top: .85rem; font-size: .92rem; color: var(--ink-soft);
  padding-left: .9rem; border-left: 2px solid var(--gold);
}
.deep .retrato figcaption { color: var(--deep-soft); }

.retrato-cargo {
  display: block; font-size: .88rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: .5rem;
}
.deep .retrato-cargo { color: var(--gold); }

.firma {
  margin-top: 1.5rem; font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem; font-style: italic; color: var(--ink);
}
.deep .firma { color: var(--deep-ink); }

/* --- Aviso de emergencia, discreto -------------------------------------- */
.aviso-emergencia {
  margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-size: .92rem; color: var(--ink-soft); max-width: none;
}
.aviso-emergencia a { color: var(--accent-ink); font-weight: 600; }

/* --- Bizum -------------------------------------------------------------- */
p.bizum-etiqueta {
  margin: 1.25rem 0 .1rem; font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
p.bizum-codigo {
  margin: 0 0 1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.6rem, 2rem + 3vw, 3.6rem); font-weight: 700;
  letter-spacing: .12em; line-height: 1; color: var(--accent-ink);
}
.bizum-pasos {
  margin: 0 0 1rem; padding-left: 1.2rem;
  display: grid; gap: .5rem; font-size: .97rem;
}
.bizum-pasos li { padding-left: .2rem; }
.bizum-pasos li::marker { color: var(--gold); font-weight: 700; }

/* --- Carnet de Poeta ---------------------------------------------------- */
.carnet {
  width: 100%; height: auto; display: block;
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
}

/* --- Marcadores de imagen pendiente ------------------------------------- */
.img-slot {
  display: grid; place-items: center; text-align: center;
  background: var(--surface-sunken);
  border: 1px dashed var(--line-strong); border-radius: var(--r-card);
  color: var(--ink-soft); font-size: .9rem; padding: 1.5rem;
  aspect-ratio: 4 / 3;
}
.img-slot span { max-width: 26ch; }

/* --- Documentos --------------------------------------------------------- */
.docs { display: grid; gap: .75rem; }
@media (min-width: 760px) { .docs { grid-template-columns: 1fr 1fr; } }
/* Sin min-width:0, una dirección de correo larga fuerza a ensanchar la columna
   de la rejilla y saca el scroll horizontal en móvil. */
.grid > *, .split > *, .docs > *, .paths > *, .tiers > *, .case-list > * { min-width: 0; }

.doc {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem;
  flex-wrap: wrap; overflow-wrap: anywhere;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input);
  padding: 1rem 1.25rem; text-decoration: none; color: inherit; font-weight: 600; font-size: .95rem;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.doc:hover { border-color: var(--accent); }
.doc em { font-style: normal; font-weight: 400; color: var(--ink-soft); font-size: .85rem; }

/* --- Pie ---------------------------------------------------------------- */
.site-footer { background: var(--deep); color: var(--deep-soft); padding-block: 3.5rem 2rem; margin-top: 2rem; }
.site-footer h2 { color: var(--deep-ink); font-size: 1.05rem; margin-bottom: .9rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.site-footer a { color: var(--deep-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer img { height: 42px; width: auto; margin-bottom: 1.25rem; }
.footer-legal {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--deep-line);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .85rem;
}

/* --- Entrada suave (una sola, y solo si el usuario no la ha desactivado) - */
/* La entrada solo se oculta si hay JavaScript para volver a mostrarla.
   Sin JS, la clase .js nunca se añade y el contenido se ve siempre. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); }
  .js .reveal.is-in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
}

@media print {
  .masthead, .exit-bar, .site-footer, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}
