/* ChatPlace — chatplace.pro
   Вёрстка сайта без конструктора: только HTML + CSS, без сборки и зависимостей.
   Значения цветов, кеглей и отступов сняты с прежней версии сайта на Tilda. */

/* ---------- Шрифты ---------- */
@font-face {
  font-family: 'Pragmatica Extended';
  src: url('../fonts/PragmaticaExtended-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pragmatica Extended';
  src: url('../fonts/PragmaticaExtended-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Токены ---------- */
:root {
  --ink: #0c0c0c;
  --white: #ffffff;
  --wine: #5f0c43;
  --lime: #beff53;
  --card: #f6f5f8;
  --dark: #261930;
  --accent: #ff8562;
  --grey: #7f7f7f;

  --font-display: 'Pragmatica Extended', 'Arial Black', Arial, sans-serif;
  --font-text: 'Roboto', Arial, Helvetica, sans-serif;

  --container: 1160px;
  --radius-card: 24px;
  --radius-img: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* height: auto обязателен: у картинок в разметке указаны width/height (чтобы
   браузер заранее знал пропорции), без него они растягиваются по вертикали */
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Типографика ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.h-hero {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 70px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 60px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.h-card {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 500;
}

.lead { font-size: 24px; line-height: 1.25; }
.text { font-size: 18px; line-height: 1.3; }
.text-lg { font-size: 20px; line-height: 1.55; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-text);
  font-weight: 700;
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }

.btn-lime {
  background: var(--lime);
  color: var(--ink);
  font-size: 18px;
  border-radius: 100px;
  padding: 10px 10px 10px 48px;
  min-height: 64px;
}
.btn-lime:hover { background: #cbff74; }
.btn-lime .btn-arrow { width: 44px; height: 44px; flex: 0 0 44px; }

.btn-dark {
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  border-radius: 30px;
  padding: 16px 32px;
}
.btn-dark:hover { background: #262626; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid rgba(12, 12, 12, 0.06);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 86px;
  padding: 12px 20px;
  max-width: var(--container);
  margin: 0 auto;
}
.site-logo { flex: 0 0 auto; }
.site-logo img { width: 180px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: 32px;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0;
  white-space: nowrap;
}
.site-nav a:hover { opacity: 0.6; }

.site-header .btn-dark { margin-left: auto; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--ink) url('../img/menu.svg') center / 20px no-repeat;
  cursor: pointer;
}

/* ---------- Секции ---------- */
/* закрепленная шапка не должна перекрывать заголовок при переходе по ссылке-якорю */
section[id] { scroll-margin-top: 96px; }

.section { padding: 90px 0; }
.section--white { background: var(--white); }
.section--wine { background: var(--wine); color: var(--white); }
.section--dark { background: var(--dark); color: var(--white); }
.section__title { text-align: center; margin-bottom: 70px; }

/* Первый экран */
.hero { padding: 88px 0 100px; text-align: center; }
.hero__title { max-width: 1040px; margin: 0 auto; }
.hero__sub { max-width: 700px; margin: 22px auto 0; }
.hero__cta { margin-top: 40px; display: flex; justify-content: center; }

/* Блок «о компании» (винный) */
.about__text p { margin: 0 0 4px; }
.about__text strong { font-weight: 700; }
.about__list { margin: 0; padding: 0; list-style: none; }

/* Направления: текст + картинка */
.product {
  display: grid;
  grid-template-columns: minmax(0, 612px) minmax(0, 502px);
  gap: 47px;
  align-items: start;
  margin-bottom: 80px;
}
.product:last-child { margin-bottom: 0; }
.product__title { margin-bottom: 20px; }
.product__text p { margin: 0 0 12px; }
.product__text ul { margin: 0 0 12px; padding-left: 22px; }
.product__text li { margin-bottom: 2px; }
.product__media img {
  width: 100%;
  border-radius: var(--radius-img);
}

/* Карточки */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.cards--two {
  grid-template-columns: repeat(2, minmax(0, 373px));
  justify-content: center;
}
.card {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: 32px;
  min-height: 380px;
}
.card__title { margin-bottom: 24px; }
.card__price { font-size: 32px; line-height: 1.1; font-weight: 700; margin-bottom: 40px; }
.card__text p { margin: 0 0 10px; }
.card--plan { text-align: center; }
.card--plan .card__title { margin-bottom: 8px; }
.card--plan .card__text { text-align: left; }

/* Список технологий */
.stack__intro { margin-bottom: 12px; }
.stack__list { margin: 0; padding-left: 24px; }
.stack__list li { margin-bottom: 4px; }

/* Кейсы */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cases img { width: 100%; border-radius: var(--radius-img); }

/* Контакты */
.contacts {
  background: linear-gradient(0deg, #ef65e1 0%, #f8418f 100%);
  color: var(--white);
  padding: 100px 0;
}
.contacts__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 562px);
  gap: 60px;
  align-items: center;
}
.contacts__note { margin: 60px 0 24px; }
.contacts__card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: 45px;
}
.contacts__card p { margin: 0 0 18px; }
.contacts__card p:last-child { margin-bottom: 0; }
.contacts__card a { color: var(--accent); text-decoration: none; }
.contacts__card a:hover { text-decoration: underline; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--dark); color: var(--white); padding-top: 64px; overflow: hidden; }
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
}
.site-footer__name { font-size: 22px; line-height: 1.2; font-weight: 500; margin-bottom: 24px; }
.site-footer__meta { font-size: 12px; line-height: 1.5; }
.site-footer__meta a { color: var(--accent); text-decoration: none; }
.site-footer__meta a:hover { text-decoration: underline; }
.site-footer__docs-title { font-size: 22px; line-height: 1.2; font-weight: 500; margin-bottom: 28px; }
.site-footer__docs { display: flex; flex-direction: column; gap: 12px; }
.site-footer__docs a {
  font-size: 14px;
  line-height: 1.15;
  color: var(--white);
  text-decoration: none;
}
.site-footer__docs a:hover { color: var(--lime); }
.site-footer__wordmark { margin-top: 56px; padding: 0 20px; }
.site-footer__wordmark img { width: 100%; }

/* ---------- Модальная форма ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 12, 12, 0.6);
}
.modal[open], .modal.is-open { display: flex; }
.modal__window {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow: auto;
  background: var(--white);
  border-radius: 20px;
}
.modal__banner { width: 100%; border-radius: 20px 20px 0 0; }
.modal__body { padding: 32px 40px 40px; }
.modal__title { font-size: 28px; line-height: 1.2; font-weight: 500; margin-bottom: 24px; }
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { background: var(--white); }

.field { margin-bottom: 14px; }
.field input[type='text'],
.field input[type='tel'],
.field input[type='email'] {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  font: 400 16px/1 var(--font-text);
  color: var(--ink);
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 12px;
}
.field input:focus { outline: 0; border-color: var(--ink); }
.field input::placeholder { color: rgba(12, 12, 12, 0.5); }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
  color: var(--grey);
  margin: 18px 0 22px;
}
.consent input { margin-top: 2px; flex: 0 0 auto; }
.consent a { color: var(--grey); }

.form__submit { width: 100%; justify-content: center; padding-left: 32px; }
.form__status { margin-top: 14px; font-size: 14px; line-height: 1.4; }
.form__status--ok { color: #1a7f37; }
.form__status--err { color: #c0392b; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .h-hero { font-size: 56px; }
  .h-section { font-size: 46px; }
  .product { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 32px; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header .btn-dark { display: none; }
  .nav-toggle { display: block; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 24px 20px 28px;
    background: var(--white);
    border-bottom: 1px solid rgba(12, 12, 12, 0.08);
  }
  .site-header__inner { position: relative; }
  .section { padding: 60px 0; }
  .section__title { margin-bottom: 40px; }
  .hero { padding: 56px 0 64px; }
  .h-hero { font-size: 40px; }
  .h-section { font-size: 34px; }
  .h-card { font-size: 26px; }
  .lead { font-size: 20px; }
  .product { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 56px; }
  .cards, .cases { grid-template-columns: minmax(0, 1fr); }
  .cards--two { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .contacts { padding: 60px 0; }
  .contacts__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .contacts__note { margin: 28px 0 20px; }
  .contacts__card { padding: 28px; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .modal__body { padding: 24px 22px 30px; }
}

@media (max-width: 480px) {
  .h-hero { font-size: 32px; }
  .text-lg { font-size: 17px; line-height: 1.5; }
  .lead { font-size: 18px; }
  .h-section { font-size: 28px; }
  .btn-lime { font-size: 16px; padding-left: 32px; min-height: 58px; }
  .btn-lime .btn-arrow { width: 38px; height: 38px; flex-basis: 38px; }
  .site-logo img { width: 140px; }
}
