@import './tokens.css';

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ── Body — same dotted texture as landing ────────────────────────────────── */
body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--fg);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── App shell ────────────────────────────────────────────────────────────── */
#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Screen wrapper ───────────────────────────────────────────────────────── */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--px);
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */
.quiz-progress {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px var(--px);
  background: rgba(240,239,235,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.quiz-progress-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.quiz-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}

/* ── Section label (small caps) ───────────────────────────────────────────── */
.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── Heading scales ───────────────────────────────────────────────────────── */
.cover-h1 {
  font-size: clamp(34px, 8.5vw, 64px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -1.8px;
  margin-bottom: 16px;
}
.cover-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ── CTA button — pill, same as landing ──────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  background: var(--fg);
  color: #fff;
  text-decoration: none;
  text-align: center;
  font: 700 16px/1 var(--font);
  padding: 18px 32px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover  { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }

.btn--accent {
  background: var(--accent);
  box-shadow: 0 8px 32px rgba(124,58,237,0.35);
}

/* ── Trust line below CTA ─────────────────────────────────────────────────── */
.trust {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

/* ── Floating collage cards — reused 1:1 from landing ────────────────────── */
@keyframes float1 {
  0%, 100% { transform: rotate(-8deg) translateY(0px); }
  50%       { transform: rotate(-8deg) translateY(-6px); }
}
@keyframes float2 {
  0%, 100% { transform: rotate(2deg) translateY(0px); }
  50%       { transform: rotate(2deg) translateY(-9px); }
}
@keyframes float3 {
  0%, 100% { transform: rotate(6deg) translateY(0px); }
  50%       { transform: rotate(6deg) translateY(-5px); }
}

.collage {
  position: relative;
  height: 205px;
  margin-top: 40px;
  overflow: visible;
}
.collage-card {
  position: absolute;
  width: 160px;
  height: 115px;
  border-radius: var(--radius-card);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  transition: transform 0.3s ease;
}
.card-emoji {
  position: absolute;
  top: 11px;
  right: 12px;
  font-size: 22px;
  line-height: 1;
}

.collage-card:nth-child(1) {
  left: 0; top: 42px;
  background: var(--accent);
  color: #fff;
  z-index: 1;
  box-shadow: var(--shadow-purple);
  animation: float1 3s ease-in-out infinite;
}
.collage-card:nth-child(1):hover {
  animation: none;
  transform: rotate(-8deg) scale(1.05);
  z-index: 10;
}

.collage-card:nth-child(2) {
  left: calc(50% - 80px); top: 6px;
  background: var(--white);
  color: var(--fg);
  border: 1.5px solid var(--border);
  z-index: 3;
  box-shadow: var(--shadow-white);
  animation: float2 4s ease-in-out infinite;
}
.collage-card:nth-child(2):hover {
  animation: none;
  transform: rotate(2deg) scale(1.05);
  z-index: 10;
}

.collage-card:nth-child(3) {
  right: 0; top: 56px;
  background: var(--fg);
  color: #fff;
  z-index: 2;
  box-shadow: var(--shadow-dark);
  animation: float3 3.5s ease-in-out infinite;
}
.collage-card:nth-child(3):hover {
  animation: none;
  transform: rotate(6deg) scale(1.05);
  z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
  .collage-card { animation: none !important; }
}

/* ── TODO stub screen ─────────────────────────────────────────────────────── */
.todo-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px var(--px);
  text-align: center;
}
.todo-screen h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.todo-screen p {
  font-size: 14px;
  color: var(--muted);
}
.todo-nav {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}
.todo-nav .btn {
  flex: 1;
  padding: 14px;
  font-size: 14px;
}
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover { background: rgba(0,0,0,0.04); }

/* ── Question screen ──────────────────────────────────────────────────────── */
.q-screen {
  padding-top: 28px;
  padding-bottom: 56px;
}
.q-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px;
}
.q-heading {
  font-size: clamp(22px, 5.5vw, 32px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.q-hint {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Option cards */
.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.q-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font: 600 16px/1.4 var(--font);
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.12s, background 0.12s, transform 0.1s;
}
.q-option:hover  { border-color: var(--accent); background: rgba(124,58,237,0.04); }
.q-option:active { transform: scale(0.985); }

.q-option-emoji { font-size: 24px; line-height: 1; flex-shrink: 0; }
.q-option-label { flex: 1; }

/* Multi-select checkbox indicator */
.q-option--multi .q-option-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: transparent;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.q-option--multi.selected {
  border-color: var(--accent);
  background: rgba(124,58,237,0.06);
}
.q-option--multi.selected .q-option-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* "Continue" button under multi-select */
.q-next { margin-top: 4px; }
.q-next:disabled {
  background: var(--border);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Desktop ──────────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  :root { --px: 40px; }
  .cover-h1 { letter-spacing: -2.5px; }
  .collage  { height: 250px; }
}

/* ── Loader screen (screen 5) ─────────────────────────────────────────────── */
.loader-screen {
  padding-top: 56px;
  padding-bottom: 56px;
  gap: 0;
  justify-content: center;
}

.loader-heading {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.35;
  text-align: center;
  margin-bottom: 24px;
}

.loader-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}
.loader-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 99px;
  transition: width 4.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loader-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  margin-bottom: 36px;
  transition: opacity 0.2s ease;
}

.loader-reviews-label {
  margin-bottom: 14px;
}

/* Testimonial carousel */
.loader-cards {
  position: relative;
  height: 112px;
}
.loader-card {
  position: absolute;
  inset: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.loader-card--active {
  opacity: 1;
  pointer-events: auto;
}
.loader-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.loader-card-body  { flex: 1; min-width: 0; }
.loader-card-text  { font-size: 14px; line-height: 1.55; color: var(--muted); font-style: italic; }
.loader-card-meta  { font-size: 12px; color: var(--border); font-weight: 600; margin-top: 6px; }

/* ── Checklist screen (screen 9) ──────────────────────────────────────────── */
.cl-screen {
  padding-top: 28px;
  padding-bottom: 48px;
  gap: 18px;
}
.cl-heading {
  font-size: clamp(22px, 5.5vw, 32px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.6px;
  text-wrap: balance;
}
.cl-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cl-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cl-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.cl-text {
  font-size: 15px;
  line-height: 1.55;
  flex: 1;
}
.cl-assurance {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* ── Result screen (screen 6) ─────────────────────────────────────────────── */
.result-screen {
  padding-top: 32px;
  padding-bottom: 56px;
  gap: 16px;
}

.result-greeting {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

/* Gauge */
.result-gauge-wrap {
  width: 160px;
  margin: 0 auto;
}
.result-gauge-svg {
  width: 100%;
  display: block;
  font-family: var(--font);
}
.gauge-fill {
  stroke-dasharray: 169.6;
  stroke-dashoffset: 169.6;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gauge-score-text {
  font-size: 26px;
  font-weight: 900;
  text-anchor: middle;
  fill: var(--fg);
  letter-spacing: -0.5px;
}
.gauge-label-text {
  font-size: 8.5px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--muted);
  letter-spacing: 0.8px;
}

/* Archetype card */
.result-card {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-purple);
}
.result-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.result-card-emoji { font-size: 26px; line-height: 1; }
.result-card-name  { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.result-card-desc  { font-size: 14px; line-height: 1.6; opacity: 0.88; }

.result-cta { margin-top: 4px; }

/* ── Pricing screen (screen 10) ───────────────────────────────────────────── */

/* Sticky countdown bar */
.pr-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--fg);
  color: #fff;
  padding: 10px var(--px);
}
.pr-sticky-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pr-countdown {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
  flex: 1;
  line-height: 1;
}
.pr-timer {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.pr-sticky-btn {
  display: inline-block;
  width: auto;
  padding: 9px 16px;
  font-size: 13px;
  border-radius: var(--radius-btn);
  white-space: nowrap;
}

/* Main screen */
.pr-screen {
  padding-top: 24px;
  padding-bottom: 64px;
  gap: 20px;
}

/* Recap chips */
.pr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pr-chip {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.22);
  border-radius: 99px;
  padding: 5px 12px;
}

/* Discount badge */
.pr-badge {
  display: inline-block;
  align-self: flex-start;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 99px;
  padding: 5px 14px;
}

/* Price */
.pr-price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.pr-old {
  font-size: 28px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: line-through;
  letter-spacing: -0.5px;
}
.pr-new {
  font-size: 56px;
  font-weight: 900;
  color: var(--fg);
  letter-spacing: -2.5px;
  line-height: 1;
}

/* What's included */
.pr-includes-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.pr-include-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pr-include-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.pr-check {
  color: var(--accent);
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
}

/* Guarantee */
.pr-guarantee {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* Payment methods */
.pr-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 20px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pr-methods-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
