/* Structural breakpoints only — sizes/fonts scale via clamp() */

@media (max-width: 1200px) {
  .algorithm__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .algorithm__myth {
    flex-direction: column;
    gap: var(--space-24);
  }

  .algorithm__myth-card {
    flex: 1 1 auto;
    width: 100%;
    max-width: 40rem;
    min-height: 0;
  }

  .algorithm__myth-arrow {
    width: clamp(48px, 8vw, 100px);
    transform: rotate(90deg);
  }

  .section-photo__inner,
  .section-photo__inner--single {
    grid-template-columns: 1fr;
  }

  .section-photo__cards {
    max-width: none;
  }

  .section-photo--krasnoyarsk .section-photo__cards {
    max-width: none;
  }

  .section-photo--krasnoyarsk {
    min-height: 0;
    padding-bottom: 0;
  }

  .section-photo__media--krasnoyarsk {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(768px, 90%);
    margin-left: auto;
    margin-top: var(--space-24);
    pointer-events: auto;
  }

  .section-photo--audience .section-photo__inner,
  .section-photo--audience-alt .section-photo__inner {
    display: block;
  }

  .section-photo--audience .section-photo__cards,
  .section-photo--audience-alt .section-photo__cards {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .checklist__inner {
    grid-template-columns: 1fr;
  }

  .checklist__content {
    max-width: none;
  }

  .checklist__card {
    margin-top: clamp(-100px, -12vw, -80px);
    padding-top: clamp(140px, 18vw, 180px);
    min-height: clamp(560px, 70vw, 720px);
  }

  .checklist__media {
    width: clamp(180px, 36vw, 320px);
    opacity: 0.95;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .reviews .slider__slide,
  .cases .slider__slide {
    flex-basis: calc((100% - 20px) / 2);
  }

  .slider__slide {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (max-width: 768px) {
  .algorithm__headline,
  .algorithm__headline-accent {
    font-size: clamp(20px, 5.5vw, 24px);
    line-height: 1.15;
  }

  .algorithm__headline-accent {
    min-height: 0;
    margin-top: var(--space-12);
    padding: 10px 14px;
  }

  .algorithm__myth {
    flex-direction: column;
    gap: var(--space-20);
  }

  .algorithm__myth-card {
    flex: 1 1 auto;
    width: 100%;
  }

  .algorithm__myth-arrow {
    width: clamp(48px, 18vw, 80px);
    transform: rotate(90deg);
  }

  .algorithm__title br {
    display: none;
  }

  .algorithm__grid {
    grid-template-columns: 1fr;
    gap: var(--space-20);
  }

  .algorithm-step {
    min-height: 0;
  }

  /* Hero: фото на весь блок + мягкий градиент в синий; компактная плашка */
  .hero {
    --hero-blue: #208dcf;
    min-height: auto;
    background-color: var(--hero-blue);
    background-image: url("../assets/images/hero-tower.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 72% 12%;
    padding: calc(clamp(120px, 34vw, 160px) + 200px) 0 clamp(24px, 6vw, 36px);
  }

  .hero::before {
    content: "";
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background: linear-gradient(
      to bottom,
      rgba(32, 141, 207, 0) 0%,
      rgba(32, 141, 207, 0.35) 40%,
      var(--hero-blue) 85%,
      var(--hero-blue) 100%
    );
    pointer-events: none;
  }

  .hero__offer {
    max-width: none;
    width: 100%;
    padding: 14px 14px 14px 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 5px -5px 0 0 rgba(255, 255, 255, 0.35);
  }

  .hero__offer .bullet-list {
    gap: 10px;
  }

  .hero__offer .bullet-list__item {
    gap: 10px;
    font-size: 16px;
    line-height: 1.25;
  }

  .hero__offer .bullet-list__marker {
    width: 11px;
    height: 11px;
    margin-top: 0.35em;
  }

  .hero__meta {
    display: grid;
    grid-template-columns: 14px 1fr;
    column-gap: 8px;
    row-gap: 6px;
    align-items: start;
    margin-top: 12px;
    padding-left: 0;
  }

  .hero__address {
    display: contents;
    flex: none;
    max-width: none;
    gap: 0;
    font-size: 13px;
    line-height: 1.3;
  }

  .hero__address img {
    grid-column: 1;
    grid-row: 1;
    width: 14px;
    height: 19px;
  }

  .hero__address span {
    grid-column: 2;
    grid-row: 1;
  }

  .hero__map-link {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
    margin-left: 0;
    font-size: 12px;
    line-height: 1.2;
  }

  .hero__map-link img {
    display: none;
  }

  .hero__cta {
    margin-top: 18px;
  }

  .hero__cta,
  .checklist__cta,
  .btn {
    width: 100%;
    min-width: 0;
  }

  .lead-form__submit {
    width: auto;
    align-self: stretch;
  }

  .section-photo,
  .section-photo--region {
    min-height: 0;
  }

  /* Плашки на всю ширину контейнера */
  .section-photo__inner,
  .section-photo__inner--single,
  .section-photo__inner--krasnoyarsk,
  .section-photo--north .section-photo__inner--single,
  .section-photo--south .section-photo__inner--single,
  .section-photo--northwest .section-photo__inner--single,
  .section-photo--audience .section-photo__inner,
  .section-photo--audience-alt .section-photo__inner {
    display: block;
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
  }

  .section-photo__cards,
  .section-photo--audience .section-photo__cards,
  .section-photo--audience-alt .section-photo__cards,
  .section-photo--krasnoyarsk .section-photo__cards,
  .section-photo--region .section-photo__cards,
  .section-photo--north .section-photo__cards,
  .section-photo--east .section-photo__cards,
  .section-photo--south .section-photo__cards,
  .section-photo--northwest .section-photo__cards,
  .section-photo--miners .section-photo__cards,
  .section-photo--river .section-photo__cards,
  .section-photo--shift .section-photo__cards,
  .section-photo--forest .section-photo__cards,
  .section-photo--ges .section-photo__cards,
  .section-photo--pension .section-photo__cards,
  .section-photo--cement .section-photo__cards {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    flex-shrink: 1;
    align-self: stretch;
    gap: clamp(28px, 7.5vw, 46px);
  }

  .section-photo .card,
  .section-photo .card--green,
  .section-photo .card--purple,
  .hero__offer,
  .checklist__banner,
  .checklist__card,
  .checklist__content,
  .algorithm__myth-card,
  .lead-form,
  .reviews__title,
  .review-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  /*
   * Mobile photo-stack:
   * full photo on top → fade into solid color → cards on that color.
   * Макеты: 267:325 + 360:440 (SVg3fNHdgzz4xMb9sp5ZuD).
   */
  .section-photo--krasnoyarsk,
  .section-photo--audience,
  .section-photo--region {
    --mobile-photo-pos: center top;
    --mobile-photo-ratio: 600 / 517;
    display: flex;
    flex-direction: column;
    padding: 0 0 clamp(40px, 10vw, 64px);
    background-color: var(--mobile-fade, #d8d9de);
    background-image: none;
  }

  /* Базовый audience без отраслевых модификаторов */
  .section-photo--audience:not(.section-photo--shift):not(.section-photo--forest):not(
      .section-photo--ges
    ):not(.section-photo--pension):not(.section-photo--miners):not(
      .section-photo--cement
    ):not(.section-photo--river) {
    --mobile-fade: #d8d9de;
    --mobile-photo: url("../assets/images/section-audience-worker.png");
    --mobile-photo-pos: 32% top;
  }

  .section-photo--krasnoyarsk {
    --mobile-fade: #bdbdbd;
    --mobile-photo: url("../assets/images/section-krasnoyarsk-mobile.png");
    --mobile-photo-pos: center top;
  }

  .section-photo--audience.section-photo--shift {
    --mobile-fade: #d4d7dd;
    --mobile-photo: url("../assets/images/section-shift-bg.jpg");
    --mobile-photo-pos: 22% center;
    --mobile-photo-ratio: 600 / 448;
  }

  .section-photo--audience.section-photo--forest {
    --mobile-fade: #d5ceca;
    --mobile-photo: url("../assets/images/section-forest-bg.jpg");
    --mobile-photo-pos: 28% center;
  }

  .section-photo--audience.section-photo--ges {
    --mobile-fade: #bcb5b3;
    --mobile-photo: url("../assets/images/section-ges-bg.png");
    --mobile-photo-pos: 20% center;
  }

  .section-photo--audience.section-photo--pension {
    --mobile-fade: #000000;
    --mobile-photo: url("../assets/images/section-pension-bg.png");
    --mobile-photo-pos: 18% center;
  }

  .section-photo--audience.section-photo--cement {
    --mobile-fade: #796152;
    --mobile-photo: url("../assets/images/section-cement-bg.png");
    --mobile-photo-pos: center center;
  }

  .section-photo--audience.section-photo--miners {
    --mobile-fade: #464447;
    --mobile-photo: url("../assets/images/section-miners-bg.png");
    --mobile-photo-pos: center center;
    --mobile-photo-ratio: 600 / 419;
  }

  .section-photo--audience.section-photo--river {
    --mobile-fade: #92999e;
    --mobile-photo: url("../assets/images/section-river-bg.png");
    --mobile-photo-pos: center 40%;
    --mobile-photo-ratio: 600 / 419;
  }

  .section-photo--north {
    --mobile-fade: #49484e;
    --mobile-photo: url("../assets/images/section-north-bg.jpg");
    --mobile-photo-pos: center center;
    --mobile-photo-ratio: 600 / 419;
  }

  .section-photo--east {
    --mobile-fade: #051623;
    --mobile-photo: url("../assets/images/section-east-bg.jpg");
    --mobile-photo-pos: center center;
    --mobile-photo-ratio: 600 / 419;
  }

  .section-photo--south {
    --mobile-fade: #555c63;
    --mobile-photo: url("../assets/images/section-south-bg.jpg");
    --mobile-photo-pos: center center;
    --mobile-photo-ratio: 600 / 419;
  }

  .section-photo--northwest {
    --mobile-fade: #344023;
    --mobile-photo: url("../assets/images/section-northwest-bg.png");
    --mobile-photo-pos: center center;
    --mobile-photo-ratio: 600 / 419;
  }

  .section-photo--krasnoyarsk::before,
  .section-photo--audience::before,
  .section-photo--region::before {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: var(--mobile-photo-ratio);
    background-color: var(--mobile-fade);
    background-image: linear-gradient(
        to bottom,
        transparent 38%,
        var(--mobile-fade) 100%
      ),
      var(--mobile-photo);
    background-repeat: no-repeat;
    background-size: cover, cover;
    background-position: center, var(--mobile-photo-pos);
  }

  /* В ассете уже есть белый фейд — перекрываем его цветом секции */
  .section-photo--krasnoyarsk::before {
    background-image: linear-gradient(
        to bottom,
        transparent 28%,
        var(--mobile-fade) 82%
      ),
      var(--mobile-photo);
  }

  .section-photo--krasnoyarsk .section-photo__inner,
  .section-photo--audience .section-photo__inner,
  .section-photo--region .section-photo__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: clamp(-72px, -14vw, -48px);
  }

  .section-photo--krasnoyarsk .section-photo__media--krasnoyarsk {
    display: none;
  }

  .checklist__media {
    display: none;
  }

  .checklist__content {
    order: 0;
    width: 100%;
    max-width: none;
  }

  .checklist {
    display: flex;
    flex-direction: column;
    padding-bottom: clamp(40px, 10vw, 64px);
    min-height: 0;
  }

  .checklist__inner {
    order: 0;
  }

  /* Form: фото сверху → мятный фон → поля без белой плашки */
  .form-section {
    --form-fade: #e7f3db;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 0 clamp(36px, 9vw, 56px);
    background-color: var(--form-fade);
    background-image: none;
  }

  .form-section::before {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 600 / 517;
    background-color: var(--form-fade);
    background-image: linear-gradient(
        to bottom,
        transparent 42%,
        var(--form-fade) 100%
      ),
      url("../assets/images/form-office-mobile.png");
    background-repeat: no-repeat;
    background-size: cover, cover;
    background-position: center, center top;
  }

  .form-section__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: clamp(-56px, -10vw, -32px);
    padding-top: 0;
    padding-bottom: 0;
    align-items: stretch;
  }

  .lead-form {
    max-width: none;
    width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    transform: none;
  }

  .lead-form__title {
    margin-bottom: var(--space-28);
  }

  .slider__slide {
    flex: 0 0 100%;
  }

  .reviews .slider__slide,
  .cases .slider__slide {
    flex: 0 0 100%;
  }

  .reviews__slider,
  .cases__slider {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-16);
  }

  .reviews__shell {
    position: relative;
    display: block;
  }

  .reviews__slider {
    order: unset;
    flex: none;
    width: 100%;
  }

  .reviews__viewport {
    order: unset;
    flex: none;
    width: 100%;
  }

  .reviews__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    margin: 0;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
  }

  .reviews__nav--prev {
    order: unset;
    left: -20px;
    right: auto;
    margin-right: 0;
  }

  .reviews__nav--next {
    order: unset;
    right: -20px;
    left: auto;
    margin-left: 0;
  }

  .reviews__nav img {
    width: 36px;
    height: auto;
  }

  /* Cases: компактнее типографика, стрелки по центру слайдов с лёгким наложением */
  .cases {
    min-height: 0;
    padding: clamp(48px, 12vw, 72px) 0;
    overflow: visible;
  }

  .cases__title-line {
    font-size: clamp(18px, 5.2vw, 22px);
    padding: 8px 14px;
    border-radius: 18px;
  }

  .cases__title-line--dark {
    padding: 0;
  }

  .cases__subtitle {
    margin-top: var(--space-16);
    font-size: clamp(15px, 4.2vw, 18px);
    line-height: 1.35;
  }

  .cases__slider {
    display: grid;
    grid-template-columns: 1fr;
    position: relative;
    align-items: center;
    gap: 0;
    overflow: visible;
  }

  .cases__viewport {
    order: unset;
    flex: none;
    width: 100%;
  }

  .cases__nav,
  .cases__nav--prev,
  .cases__nav--next {
    position: absolute;
    top: 50%;
    z-index: 3;
    order: unset;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
  }

  .cases__nav--prev {
    left: -20px;
  }

  .cases__nav--next {
    right: -20px;
  }

  .cases__nav img {
    width: 36px;
    height: auto;
  }

  .quiz-step__head {
    flex-direction: column;
  }

  .quiz-step__title {
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.35;
  }

  .quiz-step__counter {
    white-space: normal;
    font-size: clamp(15px, 4vw, 18px);
  }

  .quiz-nav .btn {
    width: 100%;
  }
}
