/* Paleta viva: azul, amarillo y verde sobre papel azulado.
   Cambiar los tres colores de marca aquí cuando se defina la identidad visual (T-011). */
:root {
  --azul: #1747e8;
  --azul-hondo: #0a1f5c;
  --amarillo: #ffd21f;
  --verde: #10b36a;

  --papel: #f5f8ff;
  --tarjeta: #ffffff;
  --tinta: var(--ink);
  --tinta-suave: #43557a;
  --linea: #cfd9ee;
  --enlace: #1747e8;
  --error: #b3261e;
  --sobre-azul: #ffffff;   /* texto sobre el color principal */
  --realce: var(--amarillo); /* segunda línea del nombre en la portada */
  --ink: #0b1b3a;          /* texto fijo sobre bloques de color vivo */
  --sobre-verde: #04281a;  /* texto sobre el tercer color de acento */

  --titulo: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --texto: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radio: 1.25rem;
}
:root[data-modo="oscuro"] {
  --papel: #071433;
  --tarjeta: #0f2150;
  --tinta: #eef3ff;
  --tinta-suave: #a9b8dc;
  --linea: #1d2f66;
  --enlace: #8fb0ff;
  --error: #ff9b8f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-modo="claro"]) {
    --papel: #071433;
    --tarjeta: #0f2150;
    --tinta: #eef3ff;
    --tinta-suave: #a9b8dc;
    --linea: #1d2f66;
    --enlace: #8fb0ff;
    --error: #ff9b8f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
html[data-texto="1"] { font-size: 112.5%; }
html[data-texto="2"] { font-size: 125%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.125rem;
  line-height: 1.55;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; box-shadow: 0 0 0 6px var(--azul-hondo); border-radius: 0.4rem; }

.pagina { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 52rem) { .pagina { padding: 0 2rem; } }

/* ---------- Barra superior fija ---------- */
.barra {
  position: sticky; top: 0; z-index: 20;
  background: var(--papel); border-bottom: 2px solid var(--tinta);
}
.barra .pagina { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; min-height: 4rem; }
.marca { font-family: var(--titulo); font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.15rem; white-space: nowrap; }
.barra nav { display: none; gap: 1.5rem; }
.barra nav a { text-decoration: none; font-weight: 600; }
.barra nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--amarillo); }
.barra-derecha { display: flex; align-items: center; gap: 0.75rem; }
.barra .accesibilidad { display: none; }
@media (min-width: 52rem) {
  .barra nav { display: flex; }
  .barra .accesibilidad { display: flex; }
}

.accesibilidad { display: flex; gap: 0.35rem; align-items: center; }
.accesibilidad button {
  min-width: 2.5rem; height: 2.5rem; padding: 0 0.6rem;
  font: 700 0.95rem var(--texto); color: var(--tinta); background: transparent;
  border: 2px solid var(--tinta); border-radius: 0.6rem; cursor: pointer;
}
.accesibilidad button:hover { background: var(--amarillo); color: var(--ink); }
.accesibilidad button[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.5rem;
  background: var(--azul); color: var(--sobre-azul);
  font: 700 1.0625rem var(--texto); text-decoration: none; white-space: nowrap;
  border: 2px solid var(--azul); border-radius: 3rem; cursor: pointer;
  transition: transform 0.12s ease;
}
.boton:hover { transform: translateY(-2px); }
.boton.amarillo { background: var(--amarillo); border-color: var(--amarillo); color: var(--ink); }
.boton.contorno { background: transparent; border-color: currentColor; color: inherit; }
.boton.compacto { min-height: 2.5rem; padding: 0.4rem 1.1rem; font-size: 1rem; }
.boton[disabled] { opacity: 0.6; cursor: progress; transform: none; }
@media (prefers-reduced-motion: reduce) { .boton { transition: none; } .boton:hover { transform: none; } }

/* ---------- Presentación ---------- */
.heroe { background: var(--azul); color: var(--sobre-azul); overflow: hidden; }
.heroe-grid { display: grid; gap: 2rem; padding-top: clamp(2.5rem, 7vw, 4.5rem); }
.heroe-texto { display: grid; gap: 1.5rem; align-content: center; padding-bottom: 0.5rem; }
.chip-lugar {
  justify-self: start; margin: 0; padding: 0.35rem 1rem;
  background: var(--verde); color: var(--sobre-verde); font-weight: 700; border-radius: 3rem; font-size: 1rem;
}
h1 {
  margin: 0; font-family: var(--titulo); font-weight: 800;
  font-size: clamp(3.4rem, 15vw, 7.5rem); line-height: 0.9; letter-spacing: -0.045em;
}
h1 span { display: block; }
h1 span + span { color: var(--realce); }
.lede { margin: 0; font-size: 1.375rem; line-height: 1.4; max-width: 28rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.heroe .boton.contorno { color: var(--sobre-azul); }

.heroe-foto { position: relative; margin: 0; align-self: end; justify-self: center; max-width: 34rem; width: 100%; }
/* La luna: un círculo de color detrás del retrato. Se sale por abajo y el borde de la portada lo recorta. */
.heroe-foto::before {
  content: ""; position: absolute; width: 94%; aspect-ratio: 1; left: 3%; bottom: -38%;
  border-radius: 50%; background: var(--amarillo);
}
.heroe-foto picture, .heroe-foto img { position: relative; display: block; width: 100%; height: auto; }
.heroe-foto img { filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22)); }
.heroe-foto::after {
  content: ""; position: absolute; width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: var(--verde); right: 2%; top: 16%; border: 4px solid var(--azul);
}

@media (min-width: 52rem) {
  .heroe-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; align-items: end; padding-top: clamp(3rem, 7vw, 5rem); }
  .heroe-texto { padding-bottom: clamp(3rem, 7vw, 5rem); }
  .heroe-foto { justify-self: end; }
}

/* Cinta que repite el mensaje */
.cinta { background: var(--amarillo); color: var(--ink); overflow: hidden; border-block: 2px solid var(--ink); }
.cinta-pista { display: flex; width: max-content; animation: correr 40s linear infinite; }
.cinta-pista .grupo { display: flex; }
.cinta-pista span {
  padding: 0.7rem 1.5rem; font-family: var(--titulo); font-weight: 800; font-size: 1.25rem; white-space: nowrap; letter-spacing: -0.01em;
}
.cinta-pista span::after { content: "\2022"; margin-left: 3rem; color: var(--azul); }
@keyframes correr { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .cinta-pista { animation: none; width: auto; flex-wrap: wrap; }
  .cinta-pista .grupo + .grupo { display: none; }
  .cinta-pista .grupo span:nth-child(n+4) { display: none; }
}

/* ---------- Secciones ---------- */
.seccion { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
#contacto { padding-top: 0; }
.seccion h2 {
  margin: 0 0 0.5rem; font-family: var(--titulo); font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1; letter-spacing: -0.035em;
}
.seccion .intro { margin: 0 0 2rem; color: var(--tinta-suave); max-width: 34rem; }

/* Temas: bloques de color */
.temas-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.tema {
  display: grid; align-content: space-between; gap: 1.25rem; padding: 1.5rem; min-height: 15rem;
  border-radius: var(--radio); border: 2px solid var(--ink); color: var(--ink);
}
.tema.azul { background: var(--azul); color: var(--sobre-azul); }
.tema.amarillo { background: var(--amarillo); }
.tema.verde { background: var(--verde); }
.tema.hondo { background: var(--azul-hondo); color: #fff; border-color: var(--azul-hondo); }
.tema h3 { margin: 0 0 0.5rem; font-family: var(--titulo); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1.02; }
.tema p { margin: 0; }
.tema { min-width: 0; }
.tema .boton { white-space: normal; text-align: left; justify-self: start; border-radius: 1.5rem; background: transparent; color: inherit; border-color: currentColor; min-height: 2.5rem; padding: 0.35rem 1.1rem; font-size: 1rem; }
.tema .boton:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.tema.azul .boton:hover, .tema.hondo .boton:hover { background: var(--amarillo); color: var(--ink); border-color: var(--amarillo); }
@media (min-width: 38rem) { .temas-lista { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .temas-lista { grid-template-columns: repeat(4, 1fr); } }

/* Reglas de datos */
.datos { background: var(--azul-hondo); color: #fff; }
.datos .intro { color: rgba(255,255,255,.78); }
.promesas { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.promesas li { display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 4px solid var(--amarillo); }
.promesas strong { font-family: var(--titulo); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1.05; color: var(--amarillo); }
.promesas span { color: rgba(255,255,255,.88); }
.promesas a { color: #fff; }
@media (min-width: 52rem) { .promesas { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

/* ---------- Participa ---------- */
.participa { background: var(--amarillo); color: var(--ink); }
.participa .intro { color: var(--ink); }
.participa .intro a { color: var(--ink); font-weight: 600; }
.participa-grid { display: grid; gap: 2rem; }
@media (min-width: 64rem) { .participa-grid { grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; } }

.tarjeta-form {
  background: var(--tarjeta); color: var(--tinta);
  border: 2px solid var(--ink); border-radius: var(--radio); padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 8px 8px 0 var(--ink);
}
.registro { display: grid; gap: 1.25rem; }
.registro fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 1rem; }
.registro legend { padding: 0; margin: 0 0 0.75rem; font-family: var(--titulo); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1.1; }
.progreso { display: none; margin: 0; color: var(--tinta-suave); font-size: 1rem; font-weight: 600; }
.js .progreso { display: block; }
.progreso .barra-progreso { display: block; height: 8px; margin-top: 0.4rem; background: var(--linea); border-radius: 8px; overflow: hidden; }
.progreso .barra-progreso i { display: block; height: 100%; width: 33%; background: var(--azul); border-radius: 8px; transition: width 0.25s; }
@media (prefers-reduced-motion: reduce) { .progreso .barra-progreso i { transition: none; } }

.campo { display: grid; gap: 0.35rem; }
.campo label, .etiqueta { font-weight: 700; }
.opcional { font-weight: 400; color: var(--tinta-suave); }
.ayuda { margin: 0; color: var(--tinta-suave); font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; color: var(--tinta); background: var(--papel);
  border: 2px solid var(--tinta-suave); border-radius: 0.75rem; padding: 0.7rem 0.9rem; min-height: 3rem;
}
textarea { min-height: 7.5rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--azul); outline-offset: 1px; border-color: var(--azul); }
:root[data-modo="oscuro"] input:focus-visible, :root[data-modo="oscuro"] select:focus-visible, :root[data-modo="oscuro"] textarea:focus-visible { outline-color: var(--amarillo); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.error { margin: 0; color: var(--error); font-size: 0.95rem; font-weight: 700; }
.error:empty { display: none; }

.fichas { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ficha { position: relative; }
.ficha input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ficha span {
  display: inline-block; padding: 0.55rem 1rem; min-height: 2.75rem; line-height: 1.6; font-weight: 600;
  border: 2px solid var(--tinta); border-radius: 3rem; background: var(--papel);
}
.ficha input:checked + span { background: var(--azul); border-color: var(--azul); color: var(--sobre-azul); }
.ficha input:focus-visible + span { outline: 3px solid var(--amarillo); outline-offset: 2px; box-shadow: 0 0 0 6px var(--azul-hondo); }

.casilla { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.75rem; align-items: start; }
.casilla input { width: 1.5rem; height: 1.5rem; margin: 0.15rem 0 0; accent-color: var(--azul); }
.casilla label { font-weight: 400; }
.casilla a { color: var(--enlace); }
.casilla .error { grid-column: 2; }

.acciones { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.estado { margin: 0; min-height: 1.5rem; font-weight: 700; }
.estado.mal { color: var(--error); }
.js .paso[hidden] { display: none !important; }

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.gracias { display: grid; gap: 1rem; }
.gracias h3 { margin: 0; font-family: var(--titulo); font-weight: 800; font-size: 2.25rem; letter-spacing: -0.03em; line-height: 1.05; }
.gracias p { margin: 0; }
.gracias a { color: var(--enlace); font-weight: 600; }
.gracias:focus { outline: none; }

/* ---------- Redes ---------- */
.redes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.redes a {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; text-decoration: none;
  padding: 1rem 1.25rem; border: 2px solid var(--tinta); border-radius: 1rem; background: var(--tarjeta);
}
.redes a:hover { background: var(--amarillo); color: var(--ink); border-color: var(--ink); }
.redes .red { font-family: var(--titulo); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.redes .usuario { color: var(--tinta-suave); overflow-wrap: anywhere; text-align: right; }
.redes a:hover .usuario { color: var(--ink); }
@media (min-width: 44rem) { .redes { grid-template-columns: 1fr 1fr; } }

.contacto-dato { margin: 0; font-size: 1.5rem; font-family: var(--titulo); font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.contacto-dato a { color: var(--enlace); }

/* ---------- Pie ---------- */
footer { background: var(--azul-hondo); color: rgba(255,255,255,.85); padding: 1.75rem 0 2.5rem; font-size: 0.95rem; }
footer .pagina { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
footer a { color: #fff; }
footer .accesibilidad button { color: #fff; border-color: #fff; }
footer .accesibilidad button[aria-pressed="true"] { background: #fff; color: var(--azul-hondo); }
footer .accesibilidad .rotulo { margin-right: 0.35rem; }
@media (min-width: 52rem) { footer .accesibilidad { display: none; } }

/* ---------- Aviso de privacidad ---------- */
.documento { max-width: 46rem; padding: 2.5rem 1rem 3.5rem; margin: 0 auto; }
.documento h1 { font-size: clamp(2.4rem, 8vw, 3.75rem); line-height: 1; letter-spacing: -0.035em; margin-bottom: 1.5rem; color: var(--tinta); }
.documento h2 { font-family: var(--titulo); font-weight: 800; font-size: 1.5rem; margin: 2.25rem 0 0.5rem; letter-spacing: -0.02em; }
.documento p, .documento li { max-width: 40rem; }
.documento a { color: var(--enlace); }
.completar { background: #ffe9a8; color: #3a2d00; padding: 0 0.25rem; border-radius: 2px; font-weight: 600; }
:root[data-modo="oscuro"] .completar { background: #5c4a00; color: #fff3c9; }
@media (prefers-color-scheme: dark) { :root:not([data-modo="claro"]) .completar { background: #5c4a00; color: #fff3c9; } }

/* Evita que correos largos ensanchen la página en pantallas estrechas */
.seccion { overflow-wrap: anywhere; }
.participa-grid > *, .promesas li, .tarjeta-form { min-width: 0; }

/* Ajustes tras revisar capturas */
.tema h3 { overflow-wrap: normal; }
@media (min-width: 72rem) { .tema h3 { font-size: 1.5rem; } }
.redes .red { white-space: nowrap; overflow-wrap: normal; flex-shrink: 0; }
.contacto-dato { font-size: clamp(1.05rem, 5.4vw, 1.5rem); }
.promesas li { align-content: start; }
@media (min-width: 52rem) {
  .heroe-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  h1 { font-size: clamp(4.5rem, 8.2vw, 6.75rem); }
}


/* Espacios de la portada: el retrato sube hasta cerca del borde de arriba, sin hueco muerto */
@media (min-width: 52rem) {
  .heroe-grid { padding-top: 2.5rem; }
  .heroe-texto { padding-bottom: 2.5rem; }
  .heroe-foto { width: 120%; max-width: none; margin-left: -20%; }
}
@media (min-width: 64rem) {
  .heroe-grid { padding-top: 2rem; }
  .heroe-foto { width: 122%; margin-left: -22%; }
}

/* Tema «Otro»: franja a todo el ancho al final de la cuadrícula */
.tema-otro { grid-column: 1 / -1; min-height: 0; }
@media (min-width: 38rem) {
  .tema-otro { grid-template-columns: 1fr auto; align-items: center; column-gap: 2rem; }
  .tema-otro .boton { justify-self: end; white-space: nowrap; }
}

.participa .redes { margin-top: 1.5rem; }
.redes a { color: var(--tinta); }
/* Panel flotante de redes */
.panel-redes { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 0.35rem; padding: 0.45rem; background: var(--tarjeta); border: 2px solid var(--ink); border-right: 0; border-radius: 1rem 0 0 1rem; box-shadow: -3px 3px 0 var(--ink); }
.panel-redes a { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: var(--tinta); transition: background .15s, color .15s, transform .15s; }
.panel-redes a svg { width: 1.35rem; height: 1.35rem; }
.panel-redes a:hover, .panel-redes a:focus-visible { background: var(--amarillo); color: var(--ink); transform: scale(1.08); }
@media (max-width: 40rem) { .panel-redes { padding: 0.3rem; gap: 0.2rem; } .panel-redes a { width: 2.2rem; height: 2.2rem; } .panel-redes a svg { width: 1.1rem; height: 1.1rem; } }
