/* ══════════════════════════════════���════════════════════════════════
   test.css — Test de reto v2 (UI/UX premium)
   Indómitos 2026
   ════════════════════════════════════��══════════════════════════════ */

/* ── Tokens ───────────────────────────────────── */
.test-wrap {
  --test-max: 740px;
  --test-pad: clamp(20px, 5vw, 40px);
  --test-radius: 10px;
  --test-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Layout ────��─────────────────────────────��── */
.test-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--negro);
  color: var(--blanco);
  overflow: hidden;
}
.test-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════
   INTRO SCREEN — fullscreen hero cinemático
   ═══════��═══════════════════════════════════════ */
.test-intro {
  position: relative;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}
.test-intro__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.test-intro__bg picture {
  display: block;
  width: 100%;
  height: 100%;
}
.test-intro__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.1);
  filter: grayscale(0.2) contrast(1.03);
}
.test-intro__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(24,24,24,0.3) 0%,
    rgba(24,24,24,0.55) 35%,
    rgba(24,24,24,0.82) 65%,
    rgba(24,24,24,0.95) 100%
  );
}
.test-intro__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--test-pad);
  max-width: 640px;
  width: 100%;
  flex: 1;
}
.test-intro__marca {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(12px);
}
.test-intro__titulo {
  font-family: 'Forma DJR Banner', 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(48px, 8vw, 80px);
  line-height: 0.95;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.test-intro__sub {
  font-size: 17px;
  font-weight: 300;
  color: rgba(255,255,255,0.60);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 440px;
  opacity: 0;
  transform: translateY(12px);
}
.test-intro__cta {
  display: inline-block;
  padding: 16px 52px;
  background: var(--naranja);
  color: var(--blanco);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.3s, transform 0.2s;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
}
.test-intro__cta:hover {
  background: #f5753a;
  box-shadow: 0 0 32px rgba(232,79,28,0.45);
}
.test-intro__cta:active { transform: scale(0.97); }
.test-intro__scroll {
  margin-top: 40px;
  opacity: 0;
}
.test-intro__scroll span {
  display: block;
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.25);
  animation: scroll-pulse 1.8s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.3; }
  50% { transform: scaleY(0.4) translateY(10px); opacity: 0.8; }
}

/* ═══════════════════════════════════════════════
   QUESTION SCREEN — header + progress + body
   ══���═════════════════���══════════════════════════ */

/* ── Header ── */
.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--test-pad) 18px;
  flex-shrink: 0;
}
.test-logo {
  font-family: 'Forma DJR Banner', 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 18px;
  color: var(--blanco);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.test-header__info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.test-counter {
  font-size: 12px;
  font-weight: 500;
  color: var(--gris-t);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.test-seccion-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--naranja);
  transition: opacity 0.3s var(--test-ease);
}

/* ── Progress bar ── */
.test-progress {
  height: 3px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
  border-radius: 3px;
  margin: 0 var(--test-pad);
}
.test-progress__bar {
  height: 100%;
  background: var(--naranja);
  border-radius: 3px;
  transition: width 0.5s var(--test-ease);
  box-shadow: 0 0 8px rgba(232,79,28,0.4);
}

/* ── Question body ��─ */
.test-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--test-pad) 32px;
  max-width: var(--test-max);
  margin: 0 auto;
  width: 100%;
}

.test-seccion {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 18px;
  margin-top: 20px;
}
.test-seccion::after {
  content: '';
  flex: 0 0 40px;
  height: 1px;
  background: var(--naranja);
  opacity: 0.4;
}

.test-pregunta {
  font-family: 'Forma DJR Banner', 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--blanco);
  margin-bottom: 36px;
  max-width: 680px;
}

.test-opciones {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Option cards ── */
.test-opcion {
  position: relative;
  padding: 20px 48px 20px 28px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--test-radius);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: all 0.2s var(--test-ease);
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.test-opcion::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--naranja);
  transform: scaleY(0);
  transition: transform 0.3s var(--test-ease);
  border-radius: 3px 0 0 3px;
}
.test-opcion::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 14px;
  border-right: 2px solid var(--naranja);
  border-bottom: 2px solid var(--naranja);
  transform: translateY(-60%) rotate(45deg) scale(0);
  transition: transform 0.25s var(--test-ease);
  opacity: 0;
}

.test-opcion:hover {
  border-color: rgba(255,255,255,0.28);
  color: var(--blanco);
  background: rgba(255,255,255,0.03);
  transform: translateY(-1px);
}
.test-opcion:active {
  transform: scale(0.98);
}
.test-opcion.selected {
  border-color: var(--naranja);
  background: rgba(232,79,28,0.08);
  color: var(--blanco);
}
.test-opcion.selected::before {
  transform: scaleY(1);
}
.test-opcion.selected::after {
  transform: translateY(-60%) rotate(45deg) scale(1);
  opacity: 1;
}

/* ── Footer nav ── */
.test-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--test-pad) 28px;
  max-width: var(--test-max);
  margin: 0 auto;
  width: 100%;
  flex-shrink: 0;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
.test-btn {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 0;
  transition: color 0.2s, opacity 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.test-btn--back { color: var(--gris-t); }
.test-btn--back:hover { color: var(--blanco); }
.test-btn--next { color: var(--naranja); }
.test-btn--next:hover { color: #f5753a; }
.test-btn:disabled { opacity: 0.25; cursor: default; }

/* ════════���══════════════════════════════════════
   INTERSTITIAL SCREEN — section transition
   ═══════════════════════════���═══════════════════ */
.test-interstitial {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.test-interstitial__num {
  font-family: 'Forma DJR Banner', 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(48px, 10vw, 72px);
  letter-spacing: -2px;
  opacity: 0;
  transform: translateY(16px);
}
.test-interstitial__line {
  width: 0;
  height: 1px;
  background: var(--naranja);
  transition: width 0.6s var(--test-ease);
}
.test-interstitial__line.animate { width: 80px; }
.test-interstitial__name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--naranja);
  opacity: 0;
  transform: translateY(8px);
}

/* ════���══════════════════════════════════════════
   LOADING SCREEN — phased calculation
   ═════════════════════════��═════════════════════ */
.test-loading {
  justify-content: center;
  align-items: center;
}
.test-loading__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 320px;
  width: 100%;
  padding: 0 var(--test-pad);
}
.test-loading__phase {
  font-size: 17px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
}
.test-loading__phase--sub {
  font-size: 14px;
  color: rgba(255,255,255,0.35);
  min-height: 20px;
}
.test-loading__bar-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.test-loading__bar {
  height: 100%;
  width: 0%;
  background: var(--naranja);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(232,79,28,0.4);
  transition: width 1.5s var(--test-ease);
}

/* ���══════════════════════════════════════════════
   RESULT SCREEN — profile card + email gate
   ══��════════════════════════════════════════════ */
.test-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 60px var(--test-pad) 40px;
  max-width: var(--test-max);
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
}

/* ── Profile card (screenshot-friendly) ── */
.test-result__card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 40px;
  position: relative;
}
.test-result__etiq {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 12px;
}
.test-result__nombre {
  font-family: 'Forma DJR Banner', 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.0;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.test-result__perfil-desc {
  font-size: 17px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
}

/* ── Trait bars ── */
.test-result__traits {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.test-trait {
  display: flex;
  align-items: center;
  gap: 12px;
}
.test-trait__label {
  flex: 0 0 90px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gris-t);
  text-align: right;
}
.test-trait__bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.test-trait__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--naranja), #f5753a);
  border-radius: 3px;
  transition: width 0.8s var(--test-ease);
}
.test-trait__val {
  flex: 0 0 32px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-align: right;
}

/* ── Resumen personalizado ── */
.test-result__resumen {
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  padding-left: 16px;
  border-left: 2px solid rgba(255,255,255,0.10);
  max-width: 520px;
}
.test-result__resumen strong {
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}
.test-result__watermark {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.15);
  text-align: right;
  margin-top: 16px;
}

/* ��─ Email gate ── */
.test-result__gate {
  padding-top: 8px;
}
.test-result__gate-titulo {
  font-family: 'Forma DJR Banner', 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.test-result__gate-txt {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.50);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 480px;
}

/* ��─ Email capture ── */
.test-email {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.test-email__input {
  flex: 1;
  padding: 15px 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: var(--blanco);
  font-size: 15px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  min-height: 48px;
}
.test-email__input::placeholder { color: rgba(255,255,255,0.30); }
.test-email__input:focus {
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px rgba(232,79,28,0.15);
}
.test-email__btn {
  padding: 15px 32px;
  background: var(--naranja);
  color: var(--blanco);
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: background 0.25s, box-shadow 0.3s, transform 0.15s;
  min-height: 48px;
}
.test-email__btn:hover {
  background: #f5753a;
  box-shadow: 0 0 24px rgba(232,79,28,0.35);
}
.test-email__btn:active { transform: scale(0.97); }
.test-email__btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.test-email__msg {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
  min-height: 18px;
}
.test-email__trust {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════
   POST-EMAIL SCREEN — checkmark animation
   ═══════════════════════════════════════════════ */
.test-post-email {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px var(--test-pad);
  min-height: 100vh;
  min-height: 100dvh;
}
.test-post-email__check {
  width: 64px;
  height: 64px;
  margin-bottom: 32px;
}
.test-post-email__circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw-circle 0.6s ease forwards;
}
.test-post-email__tick {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw-tick 0.35s 0.55s ease forwards;
}
@keyframes draw-circle {
  to { stroke-dashoffset: 0; }
}
@keyframes draw-tick {
  to { stroke-dashoffset: 0; }
}
.test-post-email__titulo {
  font-family: 'Forma DJR Banner', 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.08;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.test-post-email__sub {
  font-size: 18px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  margin-bottom: 28px;
}
.test-post-email__nota {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}
.test-post-email__link {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.50);
  text-decoration: none;
  padding: 12px 28px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  transition: color 0.2s, border-color 0.2s;
}
.test-post-email__link:hover {
  color: var(--blanco);
  border-color: rgba(255,255,255,0.40);
}

/* ══════���════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════��═════════════════ */
@media (max-width: 640px) {
  .test-header { padding: 18px 20px 14px; }
  .test-progress { margin: 0 20px; }
  .test-body { padding: 0 20px 20px; }
  .test-footer { padding: 14px 20px 20px; }
  .test-pregunta { margin-bottom: 28px; }
  .test-result { padding: 40px 20px 32px; }
  .test-result__card { padding: 20px; }
  .test-trait__label { flex: 0 0 70px; font-size: 9px; }
  .test-email { flex-direction: column; }
  .test-email__btn { width: 100%; }
  .test-seccion-label { display: none; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .test-intro__bg img { transform: none; }
  .test-intro__scroll span { animation: none; }
  .test-opcion,
  .test-opcion::before,
  .test-opcion::after { transition: none; }
  .test-progress__bar { transition: none; }
  .test-loading__bar { transition: none; }
  .test-trait__bar { transition: none; }
  .test-interstitial__line { transition: none; }
  .test-post-email__circle,
  .test-post-email__tick { animation: none; stroke-dashoffset: 0; }
}
