/* =========================================================
   VCHERA — public/assets/css/responsive.css
   ---------------------------------------------------------
   Адаптив для нового тёмного дизайна.
   База — в style.css.
   ========================================================= */



/* ============ 1500px ============ */

@media (max-width: 1500px) {
  .wrap {
    padding: 0 24px;
  }
}



/* ============ 960px ============ */


@media (max-width: 960px) {
  .ct {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .ba-card--plan {
    grid-column: auto;
  }



  /*
   * В одноколоночном диапазоне план фиксируется внутри панели.
   * Координаты точек считаются от фактически видимого изображения,
   * а не от всей высоты контейнера.
   */

  .plan-case__plan {
    container-type: inline-size;
    height: clamp(220px, 26vw, 250px);
    min-height: 0;
  }

  .plan-case__plan img {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: auto;
    min-height: 0;
    padding: 0;
    object-fit: contain;
  }

  .plan-pin {
    top: auto;
  }

  .plan-pin:nth-of-type(1) {
    left: calc(8.8cqw + 9.9px);
    bottom: calc(6.83cqw + 10.4px);
  }

  .plan-pin:nth-of-type(2) {
    left: calc(50.5cqw - 0.1px);
    bottom: calc(12.69cqw + 9px);
  }

  .plan-pin:nth-of-type(3) {
    left: calc(91.6cqw - 10px);
    bottom: calc(5.58cqw + 10.7px);
  }

  /*
   * Центральная плашка остаётся внутри панели.
   * Линия начинается у нижней границы плашки
   * и заканчивается точно в центре точки.
   */

  .plan-pin:nth-of-type(2) .plan-pin__bubble {
    transform: translate(22px, -76px);
  }

  .plan-pin:nth-of-type(2) .plan-pin__line {
    top: -36px;
    left: 26px;
    width: 44.5px;
    transform: rotate(125.8deg);
  }
  
  
  
  
  .statement-panel {
    grid-template-columns: 1fr;
  }

  .statement-proof {
    grid-template-columns: 1fr;
  }

  .statement-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .cookie-bar__inner,
  .cookie-item {
    grid-template-columns: 1fr;
  }

  .cookie-bar__actions,
  .cookie-modal__footer {
    display: grid;
  }

  .cookie-bar__btn,
  .cookie-modal__btn {
    width: 100%;
  }

  .portfolio-hero {
    min-height: 92dvh;
    padding-bottom: 42px;
  }

  .portfolio-hero__strip {
    grid-template-columns: auto 1fr;
    border-radius: 28px;
  }

  .portfolio-hero__strip .btn {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .case-carousel--new .case-slide,
  .case-carousel--commercial .case-slide,
  .case-carousel--ugc .case-slide {
    flex-basis: calc((100% - 14px) / 2);
  }

  .inner-cta__box {
    grid-template-columns: 1fr;
  }

  .inner-cta__box .btn {
    justify-content: center;
  }
}




/* ============ 900px ============ */




@media (max-width: 900px) {
  .nav,
  .hdr .btn-a {
    display: none;
  }

  .burger {
    display: block;
  }

  .hdr.is-open .nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
  }

  .hdr.is-open .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 16px;
  }

  .hdr.is-open .nav a:last-child {
    border-bottom: 0;
  }

  .hdr.is-open .nav .nav-dd {
    width: 100%;
    border-bottom: 1px solid var(--line);
  }

  .hdr.is-open .nav .nav-dd__summary {
    padding: 14px 0 6px;
    color: var(--text);
    font-size: 16px;
  }

  .hdr.is-open .nav .nav-dd__summary::after {
    display: none;
  }

  .hdr.is-open .nav .nav-dd__menu {
    position: static;
    display: grid;
    min-width: 0;
    padding: 0 0 12px 14px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hdr.is-open .nav .nav-dd__link {
    padding: 8px 0;
    border-bottom: 0;
    color: var(--muted);
    font-size: 15px;
  }

  .hdr.is-open .nav .nav-dd__link:hover,
  .hdr.is-open .nav .nav-dd__link.is-active {
    background: none;
    color: var(--text);
  }

  .dir-stage {
    min-height: clamp(380px, 62vh, 560px);
  }

  .dir-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .dir-tab {
    min-height: 124px;
  }

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

  .case:nth-child(n) {
    grid-column: span 1;
  }

  .case-img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  
}


/* ============ plan correction: 681–960px ============ */

@media (min-width: 681px) and (max-width: 960px) {
  /*
   * Кладовая 44:
   * сдвигаем только точку по горизонтали
   * от входа ближе к центру помещения.
   *
   * Плашка и линия сохраняют текущую геометрию
   * и перемещаются вместе с точкой.
   */

  .plan-pin:nth-of-type(3) {
    left: calc(94.6cqw - 10.7px);
  }
}




/* ============ plan labels: 681–760px ============ */

@media (min-width: 681px) and (max-width: 760px) {
  /*
   * Кладовая 34:
   * центрируем плашку над собственной точкой,
   * чтобы она не пересекалась с плашкой №3.
   */

  .plan-pin:nth-of-type(2) .plan-pin__bubble {
    transform: translate(-50%, -76px);
  }

  .plan-pin:nth-of-type(2) .plan-pin__line {
    top: 0;
    left: 0;
    width: 40px;
    transform: rotate(-90deg);
  }
}



/* ============ formats compact rows: ≤681px ============ */

@media (max-width: 681px) {
  #formats .fmts {
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  #formats .fmt {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-areas:
      "number title"
      "number text";
    align-items: start;
    column-gap: 12px;
    row-gap: 3px;
    min-height: 0;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  #formats .fmt:last-child {
    border-bottom: 0;
  }

  #formats .fmt-num {
    grid-area: number;
    align-self: start;
    padding-top: 3px;
  }

  #formats .fmt h3 {
    grid-area: title;
    min-width: 0;
    font-size: 17px;
    line-height: 1.2;
  }

  #formats .fmt p {
    grid-area: text;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
  }
}






/* ============ 680px ============ */




@media (max-width: 680px) {
  :root {
    --header-h: 64px;
  }

  .wrap {
    padding: 0 14px;
  }

  .hdr {
    height: var(--header-h);
  }

  h1,
  .hero h1 {
    font-size: clamp(40px, 14vw, 58px);
  }

  h2,
  .sec-h h2,
  .statement h2 {
    font-size: clamp(30px, 10vw, 42px);
  }

  p {
    font-size: 16px;
  }

  .hero {
    min-height: 92dvh;
    padding-bottom: 46px;
  }

  .hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }

  .hero-cta .btn {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
  }

  .ticker span {
    padding: 0 24px;
    font-size: 12px;
  }

  section,
  .statement {
    padding: 64px 0;
  }

  .statement-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .statement-lead {
    font-size: 15.5px;
  }




.statement-proof {
  position: relative;
  display: block;
  min-height: 196px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.statement-proof::before {
  content: "";
  position: absolute;
  right: auto;
  bottom: 14px;
  left: 50%;
  z-index: 2;
  width: 76px;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(to right,
      rgba(255, 255, 255, 0.22) 0 16px,
      transparent 16px 20px,
      rgba(255, 255, 255, 0.22) 20px 36px,
      transparent 36px 40px,
      rgba(255, 255, 255, 0.22) 40px 56px,
      transparent 56px 60px,
      rgba(255, 255, 255, 0.22) 60px 76px
    );
  transform: translateX(-50%);
}

.statement-proof::after {
  content: "";
  position: absolute;
  right: auto;
  bottom: 14px;
  left: calc(50% - 38px);
  z-index: 3;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: #d7ea8a;
  box-shadow: 0 0 12px rgba(215, 234, 138, 0.28);
  animation: statementProofIndicator 20s infinite;
}

.statement-proof .proof-item {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 18px 0 42px;
  border: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  pointer-events: none;
  animation: statementProofSlide 20s infinite;
}

.statement-proof .proof-item:nth-child(1) {
  animation-delay: 0s;
}

.statement-proof .proof-item:nth-child(2) {
  animation-delay: 5s;
}

.statement-proof .proof-item:nth-child(3) {
  animation-delay: 10s;
}

.statement-proof .proof-item:nth-child(4) {
  animation-delay: 15s;
}

.statement-proof:hover::after,
.statement-proof:focus-within::after,
.statement-proof:active::after,
.statement-proof:hover .proof-item,
.statement-proof:focus-within .proof-item,
.statement-proof:active .proof-item {
  animation-play-state: paused;
}

@keyframes statementProofSlide {
  0%,
  23% {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  25%,
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-18px);
  }
}

@keyframes statementProofIndicator {
  0%,
  23% {
    transform: translateX(0);
  }

  25%,
  48% {
    transform: translateX(20px);
  }

  50%,
  73% {
    transform: translateX(40px);
  }

  75%,
  98% {
    transform: translateX(60px);
  }

  100% {
    transform: translateX(0);
  }
}




  .statement-stats {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .statement-stats .stat {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding: 15px 12px;
  }

  .statement-stats .stat-num {
    display: inline-flex;
    align-items: flex-end;
    min-width: 0;
    font-size: 44px;
    line-height: 0.9;
    white-space: nowrap;
  }

  .statement-stats .stat-num small {
    display: inline-block;
    margin: 0 0 2px 4px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  .statement-stats .stat-label {
    max-width: none;
    margin-top: 0;
    font-size: 14px;
    line-height: 1.38;
  }
  
  

  .chip {
    white-space: normal;
  }






  .plan-case {
    padding: 10px 10px 0;
  }

  .plan-case__plan {
    position: relative;
    container-type: inline-size;
    height: clamp(150px, calc(20vw + 84px), 220px);
    min-height: 0;
    overflow: hidden;
  }

  .plan-case__plan img {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: auto;
    min-height: 0;
    padding: 0;
    object-fit: contain;
  }

  .plan-pin {
    top: auto;
  }

  .plan-pin:nth-of-type(1) {
    left: calc(8.8cqw + 9.9px);
    bottom: calc(6.83cqw + 10.4px);
  }

  .plan-pin:nth-of-type(2) {
    left: calc(50.5cqw - 0.1px);
    bottom: calc(12.69cqw + 9px);
  }

  .plan-pin:nth-of-type(3) {
    left: calc(91.6cqw - 10px);
    bottom: calc(5.58cqw + 10.7px);
  }

  /*
   * На ширинах 561–680px все три плашки находятся
   * внутри панели и образуют одну визуальную строку.
   */

  .plan-pin:nth-of-type(1) .plan-pin__bubble {
    transform: translate(-14px, -114px);
  }

  .plan-pin:nth-of-type(2) .plan-pin__bubble {
    transform: translate(-50%, -70px);
  }

  .plan-pin:nth-of-type(2) .plan-pin__line {
    top: 0;
    left: 0;
    width: 50px;
    transform: rotate(-90deg);
  }

  .plan-pin:nth-of-type(3) .plan-pin__bubble {
    transform: translate(calc(-100% + 14px), -120px);
  }

  /*
   * Концы линий заходят под соответствующие плашки,
   * поэтому визуального разрыва не возникает.
   */

  .plan-pin:nth-of-type(1) .plan-pin__line {
    top: 0;
    left: 0;
    width: 104px;
    transform: rotate(-96deg);
  }

  .plan-pin:nth-of-type(2) .plan-pin__line {
    top: 0;
    left: 0;
    width: 64px;
    transform: rotate(-90deg);
  }

  .plan-pin:nth-of-type(3) .plan-pin__line {
    top: 0;
    left: 0;
    width: 118px;
    transform: rotate(-116deg);
  }

  .plan-case__renders {
    grid-template-columns: 1fr;
  }






  .ba-tag {
    justify-self: start;
  }

  .dir-stage {
    min-height: 420px;
    border-radius: 18px;
  }

  .dir-stage__body {
    padding: 22px;
  }

  .dir-stage h3 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .dir-stage__text {
    max-height: none;
    opacity: 1;
    transform: none;
  }

  .dir-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dir-tab {
    display: flex;
    min-width: 0;
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 8px;
    text-align: center;
  }

  .dir-tab::before,
  .dir-tab::after {
    display: none;
  }

  .dir-tab__num,
  .dir-tab__text {
    display: none;
  }

  .dir-tab__title {
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-shadow: none;
  }
  
  
  

  .cases,
  .fmts {
    grid-template-columns: 1fr;
  }

  .case-meta,
  .ba-meta {
    display: grid;
  }

  .fmt {
    min-height: auto;
  }

  .ct-step {
    align-items: flex-start;
  }

  .ftr .wrap {
    display: grid;
    gap: 18px;
  }

  .ftr-nav {
    flex-wrap: wrap;
    gap: 14px 22px;
  }

  .portfolio-hero h1 {
    max-width: 12ch;
    font-size: clamp(38px, 13vw, 56px);
  }

  .portfolio-hero__badges {
    margin-bottom: 18px;
  }

  .portfolio-hero__strip {
    margin-top: 34px;
    padding: 14px;
  }

  .case-strip {
    padding: 54px 0;
  }

  .case-strip + .case-strip {
    padding-top: 18px;
  }

  .case-strip__head {
    align-items: flex-end;
  }

  .case-strip__head h2 {
    font-size: clamp(30px, 9vw, 38px);
  }

  .case-strip__arrow {
    width: 32px;
    height: 32px;
  }

  .case-carousel__viewport {
    height: clamp(300px, 66vh, 480px);
  }

  .case-carousel--new .case-slide,
  .case-carousel--commercial .case-slide,
  .case-carousel--ugc .case-slide {
    flex-basis: 82%;
  }
}





/* ============ 560px ============ */



@media (max-width: 560px) {
  .cases {
    grid-template-columns: 1fr;
  }

  .plan-case__plan {
    height: clamp(184px, 40vw, 208px);
  }
}







/* ============ 420px ============ */

@media (max-width: 420px) {
  .hero h1 {
    max-width: 11ch;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .dir-stage {
    min-height: 460px;
  }

  .ba {
    height: 300px;
  }

  .case-carousel--new .case-slide,
  .case-carousel--commercial .case-slide,
  .case-carousel--ugc .case-slide {
    flex-basis: 88%;
  }

  .portfolio-hero__strip {
    gap: 12px;
  }

  /*
   * На ширинах до 420px высота панели фиксируется,
   * чтобы три плашки сохраняли одну линию.
   */

  .plan-case__plan {
    height: 184px;
  }

  /*
   * Компактные размеры позволяют сохранить
   * все три названия даже около минимальной ширины сайта.
   */

  .plan-pin__bubble {
    gap: clamp(3px, 1vw, 5px);
    padding:
      2px
      clamp(4px, 1.5vw, 7px)
      2px
      2px;
    font-size: clamp(9px, 2.65vw, 11px);
    letter-spacing: -0.01em;
  }

  .plan-pin__bubble b {
    width: clamp(22px, 6.2vw, 26px);
    height: clamp(22px, 6.2vw, 26px);
    flex-basis: clamp(22px, 6.2vw, 26px);
    font-size: clamp(9px, 2.65vw, 11px);
  }

  /*
   * Единая верхняя строка:
   * №1 — 6px от левого края;
   * №2 — по центру панели;
   * №3 — 6px от правого края.
   */

  .plan-pin:nth-of-type(1) .plan-pin__bubble {
    transform: translate(
      calc(-8.8cqw - 3.9px),
      calc(6.83cqw - 165.6px)
    );
  }

  .plan-pin:nth-of-type(2) .plan-pin__bubble {
    transform: translate(
      calc(-50% - 0.5cqw + 0.1px),
      calc(12.69cqw - 167px)
    );
  }

  .plan-pin:nth-of-type(3) .plan-pin__bubble {
    transform: translate(
      calc(-100% + 8.4cqw + 4px),
      calc(5.58cqw - 165.3px)
    );
  }

  /*
   * Вертикальные линии заканчиваются под плашками.
   * Их длина автоматически учитывает ширину панели.
   */

  .plan-pin:nth-of-type(1) .plan-pin__line {
    top: 0;
    left: 0;
    width: calc(140px - 6.83cqw);
    transform: rotate(-90deg);
  }

  .plan-pin:nth-of-type(2) .plan-pin__line {
    top: 0;
    left: 0;
    width: calc(141px - 12.69cqw);
    transform: rotate(-90deg);
  }

  .plan-pin:nth-of-type(3) .plan-pin__line {
    top: 0;
    left: 0;
    width: calc(139px - 5.58cqw);
    transform: rotate(-90deg);
  }
}





/* ============ prefers-reduced-motion: reduce ============ */



@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ticker-track {
    animation: none;
  }

  .dir-stage__image,
  .dir-stage__text,
  .dir-tab,
  .dir-link svg,
  .case-img img,
  .btn,
  .nav a,
  .ftr-nav a,
  .toggle__ui,
  .toggle__ui::before {
    transition: none;
  }

  .dir-stage__text {
    max-height: none;
    opacity: 1;
    transform: none;
  }

  .statement-proof::before,
.statement-proof::after {
  display: none;
	}

}



/* ============ prefers-reduced-motion: reduce and 680px ============ */



@media (prefers-reduced-motion: reduce) and (max-width: 680px) {
  .statement-proof {
    min-height: 0;
    overflow: visible;
    padding-top: 0;
    border-top: 0;
    border-bottom: 0;
    cursor: default;
  }

  .statement-proof::before,
  .statement-proof::after {
    display: none;
  }

  .statement-proof .proof-item {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    animation: none;
    border-top: 1px solid var(--line);
  }

  .statement-proof .proof-item:last-child {
    border-bottom: 1px solid var(--line);
  }
}