/* Casa y Patitas — quiz. Se carga después de styles.css y usa sus variables. */

/* Cada pantalla vuelve arriba al instante */
html { scroll-behavior: auto; }

/* Enlaces de texto un tono más oscuro: contraste 5.6:1 sobre crema */
.quiz a:not(.btn),
.site-footer a { color: var(--coral-deeper); }

.quiz-page h1,
.quiz-page h2,
.quiz-page h3,
.quiz-page .btn { overflow-wrap: anywhere; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.quiz-header { padding: 0.75rem 0 0.25rem; }

.quiz-col {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.quiz-col--wide { max-width: 48rem; }

/* Barra de progreso */
.quiz-progress {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.quiz-progress__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
}
.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  margin-left: -0.5rem;
  padding: 0 0.75rem 0 0.4rem;
  background: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.quiz-back:hover { color: var(--ink); }
.quiz-back svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quiz-progress__label {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--muted);
}
.quiz-progress__track {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--peach);
  overflow: hidden;
}
.quiz-progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral-deep);
  transition: width 0.25s ease;
}

/* Pantallas */
.screen { padding: 1.5rem 0 3rem; }
.screen.is-entering { animation: screen-in 0.24s ease-out both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.q-title {
  font-size: clamp(1.625rem, 6.4vw, 2.125rem);
  margin-bottom: 1.25rem;
}
/* El foco llega al título por código: no hace falta el anillo */
.q-title:focus { outline: none; }

.q-hint {
  margin: 0.5rem 0 1.25rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.q-hint--top { margin: -0.5rem 0 1.25rem; }

/* Apertura */
.intro { text-align: center; padding-top: 0.25rem; }
.intro__art {
  position: relative;
  width: min(15rem, 64vw);
  margin: 0 auto 1rem;
}
.intro__art::before {
  content: "";
  position: absolute;
  inset: 8% 0 0;
  background: var(--peach);
  border-radius: 48% 52% 46% 54% / 55% 50% 50% 45%;
}
.intro__art img {
  position: relative;
  width: 100%;
  aspect-ratio: 900 / 720;
  object-fit: cover;
  object-position: 50% 100%;
}
.intro__title { font-size: clamp(2rem, 8.6vw, 3rem); margin-bottom: 0.75rem; }
.intro .lead { margin: 0 auto 1.5rem; }
.intro__btn { min-width: min(100%, 16rem); }
.intro .reassure { margin-left: auto; margin-right: auto; }

/* Nombre */
.name-input {
  display: block;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1.1rem;
  background: var(--white);
  color: var(--ink);
  border: 2px solid #CDB3A2;
  border-radius: 1rem;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
}
.name-input::placeholder { color: var(--muted); font-weight: 400; opacity: 1; }
.name-input:focus { border-color: var(--coral-deep); }

.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
  background: none;
  border: 0;
  font: inherit;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-quiet:hover { color: var(--ink); }

/* Respuestas */
.choices { display: grid; gap: 0.75rem; }
.choice {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.85rem 1rem 0.85rem 1.25rem;
  background: var(--white);
  color: var(--ink);
  border: 2px solid #E3CBBB;
  border-radius: 1rem;
  box-shadow: 0 3px 0 #EED9CB;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.choice:hover { border-color: var(--coral); }
.choice[aria-pressed="true"] {
  background: var(--peach);
  border-color: var(--coral-deep);
  box-shadow: 0 3px 0 var(--coral-deep);
}
.choice__text { flex: 1; min-width: 0; }
.choice__hint {
  display: block;
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--muted);
}
.choice__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 2px solid #CDB3A2;
  background: var(--white);
}
.choice__mark svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}
.choice[aria-pressed="true"] .choice__mark { background: var(--coral-deep); border-color: var(--coral-deep); }
.choice[aria-pressed="true"] .choice__mark svg { visibility: visible; }

/* Preparando el plan */
.loading { text-align: center; padding-top: 4rem; min-height: 60vh; }
.loading__paws {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.loading__paws svg {
  width: 2.25rem;
  height: 2.25rem;
  fill: var(--coral);
  opacity: 0;
  animation: paw-in 0.3s ease-out forwards;
}
.loading__paws svg:nth-child(2) { animation-delay: 0.3s; transform: translateY(-0.6rem) rotate(10deg); }
.loading__paws svg:nth-child(3) { animation-delay: 0.6s; }
.loading__paws svg:nth-child(1) { transform: rotate(-10deg); }
@keyframes paw-in { to { opacity: 1; } }

/* Resultado */
.result { padding-bottom: 0; }
.result__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--teal-deep);
}
.result .q-title { margin-bottom: 0.5rem; }
.result__profile {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--peach);
  font-weight: 700;
}
.result__h2 { font-size: var(--step-2); margin: 2.25rem 0 1rem; }

.health {
  padding: 1rem 1.25rem 1.15rem;
  background: #E6F3F0;
  border: 2px solid var(--teal);
  border-left-width: 6px;
  border-radius: 1rem;
}
.health p { margin: 0; max-width: none; }
.health__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: #1F5F55;
}
.health__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal-deep);
}
.health__icon svg { width: 1rem; height: 1rem; fill: var(--white); }

.findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.finding {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  overflow: hidden;
}
.finding img {
  width: 100%;
  aspect-ratio: 1200 / 490;
  object-fit: contain;
  background: var(--cream);
}
.finding__body { padding: 1rem 1.25rem 1.25rem; }
.finding h3 { font-size: 1.1875rem; margin-bottom: 0.35rem; }
.finding p { margin: 0; }
@media (min-width: 40rem) {
  .finding {
    display: grid;
    grid-template-columns: 16rem 1fr;
    align-items: center;
  }
  .finding img { height: 100%; }
}

.findings__extra {
  max-width: none;
  margin: 1.25rem 0 0;
  padding: 0.9rem 1.25rem;
  border-left: 4px solid var(--coral-deep);
  border-radius: 0 1rem 1rem 0;
  background: var(--peach);
  font-weight: 600;
}
.findings__extra[hidden] { display: none; }

.result__days { margin-top: 3rem; padding: 0.5rem 0 3rem; }
.plan-days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.plan-days li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  align-items: start;
}
.plan-days h3 { font-size: 1.1875rem; margin: 0.3rem 0 0.2rem; }
.plan-days p { margin: 0; color: var(--muted); }
.plan-days__note { margin: 1.5rem 0 0; font-size: var(--step--1); color: var(--muted); }

.result__offer { padding-top: 3rem; }
.result__offer h2 { font-size: var(--step-2); }
.result__offer .offer img { max-width: 18rem; margin: 0 auto; }
@media (min-width: 56rem) {
  .result__offer .offer { grid-template-columns: 15rem 1fr; padding: 2rem; gap: 2rem; align-items: start; }
}

.result__faq { padding-bottom: 3rem; }
.result__faq .link-quiet { margin-top: 1.5rem; }

.site-footer { padding-bottom: 2.5rem; }

/* Sin movimiento si la persona lo pidió */
@media (prefers-reduced-motion: reduce) {
  .screen.is-entering { animation: none; }
  .quiz-progress__fill { transition: none; }
  .loading__paws svg { opacity: 1; animation: none; }
}
