/*
 * Las cuentas claras: estilos del sitio.
 * Mismos colores y tipografía que la app (src/theme/palette.ts), con modo oscuro automático.
 * Pensado primero para el celular; desde 52rem (unos 830 px) se acomoda en dos columnas.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/recursos/fuentes/Inter-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/recursos/fuentes/Inter-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/recursos/fuentes/Inter-800.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --fondo: #f8f7fb;
  --tarjeta: #ffffff;
  --superficie: #f1eef6;
  --borde: #e7e3ee;
  --texto: #1c1726;
  --texto-2: #4e4859;
  --texto-3: #6e6a7c;
  --marca: #6a00d4;
  --boton: #6a00d4;
  --boton-presionado: #5a00b4;
  --lavanda: #f3ebfc;
  --lavanda-presionada: #e9d9f9;
  --sobre-lavanda: #6a00d4;
  --foco: #6a00d4;
  --exito: #0f766e;
  --sombra: 0 1px 2px rgb(28 23 38 / 6%), 0 10px 30px rgb(28 23 38 / 9%);
  --radio: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #121019;
    --tarjeta: #1b1824;
    --superficie: #262230;
    --borde: #2e2a3a;
    --texto: #f3f1f8;
    --texto-2: #c6c1d1;
    --texto-3: #9c96ab;
    --marca: #c6a2f5;
    --boton: #8b44ee;
    --boton-presionado: #7a2fe0;
    --lavanda: #2a1c45;
    --lavanda-presionada: #3a2861;
    --sobre-lavanda: #d9c2fa;
    --foco: #b98af2;
    --exito: #4fd1c0;
    --sombra: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px rgb(0 0 0 / 35%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--marca);
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 10px;
}

h1,
h2,
h3 {
  color: var(--texto);
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

.contenedor {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.angosto {
  max-width: 42rem;
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--boton);
  color: #fff;
  font-weight: 600;
}

.saltar:focus {
  top: 1rem;
}

/* ---------- Encabezado y pie ---------- */

.encabezado {
  padding-block: 1rem;
}

.encabezado .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-block;
  border-radius: 10px;
}

.logo img {
  height: 2.75rem;
  width: auto;
}

.encabezado-enlace {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--lavanda);
  color: var(--sobre-lavanda);
  white-space: nowrap;
}

.encabezado-enlace:hover {
  background: var(--lavanda-presionada);
}

.pie {
  margin-top: 3.5rem;
  border-top: 1px solid var(--borde);
  padding-block: 2rem 2.5rem;
  font-size: 0.9rem;
  color: var(--texto-3);
}

.pie nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.pie a {
  color: var(--texto-2);
}

.pie p {
  margin: 0.25rem 0;
}

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--boton);
  color: #fff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.boton:hover,
.boton:active {
  background: var(--boton-presionado);
}

.boton svg {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
}

.boton-secundario {
  background: var(--lavanda);
  color: var(--sobre-lavanda);
}

.boton-secundario:hover,
.boton-secundario:active {
  background: var(--lavanda-presionada);
}

.boton-ancho {
  width: 100%;
}

/* ---------- Inicio ---------- */

.portada {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: 1.5rem 3.5rem;
}

.portada-texto {
  text-align: center;
}

.portada h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 9vw, 3.6rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.bajada {
  margin: 0 auto 1.75rem;
  max-width: 30rem;
  font-size: 1.15rem;
  color: var(--texto-2);
}

.nota {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--texto-3);
}

.portada-imagen {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

@media (min-width: 52rem) {
  .portada {
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    padding-block: 3rem 5rem;
  }

  .portada-texto {
    text-align: left;
  }

  .bajada {
    margin-inline: 0;
  }
}

.captura {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: #f8f7fb;
  box-shadow: var(--sombra);
}

.captura-suelta {
  margin: 0;
  filter: drop-shadow(0 8px 22px rgb(28 23 38 / 18%));
}

@media (prefers-color-scheme: dark) {
  .captura-suelta {
    filter: drop-shadow(0 8px 22px rgb(0 0 0 / 55%));
  }
}

.seccion {
  padding-block: 3rem;
}

.seccion-titulo {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
}

.seccion-bajada {
  margin: 0 auto 2rem;
  max-width: 34rem;
  text-align: center;
  color: var(--texto-2);
  font-size: 1.05rem;
}

/* Cómo funciona: tres pasos numerados. */
.pasos {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.pasos li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  align-items: start;
  align-content: start;
  padding: 1.25rem;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--tarjeta);
  color: var(--texto-2);
  counter-increment: paso;
}

.pasos li::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--lavanda);
  color: var(--sobre-lavanda);
  font-weight: 800;
  font-size: 1.1rem;
}

.pasos strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--texto);
  font-size: 1.05rem;
}

@media (min-width: 52rem) {
  .pasos {
    grid-template-columns: repeat(3, 1fr);
  }

  .pasos li {
    grid-template-columns: 1fr;
  }
}

/* Lo que hace la app: texto y captura, alternados en pantallas anchas. */
.funciones {
  display: grid;
  gap: 4rem;
}

.funcion {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.funcion h3 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.funcion p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--texto-2);
}

.funcion figure {
  width: 100%;
  max-width: 24rem;
  justify-self: center;
}

@media (min-width: 52rem) {
  .funcion {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .funcion:nth-child(even) figure {
    order: -1;
  }
}

/* Instalar: bloque lavanda. */
.instalar {
  padding: 2.25rem 1.5rem;
  border-radius: 28px;
  background: var(--lavanda);
  text-align: center;
}

.instalar h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.instalar > p {
  margin: 0 auto 1.5rem;
  max-width: 32rem;
  color: var(--texto-2);
}

.instalar .boton {
  margin-bottom: 0.25rem;
}

/* El precio, grande y en el violeta de la marca. */
.instalar .precio {
  margin: 0.4rem auto 0.3rem;
  font-size: clamp(2.6rem, 10vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--marca);
}

.instalar .nota-grupo {
  max-width: 30rem;
  margin: 1.75rem auto 0;
}

.lista-numerada {
  display: grid;
  gap: 0.75rem;
  max-width: 30rem;
  margin: 1.75rem auto 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
  text-align: left;
}

.lista-numerada li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
  color: var(--texto-2);
  counter-increment: item;
}

.lista-numerada li::before {
  content: counter(item);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--tarjeta);
  color: var(--marca);
  font-weight: 800;
  font-size: 0.95rem;
}

.contacto {
  text-align: center;
}

.contacto p {
  margin: 0 auto;
  max-width: 32rem;
  color: var(--texto-2);
}

.correo {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Páginas de texto (privacidad, borrar la cuenta) ---------- */

.texto {
  padding-block: 1.5rem 1rem;
}

.texto h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 7vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.texto h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.texto p,
.texto li {
  color: var(--texto-2);
}

.texto p {
  margin: 0 0 1rem;
}

.texto ul,
.texto ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.texto li {
  margin-bottom: 0.5rem;
}

.texto li::marker {
  color: var(--marca);
}

.texto strong {
  color: var(--texto);
  font-weight: 600;
}

.fecha {
  margin: 0 0 2rem;
  font-size: 0.95rem;
  color: var(--texto-3);
}

.resumen {
  margin: 0 0 1rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radio);
  background: var(--lavanda);
}

.resumen p {
  margin: 0;
  color: var(--texto);
}

.resumen p + p {
  margin-top: 0.6rem;
}

.tabla {
  width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tabla th,
.tabla td {
  padding: 0.75rem 0.5rem 0.75rem 0;
  border-bottom: 1px solid var(--borde);
  text-align: left;
  vertical-align: top;
  color: var(--texto-2);
}

.tabla th {
  color: var(--texto);
  font-weight: 600;
}

/* En el celular, cada fila de la tabla se lee como una tarjeta. */
@media (max-width: 40rem) {
  .tabla thead {
    display: none;
  }

  .tabla tr {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--borde);
  }

  .tabla td {
    display: block;
    padding: 0.15rem 0;
    border: 0;
  }

  .tabla td:first-child {
    color: var(--texto);
    font-weight: 600;
  }
}

.tarjeta {
  padding: 1.4rem;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--tarjeta);
}

/* ---------- Invitación ---------- */

.invitacion {
  padding-block: 1.5rem 1rem;
  text-align: center;
}

.icono-app {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1.5rem;
  border-radius: 1.4rem;
  box-shadow: var(--sombra);
}

.invitacion h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.invitacion .bajada {
  margin-bottom: 1.75rem;
}

.invitacion-acciones {
  display: grid;
  gap: 0.75rem;
  max-width: 24rem;
  margin: 0 auto;
}

.codigo {
  margin: 0 auto 1.5rem;
  max-width: 24rem;
}

.codigo-etiqueta {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--texto-3);
}

.codigo-valor {
  margin: 0.15rem 0 1rem;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--texto);
  user-select: all;
}

.copiado {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--exito);
}

.copiado:empty {
  margin: 0;
}

.aviso {
  margin: 0 auto 1.5rem;
  max-width: 30rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: var(--superficie);
  color: var(--texto);
  text-align: left;
}

.aviso p {
  margin: 0;
}

.invitacion .instalar {
  margin-top: 2.5rem;
}

.invitacion .instalar h2 {
  font-size: 1.5rem;
}

[hidden] {
  display: none !important;
}
