/*
 * HearthQuotes (mdr) — оболочка страниц бренда: экран с кнопкой и копия формы
 * (form-stream), страница результатов, легалка.
 *
 * Цвета и шрифты — ТОЛЬКО в блоке :root ниже: смена варианта визуала
 * (docs/funnels/mdr/02-integration-tz.md §7) — замена значений этого блока.
 * Префикс классов — `hq-`.
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root {
  /* Вариант 1 «Pine & Linen». */
  --hq-bg: #f4f1ea;
  --hq-bg-deep: #e9e4d8;
  --hq-surface: #fffefb;
  --hq-surface-alt: #f6f3ec;

  --hq-primary: #1f5a45;
  --hq-primary-deep: #153f30;
  --hq-primary-soft: #4f7a69;
  --hq-primary-wash: #e1ede6;
  --hq-on-primary: #ffffff;

  /* Тёплый акцент «очага»: отметки готовых шагов и «заявка принята». */
  --hq-ember: #b8721f;
  --hq-ember-wash: #f7ead6;

  --hq-line: #dcd6c8;
  --hq-line-strong: #bdb5a2;
  --hq-text: #24231f;
  --hq-muted: #6d6a60;
  --hq-error: #a23a2c;
  --hq-error-bg: #f6e2dc;

  --hq-radius: 16px;
  --hq-radius-sm: 10px;
  --hq-shadow: 0 1px 2px rgba(21, 63, 48, 0.06);
  --hq-shadow-card: 0 1px 2px rgba(21, 63, 48, 0.06), 0 16px 34px -22px rgba(21, 63, 48, 0.4);

  --hq-font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --hq-font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.hq-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hq-bg);
  background-image: linear-gradient(180deg, var(--hq-bg-deep) 0, var(--hq-bg) 240px);
  color: var(--hq-text);
  font-family: var(--hq-font-body);
  font-size: 15px;
  line-height: 1.5;
}

.hq-app *,
.hq-app *::before,
.hq-app *::after {
  box-sizing: border-box;
}

/* ---------- Topbar ---------- */

.hq-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--hq-surface);
  border-bottom: 1px solid var(--hq-line);
}

.hq-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--hq-font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--hq-primary-deep);
  text-decoration: none;
}

.hq-brand__mark {
  width: 26px;
  height: 26px;
}

.hq-topbar__pill {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--hq-primary);
  background: var(--hq-primary-wash);
  border-radius: 999px;
  padding: 5px 11px;
  text-align: center;
}

/* ---------- Main / card ---------- */

.hq-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 48px;
}

.hq-card {
  width: 100%;
  max-width: 600px;
  background: var(--hq-surface);
  border: 1px solid var(--hq-line);
  border-radius: var(--hq-radius);
  box-shadow: var(--hq-shadow-card);
  padding: 30px 28px 26px;
}

.hq-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hq-primary-soft);
}

.hq-title {
  margin: 0 0 8px;
  font-family: var(--hq-font-head);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: var(--hq-primary-deep);
}

.hq-subtitle {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--hq-muted);
}

.hq-error {
  margin: 14px 0 0;
  padding: 9px 12px;
  border: 1px solid var(--hq-error);
  border-radius: var(--hq-radius-sm);
  background: var(--hq-error-bg);
  color: var(--hq-error);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Buttons ---------- */

.hq-btn {
  font-family: var(--hq-font-body);
  font-weight: 800;
  font-size: 16px;
  border-radius: var(--hq-radius-sm);
  padding: 13px 22px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
}
.hq-btn:active {
  transform: translateY(1px);
}
.hq-btn--primary {
  background: var(--hq-primary);
  border-color: var(--hq-primary-deep);
  color: var(--hq-on-primary);
}
.hq-btn--primary:hover {
  background: var(--hq-primary-deep);
}
.hq-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.hq-btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ---------- Loading ---------- */

.hq-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 0;
  color: var(--hq-muted);
  font-size: 14px;
}

.hq-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--hq-line);
  border-top-color: var(--hq-primary);
  animation: hq-spin 800ms linear infinite;
}

@keyframes hq-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Наше согласие на связь ---------- */

.hq-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--hq-text);
  cursor: pointer;
}
.hq-consent-check input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--hq-primary);
}

.hq-consent-text {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--hq-line);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--hq-muted);
}
.hq-consent-text p {
  margin: 0 0 8px;
}
.hq-consent-text a {
  color: var(--hq-primary-soft);
}

/* ---------- Secure note ---------- */

.hq-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  font-size: 12.5px;
  color: var(--hq-muted);
}
.hq-secure__icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* ---------- Footer ---------- */

.hq-footer {
  background: var(--hq-bg-deep);
  border-top: 1px solid var(--hq-line);
}

.hq-footer__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 32px;
}

.hq-footer__brand {
  font-family: var(--hq-font-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--hq-primary-deep);
  margin-bottom: 10px;
}

.hq-footer__disclaimer {
  margin: 0 0 16px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--hq-muted);
}

.hq-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 12px;
}
.hq-footer__links a {
  font-size: 12px;
  font-weight: 700;
  color: var(--hq-primary-soft);
  text-decoration: none;
}
.hq-footer__links a:hover {
  text-decoration: underline;
}

.hq-footer__copy {
  margin: 0;
  font-size: 11px;
  color: var(--hq-muted);
}

@media (max-width: 480px) {
  .hq-card {
    padding: 22px 18px 20px;
  }
  .hq-title {
    font-size: 23px;
  }
}
