/* ============ TOKENS ============ */
:root {
  --white: #ffffff;
  --black: #242424;
  --gray-500: #c4c4c4;
  --blue: #2f6eba;          /* акцент hero */
  --red: #ea3323;           /* кнопки / акцент */
  --input-bg: #f2f2f2;
  --input-border: rgba(36,36,36,0.2);

  --container: 1440px;
  --pad-x: 96px;

  --font: 'Roboto', -apple-system, Segoe UI, sans-serif;
}

/* ============ RESET / BASE ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  font-size: 14px;
  line-height: 1.4;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ============ HEADER ============ */
.header {
  background: var(--white);
  padding-top: 19px;
  padding-bottom: 19px;
  position: relative;
  z-index: 106;   /* выше меню-drawer, чтобы бургер-крестик закрывал */
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header__logo img { height: 42px; width: auto; }

.header__right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header__contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.header__contacts-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 24px;
  color: var(--black);
  white-space: nowrap;
}
.header__phone-icon { width: 18px; height: 18px; }

.header__socials {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header__socials img { width: 18px; height: 18px; }

.header__note {
  font-size: 12px;
  color: var(--black);
}

.header__burger {
  width: 24px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.header__burger span {
  display: block;
  height: 2px;
  width: 24px;
  border-radius: 2px;
  background: var(--black);
  transition: .25s;
}
.header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ NAV MENU (drawer) ============ */
.nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 105;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: var(--white);
  box-shadow: -8px 0 30px rgba(36,36,36,0.15);
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 80px 28px 28px;
  overflow-y: auto;
}
body.menu-open .nav-menu { transform: translateX(0); }
.nav-menu__close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 34px;
  line-height: 1;
  color: var(--black);
  width: 36px;
  height: 36px;
}
.nav-menu a { font-size: 17px; color: var(--black); padding: 10px 0; transition: color .2s; }
.nav-menu a:hover { color: var(--blue); }
.nav-menu__foot { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--input-border); }
.nav-menu__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
}
.nav-menu__phone img { width: 18px; height: 18px; }
.nav-menu__socials { display: flex; gap: 14px; margin-top: 16px; }
.nav-menu__socials img { width: 22px; height: 22px; }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 104;
  background: rgba(36,36,36,0.5);
}
.nav-overlay[hidden] { display: none; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  transition: .2s;
}
.btn--red { background: #e02d1c; color: var(--white); }   /* контраст AA (4.6:1) */
.btn--red:hover { background: #c21f11; }

/* ============ HERO ============ */
.hero { padding-top: 0; }
.hero__box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 75px;
  min-height: 475px;
  padding: 40px 60px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--blue);
}
.hero__box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/hero-bg.webp") center/cover no-repeat;
  opacity: .19;
}
.hero__content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 663px;
}
.hero__title {
  font-size: 46px;
  line-height: 1;
  font-weight: 700;
  color: var(--white);
}
.hero__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--white);
}
.hero__list img { width: 32px; height: 32px; flex-shrink: 0; }

/* ============ LEAD FORM ============ */
.lead-form {
  position: relative;
  flex-shrink: 0;
  width: 390px;
  background: var(--white);
  border-radius: 6px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lead-form__head { display: flex; flex-direction: column; gap: 10px; line-height: 1.1; }
.lead-form__title { font-size: 24px; font-weight: 700; color: var(--red); }
.lead-form__sub { font-size: 14px; color: var(--black); }
.lead-form__body { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 14px; color: var(--black); }
.field__input {
  width: 100%;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--black);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
}
.field__input::placeholder { color: rgba(36,36,36,0.2); }
.field__input:focus { outline: none; border-color: var(--blue); }
.field__input--error { border-color: #e02d1c; background: #fdecea; }

.lead-form__row { display: flex; gap: 16px; align-items: center; }
.lead-form__row .btn { flex-shrink: 0; }

.consent { display: flex; gap: 4px; align-items: center; font-size: 8px; line-height: 1.2; color: var(--black); cursor: pointer; }
.consent input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--red); }
.consent b { font-weight: 700; }

/* ============ SECTION TITLE ============ */
.section-title {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
.section-title span {
  display: inline-block;
  padding: 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: var(--black);
  border-bottom: 2px solid var(--red);
}

/* ============ ABOUT ============ */
.about { padding: 50px 0; }
.about__inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.checklist {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  font-size: 18px;
  line-height: 1.1;
  color: var(--black);
}
.checklist img { width: 32px; height: 32px; flex-shrink: 0; }

/* cert slider */
.cert-slider {
  flex-shrink: 0;
  width: 416px;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  justify-items: center;
  gap: 16px;
  row-gap: 20px;
}
.cert-slider__arrow {
  font-size: 22px;
  line-height: 1;
  color: var(--black);
  width: 24px;
  height: 32px;
}
.cert-slider__viewport { width: 100%; overflow: hidden; }
.cert-slider__track { display: flex; transition: transform .3s ease; }
.cert-slider__slide { min-width: 100%; }
.cert-slider__slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;          /* документы и альбомные, и портретные — показываем целиком */
  background: var(--white);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  cursor: zoom-in;
}
.cert-slider__dots {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.cert-slider__dots button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  position: relative;
}
.cert-slider__dots button::before {
  content: "";
  position: absolute;
  inset: 7px;                 /* видимая точка 10px в области нажатия 24px */
  border-radius: 50%;
  background: var(--gray-500);
}
.cert-slider__dots button.is-active::before { background: var(--blue); }

/* ============ SAFETY ============ */
.safety { background: #f8f8f8; padding: 50px 0; }
.safety__inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.safety__intro {
  flex-shrink: 0;
  width: 403px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  justify-content: center;
}
.safety__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
}
.safety__intro .btn { align-self: flex-start; }

.safety__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.info-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 10px;
  transition: .2s;
}
.info-card:hover { border-color: var(--blue); }
.info-card__icon { width: 48px; height: 48px; flex-shrink: 0; }
.info-card__text { flex: 1; font-size: 18px; line-height: 1.1; color: var(--black); }
.info-card__arrow { flex-shrink: 0; font-size: 20px; color: var(--black); }

/* ============ HOW WE WORK ============ */
.how { padding: 50px 0; }
.how__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  text-align: center;
}
.step__icon { width: 70px; height: 70px; }
.step__title { font-size: 18px; font-weight: 700; line-height: 1.1; color: var(--black); margin-bottom: 12px; }
.step__text { font-size: 12px; line-height: 1.4; color: var(--black); }

/* ============ ACCORDION ============ */
.process { padding: 50px 0; }
.accordion { display: flex; flex-direction: column; gap: 30px; }
.acc-item { width: 100%; }
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: #f8f8f8;
  text-align: left;
}
.acc-head__title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--black);
}
.acc-head__btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 6px;
  border: 1px solid var(--black);
  border-radius: 4px;
}
.acc-head__btn img {
  width: 16px;
  height: 8px;
  transition: transform .25s;
  transform: rotate(180deg);   /* закрыто — вниз */
}
.acc-item.is-open .acc-head__btn img { transform: rotate(0deg); } /* открыто — вверх */

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.acc-item.is-open .acc-body { max-height: 1200px; }
.acc-body > *:first-child { margin-top: 0; padding-top: 24px; }
.acc-body p,
.acc-body li {
  font-size: 12px;
  line-height: 1.4;
  color: var(--black);
}
.acc-body p { padding: 0 16px; margin: 8px 0 0; }
.acc-list {
  list-style: decimal;
  padding: 0 16px 0 34px;
  margin: 8px 0 0;
}
.acc-list li { margin-bottom: 4px; }
.acc-list li:last-child { margin-bottom: 0; }
.acc-list--ul { list-style: disc; }

/* длинные правовые документы — прокрутка внутри раскрытого пункта */
.legal .acc-item.is-open .acc-body--doc {
  max-height: 420px;
  overflow-y: auto;
  padding-bottom: 16px;
}
.acc-body--doc p + p { margin-top: 10px; }
.acc-body--doc b { font-weight: 700; }

/* ============ TEAM ============ */
.team { background: #e6f1ff; padding: 50px 0; }
.team__lead {
  text-align: center;
  font-size: 14px;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 30px;
}
.team__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.team-card {
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.team-card__photo {
  height: 360px;
  background: #d9d9d9;
}
.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.team-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 24px 8px;
}
.team-card__name { font-size: 18px; font-weight: 700; color: var(--black); }
.team-card__role { font-size: 13px; line-height: 1.4; color: var(--black); }

.team__cta { display: flex; justify-content: center; margin-top: 30px; }

/* ============ REVIEWS ============ */
.reviews { padding: 50px 0; }
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.review {
  height: 454px;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f8f8;
}
.review img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
}

/* ============ LEGAL ============ */
.legal { background: #f8f8f8; padding: 50px 0; }

/* ============ SEO TEXT ============ */
.seo-text { background: #f8f8f8; padding: 50px 0; }
.seo-text p {
  font-size: 14px;
  line-height: 1.3;
  color: var(--black);
}
.seo-text p + p { margin-top: 16px; }
.seo-text b { font-weight: 700; }

/* ============ MAP / CONTACTS ============ */
.map-section { padding: 50px 0; }
.map {
  position: relative;
  height: 325px;
  border-radius: 6px;
  overflow: hidden;
}
.map__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map__note {
  position: absolute;
  left: 21px;
  top: 34px;
  width: 229px;
  padding: 10px;
  background: var(--white);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.1;
  color: var(--black);
}
.contacts-card {
  position: absolute;
  right: 36px;
  top: 34px;
  width: 390px;
  padding: 30px;
  background: var(--white);
  border-radius: 6px;
}
.contacts-card__title { font-size: 24px; font-weight: 700; color: var(--black); margin-bottom: 10px; }
.contacts-card__list { display: flex; flex-direction: column; gap: 20px; }
.contacts-card__list p { font-size: 14px; line-height: 1.1; color: var(--black); }
.contacts-card__phone { font-size: 24px !important; }
.contacts-card__phone a { color: var(--black); }
.contacts-card__vk { color: var(--blue); text-decoration: underline; }

/* ============ FOOTER ============ */
.footer { padding: 40px 0; color: var(--white); }
.footer__card {
  background: var(--blue);
  border-radius: 24px;
  padding: 60px;
}
.footer__top {
  display: flex;
  gap: 40px;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__nav a {
  font-size: 18px;
  line-height: 1.1;
  color: var(--white);
  transition: .2s;
}
.footer__nav a:hover { opacity: .85; }
.footer__nav a.is-active { text-decoration: underline; }

.footer__top > .footer__nav { flex: 1; }
.footer__mid { flex: 1; display: flex; flex-direction: column; gap: 40px; }
.footer__socials { display: flex; gap: 16px; }
.footer__socials a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  transition: .2s;
}
.footer__socials a:hover { background: rgba(255,255,255,0.12); }
.footer__socials img { width: 20px; height: 20px; filter: brightness(0) invert(1); }

.footer__contacts { flex: 1.2; display: flex; flex-direction: column; gap: 16px; }
.footer__addr-title { font-size: 18px; margin-bottom: 4px; }
.footer__addr {
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.35;
}
.footer__addr svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--white); }
.footer__phone-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}
.footer__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}
.footer__phone svg { width: 22px; height: 22px; }

.footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.35);
}
.footer__bottom p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);   /* контраст AA на синем */
}
.footer__bottom p + p { margin-top: 4px; }

/* ============ MODALS ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36,36,36,0.55);
  animation: fade .2s ease;
}
.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 6px;
  padding: 30px;
  width: 390px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: pop .2s ease;
}
.modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 26px;
  line-height: 1;
  color: var(--black);
  width: 24px;
  height: 24px;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

.info-modal__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--black);
  padding-right: 32px;
  margin-bottom: 30px;
}
.info-modal__list { list-style: none; display: flex; flex-direction: column; gap: 30px; }
.info-modal__list li { display: flex; flex-direction: column; gap: 10px; }
.info-modal__list b {
  position: relative;
  padding-left: 30px;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
}
.info-modal__list b::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}
.info-modal__list span { font-size: 12px; line-height: 1.3; color: var(--black); }
.info-modal__list a { color: var(--blue); text-decoration: underline; word-break: break-word; }

.lead-form--modal { width: 100%; padding: 0; }

/* info-card как кнопка */
.info-card { width: 100%; text-align: left; font: inherit; cursor: pointer; }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  animation: pop .2s ease;
}
.lightbox__close { position: fixed; top: 24px; right: 28px; color: var(--white); font-size: 36px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  :root { --pad-x: 40px; }
  .hero__box { gap: 40px; padding: 40px; }
  .hero__title { font-size: 38px; }
}

@media (max-width: 860px) {
  .map { height: auto; overflow: visible; }
  .map__frame { position: relative; height: 260px; border-radius: 6px; }
  .map__note { display: none; }
  .contacts-card {
    position: static;
    width: 100%;
    margin-top: 16px;
  }
}

@media (max-width: 960px) {
  .hero__box { flex-direction: column; align-items: stretch; }
  .hero__content { max-width: 100%; }
  .lead-form { width: 100%; }

  .about__inner { flex-direction: column; gap: 40px; }
  .cert-slider { width: 100%; }

  .safety__inner { flex-direction: column; }
  .safety__intro { width: 100%; gap: 20px; }
}

@media (max-width: 960px) {
  .how__grid { grid-template-columns: repeat(2, 1fr); gap: 40px 0; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .reviews__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .footer__card { padding: 32px 24px; border-radius: 16px; }
  .footer__top { flex-direction: column; gap: 32px; }
  .footer__phone-row { flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 640px) {
  .safety__grid { grid-template-columns: 1fr; }
  .how__grid { grid-template-columns: 1fr; }

  /* Фото на мобиле — горизонтальный скролл со свайпом */
  .team__grid,
  .reviews__grid {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(-1 * var(--pad-x));
    padding: 0 var(--pad-x) 10px;
  }
  .team__grid::-webkit-scrollbar,
  .reviews__grid::-webkit-scrollbar { display: none; }
  .team-card,
  .review {
    flex: 0 0 72%;
    scroll-snap-align: center;
  }

  /* Сертификат — нативный свайп вместо стрелок */
  .cert-slider { grid-template-columns: 1fr; }
  .cert-slider__arrow,
  .cert-slider__dots { display: none; }
  .cert-slider__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .cert-slider__viewport::-webkit-scrollbar { display: none; }
  .cert-slider__track { transform: none !important; }
  .cert-slider__slide { scroll-snap-align: center; }
}

@media (max-width: 768px) {
  :root { --pad-x: 16px; }

  .header__note { display: none; }
  .header__socials { display: none; }
  .header { padding-top: 16px; padding-bottom: 16px; }
  .header__logo img { height: 40px; }
  .header__phone { font-size: 18px; }
  .header__phone span { display: none; }   /* на мобиле — только иконка телефона */

  .hero__box { padding: 24px 16px; }
  .hero__title { font-size: 28px; }
  .hero__list li { font-size: 15px; }
  .lead-form { padding: 20px; }
  .lead-form__row { flex-direction: column; align-items: stretch; }
  .lead-form__row .btn { width: 100%; }
}
