/*
 * Páginas legales de Mi Paraíso (política de privacidad y términos de uso). Son HTML estático, sin
 * JavaScript: las arma scripts/paginas-legales.mjs en el build a partir de web/legal/. Usan los mismos
 * colores y tipografías que la página principal, con un diseño pensado para leer cómodo en el celular.
 */

@font-face {
  font-family: 'M PLUS Rounded 1c';
  font-weight: 800;
  font-display: swap;
  src: url('/fuentes/m-plus-rounded-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Onest';
  font-weight: 400;
  font-display: swap;
  src: url('/fuentes/onest-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Onest';
  font-weight: 700;
  font-display: swap;
  src: url('/fuentes/onest-700.woff2') format('woff2');
}

:root {
  --crema: #fff6e6;
  --crema-2: #fdebcb;
  --blanco: #fffdf8;
  --tinta: #13222b;
  --tinta-suave: #465660;
  --turquesa: #14b3a3;
  --turquesa-oscuro: #087064;
  --coral: #f4696a;
  --coral-oscuro: #b4303a;
  --mostaza: #f7b32b;
  --cielo: #d8edfb;
  --pasto-oscuro: #4caf5c;
  --bosque: #2a6e3d;

  --display: 'M PLUS Rounded 1c', 'Onest', system-ui, sans-serif;
  --texto: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(18px, 4vw, 40px);
  --ancho: 1120px;
  --sombra: 0 18px 40px -22px rgb(19 34 43 / 0.35), 0 4px 10px -6px rgb(19 34 43 / 0.18);
  --ease-salida: cubic-bezier(0.23, 1, 0.32, 1);

  color-scheme: light;
  scrollbar-color: var(--turquesa-oscuro) var(--crema-2);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background-color: var(--crema);
  color: var(--tinta);
  font: 400 1.0625rem/1.7 var(--texto);
  text-rendering: optimizeLegibility;
}

::selection {
  background-color: var(--mostaza);
  color: var(--tinta);
}

a {
  color: var(--turquesa-oscuro);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

:focus-visible {
  outline: 3px solid var(--mostaza);
  outline-offset: 3px;
  border-radius: 6px;
}

.saltar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background-color: var(--tinta);
  color: var(--crema);
  translate: 0 -160%;
  transition: translate 0.2s var(--ease-salida);
}
.saltar:focus-visible {
  translate: 0 0;
}

/* ---------- Barra superior ---------- */
.barra {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgb(255 246 230 / 0.94);
  box-shadow: 0 1px 0 rgb(19 34 43 / 0.1);
}
.barra-interior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--ancho) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 10px var(--gutter);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tinta);
  text-decoration: none;
}
.marca img {
  display: block;
  width: auto;
  height: 46px;
}
.marca-texto {
  font: 800 1.35rem/1 var(--display);
  letter-spacing: -0.01em;
}
.marca-mi,
.marca-paraiso {
  -webkit-text-stroke: 0.09em var(--tinta);
  paint-order: stroke fill;
}
.marca-mi {
  color: var(--mostaza);
}
.marca-paraiso {
  color: var(--coral);
}

.volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background-color: var(--blanco);
  color: var(--tinta);
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgb(19 34 43 / 0.14);
  transition:
    box-shadow 0.2s ease,
    scale 0.15s ease-out;
}
.volver svg {
  width: 18px;
  height: 18px;
  transition: translate 0.2s var(--ease-salida);
}
.volver:active {
  scale: 0.97;
}

/* ---------- Portada de la página ---------- */
.portada-legal {
  position: relative;
  overflow: hidden;
  background: linear-gradient(var(--cielo), var(--crema));
}
.portada-interior {
  position: relative;
  max-width: calc(var(--ancho) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 88px) var(--gutter) clamp(36px, 5vw, 56px);
}

/* Nube y estrella de fondo, en los tonos de la página: el mismo cuento, en versión tranquila. */
.portada-legal::before,
.portada-legal::after {
  position: absolute;
  content: '';
  pointer-events: none;
  background-color: currentColor;
}
.portada-legal::before {
  top: 18%;
  right: 6%;
  width: clamp(120px, 18vw, 220px);
  aspect-ratio: 120 / 56;
  color: rgb(255 255 255 / 0.85);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 56'%3E%3Cpath d='M24 54a20 20 0 0 1-2-40 26 26 0 0 1 48-6 20 20 0 0 1 30 18 15 15 0 0 1-2 28Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.portada-legal::after {
  bottom: 22%;
  right: 24%;
  width: clamp(28px, 3.5vw, 44px);
  aspect-ratio: 1;
  color: rgb(247 179 43 / 0.55);
  rotate: 12deg;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.portada-legal h1 {
  position: relative;
  max-width: 16ch;
  margin: 0;
  font: 800 clamp(2.4rem, 4.4vw + 1rem, 4rem) / 1.04 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.resalte {
  position: relative;
  display: inline-block;
  color: var(--coral);
  -webkit-text-stroke: 0.06em var(--tinta);
  paint-order: stroke fill;
}
.resalte svg {
  position: absolute;
  bottom: -0.22em;
  left: -2%;
  width: 104%;
  height: 0.32em;
  overflow: visible;
  color: var(--turquesa);
}
.entrada {
  position: relative;
  max-width: 56ch;
  margin: 22px 0 0;
  color: var(--tinta-suave);
  font-size: clamp(1.08rem, 0.4vw + 1rem, 1.22rem);
  line-height: 1.6;
}
.fecha {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background-color: var(--blanco);
  color: var(--tinta-suave);
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1.5px rgb(19 34 43 / 0.1);
}
.fecha svg {
  width: 16px;
  height: 16px;
  color: var(--turquesa-oscuro);
}

/* ---------- Cuerpo: índice + texto ---------- */
.cuerpo {
  display: grid;
  gap: 40px;
  max-width: calc(var(--ancho) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(64px, 8vw, 104px);
}
@media (min-width: 64rem) {
  .cuerpo {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(48px, 6vw, 88px);
    align-items: start;
  }
}

/* Índice: en escritorio acompaña la lectura. En el celular no se muestra: el resumen inicial ya orienta
   y así el texto empieza en la primera pantalla. */
.indice {
  display: none;
  padding: 18px 20px;
  border-radius: 22px;
  background-color: var(--blanco);
  box-shadow: inset 0 0 0 1.5px rgb(19 34 43 / 0.08);
}
@media (min-width: 64rem) {
  .indice {
    display: block;
    position: sticky;
    top: 96px;
  }
}
.indice-titulo {
  margin: 0 0 8px;
  font: 800 1rem/1.3 var(--display);
}
.indice ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: indice;
}
.indice a {
  display: block;
  padding: 5px 0;
  color: var(--tinta-suave);
  font-size: 0.93rem;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.texto {
  max-width: 68ch;
}
.texto > section + section {
  margin-top: clamp(36px, 4vw, 48px);
}
.texto h2 {
  margin: 0 0 10px;
  font: 800 clamp(1.35rem, 0.8vw + 1rem, 1.6rem) / 1.2 var(--display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.texto p {
  margin: 0;
}
.texto p + p,
.texto p + ul,
.texto ul + p {
  margin-top: 12px;
}
.texto ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.texto li {
  position: relative;
  padding-left: 24px;
}
.texto li::before {
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background-color: var(--turquesa);
  content: '';
}
.texto strong {
  font-weight: 700;
}

/* Resumen al inicio: lo esencial en cuatro líneas para quien no lee todo. */
.resumen {
  margin-bottom: clamp(36px, 4vw, 48px);
  padding: clamp(20px, 3vw, 28px);
  border-radius: 22px;
  background-color: var(--crema-2);
}
.resumen h2 {
  margin-bottom: 14px;
}
.resumen ul {
  gap: 12px;
}
.resumen li {
  padding-left: 34px;
}
.resumen li::before {
  top: 0.18em;
  left: 0;
  width: 24px;
  height: 24px;
  background: var(--turquesa)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313222b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

/* Contacto del titular al final: a quién escribir, con los dos caminos (WhatsApp y correo). */
.contacto {
  display: grid;
  gap: 14px;
  margin-top: clamp(40px, 5vw, 56px);
  padding: clamp(22px, 3vw, 32px);
  border-radius: 26px;
  background-color: var(--turquesa);
  color: var(--tinta);
  box-shadow: var(--sombra);
}
.contacto h2 {
  margin: 0;
}
.contacto p {
  margin: 0;
}
.contacto-nombre {
  font: 800 1.2rem/1.25 var(--display);
}
.contacto-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.contacto-acciones a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  background-color: var(--blanco);
  color: var(--tinta);
  font-size: 0.98rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: 0 6px 14px -8px rgb(19 34 43 / 0.45);
  transition:
    translate 0.2s var(--ease-salida),
    scale 0.15s ease-out;
}
.contacto-acciones svg {
  flex: none;
  width: 20px;
  height: 20px;
}
.contacto-acciones a:active {
  scale: 0.97;
}
.contacto small {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Pie ---------- */
.pie-legal {
  padding: 26px var(--gutter) 30px;
  background-image: linear-gradient(var(--pasto-oscuro), var(--bosque) 45%);
  color: rgb(255 255 255 / 0.92);
  font-size: 0.9rem;
}
.pie-interior {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: var(--ancho);
  margin: 0 auto;
}
.pie-legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.pie-legal a {
  color: #fff;
  font-weight: 700;
  text-decoration-color: rgb(255 255 255 / 0.45);
}
.pie-legal a[aria-current='page'] {
  text-decoration-color: var(--mostaza);
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-color: var(--coral);
  }
  .volver:hover {
    box-shadow: inset 0 0 0 1.5px var(--tinta);
  }
  .volver:hover svg {
    translate: -3px 0;
  }
  .indice a:hover {
    color: var(--turquesa-oscuro);
  }
  .contacto-acciones a:hover {
    translate: 0 -2px;
  }
  .pie-legal a:hover {
    text-decoration-color: #fff;
  }
}

@media (max-width: 30rem) {
  .marca-texto {
    display: none;
  }
}

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

/* Al imprimir: solo el texto, en negro, sin barra ni adornos. */
@media print {
  .barra,
  .indice,
  .contacto-acciones,
  .saltar,
  .portada-legal::before,
  .portada-legal::after {
    display: none;
  }
  body,
  .portada-legal,
  .resumen,
  .contacto {
    background: none;
    color: #000;
    box-shadow: none;
  }
  .cuerpo {
    display: block;
    padding-top: 0;
  }
}
