/* ============================================================
   BLOCK: CTA — «Не нашли подходящий вариант?»
   Mobile: заголовок, кнопка на всю ширину, фото в шахматке.
   Tablet: три фото в ряд со смещением.
   Desktop: крайние колонки 12-колоночной сетки, центр опущен.
   ============================================================ */

.cta {
  padding: clamp(4rem, 12vw, 6rem) clamp(1rem, 0.94vw, 2.5rem) 0;
  text-align: center;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 350;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

/* ---------- Кнопка ---------- */
.cta__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  width: 100%;
  max-width: 17rem;
  min-height: 3.25rem;
  margin-top: 2rem;
  padding: 0 1.5rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--c-ink);
  font-size: clamp(0.9375rem, 1.1vw, 1.25rem);
  color: var(--c-ink);
  transition: color var(--dur) var(--ease-out);
}

/* Заливка выезжает снизу при наведении */
.cta__button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--c-ink);
  transform: translateY(101%);
  transition: transform var(--dur) var(--ease-out);
}

.cta__button-plus {
  display: inline-block;
  transition: transform var(--dur) var(--ease-out);
}

.cta__button:hover,
.cta__button:focus-visible {
  color: var(--c-white);
}

.cta__button:hover::before,
.cta__button:focus-visible::before {
  transform: translateY(0);
}

.cta__button:hover .cta__button-plus,
.cta__button:focus-visible .cta__button-plus {
  transform: rotate(90deg);
}

/* ---------- Фото ---------- */
.cta__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
  margin-top: clamp(2.5rem, 8vw, 4rem);
  text-align: left;
}

.cta__photo {
  width: 100%;
  overflow: hidden;
}

.cta__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.cta__photo--1 img {
  aspect-ratio: 3 / 4;
}

.cta__photo--2 {
  margin-top: 22%;
}

/* Третье фото на всю ширину на телефоне */
.cta__photo--3 {
  grid-column: 1 / -1;
}

.cta__photo--3 img {
  aspect-ratio: 16 / 10;
}

@media (hover: hover) and (pointer: fine) {
  .cta__photo:hover img {
    transform: scale(1.03);
  }
}

/* ---------- Tablet: три фото в ряд ---------- */
@media (min-width: 640px) {
  .cta__gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .cta__photo--2 {
    margin-top: 12%;
  }

  .cta__photo--3 {
    grid-column: auto;
  }

  .cta__photo--3 img {
    aspect-ratio: 4 / 5;
  }
}

/* ---------- Desktop: точная раскладка макета ---------- */
@media (min-width: 1024px) {
  .cta {
    padding: 11.1vw 0.94vw 0;
  }

  .cta__button {
    min-height: 2.7vw;
    max-width: none;
    width: auto;
    min-width: 14.5vw;
    margin-top: 2.2vw;
    padding: 0 1.5vw;
  }

  .cta__gallery {
    position: relative;
    display: grid;
    grid-template-columns: 23.75vw minmax(0, 1fr) 23.75vw;
    gap: 0 1vw;
    align-items: start;
    height: 37.3vw;
    margin-top: 0;
    margin-bottom: 12.4vw;
  }

  .cta__photo--1 {
    grid-column: 1;
    grid-row: 1;
  }

  .cta__photo--2 {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    width: 23.75vw;
    margin-top: 11.3vw;
  }

  .cta__photo--3 {
    grid-column: 3;
    grid-row: 1;
    margin-top: 11.3vw;
  }

  .cta__photo img,
  .cta__photo--3 img {
    aspect-ratio: 456 / 498;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta__button,
  .cta__button::before,
  .cta__button-plus,
  .cta__photo img {
    transition: none;
  }
}
