/* ============================================================
   JMP MEDIA — quiz.css
   The 60-second Growth Quiz — focused dark stage, big tappable
   option cards, progress, industry-aware result + audit capture.
   Builds on brand.css / themes.css / pages.css tokens.
   ============================================================ */

.quiz-stage{
  position:relative; overflow:hidden; isolation:isolate;
  min-height:100svh; display:flex; align-items:flex-start; justify-content:center;
  background:linear-gradient(150deg,var(--oxblood) 0%,#1a0a09 46%,var(--ink) 100%);
  color:var(--bone);
  padding:calc(var(--nav-h) + clamp(34px,6vw,70px)) var(--gutter) clamp(54px,8vw,96px);
}
.quiz-stage::before{ /* grain */
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:radial-gradient(rgba(255,255,255,0.5) 1px,transparent 1px);
  background-size:3px 3px; opacity:0.08; mix-blend-mode:overlay;
}
.quiz-stage::after{ /* brass glow */
  content:''; position:absolute; right:-12%; top:-18%; width:60%; height:120%; z-index:0;
  background:radial-gradient(ellipse at center,rgba(184,147,90,0.16) 0%,rgba(0,0,0,0) 64%); pointer-events:none;
}

.quiz{ position:relative; z-index:2; width:100%; max-width:760px; }

/* ---- intro / header ---- */
.quiz__eyebrow{ color:var(--brass); justify-content:center; }
.quiz__eyebrow.eyebrow::before{ background:var(--brass); }
.quiz__lede{
  text-align:center; margin:clamp(14px,2vw,20px) auto 0; max-width:30ch;
  font-family:var(--serif); font-style:italic; font-size:clamp(15px,1.8vw,19px);
  color:rgba(232,220,196,0.82); line-height:1.45;
}

/* ---- progress ---- */
.quiz__progress{ display:flex; align-items:center; gap:16px; margin:0 auto clamp(26px,3.4vw,40px); max-width:520px; }
.quiz__count{ font-family:'DM Sans',var(--sans); font-size:11px; letter-spacing:0.18em; text-transform:uppercase; color:rgba(232,220,196,0.6); white-space:nowrap; }
.quiz__track{ flex:1 1 auto; height:2px; background:rgba(184,147,90,0.2); position:relative; }
.quiz__fill{ position:absolute; left:0; top:0; height:100%; width:0; background:var(--brass); transition:width .55s cubic-bezier(.22,.61,.36,1); }

/* ---- card ---- */
.quiz__card{
  position:relative; border:1px solid rgba(184,147,90,0.30);
  background:color-mix(in srgb,var(--brass) 5%,rgba(8,7,6,0.5));
  backdrop-filter:blur(6px); padding:clamp(28px,4vw,52px);
}

/* a panel = one question (or the result). only the active one shows */
.qpanel{ display:none; }
.qpanel.is-active{ display:block; animation:qIn .5s cubic-bezier(.22,.61,.36,1); }
@keyframes qIn{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ .qpanel.is-active{ animation:none; } }

.qpanel__ix{ font-family:var(--serif); font-style:italic; font-size:clamp(15px,1.8vw,19px); color:var(--brass); }
.qpanel__q{ font-family:var(--serif); font-weight:500; font-size:clamp(26px,3.6vw,40px); line-height:1.08; margin:10px 0 0; text-wrap:balance; color:var(--bone); }
.qpanel__hint{ margin:14px 0 0; font-family:var(--sans); font-size:clamp(13px,1.5vw,14.5px); color:rgba(232,220,196,0.6); line-height:1.5; }

/* option cards */
.qopts{ display:grid; grid-template-columns:1fr; gap:10px; margin-top:clamp(24px,3vw,34px); }
@media (min-width:600px){ .qopts.cols-2{ grid-template-columns:1fr 1fr; } }
.qopt{
  display:flex; align-items:center; gap:16px; text-align:left; width:100%;
  min-height:62px; padding:16px 20px; cursor:pointer;
  border:1px solid rgba(184,147,90,0.28); background:rgba(245,239,227,0.02);
  color:var(--bone); transition:border-color .3s ease,background .3s ease,transform .25s ease;
}
.qopt:hover{ border-color:var(--brass); background:rgba(184,147,90,0.08); }
.qopt.is-sel{ border-color:var(--brass); background:color-mix(in srgb,var(--bordeaux) 30%,transparent); transform:translateY(-1px); }
.qopt__mark{
  flex-shrink:0; width:24px; height:24px; border:1px solid rgba(184,147,90,0.5); border-radius:50%;
  display:flex; align-items:center; justify-content:center; color:var(--ink); transition:background .3s ease,border-color .3s ease;
}
.qopt__mark .ico{ width:13px; height:13px; opacity:0; transform:scale(0.6); transition:opacity .25s ease,transform .25s ease; }
.qopt.is-sel .qopt__mark{ background:var(--brass); border-color:var(--brass); }
.qopt.is-sel .qopt__mark .ico{ opacity:1; transform:scale(1); }
.qopt__body{ display:flex; flex-direction:column; gap:3px; }
.qopt__t{ font-family:var(--sans); font-weight:600; font-size:15px; letter-spacing:0.01em; }
.qopt__d{ font-family:var(--serif); font-size:14px; color:rgba(232,220,196,0.66); line-height:1.35; }

/* footer nav of the card */
.qfoot{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:clamp(24px,3vw,32px); }
.qback{ font-family:var(--sans); font-weight:600; font-size:12px; letter-spacing:0.16em; text-transform:uppercase; color:rgba(232,220,196,0.6); display:inline-flex; align-items:center; gap:10px; transition:color .3s ease; }
.qback:hover{ color:var(--bone); }
.qback .ico{ width:14px; height:14px; transform:rotate(180deg); }
.qback[hidden]{ visibility:hidden; }
.qhelp{ font-family:'DM Sans',var(--sans); font-size:11px; letter-spacing:0.04em; color:rgba(232,220,196,0.42); }

/* ---- result panel ---- */
.qresult__kick{ color:var(--brass); }
.qresult__h{ font-family:var(--serif); font-weight:500; font-size:clamp(28px,4vw,46px); line-height:1.04; margin:14px 0 0; text-wrap:balance; }
.qresult__h em{ font-style:italic; color:var(--champagne); }
.qresult__lead{ margin:18px 0 0; font-family:var(--serif); font-size:clamp(16px,1.9vw,19px); line-height:1.55; color:rgba(245,239,227,0.86); max-width:52ch; }
.qresult__focus{ margin-top:clamp(22px,3vw,30px); display:flex; flex-wrap:wrap; gap:10px; }
.qchip{ display:inline-flex; align-items:center; gap:10px; padding:9px 16px; border:1px solid var(--brass); color:var(--champagne); font-family:var(--sans); font-weight:600; font-size:11px; letter-spacing:0.14em; text-transform:uppercase; }
.qchip .ico{ width:14px; height:14px; color:var(--brass); }
.qplan{ margin:clamp(24px,3vw,32px) 0 0; padding-top:clamp(22px,3vw,28px); border-top:1px solid rgba(184,147,90,0.26); list-style:none; display:flex; flex-direction:column; gap:14px; }
.qplan li{ display:flex; gap:14px; align-items:flex-start; font-family:var(--serif); font-size:clamp(15px,1.7vw,17px); line-height:1.5; color:rgba(245,239,227,0.9); }
.qplan li .ico{ width:18px; height:18px; color:var(--brass); margin-top:3px; flex-shrink:0; }

/* capture form inside result */
.qcapture{ margin-top:clamp(26px,3.4vw,36px); padding-top:clamp(24px,3vw,30px); border-top:1px solid rgba(184,147,90,0.26); }
.qcapture__t{ font-family:var(--sans); font-weight:600; font-size:11px; letter-spacing:0.2em; text-transform:uppercase; color:var(--brass); }
.qcapture .field-grid{ margin-top:20px; }
.qcapture .btn{ width:100%; margin-top:clamp(20px,2.6vw,26px); }
.qcapture__fine{ margin-top:16px; font-family:'DM Sans',var(--sans); font-size:11px; letter-spacing:0.02em; color:rgba(232,220,196,0.5); line-height:1.5; display:flex; gap:10px; }
.qcapture__fine .ico{ width:14px; height:14px; color:var(--brass); flex-shrink:0; margin-top:2px; }

/* done state */
.qdone{ text-align:center; padding:clamp(20px,3vw,36px) 0; }
.qdone__seal{ width:66px; height:66px; border:1px solid var(--brass); display:flex; align-items:center; justify-content:center; margin:0 auto clamp(20px,2.6vw,26px); color:var(--brass); }
.qdone__seal .ico{ width:28px; height:28px; }
.qdone h2{ font-family:var(--serif); font-weight:500; font-size:clamp(28px,3.6vw,40px); margin:0; }
.qdone p{ margin:16px auto 0; max-width:44ch; font-family:var(--serif); font-size:clamp(16px,1.8vw,18px); line-height:1.55; color:rgba(245,239,227,0.82); }
.qdone .quiz__cta-row{ margin-top:clamp(26px,3.4vw,34px); display:flex; flex-wrap:wrap; gap:18px; justify-content:center; }

/* a slim back-to-home rail under the card */
.quiz__exit{ text-align:center; margin-top:clamp(22px,3vw,30px); font-family:var(--sans); font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color:rgba(232,220,196,0.5); }
.quiz__exit a{ color:var(--champagne); border-bottom:1px solid rgba(184,147,90,0.5); padding-bottom:2px; }
.quiz__exit a:hover{ color:var(--bone); }

.qhide{ display:none !important; }

/* ============================================================
   GROWTH QUIZ — MODAL / OVERLAY
   Opens over any page; the page stays behind a dimmed backdrop.
   Reuses every .quiz / .qpanel / .qopt / .qresult style above.
   ============================================================ */
html.qmodal-lock{ overflow:hidden; }

.qmodal{
  position:fixed; inset:0; z-index:200;
  display:flex; align-items:flex-start; justify-content:center;
}
.qmodal[hidden]{ display:none; }

.qmodal__backdrop{
  position:absolute; inset:0;
  background:rgba(10,7,6,0.74); backdrop-filter:blur(3px);
  opacity:0; transition:opacity .26s ease;
}
.qmodal.is-open .qmodal__backdrop{ opacity:1; }

.qmodal__dialog{
  position:relative; z-index:1;
  width:min(820px, 100%);
  max-height:92svh; margin:clamp(14px,4vh,52px) clamp(10px,3vw,24px);
  display:flex; flex-direction:column;
  background:linear-gradient(150deg,var(--oxblood) 0%,#1a0a09 46%,var(--ink) 100%);
  border:1px solid rgba(184,147,90,0.34);
  box-shadow:0 40px 120px rgba(0,0,0,0.6);
  color:var(--bone);
  opacity:0; transform:translateY(18px) scale(0.985);
  transition:opacity .28s cubic-bezier(.22,.61,.36,1), transform .28s cubic-bezier(.22,.61,.36,1);
}
.qmodal.is-open .qmodal__dialog{ opacity:1; transform:none; }

.qmodal__dialog::after{ /* brass glow, matches the standalone stage */
  content:''; position:absolute; right:-10%; top:-14%; width:55%; height:80%; z-index:0;
  background:radial-gradient(ellipse at center,rgba(184,147,90,0.14) 0%,rgba(0,0,0,0) 64%);
  pointer-events:none;
}

.qmodal__scroll{
  position:relative; z-index:1; flex:1 1 auto; min-height:0;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:clamp(30px,4.5vw,56px) clamp(20px,4vw,52px) clamp(28px,4vw,46px);
}
.qmodal__scroll .quiz{ max-width:none; }
.qmodal__scroll .quiz__card{ backdrop-filter:none; }

.qmodal__close{
  position:absolute; top:14px; right:14px; z-index:3;
  width:42px; height:42px; display:flex; align-items:center; justify-content:center;
  background:rgba(245,239,227,0.04); color:var(--champagne);
  border:1px solid rgba(184,147,90,0.34); cursor:pointer;
  transition:background .25s ease, color .25s ease, border-color .25s ease;
}
.qmodal__close:hover{ background:rgba(184,147,90,0.16); color:var(--bone); border-color:var(--brass); }

/* prominent "see your playbook" route inside the result */
.qresult__route{
  width:100%; margin-top:clamp(26px,3.4vw,34px);
  justify-content:center; text-align:center; font-size:15px;
}
.qresult__route[hidden]{ display:none !important; }

/* consent checkbox in the capture form */
.qconsent{
  display:flex; align-items:flex-start; gap:12px; margin-top:18px; cursor:pointer;
  font-family:var(--sans); font-size:13px; line-height:1.5; color:rgba(232,220,196,0.78);
}
.qconsent input{
  flex-shrink:0; width:20px; height:20px; margin-top:1px; cursor:pointer;
  accent-color:var(--brass);
}

@media (prefers-reduced-motion:reduce){
  .qmodal__backdrop,
  .qmodal__dialog{ transition:none; }
  .qmodal__dialog{ transform:none; }
}

/* ============================================================
   DYNAMIC / MULTI-SELECT QUIZ ADDITIONS (shared engine)
   ============================================================ */
/* page mount is transparent so .quiz centres inside .quiz-stage */
.quiz-mount{ display:contents; }

/* multi-select marks read as checkboxes (square) vs. single (round) */
.qopts--multi .qopt__mark{ border-radius:6px; }

/* brief nudge when a 3rd goal is attempted (cap = 2) */
.qopts-capped .qopts{ animation:qShake .34s ease; }
@keyframes qShake{ 0%,100%{ transform:none; } 25%{ transform:translateX(-4px); } 75%{ transform:translateX(4px); } }
@media (prefers-reduced-motion:reduce){ .qopts-capped .qopts{ animation:none; } }

/* "Something else" free-text industry field */
.qother{ margin-top:14px; }
.qother__label{
  display:block; font-family:'DM Sans',var(--sans); font-size:11px; letter-spacing:0.16em;
  text-transform:uppercase; color:rgba(232,220,196,0.62); margin-bottom:8px;
}
.qother__input{
  width:100%; padding:14px 16px; font-family:var(--serif); font-size:16px; color:var(--bone);
  background:rgba(245,239,227,0.03); border:1px solid rgba(184,147,90,0.32); outline:none;
  transition:border-color .3s ease, background .3s ease;
}
.qother__input::placeholder{ color:rgba(232,220,196,0.4); }
.qother__input:focus{ border-color:var(--brass); background:rgba(184,147,90,0.06); }

/* business step — name + website/domain capture before the result */
.qbiz{ display:grid; grid-template-columns:1fr; gap:18px; margin-top:clamp(24px,3vw,34px); }
.qbiz__field{ display:flex; flex-direction:column; gap:9px; }
.qbiz__label{
  font-family:'DM Sans',var(--sans); font-size:11px; letter-spacing:0.16em;
  text-transform:uppercase; color:rgba(232,220,196,0.62);
}
.qbiz__input{
  width:100%; padding:14px 16px; font-family:var(--serif); font-size:16px; color:var(--bone);
  background:rgba(245,239,227,0.03); border:1px solid rgba(184,147,90,0.32); outline:none;
  transition:border-color .3s ease, background .3s ease;
}
.qbiz__input::placeholder{ color:rgba(232,220,196,0.4); }
.qbiz__input:focus{ border-color:var(--brass); background:rgba(184,147,90,0.06); }
.qbiz__note{
  display:flex; gap:9px; align-items:flex-start; margin:2px 0 0;
  font-family:'DM Sans',var(--sans); font-size:12px; line-height:1.5; color:rgba(232,220,196,0.5);
}
.qbiz__note .ico{ width:14px; height:14px; flex:none; margin-top:1px; color:var(--brass); opacity:0.85; }

/* card foot: back on the left, help + Continue on the right */
.qfoot__right{ display:flex; align-items:center; gap:18px; }
.qcontinue{ padding:13px 22px; font-size:13px; }
.qcontinue[disabled]{ opacity:0.4; cursor:not-allowed; pointer-events:none; }
.qcontinue .ico.ar{ width:15px; height:15px; }
@media (max-width:520px){
  .qfoot__right .qhelp{ display:none; }
}
