/* ============================================================
   MAGICAL TRAVELS WITH HALEY — quiz
   The centerpiece: an immersive "What kind of traveler are you?"
   experience. Intro → questions (one at a time) → result.
   ============================================================ */

.quiz { position: relative; }

/* the immersive stage — a self-contained enchanted panel */
.quiz-shell { max-width: 60rem; }

.quiz-stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-strong);
  background:
    radial-gradient(120% 120% at 50% -10%, rgba(201, 166, 255, .14), transparent 55%),
    radial-gradient(100% 90% at 50% 120%, rgba(244, 213, 141, .12), transparent 55%),
    linear-gradient(180deg, rgba(18, 13, 51, .9), rgba(10, 7, 32, .92));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 40px 120px -50px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(247, 243, 234, .05);
  padding: clamp(1.75rem, 5vw, 3.75rem);
  min-height: clamp(30rem, 64vh, 38rem);
  display: grid;
  overflow: hidden;
}
/* faint corner sparkles framing the stage */
.quiz-stage::before,
.quiz-stage::after {
  content: "✦";
  position: absolute;
  color: rgba(244, 213, 141, .35);
  font-size: 1rem;
}
.quiz-stage::before { top: 1.1rem; left: 1.2rem; }
.quiz-stage::after { bottom: 1.1rem; right: 1.2rem; }

/* ---- screens ---- */
.quiz-screen { grid-area: 1 / 1; align-self: center; }
.quiz-screen[hidden] { display: none; }
.quiz-screen.is-active { animation: quiz-screen-in .55s var(--ease-out) both; }
@keyframes quiz-screen-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---- intro screen ---- */
.quiz-intro { text-align: center; display: grid; justify-items: center; gap: 1.1rem; }
.quiz-intro h2 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); }
.quiz-intro-sub { color: var(--text-dim); font-size: var(--fs-lead); max-width: 44ch; }
.quiz-intro .btn { margin-top: .8rem; }
.quiz-intro-note { font-size: var(--fs-small); color: var(--text-faint); }
.quiz-intro-orbit { width: 3.4rem; height: 3.4rem; color: var(--gold); margin-bottom: .3rem; }

/* ---- progress meter ---- */
.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.quiz-meter { display: flex; gap: .5rem; align-items: center; }
.quiz-meter .pip {
  width: .7rem; height: .7rem;
  transform: rotate(45deg);
  border: 1px solid rgba(244, 213, 141, .45);
  border-radius: 2px;
  transition: background .4s var(--ease-out), border-color .4s ease, box-shadow .4s ease, transform .4s var(--ease-out);
}
.quiz-meter .pip.is-done {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(244, 213, 141, .6);
}
.quiz-meter .pip.is-current {
  border-color: var(--gold);
  transform: rotate(45deg) scale(1.25);
}
.quiz-count {
  font-size: var(--fs-label);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ---- question ---- */
.quiz-q { display: grid; gap: clamp(1.4rem, 3.5vw, 2.25rem); }
.quiz-q.is-swapping { animation: quiz-q-out .25s ease forwards; }
.quiz-q.is-entering { animation: quiz-q-in .5s var(--ease-out) both; }
@keyframes quiz-q-in {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes quiz-q-out {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(-22px); }
}

.quiz-question {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-quiz-q);
  line-height: 1.12;
  text-wrap: balance;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (max-width: 560px) { .quiz-options { grid-template-columns: 1fr; } }

.quiz-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: .9rem;
  text-align: left;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-strong);
  background: rgba(247, 243, 234, .025);
  color: var(--text);
  cursor: pointer;
  transition: transform .3s var(--ease-out), border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.quiz-option:hover {
  border-color: rgba(244, 213, 141, .55);
  background: rgba(244, 213, 141, .06);
  transform: translateY(-2px);
}
.quiz-option:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.quiz-option.is-chosen {
  border-color: var(--gold);
  background: rgba(244, 213, 141, .12);
  box-shadow: 0 0 0 1px var(--gold), 0 10px 30px -12px rgba(244, 213, 141, .5);
}
.quiz-option-glyph {
  flex: none;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  color: var(--gold);
  transition: border-color .3s ease, background .3s ease;
}
.quiz-option-glyph svg { width: 1.2rem; height: 1.2rem; }
.quiz-option:hover .quiz-option-glyph,
.quiz-option.is-chosen .quiz-option-glyph {
  border-color: rgba(244, 213, 141, .55);
  background: rgba(244, 213, 141, .1);
}
.quiz-option-label { font-size: .98rem; line-height: 1.35; }

.quiz-foot { margin-top: clamp(1.4rem, 3.5vw, 2.25rem); display: flex; justify-content: flex-start; }
.quiz-back {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-small); color: var(--text-faint);
  background: none; border: 0; cursor: pointer;
  transition: color .3s ease;
}
.quiz-back:hover { color: var(--text); }
.quiz-back svg { width: 1rem; height: 1rem; }
.quiz-back[hidden] { display: none; }

/* ---- result ---- */
.quiz-result { text-align: center; display: grid; justify-items: center; gap: 1rem; }
.quiz-result-eyebrow {
  font-size: var(--fs-label); letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint);
}
.quiz-result-emblem {
  width: 4.6rem; height: 4.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 213, 141, .45);
  background: radial-gradient(circle at 50% 35%, rgba(244, 213, 141, .25), transparent 70%);
  color: var(--gold);
  animation: emblem-pop .7s var(--ease-out) both;
}
.quiz-result-emblem svg { width: 2.3rem; height: 2.3rem; }
@keyframes emblem-pop {
  0% { opacity: 0; transform: scale(.5) rotate(-12deg); }
  100% { opacity: 1; transform: none; }
}
.quiz-result-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.8rem);
  line-height: 1.05;
}
.quiz-result-name em { color: var(--gold); font-style: italic; }
.quiz-result-tag { color: var(--gold); font-size: var(--fs-lead); font-style: italic; font-family: var(--font-display); }
.quiz-result-desc { color: var(--text-dim); max-width: 50ch; }

.quiz-trip {
  margin-top: .5rem;
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
}
.quiz-trip .trip-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .9rem;
  border-radius: 99px;
  border: 1px solid var(--hairline-strong);
  font-size: var(--fs-small);
  color: var(--text-dim);
}
.quiz-trip .trip-tag::before { content: "✦"; color: var(--gold); font-size: .7em; }

.quiz-result-cta { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.quiz-retake {
  background: none; border: 0; cursor: pointer;
  font-size: var(--fs-small); color: var(--text-faint);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color .3s ease;
}
.quiz-retake:hover { color: var(--text); }

.quiz-result-free {
  margin-top: .6rem;
  font-size: var(--fs-small);
  color: var(--text-faint);
  max-width: 48ch;
}
.quiz-result-free b { color: var(--gold); font-weight: 500; }
