/* ==========================================================================
   Главная pess.by — все секции site/layouts (110-scope … 700-content). Только var(--es-*).
   Строгий стиль: без карточек и теней — линии, колонки, воздух. Адаптив 992 / 768 / 560.
   ========================================================================== */

/* ---- Что проектируем: плитка направлений с фото ---- */
body.main-page .home-scope__grid {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 32px); margin: 0; padding: 0; list-style: none}
body.main-page .home-scope__photo {position: relative; aspect-ratio: 16 / 11; overflow: hidden; border-radius: var(--es-radius); background: var(--es-surface-alt)}
body.main-page .home-scope__photo picture,
body.main-page .home-scope__photo img {display: block; width: 100%; height: 100%; object-fit: cover}
body.main-page .home-scope__tag {position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--es-primary); font-size: 13px; font-weight: 600; line-height: 1.2; box-shadow: 0 6px 18px rgba(21, 23, 61, .12)}
body.main-page .home-scope__name {margin: 18px 0 8px; color: var(--es-heading); font-family: var(--es-font-display); font-size: 21px; font-weight: 600; line-height: 1.3}
body.main-page .home-scope__text {color: var(--es-muted); font-size: 15px; line-height: 1.6}
/* ---- Услуги: этапы проекта ---- */
body.main-page .home-svc__grid {display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: stretch}
body.main-page .home-svc__media {position: relative; min-height: 420px; overflow: hidden; border-radius: var(--es-radius); background: var(--es-border)}
body.main-page .home-svc__photo {position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease}
body.main-page .home-svc__photo.is-active {opacity: 1}
body.main-page .home-svc__photo picture,
body.main-page .home-svc__photo img {display: block; width: 100%; height: 100%; object-fit: cover}
body.main-page .home-svc__list {counter-reset: none; border-top: 1px solid var(--es-heading)}
body.main-page .home-svc__item {border-bottom: 1px solid var(--es-border)}
body.main-page .home-svc__row {position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) 28px; gap: 20px; align-items: start; padding: 24px 0; color: inherit; transition: padding .25s ease}
body.main-page .home-svc__row::before {content: ""; position: absolute; left: 0; top: -1px; width: 0; height: 2px; background: var(--es-primary); transition: width .35s ease}
body.main-page .home-svc__row.is-active::before {width: 100%}
body.main-page .home-svc__num {padding-top: 4px; color: var(--es-sky); font-family: var(--es-font-mono); font-size: 14px; font-weight: 500}
body.main-page .home-svc__name {margin: 0; color: var(--es-heading); font-family: var(--es-font-display); font-size: 21px; font-weight: 600; line-height: 1.3; transition: color .2s}
body.main-page .home-svc__text {display: -webkit-box; margin-top: 8px; overflow: hidden; color: var(--es-muted); font-size: 15px; line-height: 1.6; -webkit-line-clamp: 2; -webkit-box-orient: vertical}
body.main-page .home-svc__arrow {position: relative; width: 28px; height: 28px; margin-top: 2px; color: var(--es-primary); opacity: .35; transition: opacity .2s, transform .2s}
body.main-page .home-svc__arrow::before {content: "\2192"; position: absolute; inset: 0; font-size: 20px; line-height: 28px; text-align: center}
body.main-page .home-svc__row:hover .home-svc__name,
body.main-page .home-svc__row:focus-visible .home-svc__name {color: var(--es-primary)}
body.main-page .home-svc__row.is-active .home-svc__arrow {opacity: 1; transform: translateX(4px)}
body.main-page .home-svc__row:focus-visible {outline: 2px solid var(--es-sky); outline-offset: 4px}

/* ---- Полоса-призыв ---- */
body.main-page .home-cta {padding: 0 0 var(--es-section-py)}
body.main-page .home-cta__box {display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); overflow: hidden; border-radius: 18px; background: linear-gradient(115deg, #1a6db0 0%, #2f5fae 45%, #3f3b8a 100%); color: #fff}
body.main-page .home-cta__body {padding: clamp(32px, 4.5vw, 64px)}
body.main-page .home-cta__title {margin: 0; color: #fff; font-family: var(--es-font-display); font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; line-height: 1.2}
body.main-page .home-cta__text {max-width: 560px; margin-top: 16px; color: rgba(255, 255, 255, .86); font-size: 17px; line-height: 1.6}
body.main-page .home-cta__actions {display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 30px}
body.main-page .home-cta__phone {color: #fff; font-size: 22px; font-weight: 600; white-space: nowrap}
body.main-page .home-cta__phone:hover {color: #cfe8f8}
body.main-page .home-cta__photo {position: relative; min-height: 280px}
body.main-page .home-cta__photo picture,
body.main-page .home-cta__photo img {position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover}

/* ---- Преимущества ---- */
body.main-page .home-adv__list {display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 clamp(20px, 2.6vw, 40px)}
body.main-page .home-adv__item {padding-top: 0}
body.main-page .home-adv__icon {display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 20px; border-radius: 16px; background: var(--es-primary-soft); color: var(--es-primary); font-size: 28px}
body.main-page .home-adv__item:nth-child(even) .home-adv__icon {background: #ebeaf7; color: var(--es-indigo)}
body.main-page .home-adv__name {margin: 0 0 12px; color: var(--es-heading); font-family: var(--es-font-display); font-size: 20px; font-weight: 600; line-height: 1.3}
body.main-page .home-adv__text {color: var(--es-muted); font-size: 15px; line-height: 1.65}

/* ---- Логотипы (заказчики, партнёры) ---- */
.pess-logos {display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; margin: 0; padding: 28px 0 0; border-top: 1px solid var(--es-border); list-style: none}
.pess-logos__item {flex: 0 0 20%; min-width: 0}
.pess-logos__link {display: flex; align-items: center; justify-content: center; height: 112px; padding: 18px 26px; color: var(--es-heading)}
.pess-logos__link img,
.pess-logos__link picture {display: block; max-width: 100%; max-height: 60px; width: auto; height: auto; object-fit: contain}
.pess-logos__link {transition: transform .2s}
a.pess-logos__link:hover {transform: translateY(-3px)}

.pess-logos__name {font-family: var(--es-font-display); font-size: 16px; font-weight: 600; line-height: 1.3; text-align: center}

/* ---- Лента отзывов ---- */
body.main-page .home-reviews {margin-top: clamp(48px, 5vw, 72px)}
body.main-page .home-reviews__title {margin: 0 0 28px; color: var(--es-heading); font-family: var(--es-font-display); font-size: 24px; font-weight: 600}
body.main-page .home-reviews__slider {padding-bottom: 44px}
body.main-page .home-reviews__item {height: 100%; margin: 0; padding-top: 24px; border-top: 2px solid var(--es-sky)}
body.main-page .home-reviews__text {margin: 0; color: var(--es-heading); font-family: var(--es-font-display); font-size: 18px; font-weight: 500; line-height: 1.6}
body.main-page .home-reviews__text::before {content: "\00AB"}
body.main-page .home-reviews__text::after {content: "\00BB"}
body.main-page .home-reviews__author {display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 20px; color: var(--es-muted); font-size: 14px}
body.main-page .home-reviews__author strong {color: var(--es-heading); font-weight: 600}
body.main-page .home-reviews__author time {font-family: var(--es-font-mono); font-size: 12px}
body.main-page .home-reviews__slider .swiper-pagination {bottom: 0; text-align: left}
body.main-page .home-reviews__slider .swiper-pagination-bullet {width: 28px; height: 2px; margin: 0 6px 0 0 !important; border: 0; border-radius: 0; background: var(--es-border); opacity: 1}
body.main-page .home-reviews__slider .swiper-pagination-bullet::after {content: none}
body.main-page .home-reviews__slider .swiper-pagination-bullet-active {background: var(--es-primary)}

/* ---- Новости отрасли (RSS) ---- */
body.main-page .home-news__grid {display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start}
body.main-page .home-news__more {margin-top: 28px}
body.main-page .home-news__list {border-top: 1px solid var(--es-heading)}
body.main-page .home-news__item {border-bottom: 1px solid var(--es-border)}
body.main-page .home-news__link {display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; padding: 20px 0; color: inherit}
body.main-page .home-news__meta {display: flex; flex-direction: column; gap: 4px; color: var(--es-muted); font-size: 13px; line-height: 1.4}
body.main-page .home-news__meta time {color: var(--es-primary); font-family: var(--es-font-mono); font-size: 13px}
body.main-page .home-news__title {color: var(--es-heading); font-size: 17px; font-weight: 500; line-height: 1.5; transition: color .2s}
body.main-page .home-news__link:hover .home-news__title {color: var(--es-primary)}
body.main-page .home-news__link::after {content: none}

/* ---- Вопрос-ответ ---- */
body.main-page .home-faq__container {display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start}
body.main-page .home-faq__intro {position: sticky; top: 120px}
body.main-page .home-faq__actions {display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 32px}
body.main-page .home-faq__list {border-top: 1px solid var(--es-heading)}
body.main-page .home-faq__item {border-bottom: 1px solid var(--es-border)}
body.main-page .home-faq__question {display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; padding: 22px 0; background: none; color: var(--es-heading); font-size: 17px; font-weight: 600; line-height: 1.45; text-align: left; cursor: pointer; transition: color .2s}
body.main-page .home-faq__question:hover,
body.main-page .home-faq__item.is-open .home-faq__question {color: var(--es-primary)}
body.main-page .home-faq__icon {position: relative; width: 20px; height: 20px; flex-shrink: 0}
body.main-page .home-faq__icon::before,
body.main-page .home-faq__icon::after {content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; margin: -1px 0 0 -7px; background: currentColor; transition: transform .25s}
body.main-page .home-faq__icon::after {transform: rotate(90deg)}
body.main-page .home-faq__item.is-open .home-faq__icon::after {transform: rotate(0deg)}
body.main-page .home-faq__answer {max-height: 0; overflow: hidden; transition: max-height .35s ease}
body.main-page .home-faq__answer-inner {padding: 0 48px 24px 0; color: var(--es-text); font-size: 15px; line-height: 1.7}
body.main-page .home-faq__answer-inner p + p {margin-top: 10px}

/* ---- Форма заявки (тёмная) ---- */
body.main-page .home-form {position: relative; overflow: hidden}
body.main-page .home-form {background: linear-gradient(120deg, #1d1f5e 0%, #24306f 45%, #1a5f9e 100%)}
body.main-page .home-form::before {content: ""; position: absolute; right: -160px; top: -200px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 169, 223, .35) 0%, rgba(79, 169, 223, 0) 70%); pointer-events: none}
body.main-page .home-form__container {position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(32px, 6vw, 96px); align-items: center}
body.main-page .home-form__features {display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none}
body.main-page .home-form__features li {display: flex; align-items: center; gap: 14px; color: rgba(255, 255, 255, .9); font-size: 16px}
body.main-page .home-form__features i {display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #8fcbf0; font-size: 18px}
body.main-page .home-form__contacts {display: flex; flex-direction: column; gap: 10px; margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .14)}
body.main-page .home-form__contact {display: inline-flex; align-items: baseline; gap: 12px; color: #fff; font-size: 16px; font-weight: 500}
body.main-page .home-form__contact:hover {color: #8fcbf0}
body.main-page .home-form__contact--phone {font-size: 20px; font-weight: 600}
body.main-page .home-form__label {min-width: 76px; color: #8fcbf0; font-family: var(--es-font-mono); font-size: 12px; font-weight: 400;text-transform: uppercase}
body.main-page .home-form__contact--muted {color: rgba(255, 255, 255, .6); font-size: 14px; font-weight: 400}
body.main-page .home-form__form {display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 3vw, 40px); border-radius: 16px; background: #fff; color: var(--es-text); box-shadow: 0 30px 60px rgba(0, 0, 0, .25)}
body.main-page .home-form__form-title {margin: 0 0 4px; color: var(--es-heading); font-family: var(--es-font-display); font-size: 24px; font-weight: 600}
body.main-page .home-form__field {display: flex; flex-direction: column; gap: 6px; margin: 0}
body.main-page .home-form__field > span {color: var(--es-heading); font-size: 13px; font-weight: 600}
body.main-page .home-form__field em {color: #c62828; font-style: normal}
body.main-page .home-form__field input,
body.main-page .home-form__field textarea {width: 100%; padding: 13px 14px; border: 1px solid var(--es-border); border-radius: var(--es-radius-sm); background: #fff; color: var(--es-heading); font-size: 15px; line-height: 1.4; transition: border-color .2s, box-shadow .2s}
body.main-page .home-form__field textarea {min-height: 92px; resize: vertical}
body.main-page .home-form__field input:focus,
body.main-page .home-form__field textarea:focus {outline: none; border-color: var(--es-primary); box-shadow: 0 0 0 3px var(--es-primary-soft)}
body.main-page .home-form__field .is-invalid {border-color: #c62828; background: #fff5f5}
body.main-page .home-form__confirm {display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 13px; line-height: 1.45; cursor: pointer}
body.main-page .home-form__confirm input {width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--es-primary); appearance: auto; -webkit-appearance: auto}
body.main-page .home-form__confirm a {color: var(--es-primary); text-decoration: underline}
body.main-page .home-form__submit {width: 100%; margin-top: 4px}
body.main-page .home-form__submit:disabled {opacity: .6; cursor: wait}
body.main-page .home-form__status {min-height: 20px; margin: 0; font-size: 14px}
body.main-page .home-form__status.is-error {color: #c62828}
body.main-page .home-form__status.is-success {color: #2e7d32; font-weight: 600}

/* ---- Адаптив ---- */
@media (max-width: 1200px) {
    body.main-page .home-adv__list {grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 32px}
}
@media (max-width: 992px) {
    body.main-page .home-scope__grid {grid-template-columns: repeat(2, minmax(0, 1fr))}
    body.main-page .home-cta__box {grid-template-columns: 1fr}
    body.main-page .home-cta__photo {min-height: 220px}
    body.main-page .home-svc__grid,
    body.main-page .home-news__grid,
    body.main-page .home-faq__container,
    body.main-page .home-form__container {grid-template-columns: 1fr}
    body.main-page .home-faq__intro {position: static}
    body.main-page .home-svc__media {display: none}
}
@media (max-width: 768px) {
    body.main-page .home-adv__list {grid-template-columns: 1fr 1fr}
    body.main-page .home-news__link {grid-template-columns: 1fr; gap: 6px}
    body.main-page .home-news__meta {flex-direction: row; flex-wrap: wrap; gap: 4px 14px}
    .pess-logos__item {flex-basis: 33.333%}
    .pess-logos__link {height: 96px; padding: 14px}
}
@media (max-width: 560px) {
    body.main-page .home-scope__grid {grid-template-columns: 1fr}
    .pess-logos__item {flex-basis: 50%}
    body.main-page .home-svc__row {grid-template-columns: 36px minmax(0, 1fr); gap: 12px}
    body.main-page .home-svc__arrow {display: none}
    body.main-page .home-svc__name {font-size: 18px}
    body.main-page .home-adv__list {grid-template-columns: 1fr}
    body.main-page .home-faq__question {padding: 18px 0; font-size: 16px}
    body.main-page .home-faq__answer-inner {padding-right: 0}
    body.main-page .home-reviews__text {font-size: 16px}
}
@media (prefers-reduced-motion: reduce) {
    body.main-page .home-svc__photo, body.main-page .home-svc__row::before {transition: none}
}
