/**
 * Квиз «близость в паре» — mobile-first, спокойная палитра, акцент teal.
 * Корневой контейнер: .relationship-quiz (внутри #relationship-quiz-root)
 */

.relationship-quiz {
  --rq-teal: #3d6866;
  --rq-teal-hover: #325653;
  --rq-teal-soft: #e8f1f0;
  --rq-ink: #14120f;
  --rq-muted: #5a5550;
  --rq-border: rgba(61, 104, 102, 0.14);
  --rq-card-bg: #fffcfa;
  --rq-radius: 20px;
  --rq-radius-sm: 14px;
  --rq-shadow: 0 16px 48px rgba(20, 18, 15, 0.07), 0 2px 10px rgba(20, 18, 15, 0.035);
  --rq-font: "Manrope", system-ui, sans-serif;
  --rq-display: "Playfair Display", Georgia, serif;

  font-family: var(--rq-font);
  color: var(--rq-ink);
  max-width: 100%;
  margin: 0 auto;
}

.rq-screen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

/* ─── Старт ─── */
.rq-screen--start {
  text-align: left;
}

.rq-screen--start-minimal {
  text-align: center;
  align-items: center;
  gap: 0;
  padding-bottom: 0.35rem;
}

.rq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.25rem;
  font-family: var(--rq-font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--rq-radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.rq-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rq-btn--primary {
  background: linear-gradient(168deg, #4a7a78 0%, var(--rq-teal) 50%, #325653 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(50, 86, 83, 0.28), 0 2px 8px rgba(50, 86, 83, 0.12);
  margin-top: 0.5rem;
}

.rq-btn--primary:hover:not(:disabled) {
  background: linear-gradient(168deg, #528583 0%, var(--rq-teal-hover) 55%, #2a4a48 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(50, 86, 83, 0.32);
}

.rq-btn--secondary {
  background: linear-gradient(168deg, #4a7a78 0%, var(--rq-teal) 50%, #325653 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(50, 86, 83, 0.22);
}

.rq-btn--secondary:hover:not(:disabled) {
  background: linear-gradient(168deg, #528583 0%, var(--rq-teal-hover) 55%, #2a4a48 100%);
  transform: translateY(-1px);
}

/* ─── Вопрос ─── */
.rq-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.rq-progress__bar {
  height: 100%;
  background: #fff;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.rq-progress__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.rq-back {
  align-self: flex-start;
  margin-bottom: 0.25rem;
}

.rq-link-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rq-link-btn:hover {
  color: #fff;
}

.rq-card {
  background: var(--rq-card-bg);
  border-radius: var(--rq-radius);
  box-shadow: var(--rq-shadow);
  border: 1px solid rgba(20, 18, 15, 0.055);
}

.rq-card--question {
  padding: 1.25rem 1.1rem 1.35rem;
  animation: rq-fade-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rq-fade-in {
  from {
    opacity: 0.92;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rq-question-title {
  font-family: var(--rq-display);
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.32;
  margin: 0 0 1.25rem;
  color: var(--rq-ink);
}

.rq-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rq-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 1.05rem 1.1rem;
  min-height: 56px;
  border: 1px solid rgba(61, 104, 102, 0.16);
  border-radius: var(--rq-radius-sm);
  background: linear-gradient(180deg, #fffcfa 0%, #f8faf9 100%);
  cursor: pointer;
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease;
}

.rq-option:hover {
  border-color: rgba(61, 104, 102, 0.38);
  background: var(--rq-teal-soft);
  box-shadow: 0 6px 20px rgba(61, 104, 102, 0.1);
}

.rq-option:active {
  transform: scale(0.992);
}

.rq-option__letter {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--rq-teal);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}

.rq-option__text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--rq-ink);
  padding-top: 0.15rem;
}

/* ─── Результат ─── */
.rq-screen--result {
  gap: 1.25rem;
}

.rq-card--result {
  padding: 1.5rem 1.15rem 1.6rem;
  background: linear-gradient(168deg, #fffcfa 0%, #f2f8f7 48%, #e8f2f0 100%);
  border: 1px solid rgba(61, 104, 102, 0.14);
}

.rq-result-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rq-teal);
  margin: 0 0 0.5rem;
}

.rq-result-headline {
  font-family: var(--rq-display);
  font-size: clamp(1.2rem, 4.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.28;
  margin: 0 0 1rem;
  color: var(--rq-ink);
}

.rq-result-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--rq-muted);
  margin: 0 0 1.25rem;
}

.rq-result-closing {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--rq-ink);
  margin: 0 0 1.25rem;
}

.rq-tips-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--rq-ink);
}

.rq-tips-list {
  margin: 0 0 1.35rem;
  padding-left: 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--rq-muted);
}

.rq-tips-list li {
  margin-bottom: 0.4rem;
}

/* ─── Форма ─── */
.rq-lead-form {
  background: linear-gradient(180deg, #fffcfa 0%, #faf8f6 100%);
  border-radius: var(--rq-radius);
  padding: 1.35rem 1.1rem 1.5rem;
  border: 1px solid rgba(20, 18, 15, 0.06);
  box-shadow: 0 16px 48px rgba(20, 18, 15, 0.06), 0 2px 10px rgba(20, 18, 15, 0.03);
}

.rq-form-title {
  font-family: var(--rq-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.38;
  margin: 0 0 1.1rem;
  color: var(--rq-ink);
}

.rq-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.rq-field__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rq-ink);
}

.rq-input {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  font-family: var(--rq-font);
  border: 1px solid rgba(61, 104, 102, 0.22);
  border-radius: var(--rq-radius-sm);
  background: #fafcfb;
}

.rq-input:focus {
  outline: none;
  border-color: var(--rq-teal);
  box-shadow: 0 0 0 3px rgba(61, 104, 102, 0.14);
}

.rq-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}

.rq-field--checkbox input {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--rq-teal);
}

.rq-consent-text {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--rq-muted);
}

.rq-consent-text a {
  color: var(--rq-teal);
  font-weight: 600;
}

.rq-form-error {
  font-size: 0.875rem;
  color: #b91c1c;
  margin-bottom: 0.5rem;
}

.rq-form-error.hidden {
  display: none;
}

.rq-form-foot {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  margin: 0.75rem 0 0;
}

.rq-form-success {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rq-teal);
  text-align: center;
  padding: 1rem 0;
  margin: 0;
}

@media (min-width: 480px) {
  .rq-card--question,
  .rq-card--result,
  .rq-lead-form {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }
}

/* В index.html квиз стоит в .final-cta: там color:#fff и .final-cta h2 — из-за этого заголовок результата (h2) был белым на белой карточке */
.final-cta #relationship-quiz-root.relationship-quiz {
  color: #1a1a1a;
}

.final-cta #relationship-quiz-root h2.rq-result-headline {
  color: #1a1a1a;
  font-family: var(--rq-display), Georgia, serif;
  font-size: clamp(1.2rem, 4.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 1rem;
}

/* Старт теста в .final-cta: белая «таблетка», текст цвета фона секции */
.final-cta .rq-screen--start-minimal .rq-btn--primary.rq-btn--start {
  width: auto;
  min-width: 200px;
  max-width: 100%;
  min-height: 54px;
  padding: 1rem 2.4rem;
  margin-top: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fafcfb 100%);
  color: #3a6563;
  border-radius: 999px;
  letter-spacing: 0.05em;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, background 0.3s ease, color 0.2s ease;
}

.final-cta .rq-screen--start-minimal .rq-btn--primary.rq-btn--start:hover:not(:disabled) {
  background: #fff;
  color: #2f5553;
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16), 0 4px 14px rgba(0, 0, 0, 0.08);
}
