/* La web legal de pidio.app (PIDIO 120, 27 nov 2026). El boceto firmado por Guille, literal:
   "Si, asi (Recomendado)" (Pidio-revision\web-boceto\, fuera del repo). Las medidas son las del
   boceto: móvil por debajo de 720 de ancho, escritorio desde 720. Los colores son los de
   `PaletaV2` (`src/theme.ts`), con el mismo nombre; `scripts/pruebas/web-legal.test.mjs`
   comprueba cada hex de este fichero contra su token, de día y de noche. Fuera de las dos listas
   de variables no hay ningún color escrito. Las fuentes, servidas desde aquí (OFL, en fuentes/). */

@font-face {
  font-family: 'Playfair Display';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('/fuentes/PlayfairDisplay_700Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fuentes/InstrumentSans_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fuentes/InstrumentSans_600SemiBold.ttf') format('truetype');
}

/* PaletaV2.dia */
:root {
  --fondo: #F5EEE5;
  --tarjeta: #FFFAF3;
  --tinta: #2A2320;
  --tintaSuave: #6F6359;
  --linea: #E3D9CB;
  --acento: #C23F2A;
  color-scheme: light dark;
}

/* PaletaV2.noche */
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #2A2320;
    --tarjeta: #352C28;
    --tinta: #F5EEE5;
    --tintaSuave: #B3A69A;
    --linea: #4A3F39;
    --acento: #E8735C;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--tinta);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-weight: 400;
}

h1, h2, h3, p, ol, ul { margin: 0; }

a { color: var(--acento); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 2px; }

.separador { color: var(--tintaSuave); }

/* ── La portada ───────────────────────────────────────────────────────────── */

.portada { padding: 0 20px 32px; }

.portada main { width: 100%; max-width: 680px; margin: 0 auto; }

.presentacion {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 64px 0 40px;
}

.cuchara-grande { display: block; flex-shrink: 0; width: 54.8px; height: 112px; color: var(--tinta); }

.presentacion h1 {
  margin-top: 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.1;
}

.frase { font-size: 18px; line-height: 1.35; max-width: 300px; }

.subfrase { font-size: 14px; line-height: 1.4; color: var(--tintaSuave); }

.como { margin-top: 8px; text-align: left; }

.como h2 {
  margin-bottom: 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 29.3px;
}

.pasos { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }

.paso { display: flex; flex-direction: column; gap: 6px; }

.numero {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  color: var(--acento);
}

.paso h3 { font-weight: 600; font-size: 17px; line-height: 1.3; }

.paso p { font-size: 16px; line-height: 20.8px; color: var(--tintaSuave); }

.pie-portada { width: 100%; max-width: 680px; margin: 40px auto 0; }

/* En el móvil, los enlaces van en filas de 52 con su línea y la flecha. */
.legales { display: flex; flex-direction: column; border-top: 1px solid var(--linea); }

.legales a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--linea);
  color: var(--tinta);
  font-size: 16px;
}

.legales .separador { display: none; }

.chevron { flex-shrink: 0; color: var(--tintaSuave); }

.pie-portada .contacto { margin-top: 20px; font-size: 15px; line-height: 1.4; }

.antes-del-lugar { display: none; }

.lugar { display: block; margin-top: 8px; font-size: 12px; line-height: 1.2; color: var(--tintaSuave); }

/* ── Las páginas legales y la 404 ─────────────────────────────────────────── */

.barra { border-bottom: 1px solid var(--linea); }

.barra-dentro { max-width: 680px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; }

.marca { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--tinta); font-weight: 700; }

.marca span { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; }

.cuchara-pequena { display: block; flex-shrink: 0; width: 13.7px; height: 28px; }

.legal main { flex-grow: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 16px 20px 0; }

.legal h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 37.3px;
}

.indice { margin-top: 16px; background: var(--tarjeta); border-radius: 14px; padding: 16px; }

.indice-titulo { margin-bottom: 8px; font-size: 12px; line-height: 14.6px; color: var(--tintaSuave); }

.indice ul { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 24px; }

/* 44 de objetivo, como pide el prompt; el boceto los tenía a 27,5 (4 + 19,5 + 4). */
.indice a { display: flex; align-items: center; min-height: 44px; font-size: 15px; line-height: 1.3; }

.apartado { margin-top: 28px; }

.apartado h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 29.3px;
  scroll-margin-top: 16px;
}

.apartado p { margin-top: 8px; font-size: 16px; line-height: 20.8px; }

.version { margin-top: 28px; font-size: 12px; line-height: 14.6px; color: var(--tintaSuave); }

.ir-a-portada { margin-top: 16px; font-size: 16px; line-height: 20.8px; }

.ir-a-portada a { display: inline-flex; align-items: center; min-height: 44px; }

.pie-legal {
  width: 100%;
  max-width: 680px;
  margin: 28px auto 0;
  padding: 16px 20px 32px;
  border-top: 1px solid var(--linea);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pie-legal nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pie-legal nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-size: 15px; }

.pie-legal .contacto { font-size: 15px; }

/* ── Escritorio (desde 720 de ancho) ──────────────────────────────────────── */

@media (min-width: 720px) {
  .portada { padding: 40px; }

  .presentacion { gap: 18px; padding: 48px 0 40px; }

  .cuchara-grande { width: 68.5px; height: 140px; }

  .presentacion h1 { font-size: 64px; }

  .frase { font-size: 22px; max-width: none; }

  .subfrase { font-size: 15px; }

  .como { margin-top: 16px; }

  .pasos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }

  /* En ancho, el pie baja al final y los enlaces van en una fila. */
  .pie-portada {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--linea);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .portada main { margin-bottom: 40px; }

  .legales { flex-direction: row; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; border-top: 0; }

  .legales a { min-height: 44px; padding: 0 4px; border-bottom: 0; color: var(--acento); }

  .legales .separador { display: inline; }

  .legales .chevron { display: none; }

  .pie-portada .contacto { margin-top: 0; text-align: center; }

  .antes-del-lugar { display: inline; }

  .lugar { display: inline; margin-top: 0; font-size: 15px; line-height: 1.4; }

  .indice ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
