/* quiz.css — Palate Match quiz styles */
/* Follows theme.css design tokens: --bg, --fg, --accent, --muted, --surface, --border */

.quiz-body { background: var(--bg); }

.quiz-nav {
  padding: 1.5rem 8vw;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.quiz-back:hover { color: var(--accent); }

.quiz-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 6rem 8vw 4rem;
  min-height: 100vh;
}

/* Header */
.quiz-header { text-align: center; margin-bottom: 3rem; }
.quiz-label {
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.quiz-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.quiz-subtitle {
  font-size: 1rem;
  color: var(--muted);
}

/* Progress bar */
.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  margin-bottom: 3rem;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s ease;
}

/* Quiz steps */
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: fadeUp 0.3s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-question {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 2rem;
  text-align: center;
}

/* Option grid */
.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.option-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.option-grid.four-col { grid-template-columns: repeat(4, 1fr); }

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: center;
  font-family: inherit;
}
.option-btn:hover {
  border-color: var(--accent);
  background: #FAEDEA;
  transform: translateY(-2px);
}
.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
}
.option-btn.selected .option-label,
.option-btn.selected .option-desc,
.option-btn.selected .option-price {
  color: var(--bg);
}
.option-btn.selected .option-icon svg circle,
.option-btn.selected .option-icon svg rect,
.option-btn.selected .option-icon svg path,
.option-btn.selected .option-icon svg ellipse {
  fill: rgba(250,246,240,0.4);
  opacity: 1;
}

.option-icon { line-height: 0; }

.option-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  transition: color 0.2s;
}
.option-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  transition: color 0.2s;
}
.option-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  transition: color 0.2s;
}
.option-btn.selected .option-price { color: var(--bg); }

/* Navigation */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.next-btn {
  padding: 0.8rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-left: auto;
}
.next-btn:hover:not([disabled]) { background: var(--accent-light); transform: translateY(-1px); }
.next-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.prev-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}
.prev-btn:hover { color: var(--fg); }

/* Loading */
.quiz-loading {
  text-align: center;
  padding: 4rem 0;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.quiz-loading p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
}

/* Results */
.quiz-results { animation: fadeUp 0.4s ease; }

.result-label {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1.5rem;
}
.result-wine {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}
.result-wine-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.result-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}
.result-producer {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.result-region {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}
.result-price-block {
  text-align: right;
  flex-shrink: 0;
}
.result-price {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}
.result-price-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-tasting {
  font-size: 0.975rem;
  color: var(--fg);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-bottom: 1.5rem;
}
.result-why {
  background: var(--bg);
  border-radius: 10px;
  padding: 1.25rem;
}
.result-why-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.result-why p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}

/* Email capture */
.email-capture {
  background: var(--fg);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}
.email-pitch {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--bg);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.email-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 0 auto;
}
.email-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(250,246,240,0.1);
  border: 1px solid rgba(250,246,240,0.2);
  border-radius: 8px;
  color: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.email-input::placeholder { color: rgba(250,246,240,0.4); }
.email-input:focus { border-color: rgba(250,246,240,0.5); }
.email-submit {
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.email-submit:hover { background: var(--accent-light); }
.email-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.email-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(250,246,240,0.7);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Founding Member CTA */
.founding-cta { margin-bottom: 2rem; animation: fadeUp 0.4s ease; }
.founding-cta-inner {
  background: var(--accent);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.founding-cta-text { flex: 1; }
.founding-cta-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.55);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.founding-cta-headline {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bg);
  margin-bottom: 0.3rem;
}
.founding-cta-sub { font-size: 0.8rem; color: rgba(250,246,240,0.6); }
.founding-cta-btn {
  background: var(--bg);
  color: var(--accent);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.founding-cta-btn:hover { background: #F0EBE3; transform: translateY(-1px); }

@media (max-width: 600px) {
  .founding-cta-inner { flex-direction: column; align-items: flex-start; }
  .founding-cta-btn { width: 100%; text-align: center; }
}

/* Result actions */
.result-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}
.restart-link, .home-link {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.restart-link:hover, .home-link:hover { color: var(--accent); }

/* Mobile */
@media (max-width: 600px) {
  .quiz-container { padding: 5rem 6vw 3rem; }
  .option-grid { grid-template-columns: 1fr; }
  .option-grid.three-col { grid-template-columns: 1fr; }
  .option-grid.four-col { grid-template-columns: repeat(2, 1fr); }
  .result-wine-header { flex-direction: column; }
  .result-price-block { text-align: left; }
  .email-form { flex-direction: column; }
}