/* ReputationDeck · página pública
   Dos familias: Outfit (títulos y cifras) y Onest (texto), las mismas del producto.
   El coral señala: solo marca lo que hay que mirar. Los botones van en azul. */

:root {
  --tinta: #192032;
  --tinta-2: #26304a;
  --coral: #ee513e;
  --coral-texto: #b8321d;
  --papel: #ffffff;
  --bruma: #eef1f6;
  --linea: #d5d9e2;
  --cuerpo: #3b4660;
  --tenue: #566074;
  --sobre-tinta: #e3e6ec;
  --sobre-tinta-tenue: #b9c0d0;
  --linea-sobre-tinta: #343f5c;

  --titulos: "Outfit", system-ui, sans-serif;
  --texto: "Onest", system-ui, sans-serif;

  --margen: clamp(1.25rem, 4vw, 3rem);
  --aire: clamp(4.5rem, 10vw, 8.5rem);
}

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

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

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

h1, h2, h3 {
  margin: 0;
  color: var(--tinta);
  font-family: var(--titulos);
  font-weight: 600;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

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

.oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--tinta);
  color: #fff;
  border-radius: 0.5rem;
}
.saltar:focus { top: 1rem; }

/* --- Botones y enlaces ------------------------------------------------------------ */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--tinta);
  color: #fff;
  font: 500 1.0625rem/1 var(--titulos);
  letter-spacing: 0.005em;
  word-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.boton:hover { background: var(--tinta-2); }
.boton[disabled] { opacity: 0.6; cursor: progress; }
.boton--chico { min-height: 2.75rem; padding: 0 1.25rem; font-size: 0.9375rem; }

.enlace {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--tinta);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--coral);
  text-underline-offset: 0.3em;
}
.enlace:hover { text-decoration-color: var(--tinta); }

/* --- Figuras: un círculo es una persona; un cuadro coral, la que hay que mirar ---- */

.glifo {
  display: inline-block;
  flex: none;
  width: 0.5625rem;
  height: 0.5625rem;
  border-radius: 50%;
  background: var(--tinta);
}
.glifo--cuadro { border-radius: 2px; background: var(--coral); }

/* --- Cabecera --------------------------------------------------------------------- */

.cabecera { padding-block: 1.25rem; }
.cabecera__fila { display: flex; align-items: center; gap: 1.5rem; }
.cabecera__marca { flex: none; display: block; border-radius: 4px; }
.cabecera__marca img { width: auto; height: 1.625rem; }
.cabecera__lema {
  padding-left: 1.5rem;
  border-left: 1px solid var(--linea);
  color: var(--tenue);
  font-size: 0.9375rem;
  line-height: 1.3;
}
.cabecera__nav { display: flex; gap: 0.25rem; margin-left: auto; }
.cabecera__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  color: var(--tinta);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
}
.cabecera__nav a:hover { background: var(--bruma); }

/* --- Portada ---------------------------------------------------------------------- */

.portada { padding-block: clamp(2rem, 5vw, 4.5rem) var(--aire); }
.portada__rejilla {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
.portada h1 span, .hallazgo h3 span { display: block; }
.portada h1 {
  font-size: clamp(2.625rem, 5.9vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
}
.portada__caso {
  max-width: 30ch;
  margin-top: 1.75rem;
  color: var(--tinta);
  font: 500 clamp(1.25rem, 1.9vw, 1.5rem)/1.3 var(--titulos);
  word-spacing: 0.06em;
}
.portada__producto { max-width: 46ch; margin-top: 1.5rem; font-size: 1.125rem; }
.portada__acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 2.25rem;
}

/* La lectura: comentarios resumidos y lo que la plataforma saca de cada uno. */
.lectura {
  padding: clamp(1.25rem, 2.6vw, 2rem);
  background: var(--bruma);
  border-radius: 6px 28px 28px 28px;
}
.lectura h2 { font-size: 1.125rem; font-weight: 600; word-spacing: 0.08em; }

.filtros { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 1rem; }
.filtro {
  min-height: 2.75rem;
  padding: 0 0.8125rem;
  border: 1.5px solid var(--linea);
  border-radius: 999px;
  background: var(--papel);
  color: var(--tinta);
  font: 500 0.875rem/1 var(--texto);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filtro:hover { border-color: var(--tinta); }
.filtro[aria-pressed="true"] { border-color: var(--tinta); background: var(--tinta); color: #fff; }

.lectura__resumen {
  min-height: 4.2em;
  margin-top: 1.125rem;
  color: var(--tinta);
  font: 500 1.125rem/1.4 var(--titulos);
  word-spacing: 0.06em;
}

.hilo { display: grid; gap: 0.625rem; margin-top: 0.5rem; }
.voz {
  display: grid;
  gap: 0.3125rem;
  justify-items: start;
  transition: opacity 0.25s ease;
}
.voz__texto {
  max-width: 100%;
  padding: 0.5625rem 0.9375rem;
  background: var(--papel);
  border-radius: 4px 16px 16px 16px;
  color: var(--tinta);
  font-size: 0.9375rem;
  line-height: 1.4;
}
.voz__lectura {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.9375rem;
  color: var(--tenue);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.hilo[data-filtro="pregunta"] .voz:not([data-t~="pregunta"]),
.hilo[data-filtro="compra"] .voz:not([data-t~="compra"]),
.hilo[data-filtro="contra"] .voz:not([data-t~="contra"]) { opacity: 0.26; }

.lectura__nota { margin-top: 1.25rem; color: var(--tenue); font-size: 0.8125rem; line-height: 1.5; }

/* El único movimiento que nadie pide: al cargar, cada comentario recibe su lectura. */
@media (prefers-reduced-motion: no-preference) {
  .voz .voz__lectura {
    animation: leer 0.45s ease both;
    animation-delay: calc(0.4s + var(--i, 0) * 0.16s);
  }
}
@keyframes leer {
  from { opacity: 0; transform: translateX(-0.5rem); }
}

/* --- Hallazgos -------------------------------------------------------------------- */

.hallazgos { padding-bottom: var(--aire); }
.hallazgos__entrada { max-width: 40rem; }
.hallazgos__entrada h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.hallazgos__entrada p { margin-top: 0.875rem; color: var(--tenue); }

.hallazgo {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  margin-top: clamp(4rem, 9vw, 7.5rem);
}
.hallazgo h3 {
  font-size: clamp(1.625rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.022em;
}
.hallazgo__texto p { max-width: 54ch; margin-top: 1.125rem; }
.hallazgo__texto .hallazgo__origen { margin-top: 1.5rem; color: var(--tenue); font-size: 0.9375rem; }
.hallazgo__origen a {
  color: var(--tinta);
  font-weight: 500;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.hallazgo figcaption { margin-top: 1rem; color: var(--tenue); font-size: 0.875rem; line-height: 1.45; }

/* Cada hallazgo ocupa la rejilla a su manera: el ritmo cambia, no se repite una tarjeta. */
.hallazgo--a .hallazgo__texto { grid-column: 1 / span 7; }
.hallazgo--a .hallazgo__figura { grid-column: 9 / span 4; }
.hallazgo--b .hallazgo__figura { grid-column: 1 / span 5; }
.hallazgo--b .hallazgo__texto { grid-column: 7 / span 6; }
.hallazgo--c .hallazgo__texto { grid-column: 1 / span 6; }
.hallazgo--c .hallazgo__figura { grid-column: 8 / span 5; }
.hallazgo--d .hallazgo__figura { grid-column: 1 / span 5; }
.hallazgo--d .hallazgo__texto { grid-column: 7 / span 6; }
.hallazgo--e .hallazgo__texto { grid-column: 1 / span 7; }
.hallazgo--e .hallazgo__figura { grid-column: 9 / span 4; }

.cien { width: 100%; max-width: 22rem; height: auto; }
.leyenda { display: flex; align-items: center; gap: 0.5rem; }
.leyenda + .leyenda { margin-top: 0.25rem; }

.escala { width: 100%; max-width: 24rem; height: auto; }
.escala__cifra { fill: #fff; font: 600 30px var(--titulos); letter-spacing: -0.02em; }
.escala__rotulo { fill: var(--sobre-tinta-tenue); font: 400 15px var(--texto); }

.nota__pista {
  position: relative;
  height: 1.25rem;
  background: var(--bruma);
  border-radius: 999px;
  overflow: hidden;
}
.nota__real { position: absolute; inset: 0 auto 0 0; width: 82.2%; background: var(--tinta); }
.nota__resta {
  position: absolute;
  inset: 0 auto 0 82.2%;
  width: 9%;
  background: repeating-linear-gradient(-45deg, var(--coral) 0 3px, transparent 3px 6px);
}
.nota__rotulos {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.625rem;
  color: var(--tenue);
  font-size: 0.875rem;
  line-height: 1.35;
}
.nota__rotulos span:last-child { color: var(--coral-texto); text-align: right; }

.idiomas { display: grid; gap: 0.75rem; margin-top: 2rem; }
.idiomas div { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 1rem; }
.idiomas dt { color: var(--cuerpo); font-size: 0.9375rem; }
.idiomas dd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--tinta);
  font: 600 1.0625rem/1 var(--titulos);
  font-variant-numeric: tabular-nums;
}
.idiomas dd span { flex: none; width: calc(var(--v) * 0.72); height: 0.5rem; background: var(--tinta); border-radius: 999px; }

.prensa { display: grid; gap: 1.125rem; }
.prensa div { display: grid; gap: 0.375rem; }
.prensa dt { color: var(--cuerpo); font-size: 1rem; }
.prensa dd { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 1rem; align-items: center; }
.prensa .glifo { width: 0.875rem; height: 0.875rem; border-radius: 3px; }
.tira {
  display: block;
  width: calc(var(--n) * 1.375rem);
  max-width: 100%;
  height: 0.875rem;
  background: radial-gradient(circle at 0.4375rem 50%, var(--tinta) 0.4375rem, transparent 0.46875rem) 0 0 / 1.375rem 100% repeat-x;
}

.copias { display: flex; flex-wrap: wrap; gap: 0.4375rem; }
.copias li {
  padding: 0.375rem 0.75rem;
  background: var(--bruma);
  border-radius: 3px 12px 12px 12px;
  color: var(--tinta);
  font-size: 0.875rem;
  line-height: 1.3;
}
.copias .copia {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--linea);
  color: var(--tenue);
  text-decoration: line-through;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 1.5px;
}

/* --- Apps ------------------------------------------------------------------------- */

.apps { padding-block: var(--aire); background: var(--bruma); }
.apps h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.apps__lista { margin-top: clamp(2rem, 5vw, 3.5rem); }
.apps__lista li {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 1rem clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1.5px solid var(--tinta);
  scroll-margin-top: 1.5rem;
}
.apps__lista h3 {
  font-size: clamp(1.5rem, 2.7vw, 2.125rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.02em;
}
.apps__nombre { color: var(--tinta); font: 600 1.0625rem/1.3 var(--titulos); }
.apps__nombre + p { margin-top: 0.375rem; max-width: 48ch; }

/* --- Agencias: la única banda oscura ---------------------------------------------- */

.agencias { padding-block: var(--aire); background: var(--tinta); color: var(--sobre-tinta); }
.agencias__rejilla {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.agencias h2 { color: #fff; font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.agencias p { max-width: 50ch; margin-top: 1.125rem; }
.agencias .agencias__viene {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linea-sobre-tinta);
  color: var(--sobre-tinta-tenue);
  font-size: 0.9375rem;
}

.matriz { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.matriz caption {
  caption-side: bottom;
  padding-top: 1.125rem;
  color: var(--sobre-tinta-tenue);
  font-size: 0.875rem;
  text-align: left;
}
.matriz th, .matriz td { padding: 0.875rem 0.5rem; }
.matriz thead th { color: var(--sobre-tinta-tenue); font-weight: 400; text-align: center; }
.matriz tbody th { padding-left: 0; color: #fff; font: 500 1rem/1.3 var(--titulos); text-align: left; }
.matriz tbody tr { border-top: 1px solid var(--linea-sobre-tinta); }
.matriz td { text-align: center; }
.celda {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 1.5px solid #6a7694;
  border-radius: 50%;
  vertical-align: middle;
}
.celda--si { border: 0; border-radius: 3px; background: var(--coral); }

/* --- Reglas ----------------------------------------------------------------------- */

.reglas { padding-block: var(--aire); }
.reglas__rejilla {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 2rem clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}
.reglas h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.reglas__lista { display: grid; gap: clamp(1.75rem, 3.5vw, 2.75rem); }
.reglas h3 {
  font-size: clamp(1.5rem, 2.7vw, 2.125rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.02em;
}
.reglas h3 + p { max-width: 50ch; margin-top: 0.625rem; }

/* --- Demo ------------------------------------------------------------------------- */

.demo { padding-block: var(--aire); background: var(--bruma); }
.demo__rejilla {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.demo h2 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.04; letter-spacing: -0.026em; }
.demo h2 + p { margin-top: 1.5rem; color: var(--tinta); font-weight: 500; }

.pasos { display: grid; gap: 1.125rem; margin-top: 1.125rem; counter-reset: paso; }
.pasos li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.875rem;
  max-width: 44ch;
  counter-increment: paso;
}
.pasos li::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--tinta);
  color: #fff;
  font: 600 0.9375rem/1 var(--titulos);
}

.formulario {
  display: grid;
  gap: 1.125rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--papel);
  border-radius: 6px 28px 28px 28px;
}
.campo { display: grid; gap: 0.375rem; }
.campo label { color: var(--tinta); font-size: 0.9375rem; font-weight: 500; }
.campo__opcional { color: var(--tenue); font-weight: 400; }
.campo input, .campo textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--linea);
  border-radius: 10px;
  background: var(--papel);
  color: var(--tinta);
  font: inherit;
}
.campo textarea { resize: vertical; }
.campo input:hover, .campo textarea:hover { border-color: var(--tenue); }
.campo input:focus-visible, .campo textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 1px;
  border-color: var(--tinta);
  border-radius: 10px;
}
.campo [aria-invalid="true"] { border-color: var(--coral-texto); }
.campo__error { color: var(--coral-texto); font-size: 0.875rem; }
.campo--trampa { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }

.formulario .boton { justify-self: start; margin-top: 0.375rem; }
.formulario__aviso { padding: 0.875rem 1rem; border-radius: 10px; background: var(--bruma); color: var(--tinta); }
.formulario__aviso[data-tipo="error"] { background: #fff1ee; color: var(--coral-texto); }
.formulario__privacidad { color: var(--tenue); font-size: 0.875rem; }

/* --- Pie -------------------------------------------------------------------------- */

.pie { padding-block: 2.5rem; }
.pie__fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.pie img { width: auto; height: 1.375rem; }
.pie p { color: var(--tenue); font-size: 0.9375rem; }

/* --- Pantallas medianas y teléfonos ----------------------------------------------- */

@media (max-width: 61rem) {
  .cabecera__lema { display: none; }
  .portada__rejilla, .agencias__rejilla, .demo__rejilla { grid-template-columns: minmax(0, 1fr); }
  .lectura__resumen { min-height: 0; }
  .hallazgo { row-gap: 2.25rem; }
  .hallazgo .hallazgo__texto, .hallazgo .hallazgo__figura { grid-column: 1 / -1; }
  .hallazgo .hallazgo__figura { order: 2; max-width: 26rem; }
  .apps__lista li { grid-template-columns: minmax(0, 1fr); }
  .reglas__rejilla { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  .cabecera__nav { display: none; }
  .cabecera__fila { justify-content: space-between; }
  .cabecera__marca img { height: 1.375rem; }
  .portada__caso { max-width: none; }
  .matriz th, .matriz td { padding: 0.75rem 0.25rem; }
  .matriz thead th { font-size: 0.8125rem; }
  .formulario .boton { justify-self: stretch; }
}

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