/* =========================================================
   Animación HELLO — Etapa 0 manual (solo en esta sección)
   Colores de esta etapa: turquesa #0097b2 y amarillo #ffeb99.
   El texto chico va en marino o sobre amarillo para que se lea bien.
   ========================================================= */
.hello {
  container-type: inline-size;
  container-name: hello;
  position: relative;
  margin-top: 28px;
  background: var(--teal);
  color: var(--ink);
  font-family: "Manrope", var(--font-body);
  min-height: clamp(640px, 92vh, 880px);
  border-radius: 22px;
  overflow: hidden;
  scroll-margin-top: 80px;
}
.hello :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.hello__tag {
  position: absolute;
  top: 28px;
  left: 10%;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hello__stage { position: absolute; left: 10%; width: 80%; top: 20%; }

.hello__q {
  display: grid;
  perspective: 1200px;
  font-size: clamp(28px, 6.6cqw, 94px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 600;
  min-height: 1em;
  color: var(--sun);
}
.hello__layer { grid-area: 1 / 1; transform-style: preserve-3d; }
.hello__word { display: inline-block; white-space: nowrap; transform-style: preserve-3d; }
.hello__g { display: inline-block; backface-visibility: hidden; will-change: transform, opacity; }

.hello__reveal {
  max-width: 38rem;
  margin-top: clamp(24px, 3cqw, 44px);
  padding-bottom: 24px;
}
.hello__panel { border: 0; margin: 0; padding: 0; min-width: 0; }
.js .hello__legend {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0;
}

.hfield { display: grid; gap: 8px; }
.hfield + .hfield { margin-top: 18px; }
/* 19 px en negrita cuenta como texto grande: el marino sobre turquesa pasa */
.hfield label, .hfield__label { font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.hinput {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  font: 500 1rem "Manrope", var(--font-body);
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--sun);
  border-radius: 12px;
}
.hinput[aria-invalid="true"] { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 1px; }
.hfield__err {
  justify-self: start;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}
.hfield__err:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.chip input:checked + span { background: var(--ink); color: var(--sun); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

.hbtn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 1.2rem "Manrope", var(--font-body);
  cursor: pointer;
}
.hbtn--solid { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.hbtn[aria-disabled="true"] { opacity: 0.5; cursor: default; }

.hello__nav {
  position: absolute;
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}
.hello__progress { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.hello__bar { width: 96px; height: 3px; background: rgba(0, 39, 61, 0.25); border-radius: 2px; }
.hello__bar span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 2px; transition: width 300ms var(--ease); }

.hello__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  margin: 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--sun);
  color: var(--ink);
  font-size: 1rem;
}
.hello__summary dt { font-weight: 700; }
.hello__summary dd { margin: 0; overflow-wrap: anywhere; }
.hello__final-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hello__done {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--sun);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

@container hello (max-width: 640px) {
  .hello__stage { left: 7%; width: 86%; }
  .hello__q { font-size: min(8.3cqw, 42px); }
  .hello__tag { left: 7%; }
  .hello__nav { gap: 12px; }
  .hello__bar { width: 48px; }
}
@container hello (max-width: 380px) {
  .hello__bar { display: none; }
}

/* Sin JavaScript: se muestran las preguntas como lista estática */
.no-js .hello { min-height: 0; }
.no-js .hello__stage { position: static; width: auto; padding: 96px 10% 64px; }
.no-js .hello__q, .no-js .hello__nav, .no-js .hello [data-final] { display: none; }
.no-js .hello__legend { font-size: clamp(24px, 4cqw, 40px); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 16px; color: var(--sun); }
.no-js .hello__panel + .hello__panel { margin-top: 40px; }

/* Encabezado de la diapositiva manual */
.hello__tag-row {
  position: absolute;
  top: 28px;
  left: 10%;
  right: 7%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.hello__tag-row .hello__tag { position: static; font-family: var(--font-title); }
.hello__desc { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--ink); max-width: 40ch; }
@container hello (max-width: 640px) {
  .hello__tag-row { left: 7%; }
  .hello__desc { font-size: 1.2rem; }
}
.no-js .hello__tag-row { position: static; padding: 28px 10% 0; }
