/* ==========================================================================
   ПИОН — цветочная мастерская
   Палитра: слоновая кость, тёмная зелень, пыльная роза
   Шрифты: Prata (заголовки) + Golos Text (текст), локально
   ========================================================================== */

:root {
  --ivory: #faf7f2;
  --ivory-2: #f0e9df;
  --ink: #1c1b18;
  --ink-soft: #5f5a52;
  --green: #22372c;
  --green-2: #2e4738;
  --rose: #b97f79;
  --gold: #b08a4f;

  --display: 'Prata', 'Times New Roman', serif;
  --text: 'Golos Text', -apple-system, 'Segoe UI', sans-serif;

  --pad: clamp(20px, 5vw, 68px);
  --max: 1240px;
  --hair: rgba(28, 27, 24, 0.14);
  --ease: cubic-bezier(0.22, 0.68, 0.26, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(15px, 1.02vw, 17px);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, blockquote, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--rose); color: #fff; }

section[id] { scroll-margin-top: 84px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: var(--ivory);
  padding: 12px 18px; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  background: var(--green);
  color: var(--ivory);
  border: 1px solid var(--green);
  font-family: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.3s var(--ease);
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--rose);
  transform: translateY(101%);
  transition: transform 0.42s var(--ease);
  z-index: -1;
}
.btn:hover::after { transform: translateY(0); }
.btn--small { padding: 10px 18px; font-size: 11px; }
.btn--wide { width: 100%; }
.btn--light {
  background: var(--ivory);
  color: var(--green);
  border-color: var(--ivory);
}
.btn--light::after { background: var(--rose); }
.btn--light:hover { color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost::after { background: var(--ink); }
.btn--ghost:hover { color: var(--ivory); }

.link {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
  transition: color 0.25s, border-color 0.25s;
}
.link:hover { color: var(--rose); border-color: var(--rose); }

/* ---------- шапка ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px var(--pad);
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { width: 26px; height: 26px; color: var(--rose); flex: none; }
.logo__text {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; }
.nav a { position: relative; padding: 4px 0; color: var(--ink-soft); transition: color 0.25s; }
.nav a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.top__phone { font-size: 14px; font-weight: 500; white-space: nowrap; }
.top__phone:hover { color: var(--rose); }

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute; left: 12px;
  width: 18px; height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 24px; }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* ---------- герой ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding: clamp(30px, 4vw, 56px) var(--pad) clamp(36px, 4vw, 64px);
}
.hero__text { max-width: 620px; }

.kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 24px;
}
.kicker--light { color: rgba(250, 247, 242, 0.7); }

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(42px, 6.4vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--rose); }

.hero__lead {
  margin-top: 26px;
  max-width: 42ch;
  color: var(--ink-soft);
}
.hero__row { display: flex; align-items: center; gap: 24px; margin-top: 32px; flex-wrap: wrap; }

.hero__media {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  isolation: isolate;
}
.hero__media img {
  width: 100%;
  height: clamp(380px, 52vw, 620px);
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 20px;
}

/* затемнение снизу — чтобы подпись читалась поверх фотографии */
.hero__media::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48%;
  background: linear-gradient(to top, rgba(22, 18, 15, 0.88), rgba(22, 18, 15, 0.28) 45%, rgba(22, 18, 15, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero__media figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 24px 26px;
  background: transparent;
  color: #fff;
}
.hero__label {
  font-family: var(--display);
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.hero__price {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  opacity: 0.95;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* ---------- строка ---------- */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: center;
  padding: 14px var(--pad);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.strip span:nth-child(even) { color: var(--rose); }

/* ---------- секции ---------- */
.section { padding: clamp(52px, 7vw, 104px) var(--pad); }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section__head {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: clamp(18px, 4vw, 56px);
  align-items: end;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(28px, 3.5vw, 48px);
}
.section__head .kicker { grid-column: 1 / -1; margin-bottom: 6px; }
.section h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.section__note { font-size: 13px; line-height: 1.6; color: var(--ink-soft); max-width: 40ch; }

/* ---------- карточки ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 32px);
}
.card { display: flex; flex-direction: column; gap: 6px; }
.card__image { position: relative; overflow: hidden; margin-bottom: 16px; }
.card__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.card:nth-child(2) .card__image img { aspect-ratio: 4 / 4.2; }
.card:hover .card__image img { transform: scale(1.04); }
.card__tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 10px;
  background: var(--rose);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.card h3 {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
}
.card__comp { font-size: 13px; color: var(--ink-soft); }
.card__price { margin-top: 6px; font-weight: 600; font-size: 15px; }

/* ---------- категории ---------- */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 clamp(26px, 3.4vw, 40px);
}

.cat {
  appearance: none;
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cat:hover { border-color: var(--ink); }
.cat:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.cat[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--ivory);
}

/* плавное появление отфильтрованных карточек */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.card.is-in { animation: cardIn 0.42s var(--ease) both; }
.card[hidden] { display: none; }

.cards__note {
  margin: clamp(26px, 3vw, 38px) 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- по бюджету ---------- */
.budget { background: var(--green); color: var(--ivory); padding: clamp(52px, 7vw, 100px) var(--pad); }
.budget__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.budget h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}
.budget__text p:not(.kicker) { margin-top: 20px; max-width: 42ch; color: rgba(250, 247, 242, 0.72); }

.budget__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip {
  padding: 12px 20px;
  background: transparent;
  border: 1px solid rgba(250, 247, 242, 0.35);
  color: var(--ivory);
  font-family: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover { border-color: var(--ivory); }
.chip.is-active {
  background: var(--ivory);
  color: var(--green);
  border-color: var(--ivory);
}

.budget__card {
  background: var(--green-2);
  border: 1px solid rgba(250, 247, 242, 0.18);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.budget__amount {
  font-family: var(--display);
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1;
  color: var(--rose);
}
.budget__name { font-family: var(--display); font-size: 24px; font-weight: 400; }
.budget__comp { font-size: 13px; color: rgba(250, 247, 242, 0.7); }
.budget__note {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(250, 247, 242, 0.55);
  margin-bottom: 12px;
}

/* ---------- шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.step { background: var(--ivory); padding: clamp(22px, 2.6vw, 36px); display: grid; gap: 10px; align-content: start; }
.step__num {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  color: var(--rose);
}
.step h3 { font-family: var(--display); font-size: 20px; font-weight: 400; }
.step p { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- отзывы ---------- */
.reviews { background: var(--ivory-2); }
.reviews__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 32px); }
.review { display: flex; flex-direction: column; gap: 18px; }
.review p {
  font-family: var(--display);
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.38;
}
.review footer { font-size: 12px; letter-spacing: 0.05em; color: var(--ink-soft); }
.review footer span { color: var(--rose); }

/* ---------- контакты ---------- */
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
}
.contacts__text { margin-top: 18px; max-width: 40ch; color: var(--ink-soft); }
.contacts__list { margin-top: 30px; display: grid; }
.contacts__list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14px;
}
.contacts__list dt { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); padding-top: 3px; }
.contacts__list dd span { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-soft); }
.contacts__list a:hover { color: var(--rose); }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.field input,
.field select {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  transition: border-color 0.25s;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% + 2px), calc(100% - 6px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 26px;
  cursor: pointer;
}
.field input::placeholder { color: rgba(28, 27, 24, 0.35); }
.field input:focus,
.field select:focus { outline: none; border-color: var(--rose); }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--ink-soft); cursor: pointer; }
.check input {
  appearance: none;
  width: 17px; height: 17px;
  margin: 2px 0 0;
  flex: none;
  border: 1px solid var(--ink);
  position: relative;
  cursor: pointer;
}
.check input:checked { background: var(--green); border-color: var(--green); }
.check input:checked::after {
  content: '';
  position: absolute; left: 5px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--ivory);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.check a { color: var(--ink); border-bottom: 1px solid var(--rose); }
.form__status { font-size: 13px; min-height: 20px; }
.form__status.is-error { color: #a33; }

/* ---------- подвал ---------- */
.footer { background: var(--green); color: var(--ivory); padding: clamp(34px, 4vw, 54px) var(--pad) 26px; }
.footer__row {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(250, 247, 242, 0.18);
}
.footer__logo { font-family: var(--display); font-size: 28px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-left: auto; font-size: 13px; }
.footer__nav a { color: rgba(250, 247, 242, 0.7); }
.footer__nav a:hover { color: var(--rose); }
.footer__up { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rose); }
.footer__legal {
  max-width: var(--max);
  margin: 18px auto 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(250, 247, 242, 0.45);
}
.footer__legal a { color: rgba(250, 247, 242, 0.75); border-bottom: 1px solid rgba(250, 247, 242, 0.3); }

/* ---------- cookie ---------- */
.cookie {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: min(560px, calc(100vw - 40px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--ivory);
  border: 1px solid var(--ink);
  box-shadow: 0 18px 40px rgba(28, 27, 24, 0.18);
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1 1 300px; font-size: 12.5px; line-height: 1.5; }
.cookie a { border-bottom: 1px solid var(--rose); color: var(--rose); }
.cookie__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- появление ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero__media img { height: 56vw; min-height: 300px; }
  .budget__inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section__head { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 900px) {
  .top { backdrop-filter: none; background: var(--ivory); }
  .nav {
    position: fixed;
    inset: 0;
    margin: 0;
    padding: 110px var(--pad) 40px;
    background: var(--ivory);
    flex-direction: column;
    gap: 0;
    font-family: var(--display);
    font-size: 26px;
    transform: translateY(-100%);
    transition: transform 0.45s var(--ease);
    z-index: 80;
  }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--hair); color: var(--ink); }
  .nav.is-open { transform: translateY(0); }
  .top__phone, .top .btn { display: none; }
  .burger { display: block; margin-left: auto; }
  .contacts__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .reviews__grid { grid-template-columns: 1fr; }
  .cookie { padding: 12px 14px; gap: 10px; }
  .cookie p { font-size: 11.5px; }
  .cookie .btn { padding: 8px 14px; font-size: 11px; }
  .footer__row { flex-direction: column; align-items: flex-start; }
  .footer__nav { margin-left: 0; }
  .budget__card { padding: 20px; }

  /* категории листаются вбок, не переносятся */
  .cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-right: calc(-1 * var(--pad));
    padding-right: var(--pad);
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 auto; padding: 12px 18px; }

  /* каталог плотнее: две колонки вместо одной длинной ленты */
  .cards { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .card h3 { font-size: 17px; }
  .card__comp { font-size: 12px; }
  .card__price { font-size: 14px; }
}

@media (max-width: 400px) {
  .cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
