/* =========================================================
   Reyna — /apply quiz
   Reuses the design system from styles.css (palette, grain,
   .btn, .field, .btn__loader). Adds the one-question-per-screen
   flow, echoing the fans-form slide mechanics.
   ========================================================= */

.apply-body{ overflow-x:hidden; }

/* Honeypot: visually and semantically hidden, still submittable */
.hp{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px; border:0;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;
}

.quiz{
  position:relative; z-index:2;
  max-width: 560px;
  margin-inline:auto;
  min-height:100dvh;
  padding:
    calc(18px + var(--safe-top))
    22px
    calc(26px + var(--safe-bot));
  display:flex;
  flex-direction:column;
}

/* ---- top bar: back + progress + count ---- */
.quiz__top{
  display:flex;
  align-items:center;
  gap:14px;
  height:40px;
  margin-bottom: 8px;
  flex:0 0 auto;
}
.quiz__back{
  appearance:none;
  width:36px; height:36px; flex:0 0 auto;
  border-radius:50%;
  border:1px solid rgba(62,85,108,.2);
  background: rgba(255,255,255,.6);
  color: var(--slate);
  display:grid; place-items:center;
  cursor:pointer;
  transition: background .3s var(--ease), transform .3s var(--ease), opacity .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.quiz__back[hidden]{ display:none; }
.quiz__back:hover{ background: rgba(255,255,255,.9); transform: translateX(-2px); }
.quiz__back:focus-visible{ outline:2px solid var(--slate); outline-offset:2px; }

.quiz__bar{
  flex:1;
  height:4px;
  border-radius:99px;
  background: rgba(62,85,108,.16);
  overflow:hidden;
}
.quiz__bar-fill{
  display:block;
  height:100%;
  width:0%;
  border-radius:99px;
  background: linear-gradient(90deg, var(--blue-deep), var(--slate));
  transition: width .5s var(--ease);
}
.quiz__count{
  flex:0 0 auto;
  font-family:"Geist", sans-serif;
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--muted);
  min-width: 34px;
  text-align:right;
}

/* ---- screens stack (one visible at a time) ---- */
.quiz__form{
  position:relative;
  flex:1;
  display:flex;
  min-height:0;
}
.quiz__screens{
  position:relative;
  width:100%;
  flex:1;
  display:grid;
  grid-template-areas:"stack";
  align-content:center;
}
.screen{
  grid-area: stack;
  align-self:center;
  display:flex;
  flex-direction:column;
  gap:16px;
  padding: 8px 2px;
  opacity:0;
  transform: translateX(26px);
  pointer-events:none;
  transition: opacity .42s var(--ease-soft), transform .5s var(--ease-soft);
  will-change: transform, opacity;
}
.screen.is-active{
  opacity:1;
  transform: translateX(0);
  pointer-events:auto;
}
.screen.is-leaving{
  opacity:0;
  transform: translateX(-26px);
}

.screen__eyebrow{
  margin:0 0 2px;
  font-size:11px;
  letter-spacing:.2em;
  text-transform:uppercase;
  color: var(--slate);
  opacity:.7;
}
.screen__eyebrow--accent{ color: var(--rose); opacity:1; }

.screen__q{
  margin:0;
  font-family:"Fraunces", ui-serif, Georgia, serif;
  font-weight:400;
  font-style:italic;
  font-variation-settings:"opsz" 96, "SOFT" 60;
  font-size: clamp(27px, 7.4vw, 38px);
  line-height:1.12;
  letter-spacing:-.012em;
  color: var(--ink);
  text-wrap: balance;
}
.screen__sub{
  margin:0;
  font-size:16px;
  line-height:1.55;
  color: var(--ink-2);
  max-width: 34ch;
}
.screen__sub strong{ color: var(--ink); font-weight:600; }
.screen__small{
  margin: 6px 0 0;
  font-size:13px;
  letter-spacing:.05em;
  color: var(--muted);
}

.screen__cta{ margin-top: 10px; align-self:flex-start; min-width: 220px; }

/* ---- option buttons (big, tappable) ---- */
.opts{
  display:flex;
  flex-direction:column;
  gap:11px;
  margin-top: 2px;
}
.opts--tight{ gap:9px; }
.opt{
  appearance:none;
  text-align:left;
  font-family:"Geist", sans-serif;
  font-weight:500;
  font-size:16.5px;
  line-height:1.3;
  color: var(--ink);
  background: rgba(255,255,255,.62);
  border:1px solid rgba(62,85,108,.2);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  min-height: 60px;
  display:flex;
  align-items:center;
  cursor:pointer;
  position:relative;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .25s var(--ease), border-color .25s var(--ease),
              transform .18s var(--ease), box-shadow .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.opts--tight .opt{ min-height: 54px; padding: 15px 20px; }
.opt:hover{ background: rgba(255,255,255,.9); border-color: rgba(62,85,108,.4); }
.opt:active{ transform: scale(.99); }
.opt:focus-visible{ outline:2px solid var(--slate); outline-offset:2px; }
.opt.is-picked{
  background: var(--slate);
  border-color: var(--slate);
  color: var(--ivory);
  box-shadow: var(--shadow-2);
}

/* ---- final screens ---- */
.screen--final{ gap:18px; }
.screen--final .screen__cta{ align-self:stretch; min-width:0; }

.quiz__spinner{
  display:flex; justify-content:center; margin-top: 6px;
}
.quiz__spinner span{
  width:26px; height:26px; border-radius:50%;
  border:2.5px solid rgba(62,85,108,.25);
  border-top-color: var(--slate);
  animation: spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce){
  .screen{ transition: opacity .2s linear; transform:none; }
  .screen.is-leaving{ transform:none; }
  .quiz__spinner span{ animation-duration: 1.2s; }
}

/* desktop */
@media (min-width: 640px){
  .quiz{ padding-top: calc(34px + var(--safe-top)); }
  .screen{ gap:18px; }
}
