/* ProveedorReady — autodiagnóstico RE.PRO.MIN.
   Tokens de diseño: tema claro y oscuro (prefers-color-scheme).
   Paleta: grafito + cobre. Sin fuentes externas (privacidad y velocidad). */

:root {
  --fondo: #f6f3ef;
  --fondo-alt: #ede8e1;
  --superficie: #ffffff;
  --tinta: #1b2025;
  --tinta-suave: #4f5862;
  --linea: #d9d2c8;
  --cobre: #9c4320;          /* 6,5:1 sobre blanco */
  --cobre-hover: #833617;
  --cobre-suave: #f6e4da;
  --sobre-cobre: #ffffff;
  --foco: #1f5fbf;

  --ok: #1d6a38;      --ok-fondo: #e3f1e7;
  --mal: #a1261d;     --mal-fondo: #fbe8e6;
  --rev: #835400;     --rev-fondo: #fdf1d4;
  --neutro: #4f5862;  --neutro-fondo: #ecebe8;
  --wa: #136c46;      --sobre-wa: #ffffff;

  --radio: 14px;
  --radio-sm: 10px;
  --sombra: 0 1px 2px rgba(27, 32, 37, .06), 0 8px 24px rgba(27, 32, 37, .06);
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ancho: 1120px;
  --ancho-estrecho: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #121518;
    --fondo-alt: #171b1f;
    --superficie: #1c2126;
    --tinta: #ece7e1;
    --tinta-suave: #a9b1b9;
    --linea: #2f363d;
    --cobre: #e3946a;
    --cobre-hover: #eda882;
    --cobre-suave: #3a2519;
    --sobre-cobre: #1a120c;
    --foco: #8ab4ff;

    --ok: #82cf9a;      --ok-fondo: #16301f;
    --mal: #f3a197;     --mal-fondo: #3b1a17;
    --rev: #f1c66d;     --rev-fondo: #33280f;
    --neutro: #a9b1b9;  --neutro-fondo: #262c32;
    --wa: #5fd39b;      --sobre-wa: #0b1f15;

    --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--fondo);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--cobre); text-underline-offset: .18em; }
a:hover { color: var(--cobre-hover); }
strong { font-weight: 650; }

:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

.visualmente-oculto {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--tinta); color: var(--fondo); padding: .6rem 1rem; border-radius: var(--radio-sm);
}
.saltar:focus { top: 1rem; }

.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.contenedor--estrecho { width: min(100% - 2.5rem, var(--ancho-estrecho)); }

/* ---------- Barra ---------- */
.barra { border-bottom: 1px solid var(--linea); background: var(--fondo); }
.barra__fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.marca { display: inline-flex; align-items: center; gap: .55rem; color: var(--tinta); text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.marca:hover { color: var(--tinta); }
.marca__logo { width: 28px; height: 28px; color: var(--cobre); }
.barra__nota { font-size: .85rem; color: var(--tinta-suave); white-space: nowrap; }
@media (max-width: 400px) { .barra__nota { display: none; } }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(120% 80% at 100% 0%, var(--cobre-suave) 0%, transparent 55%),
    var(--fondo);
  position: relative;
  overflow: hidden;
}
/* Estratos: líneas finas que evocan un corte geológico, sin clichés. */
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 90' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%239c4320' stroke-width='1.2' stroke-opacity='.35'%3E%3Cpath d='M0 30 C200 10 380 45 600 28 S1000 12 1200 32'/%3E%3Cpath d='M0 52 C220 34 420 70 640 50 S1020 36 1200 56'/%3E%3Cpath d='M0 74 C240 58 440 90 680 72 S1040 60 1200 78'/%3E%3C/g%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.hero__grid { display: grid; gap: 2rem; position: relative; z-index: 1; }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 3.5rem; }
}
.antetitulo {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700;
  color: var(--cobre); margin-bottom: .7rem;
}
.hero__intro { font-size: 1.08rem; color: var(--tinta-suave); max-width: 60ch; }
.hero__cta-texto { font-weight: 650; font-size: 1.12rem; }
.hero__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.enlace-sutil { color: var(--tinta); font-weight: 600; }

.avisos { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.aviso {
  display: flex; gap: .85rem; align-items: flex-start;
  background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: .9rem 1rem; box-shadow: var(--sombra); font-size: .98rem;
}
.aviso__icono {
  flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .95rem;
  background: var(--cobre-suave); color: var(--cobre);
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.25rem; border-radius: 999px;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s, border-color .15s, transform .1s;
}
.boton:active { transform: translateY(1px); }
.boton--grande { min-height: 54px; padding: .85rem 1.6rem; font-size: 1.05rem; }
.boton--ancho { width: 100%; }
.boton--primario { background: var(--cobre); color: var(--sobre-cobre); }
.boton--primario:hover { background: var(--cobre-hover); color: var(--sobre-cobre); }
.boton--primario[disabled], .boton--primario[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.boton--secundario { background: transparent; color: var(--tinta); border-color: var(--linea); }
.boton--secundario:hover { border-color: var(--tinta-suave); color: var(--tinta); }
.boton--texto { background: transparent; color: var(--tinta-suave); padding-inline: .6rem; text-decoration: underline; text-underline-offset: .2em; }
.boton--whatsapp { background: var(--wa); color: var(--sobre-wa); }
.boton--whatsapp:hover { filter: brightness(1.08); color: var(--sobre-wa); }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.seccion:focus { outline: none; }
.seccion--diagnostico { background: var(--fondo-alt); border-block: 1px solid var(--linea); scroll-margin-top: 0; }
.seccion__intro { color: var(--tinta-suave); max-width: 65ch; }

.tarjeta {
  background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: clamp(1.25rem, 4vw, 2rem);
}
.inicio__titulo { font-size: 1.4rem; }
.lista-check { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .55rem; }
.lista-check li { position: relative; padding-left: 1.8rem; }
.lista-check li::before {
  content: ""; position: absolute; left: .15rem; top: .45em; width: .95rem; height: .55rem;
  border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg);
}

/* ---------- Pregunta ---------- */
.progreso { margin-bottom: 1.4rem; }
.progreso__texto { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--tinta-suave); margin-bottom: .45rem; }
.progreso__bloque { font-weight: 700; color: var(--cobre); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.progreso__barra { height: 8px; background: var(--neutro-fondo); border-radius: 999px; overflow: hidden; }
.progreso__relleno { display: block; height: 100%; width: 0; background: var(--cobre); border-radius: inherit; transition: width .3s ease; }

.pregunta__campo { border: 0; padding: 0; margin: 0; min-width: 0; }
.pregunta__texto { font-size: clamp(1.25rem, 4.2vw, 1.55rem); font-weight: 700; line-height: 1.3; padding: 0; margin-bottom: .5rem; letter-spacing: -.01em; }
.pregunta__ayuda { color: var(--tinta-suave); font-size: .97rem; }
.pregunta__ayuda:empty { display: none; }

.opciones { display: grid; gap: .65rem; margin-top: 1.1rem; }
@media (min-width: 560px) { .opciones--rejilla { grid-template-columns: 1fr 1fr; } }
.opcion { position: relative; display: block; }
.opcion input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opcion__caja {
  display: flex; align-items: center; gap: .85rem; min-height: 58px;
  padding: .8rem 1rem; border: 2px solid var(--linea); border-radius: var(--radio-sm);
  background: var(--superficie); transition: border-color .15s, background-color .15s;
}
.opcion__marca {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tinta-suave);
  display: grid; place-items: center;
}
.opcion__marca::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.opcion__textos { display: grid; gap: .1rem; }
.opcion__titulo { font-weight: 650; }
.opcion__detalle { font-size: .9rem; color: var(--tinta-suave); }
.opcion:hover .opcion__caja { border-color: var(--tinta-suave); }
.opcion input:checked + .opcion__caja { border-color: var(--cobre); background: var(--cobre-suave); }
.opcion input:checked + .opcion__caja .opcion__marca { border-color: var(--cobre); }
.opcion input:checked + .opcion__caja .opcion__marca::after { background: var(--cobre); }
.opcion input:focus-visible + .opcion__caja { outline: 3px solid var(--foco); outline-offset: 2px; }

.campo-lista { display: grid; gap: .4rem; margin-top: 1.1rem; }
.campo-lista label { font-weight: 600; }
.selector {
  width: 100%; min-height: 54px; font: inherit; color: var(--tinta); background: var(--superficie);
  border: 2px solid var(--linea); border-radius: var(--radio-sm); padding: .6rem .9rem;
}
.selector:focus-visible { border-color: var(--cobre); }

.pregunta__nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.6rem; }
.pregunta__nav .boton { flex: 1; }
@media (min-width: 560px) { .pregunta__nav .boton { flex: 0 0 auto; min-width: 9rem; } }

/* ---------- Resultado ---------- */
.resultado__global { border-width: 2px; }
.resultado__global h3 { font-size: clamp(1.35rem, 4.6vw, 1.75rem); margin-bottom: .4rem; }
.resultado__global p:last-child { margin-bottom: 0; }
.resultado__global--califica { border-color: var(--ok); }
.resultado__global--falta { border-color: var(--mal); }
.resultado__global--revisar { border-color: var(--rev); }
.resultado__etiqueta { display: inline-block; margin-bottom: .6rem; }
.resultado__ambito { margin: 1rem .25rem 1.8rem; color: var(--tinta-suave); font-size: .97rem; }
.resultado__subtitulo { font-size: 1.2rem; margin-bottom: .25rem; }
.nota { color: var(--tinta-suave); font-size: .92rem; }

.requisitos { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .7rem; }
.requisito {
  background: var(--superficie); border: 1px solid var(--linea); border-left: 5px solid var(--neutro);
  border-radius: var(--radio-sm); padding: 1rem 1.1rem;
}
.requisito--cumple { border-left-color: var(--ok); }
.requisito--falta { border-left-color: var(--mal); }
.requisito--revisar { border-left-color: var(--rev); }
.requisito__cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; }
.requisito__nombre { font-weight: 700; font-size: 1.02rem; margin: 0; }
.requisito__id { color: var(--tinta-suave); font-weight: 600; margin-right: .3rem; }
.requisito__motivo { margin: .45rem 0 .2rem; font-size: .95rem; }
.requisito details { margin-top: .5rem; }
.requisito summary { cursor: pointer; font-weight: 600; color: var(--cobre); font-size: .95rem; padding: .25rem 0; }
.requisito ul { margin: .5rem 0 .4rem; padding-left: 1.2rem; font-size: .94rem; }
.requisito li { margin-bottom: .3rem; }
.requisito__ref { font-size: .85rem; color: var(--tinta-suave); margin: .4rem 0 0; }

.estado {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700;
  padding: .2rem .65rem; border-radius: 999px; background: var(--neutro-fondo); color: var(--neutro); white-space: nowrap;
}
.estado::before { font-weight: 800; }
.estado--cumple { background: var(--ok-fondo); color: var(--ok); }
.estado--cumple::before { content: "\2713"; }
.estado--falta { background: var(--mal-fondo); color: var(--mal); }
.estado--falta::before { content: "\2715"; }
.estado--revisar { background: var(--rev-fondo); color: var(--rev); }
.estado--revisar::before { content: "?"; }
.estado--na::before { content: "\2013"; }
.estado--info::before { content: "i"; font-style: italic; font-family: Georgia, serif; }

.resultado__acciones { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.resumen-texto {
  width: 100%; margin-top: .75rem; font: .9rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--tinta); background: var(--superficie); border: 2px solid var(--linea); border-radius: var(--radio-sm); padding: .75rem;
}

/* ---------- CTA ---------- */
.seccion--cta { padding-bottom: clamp(2rem, 5vw, 3rem); }
.cta {
  background: var(--tinta); color: var(--fondo); border-radius: calc(var(--radio) + 4px);
  padding: clamp(1.5rem, 5vw, 2.6rem);
}
.cta h2 { color: inherit; }
.cta p { color: color-mix(in srgb, var(--fondo) 85%, var(--tinta)); }
.cta a:not(.boton) { color: inherit; }
.cta .boton--primario { background: var(--cobre); color: var(--sobre-cobre); }
@media (prefers-color-scheme: dark) {
  .cta { background: var(--superficie); color: var(--tinta); border: 1px solid var(--linea); }
  .cta p { color: var(--tinta-suave); }
}
.cta__botones { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.3rem 0 1rem; }
.cta__email { font-size: .97rem; }
.seleccionable { user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.cta__privacidad { font-size: .88rem; margin: 0; }

/* ---------- Qué revisa ---------- */
.grilla-requisitos { counter-reset: req; list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: .75rem; }
@media (min-width: 700px) { .grilla-requisitos { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grilla-requisitos { grid-template-columns: repeat(3, 1fr); } }
.grilla-requisitos li {
  counter-increment: req; position: relative; background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--radio-sm); padding: 1rem 1rem 1rem 3.2rem; font-size: .97rem;
}
.grilla-requisitos li::before {
  content: counter(req); position: absolute; left: 1rem; top: .95rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; font-weight: 800; background: var(--cobre-suave); color: var(--cobre);
}

.comparacion { display: grid; gap: .75rem; margin-bottom: 3rem; }
@media (min-width: 700px) { .comparacion { grid-template-columns: 1fr 1fr; } }
.comparacion__col { border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.25rem 1.3rem; background: var(--superficie); }
.comparacion__col h3 { font-size: 1rem; color: var(--tinta-suave); margin-bottom: .2rem; }
.comparacion__dato { font-size: 2rem; font-weight: 800; color: var(--cobre); margin-bottom: .3rem; letter-spacing: -.02em; }
.comparacion__col p:last-child { margin: 0; font-size: .95rem; }

.preguntas-frecuentes__titulo { font-size: 1.4rem; }
.faq { display: grid; gap: .6rem; max-width: 820px; }
.faq details { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-sm); padding: .2rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 650; padding: .85rem 0; min-height: 48px; display: flex; align-items: center; }
.faq details p { color: var(--tinta-suave); padding-bottom: .3rem; }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--linea); padding: 1.8rem 0 2.2rem; font-size: .9rem; color: var(--tinta-suave); }
.pie__fila { display: grid; gap: .3rem; }
.pie p { margin: 0; }

/* ---------- Página de privacidad ---------- */
.legal { padding: clamp(2rem, 6vw, 3.5rem) 0; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal .destacado { background: var(--superficie); border: 1px solid var(--linea); border-left: 5px solid var(--cobre); border-radius: var(--radio-sm); padding: 1rem 1.1rem; }
.legal .pendiente { background: var(--rev-fondo); color: var(--rev); padding: 0 .3rem; border-radius: 4px; font-weight: 600; }
