/* =========================================================
   Apex — дизайн-токены (значения /2 от Figma 2560px)
   ========================================================= */
:root {
  /* Цвета */
  --bg: #242426;
  --header-bg: rgba(28, 28, 30, 0.9);   /* + backdrop-filter: blur(7px) */
  --surface-from: #49494e;
  --surface-to: #242426;
  --text: #ffffff;
  --text-muted: #b3b3b3;   /* в hero на 64% */
  --text-desc: #a0a0a0;
  --accent: #e8d96a;
  --accent-btn: #e7d869;   /* заливка кнопок (Figma) */
  --card-border: #e8d96a;
  --divider: #3a3a3d;

  /* Градиент поверхностей */
  --surface-gradient: linear-gradient(180deg, var(--surface-from) 0%, var(--surface-to) 100%);
  --card-gradient: linear-gradient(180deg, #3a3a3d 0%, var(--bg) 60%);

  /* Радиусы (фигма /2) */
  --radius-pill: 52px;     /* 104px /2 — капсула шапки */
  --radius-btn: 10px;      /* 20px /2 */
  --radius-card: 12px;     /* 24px /2 */
  --radius-chip: 8px;

  /* Раскладка */
  --container: 1196px;     /* ~ из Figma /2 */
  --gutter: 21px;          /* 42px /2 */

  /* Шрифты */
  --font-head: "Unbounded", sans-serif;
  --font-body: "Raleway", sans-serif;
}

/* =========================================================
   Базовое
   ========================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;            /* подстраховка от горизонтального скролла на мобилке */
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: 80px;
}

/* Элементы/секции только для мобильной версии (включаются в media ≤768) */
.m-only { display: none; }
/* у .tariff базовый display:flex перебивает .m-only — поднимаем специфичность */
.tariff.m-only { display: none; }

/* Контурный «призрачный» заголовок-разделитель */
.ghost-title {
  margin: 0 0 64px;
  font-family: var(--font-head);
  font-weight: 800;         /* широкие жирные буквы (как в макете) */
  font-size: 60px;          /* 119px /2 */
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .5px;
  /* Полые буквы: заливка цветом фона поверх обводки перекрывает
     внутренние стыки контуров шрифта — остаётся только внешний контур */
  color: var(--bg);
  -webkit-text-fill-color: var(--bg);
  -webkit-text-stroke: 2px rgba(255, 255, 255, .4);
  paint-order: stroke fill;
  /* затемнение низа: контур яркий сверху и растворяется в фоне внизу */
  -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
  user-select: none;
}
.ghost-title--wide { font-size: 56px; }

@media (max-width: 768px) {
  .section { padding-block: 52px; }
  .ghost-title,
  .ghost-title--wide {
    font-size: 34px;
    margin-bottom: 36px;
    /* на мобилке убираем затемнение низа — буквы показываем полным контуром */
    -webkit-mask-image: none;
    mask-image: none;
  }
  .container { padding-inline: 20px; }   /* gutter мобильного макета */
}

/* =========================================================
   Кнопки и текст-ссылки
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-gradient);
  border: 1px solid var(--accent);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(232, 217, 106, .15); }
.btn--sm { padding: 8px 20px; font-size: 13px; }

/* Сплошная жёлтая кнопка (тарифы, отправка) — состояние по умолчанию */
.btn--filled {
  background: var(--accent-btn);
  color: #242426;
  border-color: var(--accent-btn);
}
/* hover/другое состояние: тёмный градиент с жёлтым контуром */
.btn--filled:hover {
  background: var(--surface-gradient);
  color: var(--accent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 13px;          /* 25px /2 */
  color: var(--text);
  opacity: .9;
  transition: opacity .15s ease;
}
.text-link:hover { opacity: 1; }
.text-link .arrow { color: var(--accent); }

/* =========================================================
   Шапка (fixed)
   ========================================================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 15px 42px 0;     /* верх 29/2≈15px, боковые поля от краёв окна 84/2≈42px */
}
.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: none;          /* плашка во всю ширину (поля задаёт .header) */
  margin-inline: 0;
  height: 57px;             /* 114px /2 */
  padding-inline: 36px;     /* равные внутренние поля слева и справа */
  background: var(--header-bg);
  backdrop-filter: blur(7px);     /* 14px /2 */
  -webkit-backdrop-filter: blur(7px);
  border-radius: var(--radius-pill);
}
.logo {
  position: absolute;              /* вне потока — меню центрируется по всей ширине */
  left: 12%;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
}
.logo__icon { width: 42px; height: 42px; }   /* 83 /2 */
.logo__text { display: none; }                /* в макете логотип — картинка 83×83 */
.nav {
  flex: 1;
  max-width: 740px;                /* уже капсулы → пункты ближе друг к другу */
  display: flex;
  align-items: center;
  justify-content: space-between;  /* пункты равномерно по ширине */
  margin-inline: auto;             /* меню по центру шапки */
}
.nav__link {
  display: inline-flex;
  align-items: center;
  height: 22px;             /* 43px /2 */
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;          /* 20px /2 ≈ 10px, поднял до 13px для читаемости */
  line-height: 1;           /* 100% */
  letter-spacing: 0;
  color: var(--text);
  white-space: nowrap;
  transition: opacity .15s ease;
}
.nav__link:hover { opacity: .7; }

/* works.html: две навигации — десктопная по умолчанию, мобильная скрыта */
.nav-mob { display: none; }

@media (max-width: 900px) {
  .logo { margin-left: 0; }
  .nav { margin-left: 4%; margin-right: 0; }
}
@media (max-width: 768px) {
  .header { padding: 12px 12px 0; }
  .header__inner {              /* капсула = только меню (логотип ушёл в hero) */
    height: auto;
    min-height: 48px;
    padding-block: 10px;
    padding-inline: 22px;
    gap: 4px 8px;
    flex-wrap: wrap;
    border-radius: 28px;
  }
  .logo { display: none; }      /* логотип на мобилке — в hero, по центру */
  .nav-desk { display: none; }  /* works.html: на мобилке прячем десктопную навигацию */
  .nav-mob { display: flex; }   /* …показываем мобильную */
  .nav {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: space-between;
    margin-inline: 0;
  }
  .nav__link { font-size: 11px; height: 24px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 495px;        /* ~991px /2 */
  padding-top: 120px;
  padding-bottom: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__eyebrow {
  margin: 0 0 32px;
  padding-left: 44px;            /* компенсация letter-spacing для центровки */
  font-size: 8px;                /* 16px /2 */
  line-height: 1;
  letter-spacing: 44px;          /* 551% от 16px ≈ 88фп /2 */
  color: var(--text-muted);
  opacity: .64;
  text-transform: uppercase;
  text-align: center;
}
.hero__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 55px;          /* 111px /2 */
  line-height: .99;
  text-transform: uppercase;
  color: var(--text);
}
.hero__brain {
  width: 377px;             /* 754 /2 */
  height: auto;
  margin: -30px 0 -10px;
  pointer-events: none;
}
.hero__subtitle {
  max-width: 745px;         /* 1490 /2 */
  margin: 0 auto 26px;
  font-size: 14px;          /* 28px /2 (Figma v192_52) */
  line-height: 1.4;
  color: var(--text-muted);
  opacity: .64;
}
.hero__actions { display: flex; gap: 48px; }

@media (max-width: 768px) {
  .m-only { display: block; }            /* включаем мобильные элементы */

  .hero { padding-top: 88px; }
  .hero__logo {                          /* логотип APEX по центру вверху hero */
    width: 84px;
    height: auto;
    margin: 0 auto 28px;
  }
  .hero__eyebrow {                       /* большой letter-spacing давал гор. скролл */
    margin-bottom: 24px;
    padding-left: 14px;
    letter-spacing: 14px;
  }
  .hero__title { font-size: 34px; margin-bottom: 28px; }
  .hero__brain { display: none; }        /* на мобилке мозг убираем */
  .hero__subtitle { font-size: 15px; margin-bottom: 36px; }
  .hero__actions { display: none; }      /* десктопные текст-ссылки прячем */

  /* мобильные кнопки: «Заказать» (жёлтая) + «Бесплатный аудит» (контурная) */
  .hero__actions-m {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 340px;
  }
  .hero__actions-m .btn {
    width: 100%;
    height: 60px;
    border-radius: var(--radius-btn);
    font-size: 17px;
  }
  .hero__btn-ghost {                      /* контурная: тёмный фон + жёлтая рамка 16% */
    background: var(--bg);
    border: 1px solid rgba(232, 217, 106, .35);
    color: var(--text);
  }
  .hero__btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
    box-shadow: none;
  }
}

/* Узкие телефоны: широкий Unbounded 800 не влезает на 34px */
@media (max-width: 430px) {
  .hero__title { font-size: 28px; }
  .ghost-title,
  .ghost-title--wide { font-size: 30px; }
}

/* =========================================================
   ПОЧЕМУ МЫ
   ========================================================= */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;       /* не растягивать карточки — полоса кончается ровно на тексте */
  gap: 165px 64px;          /* 165px между верхним и нижним рядом */
  max-width: 802px;         /* 1603px /2 */
  margin-inline: auto;
}
/* горизонтальная серая линия под верхним рядом (в середине межрядного зазора) */
.why-grid .advantage:nth-child(1)::after,
.why-grid .advantage:nth-child(2)::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -82px;            /* середина gap 165px */
  height: 1px;
  background: var(--divider);
}
.advantage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;                /* небольшой отступ заголовок → описание */
  padding-left: 22px;
}
.advantage::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;   /* жёлтая полоса во всю высоту — описание кончается на ней */
  width: 7px;               /* 13px /2 */
  background: var(--accent);
}
.advantage__title {
  margin: 0;
  min-height: 2em;          /* резерв под 2 строки — низ карточек в ряду выровнен (прямая линия) */
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;          /* 44px /2 */
  line-height: 1;
  color: var(--text);
}
.advantage__text {
  margin: 0;
  font-size: 13px;          /* 26px /2 */
  line-height: 1.3;
  color: var(--text-desc);
  max-width: 281px;         /* 562px /2 */
}

@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    counter-reset: adv;                 /* нумерация бейджей 1..4 */
  }
  /* карточка: [жёлтый бейдж с цифрой] | [заголовок + описание] */
  .advantage {
    counter-increment: adv;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 20px;
    row-gap: 10px;
    padding-left: 0;
  }
  .advantage__title { min-height: 0; font-size: 20px; }
  .advantage__text { max-width: none; }
  /* жёлтый вертикальный бар → квадратный бейдж с номером */
  .advantage::before {
    content: counter(adv);
    position: static;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 24px;
    color: #242426;
    background: var(--accent);
    border-radius: 12px;
  }
  /* горизонтальные разделители между пунктами (кроме последнего) */
  .why-grid .advantage::after {
    display: block;
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -24px;
    height: 1px;
    background: var(--divider);
  }
  .why-grid .advantage:last-child::after { display: none; }
}

/* =========================================================
   ПЕЧАТЬ И ДОСТАВКА
   ========================================================= */
.print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 660px;
  margin-inline: auto;
}
.print-col:first-child { border-right: 1px solid rgba(255, 255, 255, .1); }
.print-col__title {
  margin: 0 0 44px;         /* 106px /2 ≈ 53px */
  font-family: var(--font-head);
  font-weight: 400;         /* Unbounded Regular (Figma) */
  font-size: 18px;          /* 36 /2 */
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text);
}
.print-list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 28px;   /* шаг ≈ 47px (94 /2) с учётом высоты строки */
}
.print-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-muted);
}
.print-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.print-delivery {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
}
.print-delivery__pin { width: 14px; height: auto; margin-top: 2px; }
.badge-free {
  display: inline-block;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #1c1c1d;
  background: var(--accent); /* жёлтый бейдж #E8D96A (Figma) */
  border-radius: 10px;
}

@media (max-width: 768px) {
  /* «Печать и доставка» — заголовок секции на мобилке убираем */
  #print > .ghost-title { display: none; }
  .print-grid { grid-template-columns: 1fr; gap: 8px; }
  /* отступаем содержимое от левого края, чтобы линия/точки не прилипали */
  .print-col { padding-left: 14px; }
  /* разделитель между «Мы печатаем» и «Доставка» — горизонтальный */
  .print-col:first-child {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding-bottom: 36px;
    margin-bottom: 36px;
  }
  /* вертикальная линия-таймлайн через точки списка — белая */
  .print-list { position: relative; }
  .print-list::before {
    content: "";
    position: absolute;
    left: 3px; top: 10px; bottom: 10px;
    width: 1px;
    background: rgba(255, 255, 255, .55);
  }
  .print-list li::before { z-index: 1; background: #fff; }
  /* доставка: больше воздуха между иконкой и текстом */
  .print-delivery { gap: 16px; }
  /* «Бесплатно»: жёлтый бейдж → чекмарк + текст */
  .badge-free {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: none;
    border-radius: 0;
  }
  .badge-free::before {
    content: "✓";
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
  }
}

/* =========================================================
   ПАКЕТЫ УСЛУГ
   ========================================================= */
/* Общий контейнер ряда: 3 карточки × 273 + 2 gap × 31 = 881px.
   Заметка и «Разовая» выравниваются по краям этого ряда. */
.tariffs-block {
  max-width: 881px;
  margin-inline: auto;
}
.tariffs__note {
  margin: 0 0 16px 2px;
  font-size: 11px;
  color: var(--text-muted);
  opacity: .6;
}
/* Карточки 547×858фп → 273.5×429px, gap 63фп → ~31px */
.tariffs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 31px;
}
.tariff {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 429px;        /* 858 /2 */
  padding: 39px 22px 28px;  /* отступы из макета /2 */
  border: 1px solid var(--card-border);
  border-radius: 10px;      /* 20 /2 */
  /* СТАРТ: серый градиент #49494E → #242426 */
  background: linear-gradient(180deg, #49494e 0%, #242426 100%);
}
.tariff--business {        /* оливковый: rgba(64,62,45) → #242426 */
  background: linear-gradient(180deg, #403e2d 0%, #242426 100%);
}
.tariff--premium {         /* коричневый: rgba(73,39,26) → #242426 */
  background: linear-gradient(180deg, #49271a 0%, #242426 100%);
}
.tariff__head { margin-bottom: 56px; }
.tariff__badge {
  position: absolute;
  top: 43px;                /* 87 /2 */
  right: 22px;
  max-width: 80px;
  font-size: 9px;           /* 18 /2 */
  line-height: 1.3;
  text-align: right;
  color: #fff;
  opacity: .32;
}
.tariff__name {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-weight: 400;         /* Unbounded Regular по макету */
  font-size: 21px;          /* 42 /2 */
  line-height: 1;
  text-transform: uppercase;
}
.tariff__price {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 400;         /* Regular */
  font-size: 27px;          /* 55 /2 */
  line-height: 1;
}
.tariff__list {
  margin: 0 0 28px; padding: 0; list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;                /* шаг ≈ 64px (128 /2) с учётом высоты пары строк */
  flex: 1;
}
.tariff__list li {
  display: flex;
  flex-direction: column;
  gap: 8px;                 /* заголовок → подпись 16фп /2 */
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.tariff__item { font-size: 13px; color: #fff; }    /* 27 /2 */
.tariff__hint { font-size: 9px; color: #fff; opacity: .32; }  /* 18 /2 */
.tariff .btn {
  width: 168px;             /* 337 /2 */
  height: 52px;             /* 104 /2 */
  margin: 0 auto;
  border-radius: 10px;      /* 21 /2 */
  font-size: 12px;          /* 24 /2 */
}

/* «Разовая» как карточка карусели: заголовок + цена + описание, кнопка прижата вниз */
.tariff__once-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}
.tariff--once-card .tariff__head { margin-bottom: 18px; }
.tariff--once-card .btn { margin-top: auto; }

/* РАЗОВАЯ · от 2.500р — плашка 100%×143фп → высота 71.5px */
.tariff-once {
  display: flex;
  align-items: center;
  justify-content: center;  /* группа по центру плашки */
  gap: 32px;
  margin-top: 22px;
  height: 71px;             /* 143 /2 */
  padding: 0 40px;
  background: linear-gradient(180deg, #49494e 0%, #242426 100%);
  border: 1px solid var(--accent);
  border-radius: 10px;      /* 20 /2 */
}
.tariff-once__label {
  font-family: var(--font-head);
  font-weight: 400;         /* Unbounded Regular */
  font-size: 21px;          /* 42 /2 */
}
.tariff-once__price {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 27px;          /* 55 /2 */
}
.tariff-once .btn {
  margin-left: 12px;
  height: 36px;             /* визуально как на референсе */
  padding: 0 24px;
  font-size: 12px;
}

@media (max-width: 768px) {
  /* Тарифы → горизонтальная карусель со снапом, скролл от края до края */
  .tariffs {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-inline: -20px;          /* вылет за gutter контейнера */
    padding: 4px 20px 10px;
    scrollbar-width: none;
  }
  .tariffs::-webkit-scrollbar { display: none; }
  .tariff {
    flex: 0 0 84%;
    scroll-snap-align: center;
    min-height: 0;
    max-width: none;
    margin-inline: 0;
  }
  .tariff--once-card.m-only { display: flex; }   /* «Разовая» — карточка карусели */
  .tariff-once { display: none; }                /* старую плашку прячем */
}

/* =========================================================
   ЗАКАЗ / ВОПРОС
   ========================================================= */
/* Плашка ЗАКАЗ/ВОПРОС: крупное скругление 49фп → ~24px (отличается от карточек),
   жёлтый левый блок 365фп → ~182px */
.order-card {
  display: grid;
  grid-template-columns: 290px 1fr;
  border-radius: 24px;      /* 49 /2 */
  overflow: hidden;
  background: #151515;      /* тёмный фон формы (Figma) */
  border: 1px solid rgba(255, 255, 255, .08);
}
.order-card__aside {
  padding: 34px 24px;
  background: var(--accent-btn);  /* жёлтая панель #E7D869 (Figma) */
  color: #141414;
  display: flex;
  flex-direction: column;
}
.order-card__title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 700;         /* Unbounded Bold 40фп */
  font-size: 20px;          /* 40 /2 */
  line-height: 1.05;
  text-transform: capitalize;
}
.order-card__text { margin: 0 0 24px; font-size: 11px; font-weight: 500; line-height: 1.4; }
.order-card__note {
  display: inline-block;
  margin: 0 0 auto;
  padding: 14px 26px;
  font-size: 13px;
  font-weight: 600;
  background: #c5b856;      /* тёмно-жёлтый из макета (197,184,86) */
  color: #141414;
  border-radius: 9px;
  align-self: center;
  text-align: center;
}
/* Бейдж «Ответим…» — по центру жёлтой панели по вертикали */
.order-card__aside .order-card__note { margin-block: auto; }
.order-card__small { margin: 28px 0 0; font-size: 10px; opacity: .7; }

.order-form {
  position: relative;       /* для кнопки в правом нижнем углу */
  padding: 30px 32px 90px;  /* запас снизу под абсолютную кнопку */
}
.order-form__label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}
/* Поля занимают левую часть формы — справа остаётся место под кнопку */
.order-form .order-form__label,
.order-form .field { max-width: 62%; }
.order-form__submit {
  position: absolute;
  right: 32px;
  bottom: 30px;
  width: 210px;
  height: 66px;
  margin: 0;
  font-size: 16px;
}

@media (max-width: 768px) {
  .order-card { grid-template-columns: 1fr; }
  .order-form { padding-bottom: 30px; }
  .order-form .order-form__label,
  .order-form .field { max-width: 100%; }
  .order-form__submit { position: static; width: 100%; margin-top: 8px; }
}

/* Чипы */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
/* Разделитель: чипы «интересов» → линия → чипы «пакетов» */
.chips--packages {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
/* Чипы «Что вас интересует?» тянутся на всю ширину формы */
[data-chip-group="interest"] .chip { flex: 1 1 auto; text-align: center; }
.chip {
  padding: 6px 16px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  background: #222222;       /* rgba(34,34,34) из макета */
  border: 1px solid #4e4e4e;
  border-radius: 999px;      /* radius 105фп → капсула */
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1c1c1d;
  font-weight: 600;
}

/* Поля */
.field {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background: #222222;       /* rgba(34,34,34) из макета */
  border: 1px solid #2f2f2f;
  border-radius: 4px;        /* 8фп /2 */
  outline: none;
  transition: border-color .15s ease;
}
.field::placeholder { color: var(--text-muted); opacity: .7; }
.field:focus { border-color: var(--accent); }
.field--area { min-height: 90px; resize: vertical; }
.field--light {
  background: rgba(0, 0, 0, .15);
  border-color: rgba(0, 0, 0, .25);
  color: #1c1c1d;
}
.field--light::placeholder { color: rgba(28, 28, 29, .5); }

/* =========================================================
   БЕСПЛАТНЫЙ АУДИТ
   ========================================================= */
.audit {
  display: grid;
  grid-template-columns: minmax(0, 620px) 1fr;
  gap: 80px;
  align-items: center;
}
/* Плашка аудита: жёлтый блок слева + тёмная часть с полями справа (как ЗАКАЗ/ВОПРОС) */
.audit-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  border-radius: 24px;      /* 49 /2 */
  overflow: hidden;
  background: #151515;      /* тёмный фон формы (Figma) */
  border: 1px solid rgba(255, 255, 255, .08);
}
.audit-card__aside {
  display: flex;
  flex-direction: column;
  padding: 34px 24px;
  background: var(--accent-btn);  /* жёлтая панель #E7D869 (Figma) */
  color: #141414;
}
.audit-card__form { padding: 34px 32px; display: flex; flex-direction: column; }
.audit-card__form .field { margin-bottom: 18px; }
.audit-card__submit { width: 168px; height: 52px; margin: 6px auto 0; }
.audit__title {
  margin: 0 0 auto;
  font-family: var(--font-head);
  font-weight: 700;         /* Unbounded Bold */
  font-size: 24px;
  line-height: 1.05;
  text-transform: capitalize;
}
.audit-card__aside .order-card__note { margin-top: 22px; white-space: nowrap; }
.audit__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 56px; }
.audit__list h4 {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
}
.audit__list p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 360px; }

@media (max-width: 900px) {
  .audit { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .audit-card { grid-template-columns: 1fr; }
  .audit-card__aside { padding: 28px 24px; }
  .audit-card__form { padding: 28px 24px; }
  .audit-card__submit { width: 100%; }
  .audit__list { gap: 32px; }
  .audit__list h4 { font-size: 18px; }
}

/* =========================================================
   МОДАЛКА
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.is-open { display: flex; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(3px);
}
/* Диалог повторяет стиль десктопной плашки «Заказ/вопрос»:
   жёлтая панель сверху + тёмная форма #151515 (только размеры под мобилку) */
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow: hidden auto;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
}
.modal__close {
  position: absolute;
  top: 16px; right: 18px;
  width: 30px; height: 30px;
  font-size: 24px;
  line-height: 1;
  color: #141414;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
}
.modal__aside {
  padding: 26px 28px;
  background: var(--accent-btn);   /* жёлтая панель как в десктопе */
  color: #141414;
}
.modal__title {
  margin: 0;
  padding: 28px 52px 0 28px;   /* отступы как у формы; справа место под крестик */
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.05;
  text-transform: capitalize;
}
.modal__note {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #141414;
  opacity: .8;
}
.modal__form { padding: 18px 28px 28px; }
/* кнопка «Отправить» — по центру, по ширине содержимого */
.modal__form .btn--filled {
  display: block;
  width: fit-content;
  margin: 6px auto 0;
  padding: 14px 52px;
}

/* --- Модалка «Бесплатный аудит»: тёмная, заголовок по центру --- */
.modal__dialog--audit {
  max-width: 430px;
  padding: 34px 30px 30px;
  overflow: visible;
  text-align: center;
  background: linear-gradient(180deg, #2a2a2c 0%, #161618 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
}
.modal__dialog--audit .modal__close { color: var(--text); }
.audit-modal__title {
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
}
.audit-modal__sub {
  margin: 0 auto 30px;
  max-width: 310px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  opacity: .7;
}
.audit-modal__form { text-align: left; }
.audit-modal__label {
  display: block;
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.audit-modal__form .field {
  height: 56px;
  margin-bottom: 22px;
  padding: 0 18px;
  background: #2b2b2d;
  border: 1px solid #3a3a3d;
  border-radius: 12px;
}
.audit-modal__submit {
  display: block;
  width: 62%;
  max-width: 230px;
  height: 56px;
  margin: 10px auto 0;
  border-radius: 14px;
  font-size: 16px;
}

/* Оверлей «Отправлено» */
.sent-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28, 28, 29, .96);
  border-radius: 20px;
}
.sent-overlay.is-visible { display: flex; }
.sent-overlay__text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  text-transform: uppercase;
  color: var(--accent);
}

/* =========================================================
   Страница «Наши работы» (works.html)
   Геометрия — абсолютные px из Figma /2; коллаж внутри секции
   позиционируется абсолютно, под ним лежит контурный водяной знак.
   ========================================================= */
.works {
  padding-top: 110px;                           /* зазор под фикс-шапку */
  overflow-x: hidden;                           /* боковые подписи не дают гор. прокрутку */
}

/* Верхний водяной знак «НАШИ РАБОТЫ» */
.works-watermark {
  margin: 24px auto 56px;
  font-size: 60px;                              /* 119 /2 */
}

/* Одна секция-работа */
.work {
  position: relative;
  width: 840px;                                 /* 1679 /2 */
  max-width: 100%;
  margin-inline: auto;
  padding-bottom: 80px;
}

/* Шапка секции: большая цифра + заголовок + подзаголовок */
.work__head { position: relative; min-height: 78px; }
.work__num {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 84px;                              /* 168 /2 */
  line-height: .9;
  color: var(--text);
}
.work__title {
  position: absolute;
  left: 181px;                                  /* 362 /2 */
  top: 6px;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 39px;                              /* 78 /2 */
  line-height: 1.01;
  text-transform: uppercase;
  color: var(--text);
}
.work__sub {
  position: absolute;
  left: 181px;
  top: 62px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;                              /* 21 /2, поднят для читаемости */
  color: rgba(255, 255, 255, .25);
}

/* Коллаж: контейнер с абсолютно позиционированными фото */
.collage {
  position: relative;
  width: 840px;
  max-width: 100%;
  margin: 4px auto 0;
}
/* Фоновый контурный водяной знак под фотками */
.collage__ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 200px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(235, 235, 235, .08);
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
/* Фото-мокап с подписью */
.ph {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  z-index: 1;
  margin: 0;                 /* сброс UA-отступа <figure> (1em 40px) — мешает на мобилке в потоке */
  display: flex;
  flex-direction: column;
}
.ph--z2 { z-index: 2; }
.ph--z3 { z-index: 3; }                         /* верхнее фото в «лесенке» */
.ph__cap {
  order: 0;                                     /* по умолчанию — над фото */
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 12px;                              /* тег 22 /2, описание 20 /2 */
  line-height: 1.3;
  color: var(--text);
}
.ph__tag { font-weight: 700; display: block; }
.ph__img {
  order: 1;
  width: 100%;
  height: var(--h);
  object-fit: cover;
  border-radius: 20px;                          /* скругление мокапов */
  display: block;
}
/* Подпись под фото (слева) */
.ph--cap-bottom .ph__cap,
.ph--cap-bottom-right .ph__cap { order: 2; margin: 8px 0 0; }
/* Подпись под фото справа, у конца фотки */
.ph--cap-bottom-right .ph__cap { text-align: right; }
/* Подпись сбоку — рядом с фото справа, у нижнего края */
.ph--cap-side .ph__cap {
  position: absolute;
  left: 100%;
  bottom: 0;
  width: 230px;
  margin: 0 0 0 14px;
  text-align: left;
}

/* Нижний CTA-водяной знак «Обсудим ваш проект?» */
.works-cta__title { font-size: 44px; }          /* 88 /2 */

/* --- Адаптив: ниже 900px коллаж становится вертикальным потоком --- */
@media (max-width: 900px) {
  .work,
  .collage { width: auto; max-width: 540px; }
  .work__head { min-height: 0; margin-bottom: 14px; }
  .work__num { font-size: 56px; }
  .work__title,
  .work__sub { position: static; left: auto; top: auto; }
  .work__title { font-size: 24px; margin-top: 4px; }
  .work__sub { margin-top: 6px; }

  .collage { display: flex; flex-direction: column; gap: 18px; height: auto !important; }
  .collage__ghost { display: none; }
  .ph { position: static; width: 100% !important; }
  .ph__img { height: auto; aspect-ratio: 4 / 3; }
  /* боковая подпись возвращается под фото в потоке */
  .ph--cap-side .ph__cap {
    position: static; left: auto; bottom: auto; width: auto;
    order: 2; margin: 8px 0 0;
  }
}
@media (max-width: 768px) {
  /* «НАШИ / РАБОТЫ» — капсом, в два слова с переносом, прижато влево */
  .works-watermark {
    font-size: 46px;
    line-height: .98;
    margin: 8px 0 28px;
    padding-left: 2px;
    text-align: left;
  }
  .works-watermark .ww-line { display: block; }
  .works-cta__title { font-size: 30px; }

  .works { padding-top: 96px; padding-inline: 16px; }

  /* Каждая работа — секция, разделители линиями (без рамки) */
  .work {
    width: auto;
    max-width: 420px;
    margin: 0 auto;
    padding: 26px 0;
  }
  .work:first-of-type { padding-top: 4px; }

  /* Шапка секции: цифра + название в одной строке, ПОД ними линия,
     ниже линии — подзаголовок-задача во всю ширину */
  .work__head {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    margin-bottom: 22px;
  }
  .work__num {
    grid-area: 1 / 1 / 2 / 2;
    align-self: center;
    font-size: 42px;
    line-height: 1;
  }
  .work__title {
    grid-area: 1 / 2 / 2 / 3;
    align-self: center;
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .35);
  }
  .work__sub {
    grid-area: 2 / 2 / 3 / 3;          /* только колонка текста — линия не заходит под «01» */
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .16);   /* заметная серая линия */
    font-size: 12px;
  }

  /* Картинки коллажа — во всю ширину, натуральные пропорции mob-кропов */
  .collage { gap: 28px; margin-top: 0; }
  .collage--hide-m { display: none; }            /* парфюм: десктоп-лесенка скрыта */
  .ph__pic { display: contents; }                /* picture прозрачен для flex — img остаётся flex-элементом */
  .ph__img {
    height: auto !important;
    aspect-ratio: auto !important;               /* перебиваем 4/3 из ≤900 — показываем mob-кроп целиком */
    border-radius: 10px;
  }
  /* подпись всегда под фото: жирное имя (белое) + описание (серое) */
  .ph__cap {
    order: 2 !important;
    margin: 12px 0 0 !important;
    font-size: 13px;
    line-height: 1.35;
    color: var(--text-desc);
  }
  .ph__tag {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
  }

  /* Парфюм — сетка 2×2 + одна подпись «Флакон» */
  .parfum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .parfum-grid .ph__img { border-radius: 10px; }
  .parfum-cap { margin-top: 14px; }

  /* Нижний ряд тегов карточки */
  .work__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    font-size: 11px;
    color: rgba(255, 255, 255, .3);
  }

  /* Мобильный CTA + футер */
  .works-cta-m { padding: 8px 0 0; }
  .cta-card--gold {
    background: #1f1f21;
    border: 1px solid var(--accent);
    padding: 32px 24px;
  }
  .cta-card--gold .cta-card__title {
    font-weight: 500;
    font-size: 18px;
    text-transform: none;
  }
  .cta-card--gold .cta-card__btn {
    height: 55px;
    border-radius: 11px;
    background: #303030;
  }
}

/* =========================================================
   МОБИЛЬНЫЕ СЕКЦИИ index.html (видны только при .m-only → ≤768px)
   ========================================================= */

/* --- Наши работы (инлайн-превью) --- */
.works-m__grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}
.works-m__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #2c2c2e;
  border-radius: 16px;
}
.works-m__all {
  display: flex;
  align-items: center;
  height: 64px;
  font-size: 16px;
  color: var(--text);
  background: linear-gradient(180deg, #49494e 0%, #242426 100%);
  border: 1px solid var(--accent);
  /* необычная форма: крупное скругление нижнего-левого угла */
  border-radius: 16px 16px 16px 42px;
  overflow: hidden;
}
.works-m__all > span:first-child {
  flex: 1;
  text-align: center;
  padding-left: 64px;        /* компенсирует ширину стрелки справа — текст по центру */
}
.works-m__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-size: 22px;
  color: #242426;
  background: var(--accent-btn);
}

/* --- Этапы работы (карусель) --- */
.stages-m__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 10px;
  scrollbar-width: none;
}
.stages-m__track::-webkit-scrollbar { display: none; }
.stage {
  flex: 0 0 86%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px;
  background: linear-gradient(180deg, #2c2c2e 0%, #1a1a1c 100%);
  border-radius: 20px;
}
.stage__num {
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
}
.stage__title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--text);
}
.stage__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* --- Обсудим ваш проект (CTA) --- */
.cta-card {
  text-align: center;
  padding: 40px 28px;
  background: #2b2b2e;
  border-radius: 20px;
}
.cta-card__title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
}
.cta-card__text {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.cta-card__btn {
  width: 100%;
  max-width: 320px;
  height: 58px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--accent);
}
.cta-card__btn:hover { background: var(--bg); color: var(--text); box-shadow: none; }

/* --- Футер --- */
.footer-m { padding: 8px 20px 48px; text-align: center; }
.footer-m__text { margin: 0 0 16px; font-size: 12px; color: var(--text-muted); opacity: .7; }
.footer-m__mail { font-size: 15px; color: var(--text); }

/* На мобилке большие формы заменяются на CTA «Обсудим ваш проект?» */
@media (max-width: 768px) {
  #order,
  #audit { display: none; }
}
