/* ============================================================
   Family Up — familyup.blog
   Identidad visual propia. No replica paletas, tipografías ni
   estilizaciones de ninguna marca, banco o entidad mencionada.

   Paleta  : papel de libro contable (verde pálido), tinta verde-negra,
             violeta de sello, rojo de asiento negativo.
   Tipos   : Zilla Slab (títulos) / Karla (texto) / IBM Plex Mono (datos).
   Firma   : el "sello" — bloque estampado violeta que aloja las
             exenciones de responsabilidad.
   ============================================================ */

:root {
  --papel:        #F3F6EF;
  --papel-raya:   #DDE8DB;
  --papel-hondo:  #E7EDE4;
  --tinta:        #17241E;
  --tinta-suave:  #5C6A62;
  --violeta:      #56309C;
  --violeta-claro:#EFE9FB;
  --rojo-libro:   #9E2338;
  --linea:        #C3CFBF;

  --fuente-titulo: "Zilla Slab", "Bitter", Rockwell, Georgia, serif;
  --fuente-texto:  "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fuente-dato:   "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  --ancho: 1120px;
  --medida: 66ch;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--papel);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--violeta); text-underline-offset: 3px; }
a:hover { color: var(--tinta); }

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

h1, h2, h3, h4 {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; }

hr {
  border: 0;
  border-top: 1px solid var(--linea);
  margin: 2.5rem 0;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: 1.4rem;
}

.eyebrow {
  font-family: var(--fuente-dato);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--violeta);
  margin: 0 0 1rem;
  display: block;
}

.salto-contenido {
  position: absolute;
  left: -9999px;
}
.salto-contenido:focus {
  left: 1rem; top: 1rem;
  z-index: 60;
  position: fixed;
  background: var(--violeta);
  color: #fff;
  padding: .6rem 1rem;
  font-family: var(--fuente-dato);
  font-size: .8rem;
}

/* ---------- textura de libro contable ---------- */
.rayado {
  background-image: repeating-linear-gradient(
    to bottom,
    var(--papel) 0 1.55rem,
    var(--papel-raya) 1.55rem 3.1rem
  );
}
.cuadricula {
  background-image:
    linear-gradient(to right, rgba(86,48,156,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(86,48,156,.07) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* ---------- el sello (elemento de firma) ---------- */
.sello {
  border: 2px solid var(--violeta);
  border-radius: 3px;
  padding: .85rem 1.1rem;
  background: var(--violeta-claro);
  color: #2E1A5C;
  font-family: var(--fuente-dato);
  font-size: .8rem;
  line-height: 1.5;
  transform: rotate(-1.1deg);
  box-shadow: 3px 3px 0 rgba(86,48,156,.14);
}
.sello strong { letter-spacing: .04em; }
.sello-titulo {
  display: block;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .7rem;
  border-bottom: 1px solid rgba(86,48,156,.4);
  padding-bottom: .35rem;
  margin-bottom: .5rem;
}
.sello--recto { transform: none; }
.sello--marca { max-width: 46ch; margin: 2rem 0; }
.sello--oscuro {
  background: transparent;
  border-color: #B79CF0;
  color: #E7DDFB;
  box-shadow: 3px 3px 0 rgba(183,156,240,.2);
}
.sello--oscuro .sello-titulo { border-bottom-color: rgba(183,156,240,.5); }

/* ---------- cabecera ---------- */
.sitio-cabecera {
  border-bottom: 2px solid var(--tinta);
  background: var(--papel);
  position: relative;
  z-index: 20;
}
.cabecera-fila {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.05rem;
}
.marca {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--tinta);
}
.marca svg { flex: none; }
.marca-nombre {
  display: block;
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  line-height: 1;
}
.marca-etiqueta {
  display: inline-block;
  margin-top: .3rem;
  font-family: var(--fuente-dato);
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--violeta);
  border: 1px solid var(--violeta);
  border-radius: 999px;
  padding: .18rem .55rem;
  white-space: nowrap;
}
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.25rem;
  font-family: var(--fuente-dato);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.menu a {
  color: var(--tinta);
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.menu a:hover, .menu a[aria-current="page"] {
  border-bottom-color: var(--violeta);
  color: var(--violeta);
}

/* ---------- aviso superior de inicio ---------- */
.aviso-superior {
  background: var(--tinta);
  color: #EAF0E7;
  border-bottom: 2px solid var(--violeta);
}
.aviso-superior .contenedor {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  padding-block: 1.6rem;
  align-items: center;
}
.aviso-superior p { margin: 0; font-size: .97rem; }
.aviso-superior .sello {
  background: transparent;
  border-color: #B79CF0;
  color: #E7DDFB;
  box-shadow: 3px 3px 0 rgba(183,156,240,.2);
}
.aviso-superior .sello-titulo { border-bottom-color: rgba(183,156,240,.5); }
@media (min-width: 820px) {
  .aviso-superior .contenedor { grid-template-columns: 1fr minmax(300px, 380px); gap: 2.5rem; }
}

/* ============================================================
   INICIO
   ============================================================ */
.hero-inicio {
  border-bottom: 1px solid var(--linea);
  padding-block: clamp(2.6rem, 6vw, 4.6rem);
}
.hero-inicio h1 { max-width: 24ch; }
.hero-inicio .bajada {
  max-width: 52ch;
  font-size: 1.17rem;
  color: var(--tinta-suave);
}

/* balance tipo libro mayor: es / no es */
.balance {
  margin-top: 3rem;
  border: 2px solid var(--tinta);
  background: var(--papel);
}
.balance-encabezado {
  font-family: var(--fuente-dato);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .55rem 1.1rem;
  border-bottom: 2px solid var(--tinta);
  background: var(--papel-hondo);
}
.balance-cuerpo { display: grid; grid-template-columns: 1fr; }
.balance-col { padding: 1.5rem 1.4rem; }
.balance-col + .balance-col { border-top: 1px dashed var(--linea); }
.balance-col h2 {
  font-size: 1.1rem;
  font-family: var(--fuente-dato);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.balance-col--si h2 { color: var(--violeta); }
.balance-col--no h2 { color: var(--rojo-libro); }
.balance-col ul { list-style: none; margin: 0; padding: 0; }
.balance-col li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: .5rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--papel-raya);
  font-size: 1rem;
}
.balance-col li::before {
  font-family: var(--fuente-dato);
  font-weight: 600;
}
.balance-col--si li::before { content: "+"; color: var(--violeta); }
.balance-col--no li::before { content: "\2013"; color: var(--rojo-libro); }
@media (min-width: 780px) {
  .balance-cuerpo { grid-template-columns: 1fr 1fr; }
  .balance-col + .balance-col { border-top: 0; border-left: 1px dashed var(--linea); }
}

/* grilla de artículos */
.seccion-articulos { padding-block: clamp(2.8rem, 6vw, 4.4rem); }
.seccion-titulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--tinta);
  padding-bottom: .7rem;
  margin-bottom: 2rem;
}
.seccion-titulo h2 { margin: 0; }
.seccion-titulo span {
  font-family: var(--fuente-dato);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.grilla { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grilla { grid-template-columns: repeat(3, 1fr); }
  .ficha--destacada { grid-column: span 3; }
}
.ficha {
  border: 1px solid var(--linea);
  background: #fff;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ficha:hover { transform: translateY(-3px); box-shadow: 0 10px 0 -6px rgba(23,36,30,.18); }
.ficha-meta {
  font-family: var(--fuente-dato);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.ficha h3 { margin: 0; font-size: 1.2rem; }
.ficha h3 a { color: var(--tinta); text-decoration: none; }
.ficha h3 a:hover { color: var(--violeta); text-decoration: underline; }
.ficha p { margin: 0; font-size: .96rem; color: var(--tinta-suave); }
.ficha-pie {
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px dashed var(--linea);
  font-family: var(--fuente-dato);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--violeta);
}
.ficha--destacada {
  background: var(--violeta-claro);
  border: 2px solid var(--violeta);
  display: grid;
  gap: 1.2rem 2.4rem;
  grid-template-columns: 1fr;
  padding: 1.7rem;
}
.ficha--destacada h3 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.ficha--destacada p { color: #33235E; font-size: 1.03rem; }
@media (min-width: 760px) {
  .ficha--destacada { grid-template-columns: 1.15fr .85fr; align-items: center; }
}

/* método (tira de tres) */
.tira-metodo {
  background: var(--papel-hondo);
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
  padding-block: clamp(2.6rem, 6vw, 4rem);
}
.metodo-grilla { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 760px) { .metodo-grilla { grid-template-columns: repeat(3, 1fr); } }
.metodo-item h3 { margin: .9rem 0 .4rem; }
.metodo-item p { margin: 0; color: var(--tinta-suave); font-size: .98rem; }

/* ============================================================
   ACERCA DE — editorial a dos columnas
   ============================================================ */
.acerca-encabezado {
  padding-block: clamp(2.4rem, 5vw, 3.8rem);
  border-bottom: 1px solid var(--linea);
}
.acerca-encabezado h1 { max-width: 26ch; }
.acerca-encabezado .bajada { max-width: 54ch; font-size: 1.15rem; color: var(--tinta-suave); }

.acerca-cuerpo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.6rem;
  padding-block: clamp(2.4rem, 5vw, 3.6rem);
}
@media (min-width: 900px) {
  .acerca-cuerpo { grid-template-columns: 340px 1fr; gap: 3.4rem; }
  .acerca-lateral { position: sticky; top: 1.6rem; align-self: start; }
}
.retrato {
  border: 2px solid var(--tinta);
  background: #fff;
  padding: 1.1rem;
}
.retrato figcaption {
  font-family: var(--fuente-dato);
  font-size: .72rem;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--tinta-suave);
  margin-top: .9rem;
  padding-top: .7rem;
  border-top: 1px solid var(--linea);
}
.datos-lista {
  margin: 1.6rem 0 0;
  border-top: 2px solid var(--tinta);
  font-family: var(--fuente-dato);
  font-size: .8rem;
}
.datos-lista div {
  display: grid;
  grid-template-columns: 1fr;
  gap: .15rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--linea);
}
.datos-lista dt { letter-spacing: .12em; text-transform: uppercase; color: var(--violeta); font-size: .68rem; }
.datos-lista dd { margin: 0; color: var(--tinta); }
.acerca-texto { max-width: var(--medida); }
.acerca-texto h2 { margin-top: 2.4rem; }
.acerca-texto h2:first-child { margin-top: 0; }
.acerca-texto ul { padding-left: 1.1rem; }
.acerca-texto li { margin-bottom: .5rem; }

/* ============================================================
   POLÍTICA EDITORIAL — lista numerada con iconografía
   ============================================================ */
.editorial-encabezado {
  background: var(--tinta);
  color: #EAF0E7;
  padding-block: clamp(2.6rem, 6vw, 4.2rem);
}
.editorial-encabezado h1 { color: #fff; max-width: 26ch; }
.editorial-encabezado .bajada { max-width: 56ch; color: #BFCDBB; font-size: 1.12rem; margin: 0; }
.editorial-encabezado .eyebrow { color: #B79CF0; }

.criterios { list-style: none; margin: 0; padding: 0; counter-reset: criterio; }
.criterios > li {
  counter-increment: criterio;
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem 1.8rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--linea);
}
.criterios > li:first-child { border-top: 2px solid var(--tinta); }
.criterio-marca { display: flex; align-items: center; gap: .9rem; }
.criterio-marca::before {
  content: counter(criterio, decimal-leading-zero);
  font-family: var(--fuente-dato);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--violeta);
  letter-spacing: -.02em;
}
.criterio-cuerpo h2 { font-size: 1.28rem; margin-bottom: .45rem; }
.criterio-cuerpo p { margin: 0; color: var(--tinta-suave); max-width: 62ch; }
.criterio-cuerpo p + p { margin-top: .7rem; }
@media (min-width: 820px) {
  .criterios > li { grid-template-columns: 150px 1fr; align-items: start; }
}
.bloque-editorial { padding-block: clamp(2.4rem, 5vw, 3.6rem); }

/* ============================================================
   PÁGINAS LEGALES — documento tipográfico limpio
   ============================================================ */
body.p-legal { background: #fff; }
.legal-envoltorio { max-width: 780px; margin-inline: auto; padding: clamp(2.2rem, 5vw, 3.6rem) 1.4rem 1rem; }
.legal-cabecera {
  border-top: 3px solid var(--tinta);
  border-bottom: 1px solid var(--linea);
  padding-block: 1.4rem;
  margin-bottom: 2.4rem;
}
.legal-cabecera h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .6rem; }
.legal-cabecera .meta {
  font-family: var(--fuente-dato);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--tinta-suave);
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.4rem;
}
.legal-cuerpo { max-width: var(--medida); }
.legal-cuerpo h2 {
  font-size: 1.24rem;
  margin-top: 2.6rem;
  padding-top: .9rem;
  border-top: 1px solid var(--linea);
}
.legal-cuerpo h3 { font-size: 1.05rem; margin-top: 1.6rem; }
.legal-cuerpo ul, .legal-cuerpo ol { padding-left: 1.2rem; }
.legal-cuerpo li { margin-bottom: .45rem; }
.legal-cuerpo dl { margin: 1rem 0; }
.legal-cuerpo dt { font-weight: 700; margin-top: .9rem; }
.legal-cuerpo dd { margin: .2rem 0 0; color: var(--tinta-suave); }
.tabla-datos {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  margin: 1.4rem 0 2rem;
}
.tabla-datos caption {
  text-align: left;
  font-family: var(--fuente-dato);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--violeta);
  padding-bottom: .6rem;
}
.tabla-datos th, .tabla-datos td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--linea);
}
.tabla-datos thead th {
  border-bottom: 2px solid var(--tinta);
  font-family: var(--fuente-dato);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tabla-datos tbody tr:nth-child(even) { background: var(--papel-hondo); }

/* ============================================================
   ARTÍCULOS
   ============================================================ */
.articulo-encabezado {
  border-bottom: 2px solid var(--tinta);
  padding-block: clamp(2.2rem, 5vw, 3.4rem);
}
.articulo-encabezado h1 { max-width: 32ch; }
.articulo-encabezado .bajada { max-width: 58ch; font-size: 1.15rem; color: var(--tinta-suave); }
.ficha-tecnica {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 2rem;
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--linea);
  font-family: var(--fuente-dato);
  font-size: .74rem;
  letter-spacing: .05em;
  color: var(--tinta-suave);
}
.ficha-tecnica strong { color: var(--tinta); font-weight: 600; }

.articulo-cuerpo {
  max-width: var(--medida);
  padding-block: clamp(2.2rem, 5vw, 3.2rem);
}
.articulo-cuerpo h2 {
  font-size: 1.5rem;
  margin-top: 2.6rem;
  display: flex;
  align-items: baseline;
  gap: .7rem;
}
.articulo-cuerpo h2::before {
  content: "";
  width: 1.4rem;
  height: 2px;
  background: var(--violeta);
  flex: none;
  transform: translateY(-.35em);
}
.articulo-cuerpo h3 { margin-top: 1.8rem; font-size: 1.1rem; }
.articulo-cuerpo ul, .articulo-cuerpo ol { padding-left: 1.2rem; }
.articulo-cuerpo li { margin-bottom: .5rem; }
.destacado {
  border-left: 3px solid var(--violeta);
  background: var(--violeta-claro);
  padding: 1.1rem 1.3rem;
  margin: 2rem 0;
  font-family: var(--fuente-titulo);
  font-size: 1.14rem;
  line-height: 1.45;
  color: #2E1A5C;
}
.destacado p { margin: 0; }
.caja-edades {
  border: 1px solid var(--linea);
  background: #fff;
  padding: 1.2rem 1.3rem;
  margin: 2rem 0;
}
.caja-edades h3 { margin-top: 0; }
.fuentes { margin-top: 3rem; border-top: 2px solid var(--tinta); padding-top: 1.4rem; }
.fuentes h2 { margin-top: 0; }
.fuentes ol { font-size: .95rem; color: var(--tinta-suave); }
.fuentes li { margin-bottom: .7rem; }
.nota-metodo {
  font-family: var(--fuente-dato);
  font-size: .78rem;
  line-height: 1.6;
  color: var(--tinta-suave);
  border-top: 1px dashed var(--linea);
  margin-top: 1.6rem;
  padding-top: 1rem;
}
.mas-articulos { border-top: 1px solid var(--linea); padding-block: clamp(2.4rem, 5vw, 3.4rem); background: var(--papel-hondo); }

/* ---------- pie ---------- */
.sitio-pie {
  background: var(--tinta);
  color: #C9D6C5;
  border-top: 4px solid var(--violeta);
  padding-block: 2.6rem 1.6rem;
  margin-top: 0;
  font-size: .95rem;
}
.sitio-pie a { color: #DCCFFB; }
.sitio-pie a:hover { color: #fff; }
.pie-aviso { max-width: 68ch; }
.pie-aviso h2 {
  color: #fff;
  font-size: 1.05rem;
  font-family: var(--fuente-dato);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pie-grilla {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201,214,197,.25);
}
@media (min-width: 760px) { .pie-grilla { grid-template-columns: repeat(3, 1fr); } }
.pie-grilla h3 {
  font-family: var(--fuente-dato);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #B79CF0;
  margin-bottom: .9rem;
}
.pie-grilla ul { list-style: none; margin: 0; padding: 0; }
.pie-grilla li { margin-bottom: .45rem; }
.pie-grilla p { margin: 0 0 .35rem; }
.pie-legal {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(201,214,197,.25);
  font-family: var(--fuente-dato);
  font-size: .72rem;
  letter-spacing: .04em;
  color: #9DAE99;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .ficha:hover { transform: none; }
}
