/* =========================================================
   CDEK — Договорной отдел. Стили лендинга
   Цвета и шрифты по брендбуку CDEK 2025
   ========================================================= */

:root {
  --emerald: #003138;      /* Тёмный изумрудный (Pantone 547 C) */
  --emerald-2: #0B434B;    /* Светлее, для вложенных блоков на тёмном */
  --green: #00E755;        /* Яркий зелёный (Pantone 2270 C) */
  --green-soft: #E6FCEE;
  --orange: #FF6635;       /* Сигнальный оранжевый (Pantone 1645 C) */
  --ink: #0C0E12;
  --text: #3A4650;
  --muted: #4A5560;
  --muted-2: #5B6670;
  --on-dark: #D3E3E5;
  --on-dark-2: #A9C2C5;
  --line: #E3E7EA;
  --field-line: #C9D1D6;
  --surface: #F2F4F5;

  --font-head: "PT Sans Caption", "PT Sans", system-ui, sans-serif;
  --font-body: "PT Sans", system-ui, sans-serif;

  --radius-xl: 28px;
  --radius-l: 24px;
  --radius-m: 14px;
  --radius-s: 12px;
  --container: 1240px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: var(--emerald); }
a:hover { color: var(--orange); }
h1, h2, h3, p { margin: 0; }

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

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

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  font: 700 18px/1 var(--font-body);
  border-radius: var(--radius-m); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--green { background: var(--green); color: var(--emerald); }
.btn--green:hover { background: #12F566; color: var(--emerald); }
.btn--dark { background: var(--emerald); color: #FFFFFF; }
.btn--dark:hover { background: #0A4048; color: #FFFFFF; }
.btn--outline { background: transparent; color: #FFFFFF; border-color: #FFFFFF; }
.btn--outline:hover { background: #FFFFFF; color: var(--emerald); }
.btn--block { width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font-weight: 700; font-size: 16px; line-height: 1.2;
  padding: 10px 18px; border-radius: var(--radius-s);
  border: 0; cursor: pointer; text-decoration: none; text-align: left;
}
.badge--orange { background: var(--orange); color: #FFFFFF; }
.badge--orange:hover { color: #FFFFFF; filter: brightness(1.05); }
.badge--dark { background: var(--emerald); color: #FFFFFF; padding: 8px 16px; cursor: default; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 16px; padding-bottom: 16px;
}
.header__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.header__brand img { height: 30px; width: auto; }
.header__brand span {
  font-size: 14px; line-height: 1.2; color: var(--emerald);
  border-left: 1px solid var(--field-line); padding-left: 14px; white-space: nowrap;
}
.nav { display: flex; gap: 22px; }
.nav a { font-weight: 700; font-size: 16px; color: var(--emerald); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--orange); }
.header__contacts { display: flex; align-items: center; gap: 10px; }
.header__phone { font-weight: 700; font-size: 18px; color: var(--emerald); text-decoration: none; margin-right: 6px; white-space: nowrap; }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--green-soft);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--green); }
.icon-btn--text { font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--emerald); text-decoration: none; }
.icon-btn--text:hover { color: var(--emerald); }
.header__contacts .icon-btn--mail { display: none; }
.burger {
  display: none; width: 44px; height: 44px; border: 0; border-radius: var(--radius-s);
  background: var(--emerald); cursor: pointer; align-items: center; justify-content: center;
}

/* ---------- Первый экран ---------- */
.hero { padding-top: 28px; }
.hero__card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  min-height: 540px; background: var(--emerald); border-radius: var(--radius-xl); overflow: hidden;
}
.hero__content { padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hero__title { font-family: var(--font-head); font-weight: 700; font-size: 60px; line-height: 1.05; color: #FFFFFF; }
.hero__title span { color: var(--green); }
.hero__lead { font-size: 20px; color: var(--on-dark); max-width: 600px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1.5px solid var(--green); color: #FFFFFF; font-size: 16px; padding: 6px 14px; border-radius: 10px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; }
.hero__media { position: relative; min-height: 540px; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% center; }
.hero__angle { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Секции ---------- */
.section { padding-top: 88px; }
.section__title {
  font-family: var(--font-head); font-weight: 700; font-size: 44px; line-height: 1.1;
  color: var(--emerald); margin-bottom: 36px;
}

/* Преимущества */
.adv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.adv { background: var(--surface); border-radius: var(--radius-l); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.adv__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--green); display: flex; align-items: center; justify-content: center; }
.adv__title { font-size: 21px; line-height: 1.2; color: var(--emerald); }
.adv__text { font-size: 16px; color: var(--text); }

/* CDEK — это удобно */
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.about { background: var(--emerald); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; }
.about__img { width: 100%; height: 230px; object-fit: cover; }
.about__body { padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 18px; }
.about__title { font-size: 23px; line-height: 1.2; color: var(--green); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list li { display: flex; gap: 10px; align-items: flex-start; }
.list svg { flex: 0 0 auto; margin-top: 2px; }
.list--dark li { font-size: 16px; color: #E4EEEF; }
.list--light { gap: 12px; }
.list--light li { font-size: 17px; color: var(--ink); }

.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.fact { border: 2px solid var(--green); border-radius: var(--radius-l); padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.fact__title { font-size: 20px; line-height: 1.2; color: var(--emerald); }
.fact__text { font-size: 16px; color: var(--text); }

/* Интернет-магазинам */
.coop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.coop { border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-direction: column; }
.coop--grey { background: var(--surface); }
.coop--green { background: var(--green-soft); }
.coop__img { width: 100%; height: 300px; object-fit: cover; object-position: center 30%; }
.coop__body { padding: 40px; display: flex; flex-direction: column; gap: 22px; }
.coop__title { font-family: var(--font-head); font-size: 30px; line-height: 1.15; color: var(--emerald); }

/* Договор — это просто */
.agreement {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px;
  padding: 56px; background: var(--green); border-radius: var(--radius-xl);
}
.agreement__deco { position: absolute; right: 0; top: 0; height: 100%; width: 300px; pointer-events: none; }
.agreement__info { position: relative; display: flex; flex-direction: column; gap: 26px; }
.agreement .section__title { margin-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step__num {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px;
  background: var(--emerald); color: var(--green);
  font: 700 28px/1 var(--font-head); display: flex; align-items: center; justify-content: center;
}
.step__title { font-size: 22px; color: var(--emerald); }
.step__text { font-size: 17px; color: var(--emerald); }

/* ---------- Формы ---------- */
.form { position: relative; display: flex; flex-direction: column; gap: 14px; }
.form--card {
  align-self: start; background: #FFFFFF; border-radius: var(--radius-l); padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 49, 56, .12);
}
.form__title { font-size: 24px; color: var(--emerald); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.field input {
  font: inherit; font-size: 17px; color: var(--ink); background: #FFFFFF;
  border: 1px solid var(--field-line); border-radius: var(--radius-s);
  padding: 12px 14px; min-height: 48px; width: 100%;
}
.field input::placeholder { color: #8A949C; }
.field input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.field.is-invalid input { border-color: #E5484D; outline-color: #E5484D; }
.field__error { display: none; font-size: 13px; color: #C4282D; }
.field.is-invalid .field__error { display: block; }
.form__note { font-size: 13px; color: var(--muted-2); }
.form__note a, .form__note button { color: inherit; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.form--on-dark .field { color: #C3D6D8; }
.form--on-dark .field input { border-color: transparent; }
.form--on-dark .field__error { color: #FF8A8E; }
.form--on-dark .form__note { color: var(--on-dark-2); }
.form.is-sending button[type="submit"] { opacity: .6; pointer-events: none; }

/* ---------- Вопросы ---------- */
.faq { max-width: 920px; }
.faq__list { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--surface); border-radius: 18px; }
.faq__q {
  width: 100%; min-height: 56px; padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font: 700 18px/1.35 var(--font-body); color: var(--emerald); text-align: left;
  background: transparent; border: 0; cursor: pointer;
}
.faq__sign {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; background: #FFFFFF;
  display: flex; align-items: center; justify-content: center; transition: background-color .15s ease;
}
.faq__sign .v { transition: opacity .15s ease; }
.faq__q[aria-expanded="true"] .faq__sign { background: var(--green); }
.faq__q[aria-expanded="true"] .faq__sign .v { opacity: 0; }
.faq__a { padding: 0 24px 22px; font-size: 16px; color: var(--text); }
.faq__a[hidden] { display: none; }

/* ---------- Подвал ---------- */
.footer { margin-top: 96px; background: var(--emerald); color: var(--on-dark); }
.footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px;
  padding-top: 56px; padding-bottom: 32px;
}
.footer__col { display: flex; flex-direction: column; gap: 16px; font-size: 15px; }
.footer__col img { height: 32px; width: auto; align-self: flex-start; }
.requisites { display: flex; flex-direction: column; gap: 2px; color: var(--on-dark-2); font-style: normal; }
.footer a { color: var(--on-dark); }
.footer a:hover { color: var(--green); }
.footer__callback { background: var(--emerald-2); border-radius: 22px; padding: 26px; }
.footer__callback .form__title { color: #FFFFFF; font-size: 22px; }
.footer__label { color: var(--green); font-weight: 700; font-size: 15px; }
.footer__phone { color: #FFFFFF !important; font-weight: 700; font-size: 24px; text-decoration: none; }
.footer__mail { color: #FFFFFF !important; font-size: 18px; }
.messengers { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.messenger {
  color: var(--emerald) !important; background: var(--green); font-weight: 700; font-size: 15px;
  text-decoration: none; padding: 10px 16px; border-radius: 10px;
}
.messenger:hover { background: #FFFFFF; }
.footer__bottom { border-top: 1px solid #1E4E55; }
.footer__bottom .container { padding-top: 20px; padding-bottom: 32px; font-size: 13px; color: var(--on-dark-2); }

/* ---------- Модальные окна ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(12, 14, 18, .62);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__dialog {
  position: relative; width: 100%; max-height: calc(100vh - 48px); overflow: auto;
  border-radius: var(--radius-xl); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  transform: translateY(12px); transition: transform .2s ease;
}
.modal.is-open .modal__dialog { transform: none; }
.modal__close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 44px; height: 44px; border-radius: var(--radius-s); border: 0;
  background: var(--emerald); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.modal__close:hover { background: var(--emerald-2); }

/* Окно «Заключить договор» */
.modal__dialog--agreement { max-width: 560px; background: var(--emerald); overflow-x: hidden; }
.modal__angle { position: absolute; right: 0; top: 0; width: 120px; height: 100%; pointer-events: none; }
.modal__body { position: relative; padding: 44px 140px 40px 44px; display: flex; flex-direction: column; gap: 16px; }
.modal__title { font-family: var(--font-head); font-size: 34px; line-height: 1.1; color: #FFFFFF; }
.modal__text { font-size: 17px; color: #C3D6D8; }

/* Окно «Сообщение принято» */
.modal__dialog--thanks {
  max-width: 440px; background: var(--emerald); padding: 52px 40px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.modal__dialog--thanks .modal__close { top: 16px; right: 16px; background: transparent; }
.thanks__icon { width: 88px; height: 88px; border-radius: 26px; background: var(--green); display: flex; align-items: center; justify-content: center; }
.thanks__urgent { display: flex; gap: 8px; font-size: 14px; color: var(--on-dark-2); padding-top: 4px; }
.thanks__urgent a { color: #FFFFFF; font-weight: 700; text-decoration: none; }

/* Окно «Политика» */
.modal__dialog--policy {
  max-width: 860px; height: min(820px, calc(100vh - 48px)); background: #FFFFFF;
  display: flex; flex-direction: column; overflow: hidden;
}
.policy__head {
  flex: 0 0 auto; background: var(--emerald); padding: 28px 32px 26px 40px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
}
.policy__head .modal__close { position: static; background: var(--emerald-2); }
.policy__org { color: var(--green); font-weight: 700; font-size: 14px; }
.policy__title { font-family: var(--font-head); font-size: 30px; line-height: 1.15; color: #FFFFFF; margin-top: 6px; }
.policy__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 40px 36px; color: #2A3640; font-size: 16px; line-height: 1.55; }
.policy__body h3 { margin: 28px 0 12px; font-size: 20px; line-height: 1.25; color: var(--emerald); }
.policy__body p { margin: 0 0 12px; }
.policy__body ul { margin: 0 0 12px; padding-left: 22px; }
.policy__body li { margin-bottom: 6px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1500px) {
  .nav { gap: 16px; }
  .nav a { font-size: 15px; }
  .header__contacts { gap: 6px; }
  .header__phone { margin-right: 2px; }
  .header__inner { gap: 16px; }
}

@media (max-width: 1360px) {
  .header__contacts .icon-btn { display: none; }
}

@media (max-width: 1100px) {
  .burger { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: #FFFFFF;
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 49, 56, .08);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 16px 24px; border-top: 1px solid var(--line); }
  .header__inner { position: relative; }
  .adv-grid, .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .about__img { height: 100%; min-height: 230px; }
}

@media (max-width: 900px) {

  .hero__card, .coop-grid, .agreement, .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__media { order: -1; min-height: 340px; }
  .hero__media img { object-position: center 20%; }
  .hero__angle { display: none; }
  .about { display: flex; }
  .about__img { height: 230px; min-height: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header__brand span, .header__contacts .icon-btn { display: none; }
  .header__phone { font-size: 16px; }
  .hero { padding-top: 16px; }
  .hero__content, .agreement, .coop__body { padding: 32px 24px; }
  .hero__title { font-size: 40px; }
  .hero__lead { font-size: 18px; }
  .hero__actions .btn { width: 100%; }
  .section { padding-top: 64px; }
  .section__title { font-size: 30px; margin-bottom: 24px; }
  .adv-grid, .facts-grid { grid-template-columns: minmax(0, 1fr); }
  .coop__img { height: 220px; }
  .coop__title { font-size: 26px; }
  .form--card { padding: 24px; }
  .modal { padding: 12px; align-items: flex-end; }
  .modal__dialog { max-height: calc(100vh - 24px); }
  .modal__body { padding: 72px 24px 28px; }
  .modal__angle { display: none; }
  .modal__title { font-size: 28px; }
  .policy__head { padding: 22px 20px 20px 24px; }
  .policy__title { font-size: 22px; }
  .policy__body { padding: 4px 24px 28px; }
}

/* =========================================================
   Laravel: поправки для HTML из админки (Filament)
   ========================================================= */
.adv__icon img { display: block; width: 28px; height: 28px; object-fit: contain; }
.faq__a > * + * { margin-top: .6em; }
.faq__a p, .faq__a ul, .faq__a ol { margin-bottom: 0; }
.requisites p { margin: 0; }
.list li > span > p { margin: 0; }
.policy__body h1, .policy__body h2 { margin: 28px 0 12px; font-size: 22px; line-height: 1.25; color: var(--emerald); }
.policy__body > :first-child { margin-top: 12px; }
