/* ==========================================================================
   Стили секций. Токены, темы и общие компоненты берите из css/style.css
   (список классов: docs/components.md). Здесь только то, что относится
   к конкретной секции. Без градиентов, blur, теней, HEX и rgba.
   Каждый исполнитель пишет только в своём блоке.
   ========================================================================== */

/* ---- compare: «Было / Стало» ---- */
.compare-card { gap: var(--space-5); }
.compare-card h3 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
  text-transform: uppercase;
}
.compare-card .strike-list li,
.compare-card .check-list li { font-size: clamp(16px, 1.5vw, 18px); }
.compare-card .strike-list li::after { top: calc(0.05em + 11px); }

/* ---- cases: кейсы, галерея, модалка ---- */

/* фильтры: на узком экране ряд прокручивается по горизонтали */
.cases-filters { margin-bottom: clamp(24px, 3vw, 40px); }
@media (max-width: 767px) {
  .cases-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px;
    margin-inline: -6px;
    margin-bottom: var(--space-5);
    scrollbar-width: thin;
  }
  .cases-filters .choice { flex: none; white-space: nowrap; }
}

.case-card[hidden], .case-feature[hidden], .cases-group[hidden] { display: none; }

/* общие списки «параметр: значение» */
.kv-list { display: flex; flex-direction: column; }
.kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 10px;
  border-top: 2px solid var(--line);
}
.kv-row dt { font-size: 15px; line-height: 1.3; color: var(--fg-2); min-width: 0; }
.kv-row dd {
  margin: 0;
  flex: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}
.kv-row .was { color: var(--fg-2); }
.kv-head { text-align: right; padding-bottom: var(--space-2); }

/* A. крупные карточки двух новых кейсов */
.cases-feature-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vw, 24px);
}
.case-feature { gap: var(--space-5); }
.case-feature-main, .case-feature-side { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
@media (min-width: 992px) {
  .case-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 4vw, 56px);
    padding: clamp(32px, 3.4vw, 48px);
    align-items: start;
  }
}
.case-feature .pill { align-self: flex-start; }
.case-feature-title {
  font-weight: 900;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.08;
}
.case-feature .text strong { font-family: var(--font-head); font-weight: 800; }
.case-sub {
  margin: 0 0 var(--space-3);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
}
.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-block: 2px solid var(--line);
}
.figure { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.figure .num-hero { font-size: clamp(26px, 3.4vw, 46px); color: var(--mark-bg); }
.figure--hero {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-4);
  border-block: 2px solid var(--line);
}
.figure--hero .num-hero { font-size: clamp(48px, 6vw, 80px); }
.figure--hero .caption { font-size: 15px; }

/* миниатюры скриншотов: фиксированное соотношение, обрезка слева сверху */
.case-shot {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--light);
  text-align: left;
}
.case-shot img { width: 100%; object-fit: cover; object-position: left top; }
.case-shot--card { aspect-ratio: 5 / 2; }
.case-shot--card img, .case-shot--feat img { height: 100%; }
.case-shot--feat { aspect-ratio: 16 / 7; }
.case-shot--full img { height: auto; }
.case-shot-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.case-shot:hover { border-color: var(--black); }

/* Б. шесть прежних кейсов */
.cases-group { margin-top: clamp(40px, 6vw, 72px); }
.cases-group-title {
  font-weight: 900;
  font-size: clamp(26px, 3vw, 38px);
  text-transform: uppercase;
}
.cases-group-sub { margin-top: var(--space-2); }
.cases-group-title + .grid-3 { margin-top: var(--space-5); }
.cases-group-sub + .gallery-grid { margin-top: var(--space-5); }
.case-card { gap: var(--space-4); }
.case-card .pill { align-self: flex-start; min-height: 32px; padding-block: 4px; font-size: 13px; }
.case-card h4 { font-size: clamp(20px, 1.9vw, 24px); }
.case-task { font-size: 15px; line-height: 1.45; }
.case-metrics { margin-top: auto; }
.case-res { font-size: 15px; line-height: 1.45; }

/* В. галерея */
.gallery-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-card-sm);
  background: var(--white);
  color: var(--black);
  text-align: left;
}
.gallery-shot {
  display: block;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  border: 2px solid var(--line-on-light);
  border-radius: 12px;
  background: var(--light);
}
.gallery-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.gallery-name { padding-inline: 4px; font-family: var(--font-head); font-weight: 800; font-size: 18px; line-height: 1.2; }
.gallery-cap { padding-inline: 4px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.gallery-item:hover .gallery-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.gallery-item:focus-visible { outline-color: var(--lime); }

/* лента на телефоне и узком планшете: карточки листаются вбок, виден край следующей */
@media (max-width: 767px) {
  .hscroll {
    display: flex;
    gap: var(--space-4);
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) var(--space-3);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
    scrollbar-color: var(--lime) transparent;
  }
  .hscroll > * {
    flex: 0 0 min(84%, 420px);
    min-width: 0;
    scroll-snap-align: start;
  }
  .hscroll:focus-visible { outline-offset: -3px; }
}

/* модалка просмотра скриншота */
html.modal-open, html.modal-open body { overflow: hidden; }
.proof-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay);
}
.proof-modal[hidden] { display: none; }
.proof-dialog {
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: var(--space-4);
}
.proof-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.proof-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
}
.proof-close:focus-visible { outline-color: var(--black); }
.proof-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--light);
}
.proof-img { display: block; width: 100%; height: auto; }
.proof-hint { display: none; }
.proof-cta { align-self: flex-start; }
@media (max-width: 991px) {
  /* широкий скриншот не сжимается: он показывается в натуральном размере и листается вбок */
  .proof-img { width: auto; max-width: none; }
  .proof-hint { display: block; }
}
@media (max-width: 480px) {
  .proof-modal { padding: 8px; }
  .proof-dialog { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .proof-cta { align-self: stretch; }
}

/* ---- process: 5 этапов ---- */
.process-list { border-top: 2px solid var(--line); }
.process-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  align-items: center;
  padding-block: clamp(20px, 3vw, 32px);
  border-bottom: 2px solid var(--line);
}
.process-step .num { grid-row: 1; grid-column: 1; }
.process-step h3 { grid-column: 2; }
.process-step .text { grid-column: 1 / -1; color: var(--fg-2); max-width: 46em; }
@media (min-width: 768px) {
  .process-step {
    grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.3fr);
    column-gap: clamp(24px, 4vw, 48px);
    align-items: start;
  }
  .process-step h3 { align-self: center; }
  .process-step .text { grid-column: 3; }
}

/* ---- pricing: 3 тарифа ---- */
.pricing-grid { align-items: stretch; }
.price-card { gap: var(--space-4); }
.price-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 40px;
}
.price-top h3 { min-width: 0; font-weight: 900; font-size: clamp(24px, 2.1vw, 28px); text-transform: uppercase; }
.price-top .pill { flex: none; }
.price-top .pill { min-height: 32px; padding-block: 4px; font-size: 13px; }
.price-val { line-height: 1; }
.price-features { flex: 1; margin-block: var(--space-2); }
@media (min-width: 992px) and (max-width: 1099px) {
  .price-card { padding: 24px; }
}

/* ---- about: эксперт и обязательства ---- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2.2vw, 24px);
}
@media (min-width: 992px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; }
}
.expert-card { gap: var(--space-4); align-items: flex-start; }
.expert-photo {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--light);
}
.expert-card h3 { font-weight: 900; font-size: clamp(26px, 2.6vw, 32px); }
.expert-role { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--fg-2); }
.expert-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.expert-pills .pill { min-height: 36px; }
.expert-card .btn { margin-top: auto; }

.commit-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2.2vw, 24px); }
@media (min-width: 600px) { .commit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.commit-card { align-content: start; gap: var(--space-3); }
.commit-card .num { margin-bottom: var(--space-2); }
@media (max-width: 599px) {
  /* одна колонка: номер слева от текста, карточка ниже */
  .commit-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--space-4);
    row-gap: var(--space-2);
    align-items: start;
  }
  .commit-card .num { grid-row: 1 / span 2; margin-bottom: 0; }
}

/* ---- checklist: лид-магнит ---- */
.checklist { padding-block: clamp(48px, 7vw, 80px); }
.checklist-inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.checklist .section-head { margin-bottom: 0; }
@media (min-width: 992px) {
  .checklist-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-7); }
  .checklist .section-head { max-width: 900px; }
  .checklist-btn { flex: none; }
}
@media (max-width: 480px) { .checklist-btn { width: 100%; } }

/* ---- faq: аккордеон ---- */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); max-width: 860px; }
.faq-item {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-card-sm);
  overflow: hidden;
}
.faq-q { font-size: inherit; line-height: inherit; }
.faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  min-height: 64px;
  padding: var(--space-3) var(--space-5);
  text-align: left;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.2;
  color: var(--fg);
}
.faq-trigger:focus-visible { outline-offset: -3px; }
.faq-icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mark-bg);
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  width: 16px;
  height: 3px;
  border-radius: 3px;
  background: var(--mark-fg);
  transition: transform 0.2s ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-trigger[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }
.faq-panel { padding: 0 var(--space-5) var(--space-5); max-width: 720px; color: var(--fg-2); }
.faq-panel[hidden] { display: none; }

/* ---- cta: финальная форма ---- */
.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); align-items: center; }
.cta-head { margin-bottom: 0; }
.cta-card { gap: 0; padding: clamp(24px, 3.2vw, 40px); }
.cta-fields { display: flex; flex-direction: column; gap: var(--space-5); }
.cta-fields[hidden] { display: none; }
@media (min-width: 992px) {
  .cta-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: var(--space-8); }
}

/* поле-ловушка для ботов: вне экрана, недоступно клавиатуре и скринридерам */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.cta-plan { display: flex; align-items: center; gap: var(--space-2); }
.cta-plan[hidden] { display: none; }
.cta-plan .pill { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.cta-plan-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--fg);
}
.cta-plan-reset:hover { border-color: currentColor; }

.choice[aria-checked="true"] { background: var(--mark-bg); color: var(--mark-fg); border-color: var(--mark-bg); }
.cta-card .choice-group { gap: var(--space-2); }

.cta-status { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.cta-status [hidden] { display: none; }
.cta-status:not(:has(.field-error:not(:empty))) { height: 0; margin-block: calc(var(--space-5) / -2); overflow: hidden; }
.cta-privacy { text-align: center; }

.cta-success { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; padding-block: var(--space-5); }
.cta-success[hidden] { display: none; }
.cta-success h3:focus-visible { outline-offset: 6px; }
@media (max-width: 480px) {
  .cta-card .choice { flex: 1 1 auto; padding: 0 12px; }
  .cta-success .btn { width: 100%; }
}
