/* ============================================================
   Главный Герой — стили
   Порядок: токены → база → утилиты → блоки → адаптив → движение
   ============================================================ */

/* ── Токены ───────────────────────────────────────────────── */
:root {
  --paper:       #F6EEE1;
  --paper-2:     #EFE5D4;
  --card:        #FFFBF3;
  --ink:         #221C17;
  --ink-soft:    #5A4F45;
  --terracotta:  #D9522F;   /* акцент: крупный текст, графика */
  --terracotta-d:#B53F20;   /* кнопки и мелкий текст: 5.3:1 на креме */
  --terracotta-x:#96331A;   /* наведение */
  --mustard:     #EFA52F;
  --rose:        #E88AA5;
  --sage:        #6E9268;
  --indigo:      #4C5FA6;

  --line:        rgba(34, 28, 23, .16);
  --shadow-sm:   0 2px 0 rgba(34, 28, 23, .10);
  --shadow-md:   0 10px 30px -18px rgba(34, 28, 23, .55);
  --shadow-lg:   0 24px 60px -30px rgba(34, 28, 23, .6);

  --wrap:        1120px;
  --radius:      18px;
  --radius-sm:   12px;

  --font-display: "Yeseva One", Georgia, serif;
  --font-body:    "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand:    "Caveat", "Segoe Script", cursive;

  --z-thread: 2;
  --z-header: 30;
  --z-modal:  50;
}

/* ── База ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  position: relative;
  /* clip, а не hidden: hidden сделал бы body полосой прокрутки
     и сломал sticky-шапку */
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta-d); }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 10px 10px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; color: var(--paper); }

/* ── Утилиты ──────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}
.wrap--narrow { max-width: 760px; }
.wrap--wide   { max-width: 1340px; }

.section {
  position: relative;
  padding-block: clamp(60px, 8.5vw, 116px);
}
.section--paper { background: var(--paper-2); }

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-hand);
  font-size: 26px;
  line-height: 1;
  color: var(--terracotta);
}

.section__title {
  max-width: 20ch;
  font-size: clamp(30px, 4.4vw, 48px);
  margin-bottom: clamp(28px, 4vw, 48px);
}

.handwritten {
  font-family: var(--font-hand);
  font-size: 27px;
  line-height: 1.35;
  color: var(--terracotta);
}

/* ── Кнопки ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 30px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease,
              border-color .2s ease, box-shadow .2s ease;
}
.btn--primary {
  background: var(--terracotta-d);
  border-color: var(--terracotta-d);
  color: #FFF6EA;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--terracotta-x); border-color: var(--terracotta-x); color: #FFF6EA; }

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

.btn--sm  { min-height: 44px; padding: 10px 22px; font-size: 16px; }
.btn--lg  { min-height: 58px; padding: 17px 40px; font-size: 18px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ── Нить истории ─────────────────────────────────────────── */
.thread {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(48px, 6vw, 104px);
  height: 100%;
  z-index: var(--z-thread);
  pointer-events: none;
  opacity: .6;
}
.thread__path {
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 1279px) { .thread { display: none; } }

/* ── Шапка ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  padding: 12px clamp(12px, 3vw, 24px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -22px rgba(34, 28, 23, .8);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--wrap);
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding-block: 6px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}
.logo__mark {
  width: 34px;
  height: 34px;
  flex: none;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linejoin: round;
}
.logo__mark .logo__star { fill: var(--mustard); stroke: none; }
.logo__text {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
}
.nav__link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.nav__link:hover { color: var(--terracotta-d); border-bottom-color: var(--terracotta-d); }

.burger {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  place-items: center;
  align-content: center;
  gap: 6px;
}
.burger__line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] .burger__line:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__line:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* ── Герой ────────────────────────────────────────────────── */
.hero {
  /* Ширина книги задана здесь одной переменной — нижний отступ считается
     от неё же (высота книги + запас), поэтому книге всегда хватает места
     и её не обрезает overflow, на любой ширине экрана. */
  --book-w: clamp(200px, 30vw, 380px);
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) calc(var(--book-w) / 1.339 + 40px);
  text-align: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero__bg svg { width: 100%; height: 100%; }

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}
.hero__eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 7px 18px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}
.hero__title {
  font-size: clamp(38px, 7.2vw, 82px);
  line-height: 1.02;
  margin-bottom: 22px;
  text-shadow: 0 2px 0 var(--paper), 0 0 22px var(--paper);
}
.hero__title-line   { display: block; }
.hero__title-accent {
  display: block;
  color: var(--terracotta);
  text-shadow: 0 2px 0 var(--paper), 0 0 22px var(--paper);
}
.hero__lead {
  max-width: 30rem;
  margin: 0 auto 30px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-soft);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.hero__note {
  margin: 22px 0 0;
  font-family: var(--font-hand);
  font-size: 25px;
  color: var(--ink-soft);
}

.hero__book {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: var(--book-w);
  aspect-ratio: 2400 / 1792;   /* без этого блок схлопнется, когда SVG-заглушку сменит картинка */
  transform: translateX(-50%);
  pointer-events: none;
}
.hero__book svg { width: 100%; height: 100%; }

/* Персонажи по краям первого экрана. Появляются только когда
   картинки лежат в assets/img — пустых блоков без них не остаётся. */
.hero__kid,
.hero__toys {
  position: absolute;
  bottom: 0;
  z-index: 1;
  width: clamp(150px, 17vw, 260px);
  aspect-ratio: 1792 / 2400;
  pointer-events: none;
}
.hero__kid  { left: clamp(4px, 3vw, 60px); }
.hero__toys { right: clamp(4px, 3vw, 60px); bottom: 8%; width: clamp(120px, 13vw, 200px); }

@media (max-width: 900px) {
  .hero__kid, .hero__toys { display: none; }
}
.book__page {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}
.book__spine { stroke: var(--ink); stroke-width: 3; fill: none; }
.book__line  { stroke: var(--line); stroke-width: 4; stroke-linecap: round; fill: none; }

/* ── Рваный край ──────────────────────────────────────────── */
.torn {
  position: relative;
  z-index: 1;
  height: 44px;
  margin-top: -1px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 14C60 3 92 24 152 13S252 0 320 15 430 27 500 13 620 1 700 15 810 25 880 13 990 3 1060 15 1150 25 1200 13V40H0Z' fill='%23EFE5D4'/%3E%3C/svg%3E")
    repeat-x bottom / 1200px 40px;
}
.torn + .section--paper { padding-top: clamp(30px, 4vw, 56px); }

/* ── Полароиды ────────────────────────────────────────────── */
.themes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(262px, 1fr));
  gap: clamp(18px, 2vw, 28px);
}
.polaroid {
  padding: 14px 14px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .25s ease, box-shadow .25s ease;
}
.polaroid:hover { transform: rotate(0deg); box-shadow: var(--shadow-lg); }

/* У сгенерированных картинок своя бумажная рамка со скотчем,
   поэтому вторую рамку из CSS убираем. */
.polaroid:has(.polaroid__photo.has-art) {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}
.polaroid:has(.polaroid__photo.has-art):hover { box-shadow: none; }

.polaroid__photo {
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-2);
  aspect-ratio: 1 / 1;
}
.polaroid__photo.has-art {
  background-color: transparent;
  border-radius: 0;
  overflow: visible;
  aspect-ratio: 720 / 696;   /* пропорции обрезанного полароида */
}
.polaroid__photo svg,
.polaroid__photo img { width: 100%; height: 100%; object-fit: cover; }
.polaroid__caption {
  margin: 16px 0 4px;
  font-family: var(--font-hand);
  font-size: 27px;
  line-height: 1.1;
  color: var(--terracotta);
}
.polaroid__text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ── Карточки преимуществ ─────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}
.card {
  padding: clamp(24px, 2.6vw, 32px);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card__icon {
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.card p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
}

/* ── Вы выбираете сами ────────────────────────────────────── */
.section--choose { background: var(--ink); color: var(--paper); }
.section--choose .eyebrow { color: var(--mustard); }
.section--choose .handwritten { color: var(--mustard); }

.choose {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.choose__text p { max-width: 46ch; color: rgba(246, 238, 225, .82); }
.choose__text .handwritten { margin-top: 26px; }
.choose__text .section__title { color: var(--paper); margin-bottom: 24px; }

.choose__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 60px;
}
.chip {
  padding: 10px 20px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: var(--shadow-sm);
}
.chip:nth-child(3n)   { background: var(--mustard); }
.chip:nth-child(4n+2) { background: var(--rose); }

/* ── Шаги ─────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(22px, 3vw, 36px);
  counter-reset: step;
}
.step { position: relative; padding-top: 14px; border-top: 2px solid var(--ink); }
.step__num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--terracotta);
}
.step__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.step p { margin: 0; font-size: 16px; color: var(--ink-soft); }

/* ── Тарифы ───────────────────────────────────────────────── */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(20px, 2.6vw, 30px);
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: clamp(26px, 3vw, 36px);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.plan:hover { box-shadow: var(--shadow-md); }
.plan--featured {
  border-color: var(--terracotta);
  border-width: 3px;
  box-shadow: var(--shadow-md);
}
.plan__badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 5px 18px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.plan__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0;
  margin-bottom: 4px;
}
.plan__price {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
  color: var(--terracotta);
}
.plan__price span { font-size: 26px; }
.plan__desc {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.plan__list {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 16px;
}
.plan__list li {
  position: relative;
  padding-left: 28px;
  line-height: 1.45;
}
.plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 17px;
  height: 17px;
  background: var(--sage);
  border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8.6l3.4 3.4L14 3.4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8.6l3.4 3.4L14 3.4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.plan .btn { margin-top: auto; }
.plans__note {
  margin: clamp(26px, 3vw, 36px) 0 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 25px;
  color: var(--ink-soft);
}

/* ── Форма ────────────────────────────────────────────────── */
.order {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  background: var(--card) url("../assets/img/paper-texture.jpg") center / cover;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.order__flowers {
  position: absolute;
  right: -20px;
  bottom: -14px;
  width: min(340px, 42%);
  aspect-ratio: 2592 / 1664;
  opacity: .75;
  pointer-events: none;
}
.order__head { position: relative; z-index: 1; }
.order__head .section__title { margin-bottom: 10px; }
.order__lead {
  max-width: 46ch;
  margin-bottom: clamp(24px, 3vw, 36px);
  color: var(--ink-soft);
}

.form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--wide { grid-column: 1 / -1; }

.field__label {
  font-size: 15px;
  font-weight: 600;
}
.field__hint {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 14px;
}
.req { color: var(--terracotta); }

.field__input {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease, background-color .2s ease;
}
.field__input::placeholder { color: rgba(90, 79, 69, .68); }
.field__input:hover { border-color: rgba(34, 28, 23, .3); }
.field__input:focus { border-color: var(--indigo); background: #FFF; outline-offset: 1px; }
.field__textarea { min-height: 118px; resize: vertical; line-height: 1.5; }
.field__select {
  cursor: pointer;
  appearance: none;
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23221C17' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px;
}
.field.has-error .field__input { border-color: var(--terracotta); background: #FDF1EC; }
.field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--terracotta-d);
}
.field__error::before { content: "!"; display: grid; place-items: center; width: 18px; height: 18px; flex: none; background: var(--terracotta); color: #FFF6EA; border-radius: 50%; font-size: 13px; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 15.5px;
  line-height: 1.5;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  flex: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  transition: background-color .2s ease;
}
.check__box svg { width: 15px; fill: none; stroke: #FFF6EA; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check input:checked + .check__box { background: var(--sage); border-color: var(--sage); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 3px solid var(--indigo); outline-offset: 3px; }
.field.has-error .check__box { border-color: var(--terracotta); }

.form__submit {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.form__status { margin: 0; font-size: 15.5px; font-weight: 600; }
.form__status.is-error { color: var(--terracotta-d); }

/* ── Вопросы ──────────────────────────────────────────────── */
.faq { border-top: 2px solid var(--ink); }
.faq__item { border-bottom: 2px solid var(--ink); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  width: 22px;
  height: 22px;
  flex: none;
  background: var(--terracotta);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__q:hover { color: var(--terracotta-d); }
.faq__a { padding-bottom: 20px; max-width: 62ch; color: var(--ink-soft); }

/* ── Подвал ───────────────────────────────────────────────── */
.site-footer {
  padding-block: clamp(36px, 5vw, 60px);
  background: var(--ink);
  color: var(--paper);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
  justify-content: space-between;
}
.site-footer__logo {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
}
.site-footer__tag { margin: 0; font-size: 15.5px; color: rgba(246, 238, 225, .7); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 2px 26px; }
.site-footer__links a { color: var(--paper); font-size: 15.5px; padding-block: 11px; }
.site-footer__links a:hover { color: var(--mustard); }

/* ── Модалка ──────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 28, 23, .55);
  backdrop-filter: blur(3px);
  animation: fade .2s ease;
}
.modal__card {
  position: relative;
  width: min(460px, 100%);
  padding: clamp(30px, 4vw, 44px) clamp(24px, 4vw, 40px);
  text-align: center;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.2);
}
.modal__art { width: 130px; margin: 0 auto 18px; }
.modal__page { fill: var(--paper); stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.modal__spine { stroke: var(--ink); stroke-width: 2.4; fill: none; }
.modal__title { font-size: clamp(26px, 4vw, 32px); margin-bottom: 12px; }
.modal__text { margin-bottom: 8px; color: var(--ink-soft); }
.modal__text--muted { font-family: var(--font-hand); font-size: 22px; margin-bottom: 24px; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop  { from { opacity: 0; transform: translateY(14px) scale(.96) } to { opacity: 1; transform: none } }

/* ── Подмена SVG-заглушек на картинки ─────────────────────── */
/* Саму картинку подставляет js/main.js прямо в style элемента.
   Здесь — только как её показывать. */
[data-art].has-art > svg { display: none; }
[data-art].has-art {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.hero__bg.has-art { background-size: cover; }
.torn.has-art { background-size: 100% 100%; }
.order__flowers.has-art { background-position: right bottom; }
.hero__title.has-art {
  aspect-ratio: 3488 / 1216;   /* пропорции рисованного заголовка */
  max-width: 820px;
  margin-inline: auto;
  background-size: contain;
}
.hero__title.has-art .hero__title-line,
.hero__title.has-art .hero__title-accent {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .choose { grid-template-columns: 1fr; }
  .choose__chips { padding-top: 8px; }
}

@media (max-width: 860px) {
  .burger { display: grid; }
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: clamp(12px, 3vw, 24px);
    right: clamp(12px, 3vw, 24px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    background: var(--card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .nav:not(.is-open) { display: none; }
  .nav__link { padding: 12px 8px; border-bottom: none; border-radius: 10px; }
  .nav__link:hover { background: var(--paper-2); }
  .nav .btn { margin-top: 8px; }

  .form { grid-template-columns: 1fr; }
  .section__title { max-width: none; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .hero__actions .btn { width: 100%; }
}

/* ── Появление блоков ─────────────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── Живой фон героя ──────────────────────────────────────── */
.ribbon { transform-origin: center; animation: sway 9s ease-in-out infinite; }
.ribbon--2 { animation-duration: 11s; animation-delay: -1.5s; }
.ribbon--3 { animation-duration: 13s; animation-delay: -3s; }
.ribbon--4 { animation-duration: 10s; animation-delay: -4.5s; }
.ribbon--5 { animation-duration: 12s; animation-delay: -2s; }
@keyframes sway {
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(-14px) }
}

.spark { animation: twinkle 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sparks .spark:nth-child(2) { animation-delay: -.8s }
.sparks .spark:nth-child(3) { animation-delay: -1.6s }
.sparks .spark:nth-child(4) { animation-delay: -2.4s }
.sparks .spark:nth-child(5) { animation-delay: -3.2s }
.sparks .spark:nth-child(6) { animation-delay: -1.2s }
@keyframes twinkle {
  0%, 100% { opacity: .35; transform: scale(.8) }
  50%      { opacity: 1;   transform: scale(1.1) }
}

.book__flow path { animation: float 6s ease-in-out infinite; }
.book__flow path:nth-child(2) { animation-delay: -2s }
.book__flow path:nth-child(3) { animation-delay: -4s }
@keyframes float {
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(-8px) }
}

/* ── Меньше движения ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .polaroid:hover { transform: rotate(var(--tilt, 0deg)); }
}
