/* HOPE33 · hoja de estilos única del sitio (diseño v2).
   Sin recursos externos: las fuentes están en /fuentes (licencia OFL).
   Sin estilos en línea: la CSP los bloquea. Todo el movimiento es CSS y
   queda estático con prefers-reduced-motion. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fuentes/newsreader/newsreader-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fuentes/newsreader/newsreader-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fuentes/newsreader/newsreader-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fuentes/ibm-plex-sans/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fuentes/ibm-plex-sans/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fuentes/ibm-plex-mono/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fuentes/ibm-plex-mono/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --tinta: #1b2433;
  --tinta-profunda: #121a26;
  --crema: #fbf8f3;
  --crema-2: #f3eee5;
  --papel: #ffffff;
  --ambar: #e3a55b;        /* ámbar sobre tinta (7,28:1) y fondo de botones */
  --ambar-claro: #a8641b;  /* ámbar sobre claro: solo texto grande, adornos y bordes (4,40:1) */
  --ambar-texto: #8f5415;  /* ámbar para texto pequeño sobre claro (5,27:1 en crema-2) */
  --verde: #5fb58a;        /* solo sobre fondo oscuro */
  --gris: #4a5363;         /* texto secundario sobre claro (6,71:1 en crema-2) */
  --gris-claro: #c9ced8;   /* texto secundario sobre oscuro (9,29:1 o más) */
  --linea: #e6dfd3;
  --linea-oscura: rgba(251, 248, 243, 0.1);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ancho: 77.5rem;
  --texto: 42rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem);
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-top: 1.6em;
}
h3 {
  font-size: 1.4rem;
  margin-top: 1.4em;
}
em {
  font-weight: 400;
}
p,
ul,
ol,
table,
blockquote {
  margin: 0 0 1em;
}
strong,
b {
  font-weight: 600;
}

a {
  color: var(--ambar-texto);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--tinta);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--ambar-claro);
  outline-offset: 3px;
  border-radius: 2px;
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Salto al contenido */
.saltar {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  background: var(--crema);
  color: var(--tinta);
  font-weight: 600;
  border: 2px solid var(--tinta);
}
.saltar:focus {
  top: 1rem;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 48rem) {
  .contenedor {
    padding: 0 1.75rem;
  }
}

/* ---------- Botones ---------- */
.boton {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.boton:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.boton-ambar {
  background: var(--ambar);
  color: var(--tinta);
}
.boton-ambar:hover {
  background: #eab574;
  color: var(--tinta);
}
.boton-contorno {
  border-color: rgba(251, 248, 243, 0.28);
  color: var(--crema);
}
.boton-contorno:hover {
  border-color: var(--ambar);
  color: var(--crema);
}
.boton-tinta {
  background: var(--tinta);
  color: var(--crema);
}
.boton-tinta:hover {
  background: #2a3649;
  color: var(--crema);
}
.boton-chico {
  padding: 0.5rem 1.05rem;
  font-size: 0.94rem;
}

/* ---------- Logotipo 2a: círculo con H y «33» en el hombro, más «Hope³³» ---------- */
.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--crema);
  text-decoration: none;
}
.marca:hover {
  color: var(--crema);
}
.sello {
  position: relative;
  flex: 0 0 auto;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  background: var(--crema);
  overflow: hidden;
}
.sello-h {
  position: absolute;
  left: 0.375rem;
  top: 0.4375rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5625rem;
  line-height: 1;
  color: var(--tinta);
}
.sello-33 {
  position: absolute;
  left: 1.5rem;
  top: 0.5625rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.5rem;
  line-height: 1;
  color: var(--ambar-texto);
}
.sello-grande {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--tinta);
}
.sello-grande .sello-h {
  left: 0.5625rem;
  top: 0.625rem;
  font-size: 2.3125rem;
  color: var(--crema);
}
.sello-grande .sello-33 {
  left: 2.3125rem;
  top: 0.8125rem;
  font-size: 0.6875rem;
  color: var(--ambar);
}
.logotipo {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logotipo sup {
  margin-left: 1px;
  font-size: 0.5em;
  font-weight: 500;
  color: var(--ambar);
}

/* ---------- Encabezado fijo y translúcido ---------- */
.encabezado {
  position: relative;
  z-index: 20;
  background: rgba(18, 26, 38, 0.92);
  border-bottom: 1px solid rgba(251, 248, 243, 0.08);
  color: var(--crema);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .encabezado {
    background: rgba(18, 26, 38, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
  }
}
/* En pantallas angostas el menú ocupa dos líneas: ahí el encabezado no queda fijo */
@media (min-width: 48rem) {
  .encabezado {
    position: sticky;
    top: 0;
  }
}
.encabezado .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.encabezado :focus-visible,
.seccion-oscura :focus-visible,
.pie :focus-visible {
  outline-color: var(--ambar);
}
.menu {
  order: 3;
  flex: 1 0 100%;
}
.menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu a {
  display: inline-block;
  padding: 0.45rem 0;
  color: var(--gris-claro);
  font-size: 0.94rem;
  text-decoration: none;
  white-space: nowrap;
}
.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--crema);
  text-decoration: underline;
  text-decoration-color: var(--ambar);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}
.acciones {
  display: flex;
  gap: 0.6rem;
  margin-left: auto;
}
.acciones .boton-ambar {
  display: none;
}
@media (min-width: 30rem) {
  .acciones .boton-ambar {
    display: inline-block;
  }
}
@media (min-width: 64rem) {
  .menu {
    order: 0;
    flex: 0 1 auto;
    margin-left: auto;
  }
  .menu ul {
    gap: 0 1.6rem;
  }
  .acciones {
    margin-left: 0;
  }
}

/* ---------- Bloques comunes ---------- */
main {
  display: block;
  flex: 1 0 auto;
}

/* ---------- Ingresar (sección del inicio y página /ingresar) ---------- */
.ingresar {
  border-top: 1px solid var(--linea);
}
.ingreso-caja {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  max-width: 35rem;
  margin: 0 auto;
  text-align: center;
}
.ingreso-caja > * {
  margin: 0;
}
.ingreso-caja h1,
.ingreso-caja h2 {
  font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.25rem);
  letter-spacing: -0.01em;
}
.ingreso-caja p {
  color: var(--gris);
}
.ingreso-caja .nota {
  font-size: 0.8125rem;
}
.ingreso {
  width: 100%;
  text-align: left;
}
.ingreso label {
  display: block;
  margin: 0 0 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.ingreso-fila {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.ingreso-campo {
  flex: 1 1 13.75rem;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 0.375rem 0 1.25rem;
  border: 1px solid #8a8173;
  border-radius: 999px;
  background: var(--papel);
}
.ingreso-campo:focus-within {
  outline: 3px solid var(--ambar-claro);
  outline-offset: 2px;
}
.ingreso-campo input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.875rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--tinta);
  font: inherit;
  font-size: 1rem;
}
.ingreso-campo input::placeholder {
  color: #626b7a;
  opacity: 1;
}
.ingreso-sufijo {
  padding-right: 0.875rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--gris);
}
.ingreso .boton {
  flex: 0 0 auto;
  padding: 0.875rem 1.5rem;
}
.aviso-error {
  width: 100%;
  margin: 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid #a3302a;
  border-left-width: 6px;
  border-radius: 0.75rem;
  background: #fbeceb;
  color: var(--tinta);
  text-align: left;
}
.aviso-error p {
  margin: 0;
  color: var(--tinta);
}

/* ---------- Páginas interiores ---------- */
main {
  padding: 3.5rem 0 4.5rem;
}
@media (min-width: 48rem) {
  main {
    padding: 5.5rem 0 7rem;
  }
}
main.inicio {
  padding: 0;
}
.prosa {
  max-width: var(--texto);
}
.etiqueta {
  display: block;
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ambar-texto);
}
.bajada {
  font-size: 1.2rem;
  color: var(--gris);
}

.cita {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 3px solid var(--ambar-claro);
}
.cita blockquote {
  margin: 0;
}
.cita p {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
  line-height: 1.4;
}
.cita figcaption {
  font-size: 0.95rem;
  color: var(--gris);
}

/* Medidas de seguridad */
.medidas {
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}
.medidas li {
  margin: 0 0 0.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--linea);
  border-radius: 1.125rem;
  background: var(--papel);
  color: var(--gris);
}
.medidas strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--tinta);
}

/* Políticas */
.aviso-borrador {
  margin: 0 0 2rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--ambar-claro);
  border-left-width: 6px;
  border-radius: 0.75rem;
  background: #fdf1e1;
  color: var(--tinta);
}
.aviso-borrador p {
  margin: 0;
}
.indice ol {
  padding-left: 1.4rem;
}
.indice li {
  margin: 0.15rem 0;
}
.politicas h2 {
  scroll-margin-top: 6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--linea);
}
.politicas li {
  margin: 0.3rem 0;
}
.politicas li > ul {
  margin: 0.4rem 0 0.6rem;
}
.politicas li > p {
  margin: 0 0 0.4rem;
}

.tabla {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--linea);
  border-radius: 0.75rem;
  background: var(--papel);
}
.tabla:focus-visible {
  outline-offset: 0;
}
table {
  width: 100%;
  min-width: 34rem;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th,
td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--linea);
  text-align: left;
  vertical-align: top;
}
th {
  font-weight: 600;
  background: var(--crema-2);
}
tr:last-child td {
  border-bottom: 0;
}
.version {
  font-weight: 600;
}

/* Página 404 */
.error-codigo {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4rem, 3rem + 6vw, 7rem);
  line-height: 1;
  color: var(--ambar-claro);
}

/* ---------- Pie ---------- */
.pie {
  background: var(--tinta-profunda);
  color: var(--gris-claro);
  font-size: 0.9375rem;
}
.pie a {
  display: inline-block;
  padding: 0.2rem 0;
  color: var(--gris-claro);
}
.pie a:hover {
  color: var(--crema);
}
.pie-columnas {
  display: grid;
  gap: 2.25rem;
  padding-top: 4rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 40rem) {
  .pie-columnas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 64rem) {
  .pie-columnas {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.pie p,
.pie ul,
.pie figure,
.pie blockquote {
  margin: 0;
}
.pie ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0;
  list-style: none;
}
.pie .logotipo {
  margin-bottom: 0.875rem;
  color: var(--crema);
}
.pie blockquote {
  margin-bottom: 0.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--crema);
}
.pie figcaption {
  font-size: 0.8125rem;
}
.pie-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1.125rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid rgba(251, 248, 243, 0.08);
  font-size: 0.8125rem;
}

/* ---------- Movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  @view-transition {
    navigation: auto;
  }
}
/* Vuelta desde la plataforma al cerrar sesión (/ingresar?salida=…): el mismo aviso, en tinta en vez de rojo (no es un error). */
.aviso-salida {
  border-color: var(--tinta);
  background: var(--papel);
}
