/* =========================================================
   Apply page: one question at a time (Typeform style)
   Uses the tokens, fonts and buttons from styles.css
   ========================================================= */
.apply-page { min-height: 100vh; min-height: 100svh; overflow: hidden; background: var(--paper); }
.apply-glow {
  position: fixed; inset: auto -20vw -40vh auto; width: 80vw; height: 80vw; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(255, 154, 61, 0.2), rgba(255, 79, 139, 0.1) 45%, transparent 70%);
}

/* progress */
.apply-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: rgba(43, 20, 24, 0.06); z-index: 60; }
.apply-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.6s var(--ease); }

/* top bar */
.apply-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 44px);
}
.apply-top .brand { text-decoration: none; }
.apply-count { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }

/* stage + slides */
.apply-stage { position: relative; z-index: 1; height: 100vh; height: 100svh; }
.slide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 110px clamp(20px, 6vw, 80px) 110px; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateX(60px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), visibility 0.55s;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; }
.slide.is-before { transform: translateX(-60px); }
.slide-inner { width: 100%; max-width: 720px; margin: auto 0; }

.q-num { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--orange); margin-bottom: 14px; }
.q-num svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.q-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.01em; }
.q-title em { font-style: italic; color: var(--ink-soft); }
.q-help { margin-top: 14px; font-size: clamp(16px, 1.5vw, 18px); color: var(--ink-soft); max-width: 56ch; }

/* welcome */
.welcome .q-title { font-size: clamp(42px, 6.4vw, 84px); line-height: 1; max-width: 13ch; }
.welcome .q-title em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; padding-right: 0.1em; }
.welcome-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: var(--ink-soft); }
.welcome-points li { position: relative; padding-left: 26px; }
.welcome-points li::before { content: "✦"; position: absolute; left: 0; top: 2px; font-size: 12px; color: var(--pink); }

/* text inputs */
.q-field { margin-top: 34px; }
.q-input {
  width: 100%; border: 0; border-bottom: 2px solid rgba(43, 20, 24, 0.2); background: transparent; color: var(--ink);
  font-family: var(--serif); font-size: clamp(26px, 3.2vw, 38px); padding: 8px 0 12px; outline: none; border-radius: 0;
  transition: border-color 0.3s;
}
.q-input::placeholder { color: rgba(110, 80, 84, 0.45); }
.q-input:focus { border-bottom-color: var(--pink); }
.q-fields { margin-top: 30px; display: grid; gap: 26px; }
.q-fields label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.q-fields .q-input { font-size: clamp(22px, 2.6vw, 30px); margin-top: 4px; }

/* choices */
.choices { margin-top: 30px; display: grid; gap: 10px; max-width: 560px; }
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(43, 20, 24, 0.14); background: rgba(255, 255, 255, 0.55);
  font: 500 17px var(--sans); color: var(--ink);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.choice:hover { border-color: rgba(255, 79, 139, 0.55); background: #fff; }
.choice:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.choice-key {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid rgba(43, 20, 24, 0.2); font-size: 12px; font-weight: 700; color: var(--ink-soft); background: var(--paper);
}
.choice-label { flex: 1; }
.choice-check { flex: none; width: 20px; height: 20px; opacity: 0; color: var(--pink); transition: opacity 0.2s; }
.choice-check svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.choice[aria-pressed="true"] { border-color: transparent; background: #fff; box-shadow: 0 0 0 2px var(--pink), 0 14px 30px -18px rgba(255, 79, 139, 0.6); }
.choice[aria-pressed="true"] .choice-key { background: var(--grad); color: #fff; border-color: transparent; }
.choice[aria-pressed="true"] .choice-check { opacity: 1; }
.choice.blink { animation: choice-blink 0.32s ease 2; }
@keyframes choice-blink { 50% { box-shadow: 0 0 0 2px rgba(255, 79, 139, 0.25); } }

/* actions */
.q-actions { margin-top: 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.q-actions .btn { padding: 15px 26px; }
.q-hint { font-size: 13px; color: var(--ink-soft); }
.q-hint kbd { font-family: var(--sans); font-weight: 700; }
.q-error {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 7px 12px; border-radius: 8px;
  background: rgba(224, 69, 58, 0.1); color: #b2332a; font-size: 14px; font-weight: 500;
}
.q-error[hidden] { display: none; }

/* outcome screens */
.outcome .q-title { font-size: clamp(38px, 5.4vw, 68px); max-width: 15ch; }
.outcome .q-title em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; padding-right: 0.1em; }
.outcome-steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; max-width: 560px; }
.outcome-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; color: var(--ink-soft); }
.outcome-steps b { color: var(--ink); font-weight: 600; }
.outcome-steps .step-num { width: 36px; height: 36px; font-size: 18px; margin: 0; }
.outcome .seal-mini { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 26px; margin-bottom: 22px; box-shadow: 0 18px 40px -16px rgba(255, 79, 139, 0.7); }

/* bottom-right arrows */
.apply-nav { position: fixed; right: clamp(20px, 4vw, 44px); bottom: clamp(20px, 4vh, 36px); z-index: 50; display: flex; gap: 2px; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 30px -16px rgba(43, 20, 24, 0.5); }
.nav-arrow { width: 42px; height: 38px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; display: grid; place-items: center; transition: background 0.25s; }
.nav-arrow:hover:not(:disabled) { background: #46262c; }
.nav-arrow:disabled { opacity: 0.4; cursor: default; }
.nav-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-arrow:focus-visible { outline: 3px solid var(--pink); outline-offset: -3px; }
.apply-nav[hidden] { display: none; }

@media (max-width: 640px) {
  .apply-top { padding: 16px 20px; background: linear-gradient(var(--paper) 60%, rgba(251, 243, 234, 0)); }
  .slide { padding: 92px 20px 110px; align-items: flex-start; }
  .slide-inner { margin-top: 4vh; }
  .choice { font-size: 16px; padding: 12px 14px; }
  .q-hint { display: none; }
  .apply-nav { bottom: 18px; right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide { transform: none !important; }
}

/* "Other" option: typed answer under the choices */
.q-other { margin-top: 14px; max-width: 560px; }
.q-other[hidden] { display: none; }
.q-other .q-input { font-size: clamp(20px, 2.2vw, 26px); }
