/* ============================================================
   MADE FOR STORYTELLERS — Find Your Fit Quiz
   Typeform-style split-screen layout. One screen at a time.
   Copy (left) + media panel (right) + picture-choice tiles.
   Palette: pure black #0a0a0a + lime #C8FF00.
   ============================================================ */

:root {
  --lime: #C8FF00;
  --lime-soft: rgba(200, 255, 0, 0.14);
  --lime-glow: rgba(200, 255, 0, 0.28);
  --ink: #0a0a0a;
  --ink-2: #111;
  --ink-3: #141414;
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-2: rgba(255, 255, 255, 0.26);
  --stroke-3: rgba(255, 255, 255, 0.42);
  --text: #ededeb;
  --muted: rgba(237, 237, 235, 0.62);
  --muted-2: rgba(237, 237, 235, 0.38);
  --display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --body: 'Satoshi', system-ui, sans-serif;
  --pad-x: clamp(24px, 4vw, 72px);
  --pad-y: clamp(20px, 3vh, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
kbd {
  font-family: 'Satoshi', monospace;
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--stroke-2);
  border-radius: 4px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================================
   Shell
   ============================================================ */

.qz {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--ink);
  z-index: 1;
}

/* Progress bar */
.qz__progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 10;
}
.qz__progress-fill {
  display: block;
  height: 100%;
  width: 6%;
  background: var(--lime);
  transition: width 420ms cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 14px var(--lime-glow);
}

/* Top bar */
.qz__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--pad-x) 14px;
  z-index: 8;
}
.qz__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.qz__logo-img {
  display: block;
  height: 34px;
  width: auto;
  opacity: 0.95;
}
.qz__step {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.qz__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.qz__close:hover { border-color: var(--stroke-3); background: rgba(255,255,255,0.04); }

/* Legacy bg layer — kept but invisible (media now lives in stage) */
.qz__bg, .qz__bg-dim { display: none; }

/* ============================================================
   Stage — split-screen grid
   Left: copy + options. Right: media panel.
   ============================================================ */

.qz__stage {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.qz__split {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) 1.15fr;
  height: 100%;
  width: 100%;
  gap: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.qz__stage--in .qz__split { opacity: 1; transform: translateY(0); }

.qz__split--solo {
  grid-template-columns: 1fr;
}

/* Left pane — copy + options */
.qz__copy {
  padding: clamp(20px, 3vh, 44px) var(--pad-x) clamp(20px, 3vh, 40px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.qz__split--solo .qz__copy { max-width: 1080px; margin: 0 auto; width: 100%; }

.qz__copy::-webkit-scrollbar { width: 6px; }
.qz__copy::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 999px; }

.qz__eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.qz__eyebrow--accent { color: var(--lime); }

.qz__h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.qz__h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 14px;
}
.qz__sub {
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 28px;
}

/* ============================================================
   Media panel (right side)
   ============================================================ */

.qz__media {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
}
.qz__media-img,
.qz__media-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qz__media-video {
  z-index: 2;
}
.qz__media::after {
  /* subtle edge vignette so text side feels anchored */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0) 18%, rgba(10,10,10,0) 80%, rgba(10,10,10,0.22) 100%);
  pointer-events: none;
  z-index: 3;
}
.qz__media-tag {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(10,10,10,0.6);
  border: 1px solid var(--stroke);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ============================================================
   CTA buttons
   ============================================================ */

.qz__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 0 0 0 var(--lime-glow);
  align-self: flex-start;
}
.qz__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 28px var(--lime-glow); }
.qz__cta svg { flex-shrink: 0; }
.qz__cta--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--stroke-2);
  box-shadow: none;
}
.qz__cta--ghost:hover { border-color: var(--stroke-3); background: rgba(255,255,255,0.03); }

.qz__cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.qz__foot-note {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 16px;
  letter-spacing: 0.04em;
}

/* ============================================================
   Options — single / multi (text-chip style with A/B/C chips)
   ============================================================ */

.qz__opts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.qz__opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px 14px 14px;
  border: 1px solid var(--stroke-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  transition: border-color .18s, background .18s, transform .12s;
}
.qz__opt:hover {
  border-color: var(--lime);
  background: rgba(200, 255, 0, 0.04);
}
.qz__opt.is-selected {
  border-color: var(--lime);
  background: var(--lime-soft);
  box-shadow: 0 0 0 1px var(--lime) inset;
}

.qz__key {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke-2);
  border-radius: 6px;
  letter-spacing: 0;
}
.qz__opt.is-selected .qz__key {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}
.qz__opt-label {
  flex: 1;
  font-family: var(--body);
  font-weight: 500;
}
.qz__tick, .qz__check {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke-2);
  border-radius: 6px;
  color: transparent;
  transition: color .15s, background .15s, border-color .15s;
  flex-shrink: 0;
}
.qz__opt.is-selected .qz__tick,
.qz__opt.is-selected .qz__check {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

/* ============================================================
   Picture-choice tiles (NEW v=71)
   ============================================================ */

.qz__pic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.qz__split--solo .qz__pic-grid {
  grid-template-columns: repeat(5, 1fr);
}
.qz__split--solo .qz__pic-grid--lg {
  grid-template-columns: repeat(4, 1fr);
}
.qz__pic-grid--lg {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.qz__pic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  border-radius: 12px;
  background: var(--ink-2);
  color: var(--text);
  text-align: left;
  transition: border-color .18s, transform .15s, box-shadow .2s;
  padding: 0;
}
.qz__pic-card:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.qz__pic-card.is-selected {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--lime) inset, 0 8px 24px var(--lime-glow);
}

.qz__pic-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-3);
}
.qz__pic-img,
.qz__pic-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qz__pic-video { z-index: 2; }
.qz__pic-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 55%, rgba(10,10,10,0.55) 100%);
  z-index: 3;
  pointer-events: none;
}

.qz__pic-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(10, 10, 10, 0.92);
  border-top: 1px solid var(--stroke);
}
.qz__pic-card.is-selected .qz__pic-foot {
  background: var(--lime-soft);
  border-top-color: var(--lime);
}
.qz__pic-chip {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke-2);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}
.qz__pic-card.is-selected .qz__pic-chip {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}
.qz__pic-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  line-height: 1.25;
}

/* Video tile badge */
.qz__pic-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  background: rgba(10, 10, 10, 0.75);
  border: 1px solid var(--lime);
  padding: 3px 7px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.qz__pic-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--lime);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ============================================================
   Teach screen — bullet lines
   ============================================================ */

.qz__lines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.qz__lines li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--text);
  opacity: 0;
  transform: translateX(-8px);
  animation: line-in .5s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 120ms + 200ms);
}
@keyframes line-in {
  to { opacity: 1; transform: translateX(0); }
}
.qz__bullet {
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--lime-glow);
  flex-shrink: 0;
}

/* ============================================================
   Form / Lead / References screens
   ============================================================ */

.qz__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
  max-width: 520px;
}
.qz__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qz__field span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.qz__field input,
.qz__field textarea,
.qz__ta {
  font-family: var(--body);
  font-size: 15px;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke-2);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color .18s, background .18s;
}
.qz__field input:focus,
.qz__field textarea:focus,
.qz__ta:focus {
  outline: none;
  border-color: var(--lime);
  background: rgba(200, 255, 0, 0.04);
}
.qz__field textarea, .qz__ta {
  min-height: 88px;
  resize: vertical;
}
.qz__form--err .qz__field input:invalid,
.qz__form--err .qz__field textarea:invalid {
  border-color: #ff6363;
}
.qz__privacy {
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.5;
}

.qz__uploader {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed var(--stroke-2);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .18s;
}
.qz__uploader:hover { border-color: var(--lime); }
.qz__uploader input { display: none; }
.qz__uploader-cta {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qz__uploader-cta small {
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.qz__uploader-list {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

/* ============================================================
   Result screen
   ============================================================ */

.qz__h1--result { font-size: clamp(34px, 5vw, 66px); }
.qz__sub--result { font-size: clamp(14px, 1.2vw, 18px); margin-bottom: 28px; }

.qz__result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}
.qz__rrow {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
  border-radius: 8px;
}
.qz__rrow span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.qz__rrow strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.qz__result-workflow {
  border-top: 1px solid var(--stroke);
  padding-top: 18px;
  margin-bottom: 24px;
}
.qz__result-workflow p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}

/* ============================================================
   Footer controls
   ============================================================ */

.qz__foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad-x) 18px;
  gap: 16px;
  border-top: 1px solid var(--stroke);
  background: var(--ink);
  z-index: 9;
}
.qz__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.qz__back:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.qz__hint {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.qz__next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 7px;
  transition: transform .12s, box-shadow .2s;
}
.qz__next:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--lime-glow); }

/* ============================================================
   Error state
   ============================================================ */

.qz__err {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   Responsive — stack on mobile
   ============================================================ */

@media (max-width: 1100px) {
  .qz__split--solo .qz__pic-grid { grid-template-columns: repeat(3, 1fr); }
  .qz__split--solo .qz__pic-grid--lg { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .qz__split {
    grid-template-columns: 1fr;
    grid-template-rows: 38vh 1fr;
  }
  .qz__split--solo {
    grid-template-rows: 1fr;
  }
  .qz__media {
    order: -1;
    min-height: 38vh;
  }
  .qz__copy {
    padding: 24px var(--pad-x) 20px;
    justify-content: flex-start;
  }
  .qz__h1 { font-size: clamp(28px, 7vw, 40px); }
  .qz__h2 { font-size: clamp(22px, 5.8vw, 30px); }
  .qz__sub { font-size: 14px; margin-bottom: 20px; }

  .qz__pic-grid,
  .qz__split--solo .qz__pic-grid,
  .qz__split--solo .qz__pic-grid--lg {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .qz__pic-media { aspect-ratio: 1 / 1; }
  .qz__pic-label { font-size: 12px; }
}

@media (max-width: 480px) {
  .qz__logo-img { height: 18px; }
  .qz__step { display: none; }
  .qz__hint { display: none; }
  .qz__foot { padding: 10px 16px 14px; }
  .qz__next { padding: 10px 14px; font-size: 12px; }
  :root { --pad-x: 20px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .qz__split, .qz__lines li { transition: none; animation: none; opacity: 1; transform: none; }
  .qz__pic-badge::before { animation: none; }
}
