/* ═══════════════════════════════════════════════
   QUIZ — homepage centerpiece
   ═══════════════════════════════════════════════ */

body.quiz {
  background: var(--canvas);
  height: 100dvh;
  overflow: hidden;
}

/* ── thread background ── */
#thread {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#thread path { stroke: none; }
.thread-a { fill: var(--bubblegum); opacity: 0.9; }
.thread-b { fill: var(--sunflower); opacity: 0.9; }

/* ── nav counter on quiz ── */
.quiz-counter {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink-55);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.quiz-counter.on { opacity: 1; }
.quiz .nav-links { opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease); }
.quiz .nav-links.on { opacity: 1; pointer-events: auto; }

/* ── screen container ── */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 104px var(--page-x) 88px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.screen.active { opacity: 1; pointer-events: auto; }

/* ── intro ── */
.intro {
  text-align: center;
  max-width: 640px;
}
.intro-line {
  font-size: clamp(15px, 2.4vw, 19px);
  font-weight: 300;
  color: var(--ink-55);
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s var(--ease) 0.15s forwards;
}
.intro-title {
  font-size: clamp(30px, 5.4vw, 58px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 44px;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s var(--ease) 0.32s forwards;
}
.intro-title em { font-style: normal; font-weight: 500; }
.intro .btn {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s var(--ease) 0.52s forwards;
}
.intro .btn:hover {
  background: var(--valencia);
  border-color: var(--valencia);
  color: var(--white);
}

/* ── question ── */
.q-wrap { width: 100%; max-width: 860px; }
.q-text {
  font-size: clamp(23px, 3.6vw, 36px);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: clamp(32px, 5vh, 52px);
  text-wrap: balance;
}
.q-text em { font-style: normal; font-weight: 500; color: var(--cherry); }

/* per-question alignment — deliberate, not scattered */
.q-align-center { text-align: center; }
.q-align-left   { text-align: left; }
.q-align-right  { text-align: right; }

.opts { display: flex; flex-direction: column; gap: 12px; max-width: 620px; margin: 0 auto; }
.opt {
  position: relative;
  padding: 20px 26px;
  background: rgba(250,250,250,0.55);
  border: 1.5px solid var(--ink-08);
  border-radius: 16px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
              transform 0.4s var(--ease), opacity 0.4s var(--ease), color 0.4s var(--ease);
}
.opt::before {
  content: '';
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: var(--valencia);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease);
}
.opt:hover {
  background: rgba(250,250,250,0.9);
  border-color: var(--ink-14);
  transform: translateY(-2px);
}
.opt:hover::before { transform: scaleY(1); }
.opt.selected {
  background: var(--valencia);
  color: var(--white);
  border-color: var(--valencia);
  transform: translateY(-2px);
}
.opt.selected::before { background: var(--white); transform: scaleY(1); }
.opt.dimmed { opacity: 0.18; pointer-events: none; transform: scale(0.985); }

/* ── stagger animation ── */
.rise { opacity: 0; transform: translateY(18px); }
.rise.show { animation: rise 0.6s var(--ease) forwards; }

/* ═══ RESULT ═══ */
.result-wrap {
  width: 100%;
  max-width: 880px;
  max-height: calc(100dvh - 132px);
  overflow-y: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.result-wrap::-webkit-scrollbar { display: none; }

.r-headline {
  font-size: clamp(25px, 3.4vw, 37px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: clamp(18px, 3vh, 30px);
}
.r-headline em { font-style: normal; font-weight: 500; color: var(--cherry); }

/* 2×2 grid so the email + CTA sit above the fold */
.r-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: clamp(16px, 2.6vh, 26px);
}
.r-row {
  padding: 13px 26px 13px 0;
  border-top: 1px solid var(--ink-08);
}
.r-row:nth-child(2) { padding-right: 0; padding-left: 26px; }
.r-row:nth-child(4) { padding-right: 0; padding-left: 26px; }
.r-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin-bottom: 7px;
}
.r-value { font-size: 15px; font-weight: 300; line-height: 1.48; }

/* ── capture ── */
.capture {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-width: 440px;
  margin: 0 auto;
}
.capture-input {
  width: 100%;
  padding: 16px 24px;
  border: 1.5px solid var(--ink-14);
  border-radius: 100px;
  background: rgba(250,250,250,0.6);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  text-align: center;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.capture-input::placeholder { color: var(--ink-40); }
.capture-input:focus { border-color: var(--valencia); background: rgba(250,250,250,0.95); }
.capture-input.error { border-color: var(--cherry); }

.capture-cta {
  width: 100%;
  padding: 17px 32px;
  border: 1.5px solid var(--valencia);
  border-radius: 100px;
  background: var(--valencia);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.45s var(--ease), color 0.45s var(--ease), transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.capture-cta:hover { background: transparent; color: var(--valencia); }
.capture-cta:disabled { opacity: 0.45; cursor: default; }
.capture-note {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--ink-55);
  text-align: center;
  margin-top: 2px;
}

/* ── post-submit ── */
.post-submit { display: none; text-align: center; max-width: 440px; margin: 0 auto; }
.post-submit.on { display: block; animation: rise 0.7s var(--ease) forwards; }
.post-submit-lead { font-size: 17px; font-weight: 300; margin-bottom: 14px; }
.post-submit-or { font-size: 13px; color: var(--ink-55); margin-bottom: 20px; }

.retake {
  display: block;
  margin: 18px auto 0;
  font-size: 12.5px;
  font-weight: 300;
  color: var(--ink-55);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sans);
  border-bottom: 1px solid var(--ink-14);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.retake:hover { color: var(--ink); border-color: var(--ink); }

/* ── quiz footer (result only) ── */
.quiz .site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  padding: 22px var(--page-x);
  border-top: none;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}
.quiz .site-footer.on { opacity: 1; pointer-events: auto; }
.quiz .site-footer { justify-content: space-between; }
.foot-copy { font-size: 12.5px; font-weight: 300; color: var(--ink-55); }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ── responsive ── */
@media (max-width: 640px) {
  .screen { padding: 92px 22px 80px; }
  .r-row { grid-template-columns: 1fr; gap: 5px; }
  .thread-a { stroke-width: 2; }
}
