@font-face { font-family: "Public Sans"; src: url("fuentes/public-sans.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fuentes/public-sans-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fuentes/courier-prime.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fuentes/courier-prime-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --papel: #E8EDE6;      /* papel de cheque */
  --papel-2: #DCE3D9;
  --tinta: #15281F;      /* tinta verde casi negra */
  --tinta-suave: #46594E;
  --verde: #2F5D47;      /* verde de libro contable */
  --linea: #A9BCCB;      /* renglón azul de libro contable */
  --sello: #3B4C9B;      /* tinta de sello */
  --blanco: #FFFFFF;
  --negativo: #A3392B;

  --sans: "Public Sans", system-ui, sans-serif;
  --maquina: "Courier Prime", "Courier New", monospace;

  --ancho: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  -webkit-tap-highlight-color: rgba(47, 93, 71, .15);
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 1.0625rem/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--sello); outline-offset: 3px; }

.saltar { position: absolute; left: 1rem; top: -3rem; background: var(--tinta); color: var(--papel); padding: .5rem 1rem; z-index: 20; }
.saltar:focus { top: 1rem; }

/* ---------- botones y enlaces ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .75rem 1.375rem;
  background: var(--verde); color: var(--blanco);
  border: 0; border-radius: 4px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  touch-action: manipulation;
}
.boton:hover { background: var(--tinta); }
.boton--chico { min-height: 2.5rem; padding: .5rem 1rem; font-size: .9375rem; }
.boton[disabled] { opacity: .6; cursor: progress; }
.enlace { font-weight: 600; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.enlace:hover { text-decoration-thickness: 2px; }

/* ---------- cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--papel) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--papel-2); }
.cabecera__in { max-width: var(--ancho); margin: 0 auto; padding: .75rem var(--gutter); display: flex; align-items: center; gap: 2rem; }
.marca { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; color: var(--verde); }
.marca__sello { width: 1.75rem; height: 1.75rem; }
.menu { display: flex; gap: 1.5rem; margin-left: auto; }
.menu a { text-decoration: none; font-size: .9375rem; color: var(--tinta-suave); }
.menu a:hover { color: var(--tinta); text-decoration: underline; text-underline-offset: .3em; }
@media (max-width: 52rem) {
  .menu { display: none; }
  .cabecera__in > .boton { margin-left: auto; }
}

/* ---------- portada ---------- */
.portada {
  max-width: var(--ancho); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(3rem, 8vw, 6.5rem);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem); align-items: center;
}
.portada h1 {
  font-size: clamp(2.125rem, 1.4rem + 2.8vw, 3.5rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.035em;
  max-width: 17ch;
}
.portada__intro { margin-top: 1.5rem; font-size: 1.1875rem; color: var(--tinta-suave); max-width: 34rem; }
.acciones { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
@media (max-width: 56rem) {
  .portada { grid-template-columns: 1fr; }
}

/* El aviso de pago: la única pieza "fuerte" del sitio */
.aviso { margin: 0; }
.aviso__pila { position: relative; margin-right: 20px; }
.aviso__hoja {
  background: var(--blanco);
  border: 1px solid #C9D3CC;
  border-radius: 2px;
  font-family: var(--maquina);
}
.aviso__hoja--frente {
  position: relative;
  padding: 1.5rem 1.5rem 1.25rem;
  font-size: .9375rem; line-height: 1.5;
  box-shadow: 0 1px 0 #C9D3CC, 0 18px 40px -24px rgba(21, 40, 31, .45);
}
.aviso__hoja--atras1, .aviso__hoja--atras2 { position: absolute; inset: 0; }
.aviso__hoja--atras1 { transform: translate(10px, 10px) rotate(1.2deg); background: #F5F7F3; }
.aviso__hoja--atras2 { transform: translate(20px, 20px) rotate(2.4deg); background: #EEF2EC; }
.aviso__cabeza { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--tinta); padding-bottom: .375rem; }
.aviso__titulo { font-weight: 700; }
.aviso__datos { margin: 0 0 1.25rem; }
.aviso__datos div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid color-mix(in srgb, var(--linea) 55%, transparent); }
.aviso__datos dt { color: var(--tinta-suave); }
.aviso__datos dd { margin: 0; }
.aviso__cuentas { width: 100%; border-collapse: collapse; }
.aviso__cuentas th { text-align: left; font-weight: 400; padding: .3rem 1rem .3rem 0; }
.aviso__cuentas td { text-align: right; padding: .3rem 0; white-space: nowrap; }
.aviso__total th, .aviso__total td { font-weight: 700; border-top: 1px solid var(--tinta); padding-top: .5rem; }
.aviso__cuenta { margin-top: 2.5rem; padding-top: .375rem; border-top: 1px dashed #9FB0A6; font-size: .8125rem; color: var(--tinta-suave); max-width: 55%; }
.aviso figcaption { margin-top: 2.25rem; font-size: .875rem; color: var(--tinta-suave); max-width: 32rem; }

.sello {
  position: absolute; right: 1.5rem; bottom: 1.1rem;
  padding: .3rem .75rem .35rem;
  border: 3px double var(--sello); border-radius: 6px;
  color: var(--sello); font: 700 1.375rem/1.1 var(--maquina); letter-spacing: .06em; text-align: center;
  transform: rotate(-9deg);
  opacity: .82; mix-blend-mode: multiply;
  animation: sellar .5s cubic-bezier(.2, .9, .3, 1.3) .6s both;
}
.sello small { font-size: .75rem; letter-spacing: .02em; font-weight: 400; }
@keyframes sellar {
  from { opacity: 0; transform: rotate(-9deg) scale(1.6); }
  to   { opacity: .82; transform: rotate(-9deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .sello { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 30rem) {
  .aviso__pila { margin-right: 12px; }
  .aviso__hoja--frente { padding: 1.25rem 1rem 1rem; font-size: .8125rem; }
  .aviso__datos div { grid-template-columns: 6rem 1fr; }
  .sello { font-size: 1.125rem; right: .75rem; bottom: .9rem; }
  .aviso__hoja--atras1 { transform: translate(6px, 6px) rotate(1deg); }
  .aviso__hoja--atras2 { transform: translate(12px, 12px) rotate(2deg); }
}

/* ---------- bloques ---------- */
.bloque {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  padding-inline: max(var(--gutter), calc((100% - var(--ancho)) / 2));
}
.bloque h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem); font-weight: 750; line-height: 1.1; letter-spacing: -.025em; max-width: 24ch; }
.bloque h2 + * { margin-top: 1.25rem; }
.bloque__lead { font-size: 1.125rem; color: var(--tinta-suave); max-width: 40rem; }
.bloque--papel { background: var(--papel-2); }
.bloque--tinta { background: var(--tinta); color: var(--papel); }
.bloque--tinta .bloque__lead { color: #B9C6BD; }

.dos-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); margin-top: 1.5rem; }
.dos-col .bloque__lead { max-width: none; }
@media (max-width: 52rem) { .dos-col { grid-template-columns: 1fr; } }
.razones { list-style: none; margin: 0; padding: 0; }
.razones li { padding: .875rem 0; border-top: 1px solid var(--linea); }
.razones li:last-child { border-bottom: 1px solid var(--linea); }
.razones strong { font-weight: 700; }

/* Pasos: secuencia real */
.pasos { list-style: none; padding: 0; margin-top: 2.5rem; counter-reset: paso; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.pasos li { counter-increment: paso; position: relative; padding: 3.25rem 1.25rem 0 0; }
.pasos li::before {
  content: counter(paso);
  position: absolute; top: 0; left: 0;
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--verde); color: var(--blanco); font-weight: 700;
}
.pasos li::after { content: ""; position: absolute; top: 1.125rem; left: 2.75rem; right: .5rem; border-top: 2px dotted var(--verde); opacity: .5; }
.pasos li:last-child::after { display: none; }
.pasos__cuando { font-size: .875rem; font-weight: 600; color: var(--verde); }
.pasos h3 { font-size: 1.125rem; margin: .125rem 0 .5rem; letter-spacing: -.01em; }
.pasos p { font-size: .9375rem; color: var(--tinta-suave); }
@media (max-width: 62rem) {
  .pasos { grid-template-columns: 1fr; gap: 1.75rem; max-width: 40rem; }
  .pasos li { padding: 0 0 0 3.5rem; }
  .pasos li::after { top: 2.75rem; bottom: -1.5rem; left: 1.0625rem; right: auto; border-top: 0; border-left: 2px dotted var(--verde); }
}

/* Mercados */
.tabla-envoltura { margin-top: 2rem; overflow-x: auto; }
.mercados { width: 100%; border-collapse: collapse; min-width: 44rem; }
.mercados th, .mercados td { text-align: left; vertical-align: top; padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--linea); }
.mercados thead th { font-size: .875rem; font-weight: 600; color: var(--tinta-suave); border-bottom: 2px solid var(--tinta); padding-top: 0; }
.mercados tbody th { font-size: 1.25rem; font-weight: 750; letter-spacing: -.01em; }
.mercados td:nth-child(3), .mercados td:nth-child(4) { white-space: nowrap; }
.mercados td:last-child { color: var(--tinta-suave); max-width: 26rem; }
@media (max-width: 46rem) {
  .tabla-envoltura { overflow: visible; }
  .mercados, .mercados tbody, .mercados tr, .mercados th, .mercados td { display: block; min-width: 0; }
  .mercados thead { display: none; }
  .mercados tr { padding: 1.25rem 0; border-bottom: 1px solid var(--linea); }
  .mercados th, .mercados td { border: 0; padding: 0; }
  .mercados tbody th { margin-bottom: .25rem; }
  .mercados td:nth-child(3)::before { content: "Precio típico: "; color: var(--tinta-suave); }
  .mercados td:nth-child(4)::before { content: "Impuesto a la propiedad: "; color: var(--tinta-suave); }
  .mercados td:last-child { margin-top: .5rem; }
}

/* ---------- calculadora ---------- */
.calc { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 56rem) { .calc { grid-template-columns: 1fr; } }
.calc__controles { display: grid; gap: 1.5rem; }
.campo { display: grid; gap: .5rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.campo > span, .campo > legend { font-weight: 600; font-size: .9375rem; display: flex; justify-content: space-between; gap: 1rem; padding: 0; }
.campo output { font-weight: 700; }
.bloque--tinta .campo > legend { color: var(--papel); }
.campo legend + .segmentos { margin-top: .5rem; }

select, input, textarea {
  font: inherit; color: var(--tinta);
  background: var(--blanco); border: 1px solid #9FB0A6; border-radius: 4px;
  padding: .7rem .8rem; width: 100%;
}
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2315281F' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.5rem; }
input[type="range"] { padding: 0; border: 0; background: transparent; accent-color: #9FD0B4; height: 2rem; }

.segmentos { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #5E7366; border-radius: 4px; overflow: hidden; }
.segmentos label { position: relative; }
.segmentos input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmentos span { display: block; text-align: center; padding: .6rem 0; font-weight: 600; border-left: 1px solid #5E7366; }
.segmentos label:first-child span { border-left: 0; }
.segmentos input:checked + span { background: var(--papel); color: var(--tinta); }
.segmentos input:focus-visible + span { outline: 3px solid #9FD0B4; outline-offset: -3px; }

.libro { background: var(--blanco); color: var(--tinta); border-radius: 2px; padding: 1.5rem; }
.libro__titulo { font-size: 1rem; font-weight: 700; padding-bottom: .5rem; border-bottom: 2px solid var(--tinta); }
.libro table { width: 100%; border-collapse: collapse; }
.libro th { text-align: left; font-weight: 400; padding: .45rem 1rem .45rem 0; }
.libro td { text-align: right; padding: .45rem 0; white-space: nowrap; font-weight: 500; }
.libro tr { border-bottom: 1px solid color-mix(in srgb, var(--linea) 60%, transparent); }
.libro__grupo + .libro__grupo tr:first-child { border-top: 1px solid var(--tinta); }
.libro tfoot tr:first-child { border-top: 2px solid var(--tinta); }
.libro__neto th, .libro__neto td { font-weight: 750; font-size: 1.25rem; padding-top: .75rem; }
.pos { color: var(--verde); }
.neg { color: var(--negativo); }
@media (max-width: 30rem) {
  .libro { padding: 1.125rem 1rem; }
  .libro th, .libro td { font-size: .9375rem; }
  .libro__neto th, .libro__neto td { font-size: 1.125rem; }
}
.libro__nota { margin-top: .75rem; font-size: .875rem; color: var(--tinta-suave); }
.aviso-legal { margin-top: 1.5rem; font-size: .875rem; color: #B9C6BD; }

/* ---------- equipo ---------- */
.roles { margin: 2rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.roles div { padding: 1.25rem 0; border-top: 1px solid var(--linea); }
.roles dt { font-weight: 700; font-size: 1.125rem; }
.roles dd { margin: .25rem 0 0; color: var(--tinta-suave); }
@media (max-width: 46rem) { .roles { grid-template-columns: 1fr; } }

/* ---------- preguntas ---------- */
.preguntas { margin-top: 2rem; border-top: 2px solid var(--tinta); }
.preguntas details { border-bottom: 1px solid var(--linea); }
.preguntas summary { cursor: pointer; list-style: none; padding: 1.125rem 2.5rem 1.125rem 0; font-weight: 650; font-size: 1.125rem; position: relative; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: ""; position: absolute; right: .375rem; top: 1.55rem; width: .6rem; height: .6rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.preguntas details[open] summary::after { transform: rotate(-135deg); top: 1.8rem; }
.preguntas details p { padding: 0 0 1.25rem; max-width: 46rem; color: var(--tinta-suave); }

/* ---------- contacto ---------- */
.bloque--contacto { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); }
.contacto__texto p { margin-top: 1rem; font-size: 1.125rem; color: var(--tinta-suave); max-width: 30rem; }
.directo { margin: 2rem 0 0; }
.directo div { display: grid; grid-template-columns: 6rem 1fr; padding: .625rem 0; border-top: 1px solid var(--linea); }
.directo dt { color: var(--tinta-suave); }
.directo dd { margin: 0; font-weight: 600; }
.formulario { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-content: start; }
.formulario .campo--ancho, .formulario__error, .formulario .boton, .formulario__privacidad { grid-column: 1 / -1; }
.formulario .boton { justify-self: start; }
.formulario__error { color: var(--negativo); font-weight: 600; }
.formulario__error a { font-weight: 700; }
.formulario__privacidad { font-size: .875rem; color: var(--tinta-suave); margin-top: -.5rem; }
.campo input[aria-invalid="true"] { border-color: var(--negativo); box-shadow: 0 0 0 1px var(--negativo); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enviado { align-self: start; background: var(--blanco); border-left: 4px solid var(--verde); padding: 1.5rem; }
.enviado h3 { font-size: 1.375rem; }
.enviado p { margin-top: .5rem; color: var(--tinta-suave); }
@media (max-width: 56rem) {
  .bloque--contacto { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  .formulario { grid-template-columns: 1fr; }
}

/* ---------- pie ---------- */
.pie { background: var(--tinta); color: #B9C6BD; padding: 3rem var(--gutter); font-size: .9375rem; }
.pie__in { max-width: var(--ancho); margin: 0 auto; display: grid; gap: .5rem; }
.pie__marca { color: var(--papel); font-weight: 800; font-size: 1.125rem; }
.pie__legal { margin-top: 1rem; font-size: .8125rem; max-width: 46rem; }
