/* Rekuento — estilos del sitio. Colores tomados de src/ui/theme.ts de la app. */
:root {
  --bg: #f5f7fa;
  --bg-alt: #eaf0f7;
  --card: #ffffff;
  --text: #0b1a2e;
  --muted: #4d5d72;
  --border: #dbe3ee;
  --primary: #16508f;
  --primary-text: #ffffff;
  --primary-soft: #e3edf9;
  --income: #05875f;
  --expense: #c2410c;
  --hero-from: #071426;
  --hero-to: #173050;
  --hero-text: #eef3f9;
  --hero-muted: #b7c5d8;
  --hero-accent: #3fe0a0;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(11, 26, 46, .06), 0 8px 24px rgba(11, 26, 46, .06);
  --max: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071426;
    --bg-alt: #0b1b31;
    --card: #0f2138;
    --text: #eef3f9;
    --muted: #a3b3c8;
    --border: #1f3350;
    --primary: #6ea8e6;
    --primary-text: #071426;
    --primary-soft: #13294a;
    --income: #3fe0a0;
    --expense: #ff8a57;
    --hero-from: #040c18;
    --hero-to: #0f2138;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw + .6rem, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.4vw + .7rem, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.saltar {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--card); color: var(--text); padding: .6rem 1rem; border-radius: 10px;
}
.saltar:focus { top: 1rem; }

.envoltura { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: 20px; }

/* Cabecera */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.cabecera .envoltura { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.marca { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.marca img { width: 34px; height: 34px; border-radius: 9px; }
.menu { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.menu a { display: block; padding: .45rem .7rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--text); background: var(--primary-soft); }
@media (max-width: 760px) { .menu .opcional { display: none; } }
@media (max-width: 420px) { .menu a { padding: .4rem .5rem; font-size: .9rem; } }

/* Portada */
.portada {
  color: var(--hero-text);
  background:
    radial-gradient(60rem 30rem at 10% -10%, rgba(110, 168, 230, .28), transparent 60%),
    radial-gradient(40rem 26rem at 100% 110%, rgba(63, 224, 160, .16), transparent 60%),
    linear-gradient(160deg, var(--hero-from), var(--hero-to));
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  overflow: hidden;
}
.portada .envoltura { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .portada .envoltura { grid-template-columns: 1fr; } }
.portada .etiqueta { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--hero-accent); margin-bottom: 1rem; }
.portada p.lead { font-size: clamp(1.1rem, 1vw + .9rem, 1.3rem); color: var(--hero-muted); max-width: 36rem; }
.portada h1 { color: #fff; }
.portada h1 em { font-style: normal; color: var(--hero-accent); }

.tiendas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.tienda {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .7rem 1.1rem; border-radius: 14px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; min-width: 210px;
}
.tienda svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.tienda small { display: block; font-size: .75rem; color: var(--hero-muted); line-height: 1.2; }
.tienda strong { display: block; font-size: 1.05rem; line-height: 1.25; }
.nota-portada { margin-top: 1rem; font-size: .9rem; color: var(--hero-muted); }

.escena { position: relative; min-height: 360px; display: grid; place-items: center; }
.escena .icono-grande {
  width: min(260px, 62vw); border-radius: 22%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08);
}
.burbuja {
  position: absolute; padding: .65rem .95rem; border-radius: 14px;
  background: rgba(15, 33, 56, .78); border: 1px solid rgba(255, 255, 255, .14);
  color: var(--hero-text); font-size: .92rem; line-height: 1.35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  max-width: 15rem;
}
.burbuja b { display: block; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--hero-accent); }
.burbuja.b1 { top: 4%; left: 0; }
.burbuja.b2 { bottom: 10%; left: 4%; }
.burbuja.b3 { top: 40%; right: 0; }
.burbuja.b3 b { color: #ff9f6e; }
@media (max-width: 860px) {
  .escena { min-height: 0; padding-block: 1rem; display: flex; flex-direction: column; gap: .75rem; }
  .burbuja { position: static; max-width: none; width: 100%; }
}

/* Secciones */
.seccion { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.seccion.alterna { background: var(--bg-alt); }
.encabezado { max-width: 44rem; margin-bottom: 2.5rem; }
.encabezado p { color: var(--muted); font-size: 1.1rem; }
.antetitulo { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: .6rem; }

.rejilla { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.rejilla.dos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.tarjeta {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.tarjeta h3 { display: flex; align-items: center; gap: .6rem; }
.tarjeta p:last-child, .tarjeta ul:last-child { margin-bottom: 0; }
.tarjeta ul { padding-left: 1.15rem; margin: 0; }
.tarjeta li { margin-bottom: .45rem; }
.tarjeta li::marker { color: var(--primary); }
.punto {
  width: 2.4rem; height: 2.4rem; border-radius: 12px; display: inline-grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary);
}
.punto svg { width: 1.3rem; height: 1.3rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.punto.verde { color: var(--income); background: color-mix(in srgb, var(--income) 14%, transparent); }
.punto.naranja { color: var(--expense); background: color-mix(in srgb, var(--expense) 14%, transparent); }

.problema { border-left: 4px solid var(--expense); }
.problema .solucion { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--border); color: var(--text); }
.problema .solucion strong { color: var(--income); }
.problema p.dolor { color: var(--muted); font-style: italic; }

.cita { font-style: normal; background: var(--primary-soft); padding: .1em .4em; border-radius: 6px; white-space: nowrap; }

/* Privacidad destacada */
.privacidad-destacada { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .privacidad-destacada { grid-template-columns: 1fr; } }
.lista-check { list-style: none; padding: 0; margin: 0; }
.lista-check li { position: relative; padding-left: 2rem; margin-bottom: .9rem; }
.lista-check li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--income);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm-1.5 17.2-5-5 1.6-1.6 3.4 3.4 7-7 1.6 1.6-8.6 8.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm-1.5 17.2-5-5 1.6-1.6 3.4 3.4 7-7 1.6 1.6-8.6 8.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.esquema { display: grid; gap: .75rem; }
.esquema .fila { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.esquema .fila strong { display: block; }
.esquema .fila span { color: var(--muted); font-size: .95rem; }

/* Planes */
.planes { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.destacado { border: 2px solid var(--primary); }
.plan .precio { font-size: 1.6rem; font-weight: 800; margin: .25rem 0 1rem; }
.plan .precio small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--primary); color: var(--primary-text); vertical-align: middle; margin-left: .4rem; }
.tabla-envoltura { overflow-x: auto; margin-top: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .98rem; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--primary-soft); font-size: .9rem; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.nota { font-size: .92rem; color: var(--muted); margin-top: 1rem; }

/* Plataformas */
.estado { display: inline-block; font-size: .8rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; margin-left: .3rem; }
.estado.lanzamiento { background: color-mix(in srgb, var(--income) 18%, transparent); color: var(--income); }
.estado.pronto { background: color-mix(in srgb, var(--expense) 16%, transparent); color: var(--expense); }

/* Preguntas */
.preguntas { max-width: 50rem; }
details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; margin-bottom: .75rem; }
summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 650; list-style: none; position: relative; padding-right: 3rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 1.25rem; top: .85rem; font-size: 1.4rem; line-height: 1; color: var(--primary); }
details[open] summary::after { content: "–"; }
details > div { padding: 0 1.25rem 1.1rem; color: var(--muted); }
details > div p:last-child { margin-bottom: 0; }

/* Llamada final */
.llamada { text-align: center; }
.llamada .tiendas { justify-content: center; }
.llamada .tienda { background: var(--hero-from); border-color: transparent; }
@media (prefers-color-scheme: dark) { .llamada .tienda { background: var(--card); border-color: var(--border); } }
.llamada .tienda small { color: #b7c5d8; }

/* Páginas legales y de ayuda */
.documento { padding-block: clamp(2.5rem, 6vw, 4rem); }
.documento .envoltura { max-width: 820px; }
.documento h1 { font-size: clamp(2rem, 3vw + .8rem, 2.8rem); }
.documento h2 { font-size: 1.45rem; margin-top: 2.25rem; padding-top: .5rem; }
.documento h3 { margin-top: 1.5rem; }
.documento .meta { color: var(--muted); font-size: .95rem; border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; margin-bottom: 1.5rem; }
.documento ul, .documento ol { padding-left: 1.3rem; }
.documento li { margin-bottom: .4rem; }
.aviso {
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  background: var(--card); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.25rem 0;
}
.aviso p:last-child { margin-bottom: 0; }
.pendiente { background: #fff3c4; color: #5a4500; padding: .05em .35em; border-radius: 5px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .pendiente { background: #4a3b00; color: #ffe58a; } }
.indice { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 2rem; }
.indice ol { margin: .25rem 0 0; columns: 2 16rem; }
.pasos { counter-reset: paso; list-style: none; padding: 0 !important; }
.pasos li { counter-increment: paso; position: relative; padding-left: 3rem; margin-bottom: 1rem; min-height: 2.2rem; }
.pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; background: var(--primary); color: var(--primary-text);
}
.boton {
  display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.2rem; border-radius: 12px;
  background: var(--primary); color: var(--primary-text); font-weight: 700; text-decoration: none;
}
.boton:hover { filter: brightness(1.08); }
.ruta { font-weight: 650; background: var(--primary-soft); padding: .05em .4em; border-radius: 6px; }

/* Pie */
.pie { border-top: 1px solid var(--border); padding-block: 2.5rem; font-size: .95rem; color: var(--muted); }
.pie .envoltura { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; }
.pie nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.pie a { color: var(--muted); }
.pie a:hover { color: var(--text); }
.pie .marca { font-size: 1rem; }
.pie p { margin: .5rem 0 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
