/* Voronin Loft: https://voronin-loft.ru/ */

/* Circe — основной текст */
@font-face {
  font-family: "Circe";
  src: url("/fonts/circe-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Circe";
  src: url("/fonts/circe-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Circe";
  src: url("/fonts/circe-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Circe";
  src: url("/fonts/circe-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Voronin — как на сайте: Manrope (лёгкие) + TT Ramillas (акцент) */
@font-face {
  font-family: "Voronin";
  src: url("/fonts/manrope-semibold.woff") format("woff");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Voronin";
  src: url("/fonts/manrope-medium.woff") format("woff");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Voronin";
  src: url("/fonts/manrope-regular.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Voronin";
  src: url("/fonts/ramillas-it.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Voronin";
  src: url("/fonts/ramillas-light.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Voronin";
  src: url("/fonts/ramillas-extrabold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Voronin";
  src: url("/fonts/ramillas-extrabold2.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f2f0;
  --bg-soft: #fbfbf9;
  --bg-warm: #f0ece3;
  --ink: #222222;
  --ink-muted: #6f6f6f;
  --line: #d1d1d1;
  --burgundy: #802b2b;
  --burgundy-deep: #541818;
  --wine: #341412;
  --wine-near-black: #0f0404;
  --teal: #41949c;
  --teal-soft: #9cd4d9;
  --teal-mist: #d9e7e6;
  --white: #ffffff;
  --danger: #eb5151;
  --radius-card: 30px;
  --radius-field: 100px;
  --radius-choice: 30px;
  --radius-pill: 1000px;
  --font: "Circe", Arial, sans-serif;
  --font-display: "Voronin", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 50px rgba(52, 20, 18, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--burgundy);
}

.brief-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(128, 43, 43, 0.12);
  background: rgba(251, 251, 249, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--wine);
}

.brand__mark {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.brand__sub {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.brief-header__meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: right;
}

.brief-main {
  flex: 1;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.progress {
  margin-bottom: 1.5rem;
}

.progress__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.progress__label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.progress__count {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.progress__track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(128, 43, 43, 0.12);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--burgundy), var(--teal));
  transition: width 0.45s var(--ease);
}

.brief-card {
  background: var(--bg-soft);
  border: 1px solid rgba(52, 20, 18, 0.08);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.step {
  display: none;
  animation: stepIn 0.45s var(--ease);
}

.step.is-active {
  display: block;
}

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

.step__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.step__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--wine);
}

.step__lead {
  margin: 0 0 1.75rem;
  font-weight: 300;
  color: var(--ink-muted);
  max-width: 38ch;
}

.field-grid {
  display: grid;
  gap: 1rem;
}

.field-grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .field-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label,
.field__label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.field__hint {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-field);
  padding: 0.9rem 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  border-radius: 24px;
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(128, 43, 43, 0.12);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea,
.choice-grid.is-invalid .choice {
  border-color: var(--danger);
}

.field__error {
  display: none;
  font-size: 0.8rem;
  color: var(--danger);
}

.field.is-invalid .field__error,
.choice-grid.is-invalid + .field__error {
  display: block;
}

.choice-grid {
  display: grid;
  gap: 0.75rem;
}

.choice-grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .choice-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.choice {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-choice);
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}

.choice:hover {
  border-color: rgba(128, 43, 43, 0.45);
  transform: translateY(-1px);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--wine);
  margin-bottom: 0.2rem;
}

.choice__desc {
  display: block;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-muted);
}

.choice:has(input:checked) {
  border-color: var(--burgundy);
  background: linear-gradient(135deg, rgba(128, 43, 43, 0.06), rgba(65, 148, 156, 0.08));
  box-shadow: inset 0 0 0 1px var(--burgundy);
}

.level-cards .choice__desc strong {
  color: var(--burgundy);
  font-weight: 600;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(52, 20, 18, 0.08);
}

.step-nav__spacer {
  flex: 1;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* .btn перекрывал HTML-атрибут hidden — без этого submit светился на всех шагах */
.btn[hidden],
[hidden] {
  display: none !important;
}

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

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--burgundy);
  color: var(--white);
}

.btn--primary:not(:disabled):hover {
  background: var(--burgundy-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--wine);
  border: 1px solid rgba(52, 20, 18, 0.2);
}

.btn--ghost:not(:disabled):hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

.btn--submit {
  width: 100%;
  margin-top: 1.5rem;
  min-height: 56px;
  font-size: 1.05rem;
}

.brief-footer {
  padding: 1.25rem 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-muted);
}

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-muted);
}

.consent input {
  margin-top: 0.25rem;
  accent-color: var(--burgundy);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-status {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-choice);
  background: rgba(235, 81, 81, 0.08);
  border: 1px solid rgba(235, 81, 81, 0.25);
  color: var(--burgundy-deep);
  font-size: 0.9rem;
}

.form-status.is-visible {
  display: block;
}

.thanks {
  text-align: left;
}

.thanks__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(65, 148, 156, 0.35);
  background: var(--teal-mist);
  display: grid;
  place-items: center;
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
