/* PixPF — página institucional
   Idea visual: el cuaderno donde el comerciante anota quién pagó.
   Tinta de bolígrafo azul, papel, y el resaltador amarillo para lo que ya está identificado. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
}

:root {
  --paper: #F5F6FB;
  --sheet: #FFFFFF;
  --ink: #1B2FA0;
  --ink-deep: #111B63;
  --text: #171B3A;
  --muted: #535A7C;
  --marker: #FFD84A;
  --ok: #0B7A53;
  --rule: #CDD4F1;
  --margin-line: #EFA3B6;

  --font: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --wrap: 1120px;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 9vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-ink :focus-visible { outline-color: var(--marker); }

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: var(--gap); top: -4rem;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 10;
}
.skip:focus { top: .75rem; }

h1, h2 { color: var(--ink); font-weight: 700; letter-spacing: -.022em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.5rem); line-height: 1; }
h2 { font-size: clamp(1.85rem, 4.2vw, 3rem); line-height: 1.06; }
h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 650; color: var(--text); }
p { text-wrap: pretty; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .75rem 1.5rem;
  border-radius: 14px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff;
  font: inherit; font-weight: 650; text-decoration: none; text-align: center;
  transition: background-color .15s, transform .15s;
}
.btn:hover { background: var(--ink-deep); border-color: var(--ink-deep); }
.btn:active { transform: translateY(1px); }
.btn-marker { background: var(--marker); border-color: var(--marker); color: var(--ink-deep); }
.btn-marker:hover { background: #FFE376; border-color: #FFE376; }
.btn-quiet { background: transparent; color: var(--ink); min-height: 2.75rem; padding: .45rem 1.1rem; }
.btn-quiet:hover { background: var(--ink); color: #fff; }

/* ---------- Cabecera ---------- */
.top { padding-block: 1.1rem; }
.top .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; margin-right: auto; }
.brand img { height: 2.5rem; width: auto; }
.nav { display: none; gap: 1.6rem; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.langs { display: flex; gap: .15rem; font-size: .95rem; }
.langs a, .langs span {
  padding: .5rem .6rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500;
}
.langs a:hover { color: var(--ink); background: #E6EAFA; }
.langs [aria-current] { color: var(--ink); font-weight: 700; }
@media (max-width: 599px) { .langs { order: 3; flex-basis: 100%; margin-left: -.6rem; } }
@media (min-width: 900px) { .nav { display: flex; } .brand { margin-right: 2rem; } .nav { margin-right: auto; } }

/* ---------- Portada ---------- */
.hero { padding-block: clamp(1.5rem, 5vw, 4rem) var(--section); }
.hero .wrap { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
.hero-lead { margin-top: 1.4rem; font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 34rem; color: var(--text); }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; align-items: center; }
.hero-note { margin-top: 1.3rem; color: var(--muted); font-size: 1rem; max-width: 30rem; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.08fr .92fr; } }

/* La hoja del cuaderno: el extracto con cada pago identificado */
.sheet {
  position: relative;
  background: var(--sheet);
  border-radius: 6px 22px 22px 6px;
  box-shadow: 0 1px 0 #DDE2F5, 0 24px 48px -28px rgba(17, 27, 99, .45);
  padding: 1.4rem 1.25rem 1.2rem 2.9rem;
  max-width: 30rem; width: 100%; justify-self: center;
}
.sheet::before {            /* margen del cuaderno */
  content: ""; position: absolute; inset-block: 0; left: 1.9rem; width: 2px; background: var(--margin-line);
}
.sheet::after {             /* agujeros de la espiral */
  content: ""; position: absolute; left: .7rem; top: 1.6rem; bottom: 1.6rem; width: .7rem;
  background: radial-gradient(circle, var(--paper) 0 .32rem, transparent .34rem) center top / .7rem 2.6rem repeat-y;
}
.sheet-title { font-size: 1.05rem; font-weight: 650; color: var(--ink); padding-bottom: .8rem; border-bottom: 2px solid var(--ink); }
.pay { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; padding-block: .85rem; border-bottom: 1px solid var(--rule); }
.pay-what { color: var(--muted); font-size: .92rem; }
.pay-amount { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.pay-who { grid-column: 1 / -1; margin-top: .3rem; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.who {
  font-weight: 650; font-size: 1.08rem; color: var(--ink-deep);
  padding: .05em .35em; margin-left: -.35em; border-radius: 3px;
  background: linear-gradient(var(--marker), var(--marker)) no-repeat left center / 100% 100%;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.found { display: inline-flex; align-items: center; gap: .3rem; color: var(--ok); font-size: .9rem; font-weight: 600; }
.found svg { width: 1.05rem; height: 1.05rem; flex: none; }
.sheet-total { padding-top: .9rem; color: var(--muted); font-size: .95rem; }
.sheet-total strong { color: var(--text); }

/* El único momento animado: el resaltador va pasando por cada pago */
@media (prefers-reduced-motion: no-preference) {
  .who { animation: mark .55s cubic-bezier(.3, .7, .2, 1) both; animation-delay: calc(.5s + var(--i) * .55s); }
  .found { animation: appear .3s ease-out both; animation-delay: calc(.95s + var(--i) * .55s); }
  @keyframes mark { from { background-size: 0 100%; } to { background-size: 100% 100%; } }
  @keyframes appear { from { opacity: 0; transform: translateX(-.3rem); } to { opacity: 1; transform: none; } }
}

/* ---------- Secciones ---------- */
.band { padding-block: var(--section); }
.band-head { max-width: 44rem; }
.band-head p { margin-top: 1.1rem; font-size: 1.15rem; }

/* La rutina de hoy */
.routine { border-top: 1px solid var(--rule); background: var(--sheet); }
.asks { margin-top: 2.5rem; border-top: 2px solid var(--ink); }
.asks li { display: grid; gap: .35rem 2rem; padding-block: 1.4rem; border-bottom: 1px solid var(--rule); }
.asks q { quotes: "“" "”"; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 650; color: var(--ink); line-height: 1.15; letter-spacing: -.015em; }
.asks p { max-width: 34rem; }
.routine-end { margin-top: 2rem; font-size: 1.25rem; font-weight: 600; max-width: 36rem; }
@media (min-width: 760px) { .asks li { grid-template-columns: 22rem 1fr; align-items: baseline; } }

/* La novedad: fondo de tinta */
.news { background: var(--ink); color: #fff; }
.news h2 { color: #fff; }
.news .band-head p { color: #E3E7FB; }
.compare { margin-top: 2.75rem; width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 1rem 1.1rem; }
.compare thead th { font-weight: 650; font-size: 1.05rem; color: #C9D1F7; border-bottom: 2px solid rgba(255,255,255,.35); }
.compare thead th.us { color: var(--ink-deep); background: var(--marker); border-radius: 10px 10px 0 0; border-bottom-color: var(--marker); }
.compare tbody th { font-weight: 500; color: #C9D1F7; width: 28%; }
.compare tbody td { border-bottom: 1px solid rgba(255,255,255,.2); }
.compare tbody th { border-bottom: 1px solid rgba(255,255,255,.2); }
.compare td.us { background: #fff; color: var(--text); font-weight: 600; border-bottom-color: var(--rule); }
.compare tbody tr:last-child td.us { border-radius: 0 0 10px 10px; }
@media (max-width: 699px) {
  .compare thead tr, .compare tbody tr { display: grid; grid-template-columns: 1fr 1fr; }
  .compare thead th:first-child { display: none; }
  .compare tbody th { grid-column: 1 / -1; width: auto; border-bottom: 0; padding-bottom: .25rem; padding-top: 1.2rem; }
  .compare th, .compare td { padding-inline: .8rem; }
  .compare td.us { border-radius: 0; }
}

/* Cómo funciona: es una secuencia de verdad, por eso va numerada */
.steps { margin-top: 2.75rem; display: grid; gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 1.1rem; border-top: 2px solid var(--ink); }
.steps li::before {
  content: counter(step); display: block; font-size: 3.4rem; line-height: 1; font-weight: 750; color: var(--ink); margin-bottom: .9rem;
}
.steps p { margin-top: .5rem; color: var(--text); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

/* Para quién es */
.who-for { background: var(--sheet); border-block: 1px solid var(--rule); }
.who-for .wrap { display: grid; gap: 2.5rem; }
.people { border-top: 2px solid var(--ink); }
.people li { padding-block: .95rem; border-bottom: 1px solid var(--rule); font-size: 1.15rem; font-weight: 500; }
.gains { display: grid; gap: 1.6rem; align-content: start; }
.gains p { margin-top: .35rem; }
@media (min-width: 900px) { .who-for .wrap { grid-template-columns: 1fr 1fr; gap: 4rem; } .who-for .band-head { grid-column: 1 / -1; } }

/* Preguntas */
.faq-list { margin-top: 2.25rem; max-width: 48rem; border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-size: 1.15rem; font-weight: 650;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: .65rem; height: .65rem;
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { padding-bottom: 1.3rem; max-width: 40rem; }

/* Cierre */
.close { background: var(--ink-deep); color: #fff; text-align: left; }
.close h2 { color: #fff; max-width: 40rem; }
.close p { margin-top: 1rem; color: #DADFF8; max-width: 34rem; font-size: 1.15rem; }
.lead { margin-top: 2rem; display: grid; gap: 1rem; max-width: 60rem; align-items: end; }
.lead label { display: grid; gap: .4rem; font-weight: 600; color: #fff; }
.lead input {
  width: 100%; min-height: 3.25rem; padding: .7rem .9rem;
  border: 2px solid #fff; border-radius: 12px; background: #fff; color: var(--text);
  font: inherit; font-weight: 500;
}
.lead input::placeholder { color: var(--muted); opacity: 1; }
.lead input:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }
.lead .btn { width: 100%; }
.close .lead-note { margin-top: .9rem; font-size: 1rem; color: #C3CAF0; max-width: 44rem; }
@media (min-width: 760px) { .lead { grid-template-columns: 1fr 1fr 1fr auto; } .lead .btn { width: auto; } }
.close-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.close a:not(.btn) { color: #fff; }

/* Pie */
.foot { background: var(--ink-deep); color: #C4CBF2; padding-block: 2rem 2.5rem; font-size: .95rem; border-top: 1px solid rgba(255,255,255,.18); }
.foot .wrap { display: grid; gap: 1.2rem; }
.foot img { height: 2rem; width: auto; }
.foot p { max-width: 46rem; }
.foot a { color: #fff; }
.foot-row { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; }
