/* ===========================================================
   Confluente — cumplimiento de agua industrial
   Paleta: papel y tinta. Hueso, tinta casi negra y un solo
   azul profundo. Sin sombras difusas: la jerarquía la hacen
   el aire, el peso tipográfico y el hairline.
   Tipografía: Archivo variable, una sola familia usando el
   eje de ancho como recurso expresivo.
   Regla: el oficio habla, no el texto.
   =========================================================== */

:root {
  --hueso:      #f7f6f3;
  --papel:      #ffffff;
  --tinta:      #11161a;
  --suave:      #6b7280;
  --tenue:      #9aa0a8;
  --linea:      #e2e0da;
  --linea-viva: #c9c6bd;
  --azul:       #1b4fd8;

  --respiro:  clamp(4.25rem, 8vh, 7rem);
  --canal:    clamp(1.5rem, 6vw, 6rem);
  --curva:    2px;
  --paso:     cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--hueso);
  position: relative;
  color: var(--tinta);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variation-settings: "wdth" 100, "wght" 400;
  font-size: clamp(1rem, .95rem + .22vw, 1.08rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

canvas { display: block; }

::selection { background: var(--azul); color: #fff; }

:focus-visible { outline: 2px solid var(--azul); outline-offset: 4px; }

.saltar {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  padding: .75rem 1.25rem;
  background: var(--azul); color: #fff;
  font-weight: 600; text-decoration: none;
}
.saltar:focus { left: 1rem; top: 1rem; }

/* ---------- hairline de progreso de página ---------- */

.progreso-pagina {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 2px;
  z-index: 50;
  background: var(--azul);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- marca ---------- */

.marca { display: inline-flex; align-items: center; gap: .62rem; }

.marca__gota {
  width: 10px; height: 10px;
  background: var(--azul);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  flex: none;
}

.marca__nombre {
  font-variation-settings: "wdth" 112, "wght" 700;
  font-size: 1.15rem;
  letter-spacing: -.005em;
}

/* ===========================================================
   PORTADA
   =========================================================== */

.portada {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

/* Capa de agua de toda la página, no solo de la portada: es lo que
   evita que el sitio sea crema plana bajo el primer scroll. */
.agua {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.portada__luz {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(
    40rem 40rem at var(--luz-x, 50%) var(--luz-y, 40%),
    rgba(27, 79, 216, .13), rgba(27, 79, 216, .05) 44%, transparent 70%);
  transition: opacity .7s var(--paso);
}

.portada { background: transparent; }

.barra {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--canal);
  transition: padding .4s var(--paso), background .4s var(--paso),
              border-color .4s var(--paso);
  border-bottom: 1px solid transparent;
}

.barra.posada {
  padding-block: .85rem;
  background: rgba(247, 246, 243, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--linea);
}

.barra__enlace {
  color: var(--suave);
  font-size: .88rem;
  font-variation-settings: "wdth" 96, "wght" 500;
  text-decoration: none;
  padding: .5rem .95rem;
  border: 1px solid var(--linea);
  border-radius: var(--curva);
  transition: color .3s var(--paso), border-color .3s var(--paso);
}
.barra__enlace:hover { color: var(--tinta); border-color: var(--linea-viva); }

.portada__cuerpo {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 7rem var(--canal) clamp(4rem, 9vh, 7rem);
  max-width: 70rem;
}

.portada__sello {
  margin: 0;
  color: var(--azul);
  font-size: .8rem;
  font-variation-settings: "wdth" 86, "wght" 600;
  letter-spacing: .015em;
}

.titular { margin: 0; display: flex; flex-direction: column; gap: .36em; }

.titular__a {
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5rem);
  font-variation-settings: "wdth" 104, "wght" 620;
  line-height: 1.02;
  letter-spacing: -.034em;
  max-width: 15ch;
  text-wrap: balance;
}

/* segundo tiempo del titular: pertenece al titular, no a la bajada */
.titular__b {
  font-size: clamp(1.05rem, .88rem + .72vw, 1.45rem);
  font-variation-settings: "wdth" 74, "wght" 400;
  line-height: 1.25;
  letter-spacing: -.008em;
  color: rgba(17, 22, 26, .62);
}

/* reveal por palabra, el único momento orquestado de la página.
   Animación CSS, no clase por JS: el titular nunca puede quedar
   invisible esperando un frame que el navegador no programó. */
.palabra { display: inline-block; overflow: hidden; vertical-align: top; }
.palabra > i {
  display: inline-block;
  font-style: inherit;
  animation: alzar .8s var(--paso) both;
}
@keyframes alzar {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Si la pestaña estuvo en segundo plano, la animación queda congelada
   en su fotograma inicial y el titular no se ve. setTimeout sí corre
   en pestañas ocultas, así que a los 2 s se fuerza el estado final. */
.asentado .palabra > i { animation: none; transform: none; opacity: 1; }

.bajada {
  margin: 0;
  max-width: 38ch;
  font-size: 1rem;
  color: var(--suave);
}

.portada__acciones {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

/* ---------- botones ---------- */

.boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.05rem 2rem;
  background: var(--azul);
  color: #fff;
  border: 0;
  border-radius: var(--curva);
  font-family: inherit;
  font-size: 1rem;
  font-variation-settings: "wdth" 100, "wght" 650;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  will-change: transform;
  transition: transform .45s var(--paso), box-shadow .45s var(--paso);
}

.boton::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--tinta); opacity: 0;
  transition: opacity .3s var(--paso);
}
.boton:hover::before { opacity: .18; }

.boton__texto { position: relative; z-index: 1; }

.boton:hover { box-shadow: 0 .8rem 2.2rem rgba(27, 79, 216, .22); }
.boton:active { transform: scale(.985); }
.boton[disabled] { opacity: .55; cursor: progress; }

/* onda al hacer click: el agua responde al toque */
.onda {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  transform: scale(0);
  pointer-events: none;
  animation: expandir .7s var(--paso) forwards;
}
@keyframes expandir {
  to { transform: scale(2.6); opacity: 0; }
}

.boton--enviar { width: 100%; margin-top: .5rem; }

.enlace-sutil {
  color: var(--suave);
  font-size: .94rem;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--linea-viva);
  transition: color .3s var(--paso), border-color .3s var(--paso);
}
.enlace-sutil:hover { color: var(--tinta); border-color: var(--azul); }

/* ===========================================================
   TRES HECHOS
   =========================================================== */

.franja { padding: var(--respiro) 0; }

.franja__interior {
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 var(--canal);
  display: grid;
  gap: clamp(2.5rem, 4vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  align-items: start;
}

/* Escalonado a propósito: tres columnas a la misma altura y al mismo
   margen es lo que hacía ver esta franja como un wireframe. */
.hecho { padding-top: 1.1rem; border-top: 1px solid var(--tinta); }
.hecho:nth-child(2) { margin-top: clamp(1.5rem, 4vw, 3.5rem); }
.hecho:nth-child(3) { margin-top: clamp(3rem, 8vw, 7rem); }

.hecho__cifra {
  margin: 0 0 .45rem;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.6rem, 1.5rem + 3.6vw, 4.5rem);
  font-variation-settings: "wdth" 82, "wght" 520;
  letter-spacing: -.042em;
  line-height: .92;
}

.hecho__texto {
  margin: 0;
  color: var(--suave);
  font-size: .95rem;
  max-width: 26ch;
  line-height: 1.5;
}

/* ===========================================================
   PINNED SCROLL
   =========================================================== */

.revision { position: relative; height: 280vh; }

.revision__marco {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  overflow: hidden;
}

.revision__encabezado {
  padding: 0 var(--canal);
  max-width: 82rem;
  margin: 0 auto;
  width: 100%;
}

.titulo2 {
  margin: 0;
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem);
  font-variation-settings: "wdth" 100, "wght" 620;
  line-height: 1.12;
  letter-spacing: -.024em;
  max-width: 20ch;
  text-wrap: balance;
}

.revision__barra {
  height: 1px;
  background: var(--linea);
  max-width: 11rem;
  margin: 1.5rem 0 .7rem;
  overflow: hidden;
}
.revision__barra i {
  display: block;
  height: 100%;
  width: 33.333%;
  background: var(--azul);
  transition: transform .35s var(--paso);
}

.revision__progreso {
  margin: 0;
  color: var(--tenue);
  font-size: .8rem;
  font-variation-settings: "wdth" 84, "wght" 500;
}

.revision__riel {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding-inline: var(--canal);
  will-change: transform;
}

.paso {
  position: relative;
  flex: none;
  width: min(38rem, 78vw);
  background: var(--papel);
  box-shadow: inset 0 0 0 1px var(--linea);
  border-radius: var(--curva);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transform-style: preserve-3d;
  overflow: hidden;
}

.paso__titulo {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 1.15rem + .8vw, 1.95rem);
  font-variation-settings: "wdth" 94, "wght" 620;
  letter-spacing: -.022em;
}

.paso__texto { margin: 0; color: var(--suave); max-width: 36ch; font-size: 1.02rem; }

/* spotlight que sigue el cursor dentro de la pieza */
.foco::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    22rem 22rem at var(--mx, 50%) var(--my, 50%),
    rgba(27, 79, 216, .11), transparent 62%);
  transition: opacity .45s var(--paso);
}
.foco:hover::after { opacity: 1; }

/* ===========================================================
   LO QUE CASI NADIE SABE
   Sin persona en el sitio, la confianza la tiene que construir
   el conocimiento. Los números acá no decoran: el titular
   cuenta tres y contrasta uno contra dos.
   =========================================================== */

.saber { padding: var(--respiro) 0; }

.saber__interior { max-width: 82rem; margin: 0 auto; padding: 0 var(--canal); }

.motivos {
  list-style: none;
  margin: clamp(2.25rem, 4.5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
  padding: 0;
  counter-reset: motivo;
  max-width: 54rem;
}

.motivo {
  counter-increment: motivo;
  position: relative;
  padding: 1.5rem 0 1.5rem clamp(3rem, 6vw, 4.75rem);
  border-top: 1px solid var(--linea);
}
.motivo:last-child { border-bottom: 1px solid var(--linea); }

.motivo::before {
  content: counter(motivo);
  position: absolute;
  left: 0;
  top: 1.15rem;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  font-variation-settings: "wdth" 80, "wght" 500;
  line-height: 1;
  color: var(--azul);
  font-variant-numeric: tabular-nums;
}

.motivo__texto {
  margin: 0 0 .35rem;
  font-size: clamp(1.1rem, 1rem + .55vw, 1.4rem);
  line-height: 1.32;
  letter-spacing: -.018em;
  font-variation-settings: "wdth" 98, "wght" 500;
  max-width: 34ch;
}

.motivo__nota { margin: 0; color: var(--suave); font-size: .94rem; max-width: 42ch; }

.saber__cierre {
  margin: 0;
  max-width: 50ch;
  font-size: clamp(1rem, .96rem + .3vw, 1.14rem);
  line-height: 1.55;
  color: var(--suave);
}

/* ===========================================================
   EL LÍMITE
   =========================================================== */

.limite { padding: var(--respiro) 0; }

.limite__interior { max-width: 82rem; margin: 0 auto; padding: 0 var(--canal); }

/* Asimetría a propósito: un bloque de texto ancho y una nota al
   costado. Dos tarjetas gemelas con una negación y su remate
   espejado es lo que hacía sonar esta sección a plantilla. */
.limite__cuerpo {
  margin: clamp(2rem, 4vw, 3rem) 0 clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 52ch;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* el segundo párrafo entra desplazado: rompe la columna única */
.limite__parrafo:last-child { margin-left: clamp(0rem, 5vw, 5rem); }

.nota { margin-left: clamp(0rem, 14vw, 15rem); }

.limite__parrafo {
  margin: 0;
  font-size: clamp(1.08rem, 1rem + .5vw, 1.32rem);
  line-height: 1.52;
  letter-spacing: -.012em;
}

.limite__parrafo:first-child {
  font-variation-settings: "wdth" 98, "wght" 480;
}

.limite__parrafo:last-child {
  color: var(--suave);
  font-size: clamp(1rem, .96rem + .28vw, 1.12rem);
  max-width: 48ch;
}

.nota {
  position: relative;
  max-width: 34ch;
  padding: 1.3rem 1.5rem;
  border-left: 2px solid var(--azul);
  background: var(--papel);
  overflow: hidden;
  transform-style: preserve-3d;
}

.nota__texto { margin: 0; color: var(--suave); font-size: .96rem; }

/* underline draw */
.subrayado { position: relative; white-space: nowrap; font-variation-settings: "wdth" 100, "wght" 620; }
.subrayado::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -.14em;
  height: 2px;
  background: var(--azul);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--paso);
}
.subrayado.trazado::after { transform: scaleX(1); }

/* ===========================================================
   PRODUCTO + FORMULARIO
   =========================================================== */

.producto { padding: var(--respiro) 0; scroll-margin-top: 4rem; }

.producto__interior {
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 var(--canal);
  display: grid;
  gap: clamp(3rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  align-items: start;
}

.producto__bajada {
  margin: 1.5rem 0 clamp(2.5rem, 5vw, 3.5rem);
  max-width: 34ch;
  color: var(--suave);
  font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem);
}

/* La postura. Reemplaza al precio como centro de la sección:
   primero lo que NO hacemos (asustar), después lo que sí. */
.postura {
  margin: 0 0 2rem;
  max-width: 24ch;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -.022em;
  font-variation-settings: "wdth" 92, "wght" 420;
  color: var(--tenue);
}

.postura__giro {
  display: block;
  margin-top: .18em;
  color: var(--tinta);
  font-size: clamp(1.9rem, 1.3rem + 2.3vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-variation-settings: "wdth" 98, "wght" 640;
}

.producto__cierre {
  margin: 0;
  max-width: 34ch;
  color: var(--suave);
  font-size: .97rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linea);
}

.formulario__caja {
  background: var(--papel);
  box-shadow: inset 0 0 0 1px var(--linea);
  border-radius: var(--curva);
  padding: clamp(1.75rem, 3vw, 2.25rem);
}

.formulario__titulo {
  margin: 0 0 .35rem;
  font-size: 1.22rem;
  font-variation-settings: "wdth" 100, "wght" 680;
  letter-spacing: -.02em;
}

.formulario__nota { margin: 0 0 1.75rem; color: var(--tenue); font-size: .86rem; }

.campo { margin-bottom: 1rem; }

.campo--doble { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }

.campo label {
  display: block;
  margin-bottom: .4rem;
  font-size: .82rem;
  font-variation-settings: "wdth" 88, "wght" 540;
  color: var(--suave);
}

.opcional {
  font-variation-settings: "wdth" 86, "wght" 400;
  color: var(--tenue);
  text-transform: none;
}

.campo input,
.campo select {
  width: 100%;
  padding: .8rem .9rem;
  background: var(--hueso);
  border: 1px solid var(--linea);
  border-radius: var(--curva);
  color: var(--tinta);
  font-family: inherit;
  font-size: .97rem;
  transition: border-color .25s var(--paso);
}

.campo input:hover, .campo select:hover { border-color: var(--linea-viva); }

.campo input:focus, .campo select:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(27, 79, 216, .12);
}

.campo input[aria-invalid="true"], .campo select[aria-invalid="true"] {
  border-color: #b3341f;
}

.campo select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--suave) 50%),
                    linear-gradient(135deg, var(--suave) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 1.3rem, calc(100% - .8rem) 1.3rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

/* Honeypot. No se usa display:none a propósito: muchos bots
   ignoran los campos ocultos así y entonces la trampa no sirve. */
.trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formulario__estado {
  margin: .9rem 0 0;
  font-size: .88rem;
  min-height: 1.1em;
  color: var(--azul);
  line-height: 1.45;
}
.formulario__estado[data-tono="error"] { color: #b3341f; }

/* ===========================================================
   PIE
   =========================================================== */

.pie { padding: clamp(3.5rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--linea); }

.pie__interior {
  max-width: 82rem; margin: 0 auto; padding: 0 var(--canal);
  display: flex; flex-direction: column; gap: 1.1rem; align-items: flex-start;
}

.pie__texto { margin: 0; color: var(--suave); max-width: 38ch; font-size: .94rem; }
.pie__aviso { margin: 0; color: var(--tenue); max-width: 60ch; font-size: .76rem; line-height: 1.55; }

/* ===========================================================
   REVEAL  (solo con JS: sin JS, todo visible)
   =========================================================== */

.js [data-revelar] {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity .85s var(--paso), transform .85s var(--paso);
}
.js [data-revelar].visto { opacity: 1; transform: none; }

/* ===========================================================
   RESPONSIVE
   =========================================================== */

@media (max-width: 64rem) {
  .producto__interior { grid-template-columns: minmax(0, 1fr); }
  .revision { height: auto; }
  .revision__marco { position: static; height: auto; padding: var(--respiro) 0; }
  .revision__riel { flex-direction: column; transform: none !important; }
  .paso { width: 100%; }
  .revision__barra, .revision__progreso { display: none; }
}

@media (max-width: 34rem) {
  .campo--doble { grid-template-columns: 1fr; }
  .boton { width: 100%; }
  .portada__acciones { flex-direction: column; align-items: stretch; }
  .enlace-sutil { align-self: flex-start; }
}

/* ===========================================================
   MOVIMIENTO REDUCIDO
   =========================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .js [data-revelar] { opacity: 1; transform: none; }
  .palabra > i { animation: none; transform: none; opacity: 1; }
  .subrayado::after { transform: scaleX(1); }
  .revision { height: auto; }
  .revision__marco { position: static; height: auto; padding: var(--respiro) 0; }
  .revision__riel { flex-direction: column; transform: none !important; }
  .paso { width: 100%; }
  .revision__barra, .revision__progreso { display: none; }
  .portada__luz, .foco::after, .progreso-pagina { display: none; }
}
