/* Общие стили сайта LARK project: шрифт, шапка, мобильное меню, окно формы, подвал.
   Ширины экрана, под которые свёрстан дизайн (как в Tilda):
   ≥1200, 960–1199, 640–959, 480–639, <480. */

/* Шрифт Open Sans подключается отдельным файлом css/fonts.css */

/* ---------- Цвета ---------- */
:root {
  --bg: #f9f8f4;          /* фон страниц */
  --text: #353535;        /* основной текст */
  --accent: #a4476c;      /* бордовый: кнопки, акценты */
  --accent-2: #b26382;    /* бордовый светлее: рамки, заливка при наведении */
  --hover: #b26388;       /* пункты меню при наведении */
  --beige: #b29d86;       /* ссылки, пункты мобильного меню */
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
a { color: var(--beige); text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }

/* Вертикальные линии фона (3 колонки по ширине карточки контента) */
.page {
  position: relative;
  overflow: hidden;
  background: url(../images/common/bg-lines.svg) center -259px / 1040px auto repeat-y;
}
@media (max-width: 1199px) { .page { background-size: 939px auto; background-position: center -237px; } }
@media (max-width: 959px)  { .page { background: none; } }

/* На экранах уже 960px вместо линий фона — тонкие линии по краям колонки контента шириной --card-w */
@media (max-width: 959px) {
  .page { --card-w: 613px; }
  .page::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: var(--card-w);
    transform: translateX(-50%);
    border-left: 1px solid rgba(178, 157, 134, .2);
    border-right: 1px solid rgba(178, 157, 134, .2);
    pointer-events: none;
  }
}
@media (max-width: 639px) { .page { --card-w: 457px; } }
@media (max-width: 479px) { .page { --card-w: 298px; } }

/* Заголовок страницы-списка («Публикации», «Проекты»): справа, над колонкой карточек */
.page-title {
  color: #454545;
  font-size: 30px;
  font-weight: 300;
  line-height: 1.55;
  text-align: right;
}
@media (max-width: 959px) { .page-title { font-size: 26px; } }
@media (max-width: 479px) { .page-title { font-size: 24px; } }

/* ---------- Шапка (экраны от 640px) ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 108px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  font-size: 16px;
}
.header__logo {
  position: absolute;
  top: 22px; left: 90px;
  width: 110px;
}
.header__logo img { width: 100%; }
.header__logo-hover {
  position: absolute;
  inset: 0;
  background: #fff url(../images/common/logo-hover.svg) center / cover no-repeat;
  opacity: 0;
  transition: opacity .2s ease-out;
}
.header__logo:hover .header__logo-hover { opacity: 1; }
.header__link {
  position: absolute;
  top: 43px;
  color: #000;
  transition: color .2s ease-out;
}
.header__link:hover { color: var(--hover); }
/* Отступы пунктов меню от правого края окна */
.header__link:nth-of-type(1) { left: calc(100% - 770px); }
.header__link:nth-of-type(2) { left: calc(100% - 670px); }
.header__link:nth-of-type(3) { left: calc(100% - 560px); }
.header__link:nth-of-type(4) { left: calc(100% - 430px); }
.header__button {
  position: absolute;
  top: 33px; left: calc(100% - 310px);
  display: flex; align-items: center; justify-content: center;
  width: 169px; height: 44px;
  border: 1px solid var(--accent-2);
  border-radius: 30px;
  background: #fff;
  color: var(--accent);
  font: 400 14px/1.55 'Open Sans', Arial, sans-serif;
  cursor: pointer;
  transition: background-color .2s ease-in-out, color .2s ease-in-out;
}
.header__button:hover { background: var(--accent-2); color: #fff; }
.header__button:active { background: #a6496d; }

@media (max-width: 1199px) {
  .header { height: 95px; }
  .header__logo { top: 13px; left: 43px; }
  .header__link { top: 34px; }
  .header__link:nth-of-type(1) { left: calc(100% - 710px); }
  .header__link:nth-of-type(2) { left: calc(100% - 610px); }
  .header__link:nth-of-type(3) { left: calc(100% - 500px); }
  .header__link:nth-of-type(4) { left: calc(100% - 370px); }
  .header__button { top: 24px; left: calc(100% - 212px); }
}
@media (max-width: 959px) {
  .header { height: 87px; font-size: 13px; }
  .header__logo { top: 15px; left: 15px; width: 83px; }
  .header__link { top: 33px; }
  .header__link:nth-of-type(1) { left: calc(100% - 499px); }
  .header__link:nth-of-type(2) { left: calc(100% - 440px); }
  .header__link:nth-of-type(3) { left: calc(100% - 368px); }
  .header__link:nth-of-type(4) { left: calc(100% - 285px); }
  .header__button { top: 21px; left: calc(100% - 146px); width: 131px; font-size: 12px; }
}
@media (max-width: 639px) { .header { display: none; } }

/* ---------- Мобильное меню (экраны до 639px) ---------- */
.mnav { display: none; }
@media (max-width: 639px) {
  .mnav { display: block; }
  .mnav__bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 990;
    height: 110px;
    padding: 0 20px;
    transition: height .4s ease;
  }
  .mnav__logo {
    display: block;
    width: 138px; height: 110px;
    transition: opacity .4s ease, transform .4s ease;
  }
  .mnav__logo img { height: 110px; width: auto; max-width: none; }
  /* Логотип прячется при прокрутке и при открытом меню */
  .mnav.is-scrolled .mnav__bar { height: 80px; }
  .mnav.is-scrolled .mnav__logo,
  .mnav.is-open .mnav__logo { opacity: 0; transform: translateY(-100%); pointer-events: none; }
  .mnav__burger {
    position: absolute;
    top: 50%; right: 20px;
    width: 49px; height: 49px;
    margin-top: -25px;
    padding: 0;
    border: 0;
    background: url(../images/common/menu.svg) center / cover no-repeat;
    cursor: pointer;
    z-index: 2;
  }
  .mnav.is-open .mnav__burger { background: url(../images/common/menu-close.svg) center no-repeat; }
  .mnav__panel {
    position: fixed;
    inset: 0;
    z-index: 980;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease-in-out, visibility .3s;
    overflow-y: auto;
  }
  .mnav.is-open .mnav__panel { opacity: 1; visibility: visible; }
  .mnav__menu {
    position: absolute;
    top: 45%; left: 0; right: 0;
    text-align: center;
    transform: translateY(-30%) scale(.9);
    transition: transform .2s ease-in-out;
  }
  .mnav.is-open .mnav__menu { transform: translateY(-50%); }
  .mnav__item {
    display: block;
    margin: 20px auto;
    color: var(--beige);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.23;
    transition: color .3s ease-in-out;
  }
  .mnav__item:first-child { margin-top: 0; }
  .mnav__item:last-child { margin-bottom: 0; }
  .mnav__item:hover { color: var(--hover); }
  .mnav__item[aria-current="page"] { opacity: .7; }
  .mnav__telegram { position: absolute; left: 0; right: 0; bottom: 20px; }
  .mnav__telegram .btn-telegram { margin: 0 auto; }
}

/* ---------- Кнопка «Написать в Telegram» ---------- */
.btn-telegram {
  display: block;
  width: 271px; height: 57px;   /* в Tilda 234×55 без учёта отступа и рамки */
  padding-left: 35px;
  border: 1px solid var(--accent);
  border-radius: 30px;
  background: var(--accent) url(../images/common/telegram-white.svg) 87% 50% no-repeat;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 55px;
  text-align: left;
  transition: all .2s ease-in-out;
}
.btn-telegram:hover {
  background-color: #fff;
  background-image: url(../images/common/telegram-accent.svg);
  color: var(--accent);
}

/* ---------- Окно «Задать вопрос» ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  padding: 0 20px;
  overflow-y: auto;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .3s ease-in-out;
  cursor: pointer;
}
.modal.is-visible { display: block; }
.modal.is-open { opacity: 1; }
.modal__close {
  position: fixed;
  top: 20px; right: 20px;
  width: 23px; height: 23px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: opacity .3s ease-in-out;
}
.modal__close:hover { opacity: .7; }
.modal__dialog {
  position: absolute;
  top: 50%; left: 50%;
  width: 691px;
  min-height: 618px;
  padding: 54px 0 40px;
  border-radius: 10px;
  background: #fff;
  cursor: default;
  transform: translate(-50%, -30%) scale(.9);
  transition: transform .3s ease-in-out;
}
.modal.is-open .modal__dialog { transform: translate(-50%, -50%); }
.modal__title {
  width: 380px;
  margin: 0 auto;
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .5px;
  text-align: center;
}
@media (max-width: 1199px) {
  .modal__dialog { width: 625px; min-height: 607px; padding-top: 41px; }
}
@media (max-width: 959px) {
  .modal__dialog { width: 610px; padding-top: 50px; }
}
@media (max-width: 639px) {
  .modal__dialog { width: 459px; padding-top: 47px; }
  .modal__title { width: 320px; font-size: 12px; }
}
@media (max-width: 479px) {
  .modal__dialog { width: 299px; }
  .modal__title { width: 270px; font-size: 10px; }
}

/* Форма */
.form { width: 460px; margin: 51px auto 0; }
.form__field {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0 0 30px;
  padding: 0 20px;
  border: 1px solid #a39d9d;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 300 14px/1.33 'Open Sans', Arial, sans-serif;
  outline: none;
  -webkit-appearance: none;
}
.form__field::placeholder { color: #000; opacity: .5; }
textarea.form__field { height: 102px; padding-top: 15px; padding-bottom: 15px; resize: vertical; }
.form__field.is-invalid { border-color: #f95d51; }
.form__error { margin: -24px 0 12px; color: #f95d51; font-size: 12px; font-weight: 400; }
.form__submit {
  display: block;
  width: 186px; height: 50px;
  margin: 0 auto;
  border: 1px solid var(--accent-2);
  border-radius: 100px;
  background: var(--accent-2);
  color: #fff;
  font: 400 15px 'Open Sans', Arial, sans-serif;
  cursor: pointer;
  transition: background-color .2s ease-in-out, color .2s ease-in-out;
}
.form__submit:hover { background: #fff; color: var(--accent-2); }
.form__submit:disabled { opacity: .6; cursor: default; }
.form__status:empty { display: none; }
.form__status { margin-top: 20px; font-size: 14px; font-weight: 400; text-align: center; }
.form__status.is-ok { color: #62c584; }
.form__status.is-error { color: #f95d51; }
/* Поле-ловушка для ботов (send.php): людям не видно, боты заполняют */
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 1199px) { .form { margin-top: 64px; } }
@media (max-width: 959px)  { .form { margin-top: 55px; } }
@media (max-width: 639px)  {
  .form { width: 340px; margin-top: 54px; }
  .form__field { font-size: 12px; }
}
@media (max-width: 479px)  {
  .form { width: 260px; }
  .form__submit { width: 156px; font-size: 14px; }
}

/* ---------- Подвал ---------- */
.footer {
  padding: 30px 0;
  background: #fff;
  font-size: 14px;
  color: #000;
}
.footer__inner {
  position: relative;
  width: 1200px;
  height: 80px;
  margin: 0 auto;
  overflow: hidden;
}
.footer__logo { position: absolute; top: 5px; left: 50px; width: 110px; }
.footer__copy { position: absolute; top: 25px; left: 220px; width: 400px; font-weight: 400; }
.footer__copy b { font-weight: 400; }
.footer__ask { position: absolute; top: 45px; left: 760px; width: 260px; text-align: right; }
.footer__icon { position: absolute; top: 43px; height: 24px; }
.footer__icon img { width: 100%; height: 100%; }
.footer__icon--wa { left: 1051px; width: 24px; }
.footer__icon--tg { left: 1094px; width: 26px; }

@media (max-width: 1199px) {
  .footer__inner { width: 960px; }
  .footer__ask { left: 591px; }
  .footer__icon--wa { left: 875px; }
  .footer__icon--tg { left: 925px; }
}
@media (max-width: 959px) {
  .footer__inner { width: 640px; height: 150px; }   /* в Tilda было 90px — контакты обрезались */
  .footer__logo { top: 6px; }
  .footer__ask { top: 119px; left: 212px; width: 220px; }
  .footer__icon--wa { top: 125px; left: 470px; }
  .footer__icon--tg { top: 123px; left: 516px; }
}
@media (max-width: 639px) {
  .footer__inner { width: 480px; height: 210px; }
  .footer__logo { top: 5px; left: 160px; }
  .footer__copy { top: 94px; left: 40px; text-align: center; }
  .footer__ask { top: 167px; left: 80px; }
  .footer__icon { top: 165px; }
  .footer__icon--wa { left: 318px; }
  .footer__icon--tg { left: 362px; }
}
@media (max-width: 479px) {
  .footer__inner { width: 320px; height: 320px; }
  .footer__logo { top: 20px; left: 80px; }
  .footer__copy { top: 115px; left: 20px; width: 280px; }
  .footer__ask { top: 217px; left: 95px; width: 130px; text-align: center; }
  .footer__icon { top: 279px; }
  .footer__icon--wa { left: 123px; }
  .footer__icon--tg { left: 175px; }
}

/* Текст только для поисковиков и экранных читалок (h1 на «Услугах») */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
