/* ==========================================================================
   NV Group — css/evaluacion.css
   La evaluación de proyecto. Una pregunta por pantalla.

   La regla de toda esta pantalla: que en el celular la pregunta y las
   respuestas entren SIN scroll. Alguien que tiene que hacer scroll para ver la
   última opción no la lee, y a los tres pasos abandona.
   ========================================================================== */

.ev-cuerpo {
  min-height: 100svh;
  background: var(--fondo);
}

/* --- La barra de progreso ---------------------------------------------------
   Arriba de todo y fina. Es lo único que le dice a alguien que va por la
   pregunta 6 que le faltan dos, y no diez. */

.ev__progreso {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  background: var(--linea-tenue);
  z-index: 50;
}

.ev__progreso i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--acento-vivo);
  transition: width 0.55s var(--curva);
}

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

.ev__cabecera {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.25rem, 3vh, 1.75rem) var(--gutter);
}

.ev__marca svg { height: 18px; width: auto; display: block; color: var(--tinta); }

.ev__cuenta {
  margin: 0;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--tinta-tenue);
  font-variant-numeric: tabular-nums;
}

/* --- Los pasos --------------------------------------------------------------
   Todos existen en el HTML desde el principio; el JavaScript muestra uno. El
   que sale y el que entra no se cruzan: primero se va uno, después llega el
   otro. Cruzados, se leen dos textos encimados y marea. */

.ev {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 5.5rem);
  padding: 0 var(--gutter) clamp(2rem, 6vh, 4rem);
}

.ev__paso { width: 100%; }
.ev__paso[hidden] { display: none; }

.ev__caja {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}

.ev__paso--intro .ev__caja { max-width: 40rem; }

/* La entrada. Sube apenas y aparece: el mismo gesto que el resto del sitio. */
.ev__paso--activo .ev__caja {
  animation: evEntra 0.5s var(--curva) both;
}

@keyframes evEntra {
  from { opacity: 0; transform: translateY(16px); }
}

/* --- Textos ------------------------------------------------------------------ */

.ev__titulo {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.028em;
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.ev__titulo--grande {
  font-size: clamp(1.875rem, 1.2rem + 2.8vw, 3rem);
  margin-bottom: 1.25rem;
}

.ev__bajada {
  font-size: var(--t-cuerpo);
  line-height: 1.55;
  color: var(--tinta-suave);
  margin-bottom: 1.75rem;
}

.ev__bajada p + p { margin-top: 0.6rem; }

.ev__paraquien {
  font-size: var(--t-cuerpo);
  font-weight: 500;
  line-height: 1.5;
  padding-left: 1rem;
  border-left: 2px solid var(--acento-vivo);
  margin-bottom: 2rem;
}

.ev__nota {
  margin-top: 1.5rem;
  font-size: var(--t-chico);
  line-height: 1.5;
  color: var(--tinta-tenue);
}

/* --- Opciones ----------------------------------------------------------------
   Botones grandes, de ancho completo. Al elegir uno se avanza solo: en una
   pregunta de respuesta única, obligar a elegir y DESPUÉS apretar Continuar es
   un clic de más repetido ocho veces. */

.ev__opciones {
  display: grid;
  gap: 0.7rem;
}

.ev__op {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  padding: clamp(0.95rem, 2.2vh, 1.15rem) 1.15rem;
  border: 1px solid var(--linea);
  border-radius: var(--radio-chico, 12px);
  background: var(--blanco);
  font-size: var(--t-cuerpo);
  line-height: 1.35;
  color: var(--tinta);
  cursor: pointer;
  transition: border-color 0.2s var(--curva), background 0.2s var(--curva),
              transform 0.2s var(--curva), box-shadow 0.2s var(--curva);
}

.ev__op:hover {
  border-color: var(--tinta-tenue);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.ev__op[aria-checked="true"] {
  border-color: var(--acento-vivo);
  box-shadow: inset 0 0 0 1px var(--acento-vivo);
}

.ev__op__letra {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  border: 1px solid var(--linea);
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--tinta-tenue);
  transition: inherit;
}

.ev__op[aria-checked="true"] .ev__op__letra {
  background: var(--acento-vivo);
  border-color: var(--acento-vivo);
  color: #fff;
}

/* Los países van en fila y más chicos: son cinco y todos cortos. */
.ev__opciones--fila {
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.5rem;
}

.ev__op--chica {
  justify-content: center;
  text-align: center;
  padding: 0.8rem 0.5rem;
  font-size: var(--t-chico);
}

@media (max-width: 640px) {
  .ev__opciones--fila {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Campos ------------------------------------------------------------------ */

.ev__campos { display: grid; gap: 1rem; }

.ev__campo { display: block; }

.ev__campo > span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--t-chico);
  font-weight: 500;
  color: var(--tinta-suave);
}

.ev__campo > span i { font-style: normal; color: var(--tinta-tenue); font-weight: 400; }

.ev__campo input,
.ev__area,
.ev__prefijo {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--linea);
  border-radius: var(--radio-chico, 12px);
  background: var(--blanco);
  font-family: inherit;
  font-size: var(--t-cuerpo);
  color: var(--tinta);
  transition: border-color 0.2s var(--curva), box-shadow 0.2s var(--curva);
}

.ev__campo input:focus,
.ev__area:focus,
.ev__prefijo:focus {
  outline: none;
  border-color: var(--acento-vivo);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.13);
}

.ev__campo.tiene-error input { border-color: #e0342c; }

.ev__tel { display: flex; gap: 0.5rem; }
.ev__prefijo { width: auto; flex: none; min-width: 7.5rem; }

.ev__area { resize: vertical; min-height: 8rem; line-height: 1.5; }

.ev__contador {
  margin: 0.5rem 0 0;
  font-size: var(--t-micro);
  color: var(--tinta-tenue);
  font-variant-numeric: tabular-nums;
}

/* --- La ruta ----------------------------------------------------------------
   NO es un mapa. Por la misma razón que el de la sección Operaciones: una
   silueta de países dibujada a ojo, en el sitio de una empresa que vende
   control de calidad, se nota y juega en contra. Es un origen, un destino y la
   ruta entre los dos, que es exactamente lo que hacemos. */

.ev__ruta {
  position: relative;
  height: clamp(90px, 16vh, 130px);
  margin-bottom: 1.5rem;
}

.ev__ruta canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.ev__ruta__origen,
.ev__ruta__destino {
  position: absolute;
  bottom: 0;
  margin: 0;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--tinta-tenue);
}

.ev__ruta__origen  { left: 0; }
.ev__ruta__destino { right: 0; color: var(--tinta); opacity: 0; transition: opacity 0.4s var(--curva); }
.ev__ruta__destino.visible { opacity: 1; }

/* --- Acciones y errores ------------------------------------------------------ */

.ev__acciones {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.ev__paso--intro .ev__acciones,
.ev__paso--gracias .ev__acciones { margin-top: 2rem; }

/* El botón de volver va DESPUÉS del de seguir en la lectura visual, chiquito y
   apagado: el camino natural es hacia adelante. */
.ev__atras { order: 2; color: var(--tinta-tenue); font-size: var(--t-chico); }
.ev__atras:hover { color: var(--tinta); }
.ev__seguir { order: 1; }
.ev__paso[data-paso="1"] .ev__atras { visibility: hidden; }

.ev__error {
  margin: 0.9rem 0 0;
  font-size: var(--t-chico);
  color: #e0342c;
}

.ev__seguir[disabled] { opacity: 0.45; pointer-events: none; }

/* --- El tilde final ---------------------------------------------------------- */

.ev__tilde {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  color: #1d8a3f;
  background: rgba(52, 199, 89, 0.11);
  border: 2.5px solid rgba(52, 199, 89, 0.45);
}

.ev__tilde svg { width: 34px; height: 34px; }

.ev__tilde path {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: evTilde 0.5s var(--curva-neta) 0.25s both;
}

@keyframes evTilde { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .ev__paso--activo .ev__caja { animation: none; }
  .ev__tilde path { animation: none; stroke-dashoffset: 0; }
  .ev__progreso i { transition: none; }
}
