/* ==========================================================================
   NatalPass Quiz — built on top of /blog/_assets/blog.css tokens.
   Mobile-first (9:16), single-card-per-screen funnel.
   ========================================================================== */

body.quiz-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.quiz-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}
.quiz-nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.quiz-nav__brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-size: 1.0625rem;
}
.quiz-nav__brand span { color: var(--muted); font-weight: 400; }

.quiz-shortcuts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem clamp(1rem, 4vw, 2rem);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.quiz-shortcuts a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.15rem 0;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s var(--ease);
}
.quiz-shortcuts a i { margin-right: 0.35rem; font-size: 0.95em; }
.quiz-shortcuts a:hover { color: var(--ink); }
.quiz-shortcuts span { color: var(--muted); }

/* Progress bar */
.quiz-progress {
  height: 3px;
  background: var(--line);
}
.quiz-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #F0CE7B, #E8B84B 55%, #D9A63A);
  width: 0%;
  transition: width 0.4s var(--ease);
}

.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vh, 3rem) clamp(1.25rem, 5vw, 3rem);
}

.quiz-screen {
  width: 100%;
  max-width: 30rem;
  animation: quiz-in 0.35s var(--ease) both;
}
@media (min-width: 900px) {
  .quiz-screen { max-width: 37rem; }
}
@keyframes quiz-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-screen { animation: none; }
}

.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.4rem 0;
  margin-bottom: 1.25rem;
  transition: color 0.2s var(--ease);
}
.quiz-back:hover { color: var(--ink); }

.quiz-eyebrow {
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
}
.quiz-eyebrow-badge {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.quiz-title {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.quiz-title strong, .quiz-body-text strong { font-weight: 800; }
.quiz-hook-title {
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.quiz-body-text {
  margin-top: 1.15rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.quiz-hook-title + .quiz-body-text { margin-top: 1.5rem; }
.quiz-meta {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.quiz-actions { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-actions .btn-primary,
.quiz-actions .btn-secondary { width: 100%; text-align: center; }

/* Choice options */
.quiz-options {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease), background 0.2s var(--ease);
}
.quiz-option:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.quiz-option:active { transform: translateY(0); }
.quiz-option[aria-pressed="true"] {
  border-color: var(--gold-ink);
  background: rgba(232, 184, 75, 0.14);
}

/* Metaphor grid */
.quiz-metaphor-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .quiz-metaphor-grid { grid-template-columns: repeat(3, 1fr); }
}
.quiz-photo-credit { margin-top: 0.75rem; font-size: 0.72rem; color: var(--muted); text-align: center; }
.quiz-metaphor {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  padding: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.quiz-metaphor:hover { transform: translateY(-2px); }
.quiz-metaphor[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.quiz-metaphor__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.65rem 0.65rem;
  font-size: 0.8rem; line-height: 1.25; font-weight: 500;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0));
}
/* Photos (Unsplash License — free to use, no attribution required; credited
   below the grid anyway). A dark gradient is layered under the label text
   for legibility regardless of the photo underneath. */
.quiz-metaphor--coastal  { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/coastal.jpg'); }
.quiz-metaphor--lake     { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/lake.jpg'); }
.quiz-metaphor--neon     { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/neon.jpg'); }
.quiz-metaphor--mountain { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/mountain.jpg'); }
.quiz-metaphor--forest   { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/forest.jpg'); }
.quiz-metaphor--highway  { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/highway.jpg'); }
.quiz-metaphor--sunlight { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/sunlight.jpg'); }
.quiz-metaphor--roots    { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/roots.jpg'); }
.quiz-metaphor--pot      { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/pot.jpg'); }
.quiz-metaphor--soil     { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/soil.jpg'); }
.quiz-metaphor--prune    { background-image: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%), url('/images/quiz/metaphors/prune.jpg'); }

/* Micro-affirmation toast */
.quiz-affirm {
  position: fixed;
  left: 50%;
  bottom: clamp(1.25rem, 5vh, 2.5rem);
  transform: translate(-50%, 6px);
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 60;
}
.quiz-affirm[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }

.quiz-privacy { margin-top: 1rem; font-size: 0.78rem; color: var(--muted); }

/* Birth date/time/city — ported 1:1 from natalpass.com's own check-in flow
   (index.html .ci-field/.ci-badge/.ci-input/.ci-line/.ci-label system):
   free-text numeric fields under a dark pill badge, underlined, tiny caption
   below. Same visual + interaction language the user already knows from the
   main app, and it sidesteps native <input type=date/time> entirely — no
   iOS intrinsic-width overflow to fight. */
.quiz-ci-fields { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.75rem; }
.quiz-ci-field { display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.quiz-ci-badge {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  margin-bottom: 0.625rem;
  align-self: flex-start;
  transition: background 0.2s var(--ease);
}
.quiz-ci-input {
  box-sizing: border-box;
  background: none;
  border: none;
  outline: none;
  font: inherit;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  padding: 0 0 0.375rem 0;
  width: 100%;
}
.quiz-ci-input::placeholder { color: #D4D0C8; font-weight: 400; }
.quiz-ci-line { height: 1px; background: var(--ink); margin-bottom: 0.375rem; transition: background 0.2s var(--ease); }
.quiz-ci-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}
.quiz-ci-field.error .quiz-ci-line { background: #E05A5A; }
.quiz-ci-field.error .quiz-ci-label { color: #E05A5A; }
.quiz-ci-field.error .quiz-ci-badge { background: #E05A5A; }
.quiz-ci-inline { display: flex; gap: 3rem; align-items: flex-start; }
.quiz-ci-date-group { flex: 3; }
.quiz-ci-time-group { flex: 2; }
.quiz-ci-split { display: flex; gap: 1.5rem; margin-top: 0.5rem; }
@media (max-width: 560px) {
  .quiz-ci-inline { flex-direction: column; gap: 1.75rem; }
}

.quiz-autocomplete { position: relative; }
.quiz-suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 0.4rem);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  z-index: 10;
  max-height: 14rem;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(17,17,18,0.14);
}
.quiz-suggestions:empty { display: none; }
.quiz-suggestion {
  display: block; width: 100%; text-align: left;
  padding: 0.7rem 1rem; font: inherit; font-size: 0.92rem;
  background: none; border: 0; cursor: pointer; color: var(--ink);
  border-top: 1px solid var(--line);
}
.quiz-suggestion:first-child { border-top: 0; }
.quiz-suggestion:hover { background: var(--card); }
.quiz-suggestion span { color: var(--muted); font-size: 0.82rem; }

/* Loading screen */
.quiz-loading {
  text-align: center;
  padding: 3rem 0;
}
.quiz-loading__msg {
  font-size: 1.15rem; font-weight: 500; color: var(--ink-soft);
  min-height: 1.6em;
}
.quiz-loading__dots { margin-top: 1.25rem; display: flex; gap: 0.4rem; justify-content: center; }
.quiz-loading__dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  animation: quiz-dot 1.1s ease-in-out infinite;
}
.quiz-loading__dots span:nth-child(2) { animation-delay: 0.15s; }
.quiz-loading__dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes quiz-dot { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* Result screen */
.quiz-result__eyebrow { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.quiz-result__mirror { margin-top: 0.75rem; font-size: 1.05rem; color: var(--ink-soft); line-height: 1.55; }

/* Hero: the planet name is the whole point — it must land before any reading. */
.quiz-result__hero { margin-top: 1.25rem; }
.quiz-result__planet {
  font-size: clamp(2.6rem, 13vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.quiz-result__code-hint {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}
.quiz-result__code-hint strong { color: var(--ink-soft); font-weight: 700; }

.quiz-result__block { margin-top: 1.25rem; font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.quiz-result__note {
  margin-top: 1.25rem; padding: 1rem 1.2rem; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 0.92rem; color: var(--ink-soft); line-height: 1.55;
}
.quiz-result__teaser {
  margin-top: 1.25rem; padding: 1rem 1.2rem; border-radius: 12px;
  border: 1px dashed var(--line-strong);
  font-size: 0.92rem; color: var(--ink-soft); line-height: 1.55;
}
.quiz-result__teaser strong { color: var(--ink); }

.quiz-result__map {
  margin-top: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--card);
}
.quiz-result__map img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.quiz-result__map figcaption {
  padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--muted); text-align: center;
}

/* Lightbox — tap the map example to see it full-size, esp. useful on mobile */
.quiz-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
  background: rgba(17, 17, 18, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.quiz-lightbox[data-open="true"] { opacity: 1; pointer-events: auto; }
.quiz-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  cursor: zoom-out;
}
.quiz-lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.quiz-lightbox__close:hover { background: rgba(255,255,255,0.22); }
.quiz-result__cta-head { margin-top: 1.75rem; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.quiz-result__cta-body { margin-top: 0.5rem; color: var(--ink-soft); }
.quiz-result__cta-body + .yt-embed { margin-top: 1.25rem; }
.quiz-result__below { margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
.quiz-result__secondary { margin-top: 1.25rem; text-align: center; font-size: 0.92rem; }
.quiz-result__secondary a { color: var(--gold-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

@media (max-width: 480px) {
  .quiz-options { gap: 0.55rem; }
  .quiz-option { padding: 0.9rem 1rem; }
}
