/* The showcase funnel (owner decision 2026-08-25): lander, showcase
   screens, processing. Mobile-first, one column, funnel chrome
   (wordmark header only). */

.funnel-body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.funnel-header {
  display: flex;
  justify-content: center;
  padding: var(--space-4) var(--space-4) 0;
}

.funnel-main {
  flex: 1;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: var(--space-5) var(--space-4) var(--space-7);
}

/* Hook */

.quiz-hook {
  display: grid;
  /* The app-onboarding composition (competitor standard): text up top,
     the video centered in the leftover space, Continue in the thumb
     zone. 8.5rem is the funnel chrome (header plus main padding); the
     52rem cap keeps tall desktop windows from stretching the frame. */
  min-height: min(calc(100svh - 8.5rem), 52rem);
  grid-template-rows: auto auto auto 1fr auto auto;
  justify-items: center;
  text-align: center;
  gap: var(--space-3);
  width: 100%;
  max-width: 40rem;
}

.quiz-hook h1 {
  font-size: var(--text-h2);
  line-height: 1.05;
}

.quiz-hook-sub {
  color: var(--ink-soft);
  max-width: 30rem;
}

.quiz-hook-trust {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

/* Showcase screens: headline, one tool video, Continue. Same
   full-height composition as the hook, minus kicker and trust rows. */

.quiz-showcase {
  width: 100%;
  max-width: 40rem;
  min-height: min(calc(100svh - 8.5rem), 52rem);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  text-align: center;
  gap: var(--space-3);
}

.quiz-showcase h1 {
  font-size: var(--text-h2);
  line-height: 1.05;
}

.quiz-showcase-sub {
  color: var(--ink-soft);
  max-width: 30rem;
}

/* The video wears the landing slider's exact frame (hard hairline,
   deep offset shadow): the funnel's proof imagery stays one family. */
.quiz-showcase-video {
  align-self: center;
  width: 100%;
  /* The 16:9 video takes its width from the leftover viewport height
     (header + text stack + CTA reserve about 22rem), so Continue
     clears the fold on every phone: each screen's one job is that
     click. */
  max-width: min(40rem, calc((100svh - 22rem) * 16 / 9));
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--border-hard);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  background: var(--paper-card);
  margin: var(--space-2) auto;
}

.quiz-continue {
  align-self: end;
  width: 100%;
  max-width: 22rem;
  font-size: var(--text-base);
}

/* Processing */

.quiz-processing {
  width: 100%;
  max-width: 26rem;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--space-4);
  padding-top: var(--space-8);
}

.quiz-processing h1 {
  font-size: var(--text-xl);
}

.quiz-processing-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.quiz-processing-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: quiz-fill 2.4s ease-in-out forwards;
}

@keyframes quiz-fill {
  from { transform: scaleX(0.04); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-processing-bar span {
    animation: none;
  }
}

.quiz-processing-line {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.quiz-processing-fallback {
  font-size: var(--text-sm);
}

/* The step-to-step slide (Turbo 8 view transitions, funnel pages only:
   the meta lives in the funnel layout). Reduced motion falls back to
   the browser's instant swap. */

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: quiz-step-out 0.16s ease-in both;
  }

  ::view-transition-new(root) {
    animation: quiz-step-in 0.22s ease-out both;
  }
}

@keyframes quiz-step-out {
  to {
    opacity: 0;
    transform: translateX(-12px);
  }
}

@keyframes quiz-step-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}
