/* ============ Палитра и база ============ */
:root {
  --cream: #faf8f5;
  --cream-2: #f3efe8;
  --ink: #2c2420;
  --ink-soft: #5f544c;
  --gold: #b8860b;
  --gold-soft: #d9b45c;
  --terracotta: #c96f4a;
  --line: #e7e0d5;
  --white: #fffdf9;
  --ok: #2f7d55;
  --err: #b4432e;
  --radius: 18px;
  --shadow: 0 18px 40px -24px rgba(44, 36, 32, 0.35);
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.3rem; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--terracotta); }

.container {
  width: min(1140px, 100% - 40px);
  margin-inline: auto;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-body);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--terracotta), var(--gold));
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(201, 111, 74, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; }

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ============ Шапка ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}
.logo span { color: var(--gold); }
.logo:hover { color: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--gold); }

.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream) !important;
}
.nav-cta:hover { background: var(--gold); }

.header-burger-cta {
  display: none;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Иконка входа в кабинет (шапка) --- */
.header-account {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.header-account:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.header-inner .nav + .header-account { margin-left: auto; }
@media (min-width: 861px) {
  .header-inner .header-account { margin-left: 18px; }
}

/* --- Маленькое окно входа --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 36, 32, 0.55);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: min(400px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 28px 24px;
  box-shadow: 0 30px 70px -30px rgba(44, 36, 32, 0.6);
  animation: modal-in 0.22s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.modal-sub { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 18px; }

.modal-card form { display: grid; gap: 16px; }
.modal-card .btn-submit { width: 100%; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 50%;
}
.modal-close:hover { color: var(--terracotta); background: var(--cream-2); }

.modal-card .form-note { margin-top: 14px; }
.modal-card code {
  background: var(--cream-2);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--terracotta);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: clamp(60px, 10vw, 130px) 0 clamp(50px, 8vw, 100px);
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(184, 134, 11, 0.16), transparent 60%),
    radial-gradient(700px 400px at -10% 20%, rgba(201, 111, 74, 0.14), transparent 60%),
    var(--cream);
}

.hero-inner { max-width: 820px; }

.hero h1 { margin-bottom: 0.4em; }

.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  margin: 0 0 34px;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.hero-facts li { display: flex; flex-direction: column; gap: 2px; }
.hero-facts strong {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold);
}
.hero-facts span { font-size: 0.9rem; color: var(--ink-soft); }

/* ============ Секции ============ */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-alt { background: var(--cream-2); }

.section-head {
  max-width: 680px;
  margin: 0 auto clamp(34px, 5vw, 56px);
  text-align: center;
}
.section-sub { color: var(--ink-soft); margin: 0; }

/* ============ Карточки услуг ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold-soft); }

.card-icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.14), rgba(201, 111, 74, 0.14));
  margin-bottom: 18px;
}

.card p { color: var(--ink-soft); font-size: 0.98rem; margin: 0 0 18px; }

.card-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(184, 134, 11, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ============ Шаги ============ */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 26px 30px;
  box-shadow: var(--shadow);
}
.step p { color: var(--ink-soft); font-size: 0.98rem; margin: 0; }

.step-num {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 16px;
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--terracotta), var(--gold));
}

/* ============ Отзывы ============ */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.review {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.review blockquote {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink);
}
.review figcaption { display: flex; flex-direction: column; gap: 2px; }
.review figcaption strong { font-size: 0.98rem; }
.review figcaption span { font-size: 0.85rem; color: var(--ink-soft); }

/* ============ Форма ============ */
.section-form {
  background:
    radial-gradient(700px 380px at 100% 0%, rgba(184, 134, 11, 0.12), transparent 60%),
    var(--cream-2);
}

.form-wrap { max-width: 760px; }

.lead-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}
.req { color: var(--terracotta); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: 500 1rem/1.4 var(--font-body);
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%23b8860b' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}

.field textarea { resize: vertical; min-height: 110px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.15);
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: var(--err);
}

.error {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--err);
  min-height: 0;
}
.error:empty { display: none; }

/* Кнопка отправки */
.btn-submit {
  width: 100%;
  padding: 18px 30px;
  font-size: 1.05rem;
  position: relative;
}
.btn-submit[disabled] { opacity: 0.75; cursor: progress; }

.btn-loader {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-submit.is-loading .btn-loader { display: inline-block; }
.btn-submit.is-loading .btn-label { opacity: 0.9; }

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

.form-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Алерты */
.form-alert {
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 0.98rem;
  text-align: center;
}
.form-alert[hidden] { display: none; }

.form-alert-success {
  background: rgba(47, 125, 85, 0.1);
  border: 1.5px solid rgba(47, 125, 85, 0.4);
  color: var(--ok);
}

.form-alert-error {
  background: rgba(180, 67, 46, 0.08);
  border: 1.5px solid rgba(180, 67, 46, 0.4);
  color: var(--err);
}

/* ============ Футер ============ */
.site-footer {
  background: var(--ink);
  color: #d8d0c6;
  padding: 60px 0 28px;
}
.site-footer a { color: #e9e2d7; }
.site-footer a:hover { color: var(--gold-soft); }

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.logo-footer { color: var(--cream); display: inline-block; margin-bottom: 12px; }
.logo-footer span { color: var(--gold-soft); }

.footer-col p { margin: 0; font-size: 0.95rem; color: #b9b0a4; max-width: 34ch; }

.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 16px;
}

.footer-contacts, .footer-nav {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.98rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  font-size: 0.85rem;
  color: #9a9186;
}

/* ============ Адаптив ============ */
@media (max-width: 860px) {
  .nav { display: none; }
  .header-burger-cta { display: inline-block; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .hero-actions .btn { width: 100%; }

  .hero-facts { grid-template-columns: 1fr; gap: 14px; text-align: left; }

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

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }

  .footer-bottom { justify-content: flex-start; }

  /* Увеличиваем тап-таргеты и шрифт полей для телефона */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px; /* предотвращает зум на iOS */
    padding: 16px;
  }

  .btn { padding: 17px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
