/* "Onest" as a real multi-weight family (body uses font-family: 'Onest';
   before this it was not defined, so phones fell back to a system font). */
@font-face { font-family: "Onest"; font-weight: 100; font-display: swap; src: url('/content/css/fonts/OnestThin1602-hint.ttf') format('truetype'); }
@font-face { font-family: "Onest"; font-weight: 300; font-display: swap; src: url('/content/css/fonts/OnestLight1602-hint.ttf') format('truetype'); }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url('/content/css/fonts/OnestRegular1602-hint.ttf') format('truetype'); }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url('/content/css/fonts/OnestMedium1602-hint.ttf') format('truetype'); }
@font-face { font-family: "Onest"; font-weight: 600 700; font-display: swap; src: url('/content/css/fonts/OnestBold1602-hint.ttf') format('truetype'); }
@font-face { font-family: "Onest"; font-weight: 800 900; font-display: swap; src: url('/content/css/fonts/OnestExtraBold1602-hint.ttf') format('truetype'); }
@font-face {
    font-family: "OnestThin";
    src: url('/content/css/fonts/OnestThin1602-hint.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "OnestRegular";
    src: url('/content/css/fonts/OnestRegular1602-hint.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "OnestMedium";
    src: url('/content/css/fonts/OnestMedium1602-hint.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "OnestLight";
    src: url('/content/css/fonts/OnestLight1602-hint.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "OnestExtraBold";
    src: url('/content/css/fonts/OnestExtraBold1602-hint.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "OnestBold";
    src: url('/content/css/fonts/OnestBold1602-hint.ttf') format('truetype');
    font-display: swap;
}
*, *::after, *::before {
    box-sizing: border-box;
}
.blue {
    color: #2E3192;
}
.flex-column {
    flex-direction: column;
}
body {
    margin: unset;
    font-family: 'Onest', 'OnestRegular', Arial, sans-serif;
    overflow-x: hidden;
}
header {
    display: flex;
    align-items: center;
    position: absolute;
    top: 1rem;
    z-index: 1;
    width: 100%;
}
header:has(.dark) {
    border-bottom: .5px solid #2E3192;
}
header > div {
    width: 85%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
}
header > a:first-child {
    margin: 0 4rem;
}
header .nav {
    display: flex;
    gap: 5rem;
}
header .nav a {
    font-size: 24px;
    text-decoration: none;
    color: black;
    font-family: "OnestThin";
}
header .nav.white a {
    color: white;
}
.video-container {
    height: 100vh;
}
.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}
.video-text {
    font-size: 71px;
    position: absolute;
    bottom: 5rem;
    color: white;
    left: 5rem;
    font-family: "OnestThin";
    text-transform: uppercase;
}
.video-text div:not(:first-child) {
    font-weight: 800;
    font-family: "OnestExtraBold";
}
.container {
    width: 85%;
    margin: 5rem auto;
}

.numbers-container {
    display:flex;
    flex-wrap: wrap;
}
.small-numbers {
    display: flex;
    justify-content: space-between;
}
.small-numbers .numbers {
    width: calc(100% / 3 - 5rem);
    color: black;
}
.small-numbers .numbers:last-child {
    text-align: end;
}
.small-numbers .text {
    font-family: "OnestLight";
}
.numbers {
    font-size: 42px;
}
.number.counter::after {
    font-family: "OnestExtraBold";
}
.number {
    font-family: "OnestExtraBold";
    font-size: 200px;
    color: #2E3192;
}
.number.total + .text{
    font-size: 44px;
    width: 65%;
    float: inline-end;
    position: relative;
    top: -1rem;
    text-transform: uppercase;
    font-family: "OnestRegular";
}

/* Counters */
@property --num {
  syntax: '<integer>';
  initial-value: 0;
  inherits: false;
}
div.counter {
    transition: --num 5s ease-in-out;
    counter-set: num var(--num);
    font: 800 120px "Onest", "OnestExtraBold", Arial, sans-serif;
    color: #2E3192;
    transition: --num 2s;
}
div.counter::after {
    content: counter(num);
}
div.counter.lifespan.show {
    --num: 30;
}
div.counter.product-types.show {
    --num: 500;
}
div.counter.number-clients.show {
    --num: 2000;
}

/* Производственные мощности */
.power-title {
    font-size: 64px;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    font-family: "OnestRegular";
}
.dark-theme .power-title, .dark-theme .power .block span, .dark-theme {
    color: white;
}
.power {
    display: grid;
    grid-template-columns: 35% 65%;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}
.power .block {
    border: solid 1px #2E3192;
    border-radius: 22px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation-timeline: scroll();
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.dark-theme .power .block {
    border-color: white;
}
.power .block div {
    font-size: 28px;
    margin-bottom: .5rem;
    display: block;
    font-family: "OnestMedium";
    font-weight: 500;
}

.power .block img {
    width: 100%;
    border-radius: 21px;
    height: 260px;
    object-fit: cover;
}
.power .block.big {
    grid-row-start: 1;
    grid-row-end: 3;
    grid-column-start: 2;
    grid-column-end: 2;
    animation-name: slideFromRight;
    display: flex;
    flex-direction: column;
}
.power .block video {
    width: 100%;
    border-radius: 21px;
    height: 100%;
    object-fit: cover;
}
.power .block:first-child, .power .block:nth-child(3){
    animation-name: slideFromLeft;
    animation-timeline: scroll();
}
.prod-container > div:first-child  {
    animation-name: slideFromLeft;
    animation-timeline: scroll();
}
.prod-container > div:last-child {
    animation-name: slideFromRight;
    animation-timeline: scroll();
}
.power .block:nth-child(4) {
    animation-name: slideFromLeft2;
}
.power .block:last-child {
    animation-name: slideFromRight2;
}
@keyframes slideFromRight {
    0% {transform: translateX(150%);}
    10% {transform: translateX(150%);}
    22% {transform: translateX(0);}
}
@keyframes slideFromLeft {
    0% {transform: translateX(-150%);}
    10% {transform: translateX(-150%);}
    22% {transform: translateX(0);}
}
@keyframes slideFromRight2 {
    25% {transform: translateX(150%);}
    33% {transform: translateX(0);}
}
@keyframes slideFromLeft2 {
    25% {transform: translateX(-150%)}
    32% {transform: translateX(0)}
}

.slideUp {
    transform: translateY(150%);
    opacity: 0;
    transition: 1s;
}
.slideUp.show {
    opacity: 1;
    transform: translateY(0%);
}

/* Мы производим */
.production-title {
    text-align: center;
    width: 100%;
    font-size: 75px;
    text-transform: uppercase;
    color: #2E3192;
    display: block;
    margin-bottom: 0.5rem;
    font-family: "OnestMedium";
}
.production {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    background-color: #ccc;
}
.production .block {
    background-color: #fff;
    padding: 5rem;
    box-sizing: border-box; 
    display: flex;
    justify-content: space-between;
}
.production .block img {
    width: 260px;
    object-fit: contain;
    height: 260px;
    filter: grayscale(1);
    transition: all .5s;
}
.production .block:hover img {
    filter: grayscale(0);
}
.production .block .text {
    width: 50%;
}
.production .block .text div:first-child {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: .5rem;
    font-family: "OnestBold";
    color: #2E3192;
}
.production .block .text div:nth-child(2) {
    color: #77778B;
    font-family: "OnestRegular";
}

/* Бегущая строка*/
.running-line {
    font-size: 96px;
    position: relative;
    text-transform: uppercase;
    overflow: hidden;
    font-weight: 600;
}
.running-line .inner {
    display: flex;
}
.running-line .line {
    flex-shrink: 0;
    margin: 0;
    min-width: 100%;
    white-space: nowrap;
    animation-name: arrows;
    animation-duration: 50s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    font-family: "OnestLight";
    margin-right: .5rem;
}
.running-line.blue .line {
    color: #D4DBFF;
}
.running-line.reverse .line {
    animation-name: arrows-reverse;
}
@keyframes arrows-reverse {
  from {
    transform: translateX(-140%);
  }
  
  to {
    transform: translateX(0);
  }
}
@keyframes arrows {
  from {
    transform: translateX(0);
  }
  
  to {
    transform: translateX(-100%);
  }
}

.bg-purple {
    background-color: #2A2849;
    position: relative;
}
.bg-purple .container {
    padding: 2rem 5rem;
    position: relative;
    z-index: 1;
}
.bg-purple .container div {
    font-size: 75px;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-family: "OnestMedium";
}
.bg-purple .container div:first-child {
    text-align: end;
}
.bg-purple .container div:last-child {
    font-size: 24px;
    font-weight: 300;
    width: 60%;
    font-family: "OnestLight";
    text-transform: none;
}
.bg-purple img {
    width: 100%;
    position: absolute;
    top: -20%;
    -webkit-mask-image: linear-gradient(180deg, #00000000, #00000000, #00000000, #000000, #000000, #000000, #000000);
}

@media (min-width: 2000px) {
    .bg-purple {
        margin-bottom: 8rem;
    }
    .bg-purple img {
        top: -60%;
    }
}
@media (max-width: 425px) {
}

/* Цикл производства */
.cycle-title {
    font-size: 96px;
    color: #2E3192;
    width: 70%;
    margin: auto;
    line-height: 1;
    margin-bottom: .5rem;
    font-family: "OnestMedium";
    text-transform: uppercase;
}
.cycle-title div:last-child {
    font-size: 16px;
    color: #77778B;
    width: 60%;
    margin-top: 2rem;
    line-height: 1;
    font-family: "OnestLight";
    text-transform: none;
}
.cycle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 85%;
    margin: auto;
}
.cycle-step {
    display: flex;
    justify-content: center;
}
.cycle-step:first-child {
    grid-column-start: 1;
    grid-column-end: 3;
    grid-row-start: 1;
    grid-row-end: 1;
}
.cycle-step:last-child {
    grid-column-start: 1;
    grid-column-end: 3;
    grid-row-start: 3;
    grid-row-end: 3;
} 
.cycle-step .step {
    font-size: 270px;
    color: #2E3192;
    position: relative;
    right: -0.3rem;
    z-index: -1;
    font-weight: 700;
}
.cycle-step .circle::before {
    content: '1';
    position: absolute;
    left: -20%;
    top: 0;
    z-index: -1;
    font-size: 280px;
    color: #2E3192;
    font-weight: 700;
    font-family: "OnestBold";
}
.cycle-step.four .circle::before {
    content: '4';
    left: -50%;
}
.cycle-step.two .circle::before {
    content: '2';
    left: 70%;
    top: -20%;
}
.cycle-step.three .circle::before {
    content: '3';
    left: unset;
    top: 50%;
}
.cycle-step .circle {
    width: 260px;
    height: 260px;
    background-color: #D9D9D94A;
    border-radius: 50%;
    align-content: center;
    padding: 1rem;
    font-size: 19px;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    color: #2E3192;
    font-family: "OnestBold";
}

.cycle-step .circle  svg {
    position: absolute;
    right: -60%;
} 
.cycle-step:last-child .circle  svg {
    transform: rotate(180deg) translate(27rem, 7rem);
}
.cycle-step:nth-child(3) .circle  svg {
    transform: rotate(93deg) translate(10rem, 17rem);
}

@keyframes move-image {
    60% { opacity: 0; }
    70% { transform: translateY(-500%); opacity: 0; }
    90% { transform: translateY(0); opacity: 1;}
}
@keyframes move-image-two {
    60% { opacity: 0; }
    70% { transform: translateY(-650%); opacity: 0; }
    90% { transform: translateY(0) rotate(270deg); opacity: 1;}
}
@keyframes move-image-three {
    60% { opacity: 0; }
    70% { transform: translateY(-800%); opacity: 0; }
    90% { transform: translateY(0) rotate(90deg); opacity: 1;}
}
@keyframes move-image-four {
    60% { opacity: 0; }
    70% { transform: translateY(-800%);}
    90% { transform: translateY(40%) rotate(295deg); opacity: 1;}
}

.pellet.show.two {
    animation-name: move-image-two;
    animation-duration: auto;
}
.pellet.show.three {
    animation-name: move-image-three;
    animation-duration: auto; 
}
.pellet.show.four {
    animation-name: move-image-four;
    animation-duration: auto;
}
.pellet.show {
    animation-name: move-image;
    animation-duration: auto;
}
.pellet.show  {
    opacity: 1;
}
.pellet.two {
    left: 45%;
    top: 45%;
    transform: rotate(270deg);
}
.pellet.three {
    left: 70%;
    top: 10%;
    transform: rotate(90deg);
}
.pellet.four {
    left: 64%;
    top: 65%;
    transform: rotate(295deg);
}
.pellet {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 165px;
    opacity: 0;
    animation-timeline: scroll();
    display: none;
}

/* Контакты */
.contacts-container > div {
    display: grid;
    grid-template-rows: 1fr 1fr;
    align-items: center;
}
.contacts-title {
    font-size: 96px;
    font-weight: 500;
    margin-top: 3em;
    margin-bottom: 1rem;
    color: #2A2849;
    font-family: "OnestMedium";
    text-transform: uppercase;
    text-align: center;
}
.contacts-container .text {
    font-size: 32px;
    color: #77778B;
    margin-bottom: 2rem;
}
.contacts-container .get-call {
    padding: 0.8rem 4rem;
    border: solid 1.8px black;
    text-transform: uppercase;
    margin-left: 5rem;
    background-color: white
}
.contacts-container .get-call:hover {
    filter: invert(1);
}
.contacts-container img {
    width: 705px;
    height: 705px;
    border-radius: 50%;
}
.contacts-container .links .phone {
    font-family: "OnestBold";
}
.contacts-container .links .email {
    color: #2E3192;
}
.contacts-container .links .email, .contacts-container .address {
    font-family: "OnestMedium";
}

.contacts-container .contacts-btns {
    display: flex;
    justify-content: space-between;
    width: 70%;
    margin: auto;
}
.contacts-container .contacts-btns > div {
    display: flex;
    flex-direction: column;
}
.contacts-container .contacts-btns > div a {
    color:#2E3192;
    text-decoration: none;
}
.contacts-container .contacts-btns > div a:first-child {
    font-size: 31px;
    font-weight: 800;
}
.contacts-container .contacts-btns > div a:last-child {
    font-size: 28px;
}
.contacts-container .address {
    font-size: 29px;
    font-weight: 500;
    width: 60%;
}

footer {
    background-color: #2A2849;
}
footer .container {
    display: flex;
    justify-content: space-between;
    margin-bottom: unset;
    padding: 1rem;
    align-items: flex-end;
}
footer .container div {
    color: #8688DD;
}

.dark-theme {
    background-color: #2A2849;
}
footer.dark-theme {
    background-color: black;
}
footer.dark-theme .container div {
    color: white;
}
.alt-theme {
    transition: all .5s;
}

.consult-form {
    background-color: #2A2849;
}
.consult-container {
    width: 70%;
    margin: auto;
    padding: 3rem 0;
}

.consult-form .title {
    font-size: 64px;
    color: white;
    text-transform: uppercase;
    text-align: center;
    padding-bottom: 0.5rem;
    font-family: "OnestMedium";
}

.consult-form .text {
    font-size: 16px;
    color: white;
    font-weight: 600;
    text-align: center;
    width: 50%;
    margin: auto;
    padding: 1rem 0;
    font-family: "OnestRegular";
}

.consult-form form {
    display: grid;
    grid-template-columns: 1fr 1fr 15rem;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}

.consult-form .button-div {
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row-start: 1;
    grid-row-end: 3;
    display: flex;
    align-items: center;
}
.consult-form .button-div button {
    background-color: #E4E9FF;
    border: none;
    padding: 1rem;
    min-width: 15rem;
    color: #2E3192;
    text-transform: uppercase;
}

.consult-form input {
    background-color: #E4E9FF;
    border: none;
    padding: 1rem;
    font-family: "OnestRegular";
}
.consult-form .small-text {
    color: #FFFFFF85;
    font-size: 7px;
    padding: 1.5rem;
    text-align: center;
    font-family: "OnestRegular";
}
.consult-form .small-text a {
    color: white;
    text-decoration: none;
}
/*Каталог*/
.catalog-container, .product-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.catalog-title, .product-title {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}
.catalog-title .title, .product-title .title, .catalog-title.alt .title {
    font-family: 'OnestExtraBold';
    text-transform: uppercase;
    font-weight: 700;
    font-size: 42px;
}
.catalog-title.alt {
    margin: 10rem 0;
    display: block;
}
.catalog-title.alt .text {
    width: fit-content;
    position: relative;
    left: 25%;
    font-size: 24px;
    font-family: 'OnestRegular';
}
.catalog-title .title.big {
    font-size: 75px;
}
.catalog-title .text, .product-title .text {
    font-size: 21px;
    font-family: 'OnestRegular';
}
.category-tree {
    width: 25%;
}
.category-tree .search {
    color: #555555;
    width: -webkit-fill-available;
    background-color: #F6F6F6;
    border: solid;
    border-radius: 12px;
    padding: 1rem;
    font-size: 19px;
    font-family: 'OnestRegular';
}
#category-tree-sidebar {
    border-radius: 12px;
    list-style: none;
    padding: unset;
}
#category-tree-sidebar li.active .nested {
    display: block;
}
#category-tree-sidebar li.active .category {
    color: #2E3192;
}
#category-tree-sidebar li.active svg {
    color: #2E3192;
    transform: rotate(360deg);
}
#category-tree-sidebar .nested {
    display: none;
    margin-top: 1rem;
}
#category-tree-sidebar li {
    font-family: 'OnestRegular';
    color: #828282;
    list-style: none;
    background-color: #F6F6F6
}
#category-tree-sidebar ul li:not(:last-child) {
    margin-bottom: 1rem;
}
#category-tree-sidebar > li {
    margin-bottom: .1rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    position: relative;
    cursor: pointer;
}
#category-tree-sidebar > li:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
#category-tree-sidebar > li:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
#category-tree-sidebar > li svg {
    position: relative;
    top: 0.5rem;
    transition: all .5s;
    transform: rotate(270deg);
}
#category-tree-sidebar > li.active, #category-tree-sidebar > li.active li {
    background-color: #e1e1e1;
}
#category-tree-sidebar > li::before {
    content: "";
    position: absolute;
    height: 0px;
    width: 3px;
    background-color: #2E3192;
    top: 1.3rem;
    left: 0;
    transition: all .5s;
}
#category-tree-sidebar > li.active::before {
    height: 30px;
    width: 3px;
}

.catalog-list {
    width: 70%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.catalog-list .product-item {
    border: solid 1px #DFDFDF;
    border-radius: 16px;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: black;
    display: flex;
    background-color: white;
    transition: all .5s;
}
.catalog-list .product-item img {
    height: 250px;
}
.catalog-list .product-item:hover {
    box-shadow: 0px 0px 30px 0px #00000026;
    border-color: transparent;
}
.catalog-list .product-item .name {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.catalog-list .product-item .name .title {
    font-weight: 700;
    font-family: 'OnestBold';
    text-transform: uppercase;
}
.catalog-list .product-item .name .article {
    display: flex;
    gap: .5rem;
    color: #767676;
    align-items: center;
}
/* Продукт */
.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 3rem;
    width: 73%;
}
.product .photo-block .big, .photo-block .mini > div {
    border: solid 1px #DFDFDF;
    padding: 15px;
    border-radius: 16px;
    transition: all .5s;
}
.photo-block .mini > div:hover {
    box-shadow: 0px 0px 30px 0px #00000026;
}
.product .photo-block .mini > div img {
    width: 160px;
}
.product .photo-block .big, .specifications .spec-row{
    margin-bottom: 1rem;
}
.product .photo-block .mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
/* Миниатюра режима "цвет" скрыта из галереи; выбор цвета остаётся через ползунок "Выберите цвет" (он программно активирует этот режим). */
.product .prod-thumb[data-mode="color"] {
    display: none;
}
.product .about .back-to-catalog {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.product .about .back-to-catalog a{
    color: #2E3192;
    text-decoration: none;
    font-family: 'OnestRegular';
    font-size: 21px;
}
.product .about .name .title {
    font-family: 'OnestBold';
    font-size: 36px;
}

.product .about .name .article {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #767676;
    cursor: pointer;
    width: fit-content;
}

.product .about .name .article.copied::after {
    content: "Скопировано";
    color: #2E3192;
    font-family: 'OnestRegular';
    font-size: 14px;
    margin-left: .25rem;
}

.product .about > .name {
    margin: 2rem 0;
}

.product .about .spec-row {
    display: flex;
    position: relative;
    justify-content: space-between;
}

.product .about .spec-row::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0;
    width: 100%;
    height: 1px;
    border-bottom: 1px #D3D3D3 solid;
}

.product .spec-row div:first-child {
    background-color: white;
    z-index: 1;
    padding-right: 10px;
}

.product .spec-name {
    color: #767676;
    font-family: 'OnestRegular';
}

.product .spec-value {
    width: 40%;
    background-color: white;
    z-index: 1;
    padding-left: 10px;
    font-family: 'OnestRegular';
    font-weight: 400;
}

.product .spec-value a {
    color: #2E3192;
}
.product .spec-value a:hover {
    text-decoration: underline;
}

.size-variants {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem .85rem;
    margin-top: 1.25rem;
}

.size-variants__title {
    color: #767676;
    font-family: 'OnestRegular';
    font-size: inherit;
    line-height: 1.4;
}

.size-variants__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
}

.size-variants__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: .55rem .9rem;
    border: 1px solid #2E3192;
    border-radius: 8px;
    background-color: #fff;
    color: #2E3192;
    font-family: 'OnestMedium';
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: background-color .25s, color .25s, transform .2s;
}

.size-variants__item:hover {
    background-color: #2E3192;
    color: #fff;
    transform: translateY(-2px);
}

.product .color {
    margin-top: 4rem;
}
.product .color .name {
    font-family: 'OnestRegular';
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 1rem;
}
.product .color .pallete {
    background: linear-gradient(to right, yellow, green, blue, red, yellow);
    appearance: none;
    height: 80px;
    width: 100%;
    border-radius: 24px;
}
.product .color .pallete::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 80px;
    background: white;
    cursor: pointer;
    border-radius: 24px;
}
.similar-products .text {
    font-family: 'OnestBold';
    font-size: 36px;
    margin-bottom: .5rem;
}

.similar-products .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.similar-products {
    width: 100%;
    margin-top: 5rem;
}
.similar-products .category a{
    color: #2E3192;
    text-decoration: none;
    font-family: 'OnestRegular';
    font-size: 21px;
}
.similar-products .product-item {
    border: solid 1px #DFDFDF;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: black;
}
.similar-products .product-item .name {
    width: 100%;
}
.similar-products .product-item .name .title {
    font-family: 'OnestBold';
    font-size: 24px;
}
.similar-products .name .title {
    font-family: 'OnestBold';
}
.similar-products .name .article {
    display: flex;
    gap: .5rem;
    color: #767676;
}

.get-consultation {
    grid-column-start: 1;
    grid-column-end: 3;
    border: solid 1px #DFDFDF;
    padding: 2rem;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 1rem;
}

.get-consultation .title {
    font-family: 'OnestExtraBold';
    text-transform: uppercase;
    font-size: 36px;
}

.get-consultation .text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.get-consultation .text .end, .get-consultation .text .text {
    font-family: 'OnestMedium';
    font-size: 21px;
}

.get-consultation .form-container {
    text-align: -webkit-right;
}
.get-consultation .form-container form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.get-consultation input, .get-consultation button {
    border-radius: 16px;
    border: solid 1px #F8F8F8;
    background-color: #F8F8F8;
    padding: 1rem;
    font-family: 'OnestRegular';
    font-size: 20px;
}
.get-consultation button {
    background: linear-gradient(90deg, #0056D8, #2E3192);
    color: white;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.get-consultation .message {
    width: 50%;
    text-align: end;
    position: relative;
    right: 0;
    color: #00000085;
}
.get-consultation .message a{
    color: #262C87;
    text-decoration: none;
}
.certificates {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2rem;
}
.certificates .item .name {
    font-family: 'OnestThin';
    font-size: 21px;
    margin-bottom: .2rem;
}
.certificates .item img {
    border: solid 1px black;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    height: 520px;
}
/*Articles*/
.articles .item .name {
    font-family: 'OnestBold';
    font-size: 30px;
    margin-bottom: 0.5rem;
}

.articles .item img {
    border-radius: 20px;
    max-height: 300px;
    object-fit: cover;
    object-position: top;
    width: 100%;
}

.articles .item  .item-flex {
    display: flex;
    gap: 2rem;
}
.articles .item .text {
    font-family: 'OnestLight';
    font-size: 24px;
    width: 40%;
}

.articles .item a {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    font-family: 'OnestMedium';
    font-size: 20px;
    color: #2E3192;
}

.articles .item  {
    border: solid 1px black;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    margin-bottom: 1rem;
}
.article-text p {
    font-family: "OnestLight";
    font-size: 20px;
}

.single-article .photo {
    width: 1150px;
}
.single-article .photo img {
    width: 100%;
}
.pros .row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}
.pros .row.end {
    justify-content: end;
}
.pros .row .item {
    width: 30%;
    min-height: 164px;
    border: solid 1px black;
    border-radius: 20px;
    padding: 1rem;
    font-family: 'OnestLight';
    font-size: 18px;
    position: relative;
}
.pros .row .item .text {
    position: absolute;
    top: -30px;
    font-family: 'OnestThin';
    font-size: 21px;
    left: 0;
}
.pros .row .item.alt {
    background-color: #2E3192;
    color: white;
}
.pros .row .item img {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 6px;
}

.contract-production .title {
    font-family: 'OnestRegular';
    font-size: 64px;
    text-transform: uppercase;
    margin-bottom: .5rem;
}
.contract-offset {
    margin-bottom: 130px;
}

.prod-container {
    display: flex;
    gap: 2rem;
}

.prod-container > div:first-child {
    width: 45%;
}
.prod-container > div:last-child {
    width: 55%;
}
.prod-container > div {
    border: solid 1px;
    border-radius: 20px;
    padding: 1rem;
}

.prod-container .name {
    font-family: 'OnestMedium';
    font-size: 28px;
    height: 80px;
    align-content: center;
}

.prod-container .text {
    font-family: 'OnestRegular';
    font-size: 24px;
}

.prod-container img {
    width: 100%;
}

.press-form .title {
    font-family: 'Onestmedium';
    font-size: 64px;
    text-transform: uppercase;
    text-align: right;
    padding: 130px 0;
}

.press-form .text {
    font-family: 'OnestLight';
    font-size: 24px;
    margin-bottom: 5rem;
}

.press-form .types > div {
    border: solid 1px;
    border-radius: 20px;
    padding: 1rem;
}

.press-form .types {
    display: flex;
    gap: 2rem;
    padding-bottom: 3rem;
}

.press-form .types > div:first-child {
    width: 50%;
}

.press-form .types > div:last-child {
    width: 50%;
}

.press-form .name {
    font-family: 'OnestMedium';
    font-size: 30px;
    text-align: center;
    margin-bottom: 1rem;
}
.press-form .img-2 {
    background-color: white;
    display: flex;
    justify-content: center;
    border-radius: 20px;
}

.polygraph .title {
    font-family: 'OnestMedium';
    font-size: 64px;
    text-transform: uppercase;
    color: #2E3192;
    margin-bottom: 1rem;
}

.row {
    display: flex;
    gap: 1rem;
    margin-bottom: 5rem;
}

.row > div:first-child {
    width: 40%;
}

.row > div:last-child {
    width: 60%;
}

.row div:has(img), .row div:has(video) {
    border: 1px solid;
    padding: 1rem;
    border-radius: 20px;
}

.row .full img,
.row .full video {
    width: 100%;
    display: block;
}

.polygraph .name {
    font-family: 'OnestBold';
    font-size: 36px;
    margin-bottom: .5rem;
}

.polygraph .text {
    font-family: 'OnestLight';
    font-size: 24px;
}

.js-cert-img {
    cursor: zoom-in;
}

.cert-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.88);
}

.cert-lightbox.active {
    display: flex;
}

.cert-lightbox__inner {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    cursor: grab;
}

.cert-lightbox__inner.dragging {
    cursor: grabbing;
}

.cert-lightbox__img {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.55);
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}

.cert-lightbox__close {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 1000000;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 40px;
    line-height: 44px;
    cursor: pointer;
}

.cert-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cert-lightbox__hint {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    opacity: 0.75;
}

body.cert-lightbox-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .cert-lightbox {
        padding: 20px;
    }

    .cert-lightbox__close {
        top: 14px;
        right: 14px;
    }

    .cert-lightbox__hint {
        display: none;
    }

    .cert-lightbox__img {
        max-width: 92vw;
        max-height: 85vh;
    }
}

a,
a:visited,
a:hover,
a:active,
a:focus {
    text-decoration: none !important;
}

/* ==========================================================================
   Reveal on scroll — лёгкие анимации появления (fade + подъём)
   Скрытие целей только при html.anim-ready (ставится синхронно из JS до
   первой отрисовки), показ — добавлением .reveal-in из IntersectionObserver.
   Без JS / при prefers-reduced-motion флаг не ставится => весь контент виден.
   ========================================================================== */
html.anim-ready .video-container,
html.anim-ready .catalog-title,
html.anim-ready .power-title,
html.anim-ready .production-title,
html.anim-ready .production,
html.anim-ready .cycle-title,
html.anim-ready .cycle,
html.anim-ready .contacts-title,
html.anim-ready .contacts-container,
html.anim-ready .product-title,
html.anim-ready .specifications,
html.anim-ready .size-variants,
html.anim-ready .single-article .photo,
html.anim-ready .article-text,
html.anim-ready .press-form,
html.anim-ready .polygraph,
html.anim-ready .contract-production > .title,
html.anim-ready .catalog-list .product-item,
html.anim-ready .articles .item,
html.anim-ready .certificates .item,
html.anim-ready .similar-products .product-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1),
                transform .7s cubic-bezier(.22, .61, .36, 1);
}
html.anim-ready .reveal-in {
    opacity: 1 !important;
    transform: none !important;
}


/* ==========================================================================
   MOBILE VERSION (<=768px). Shared layer + per-page layers. Desktop untouched.
   ========================================================================== */

/* ==========================================================================
   Mobile (<=768px) — shared layer: containers, header + burger, footer.
   Everything lives inside the media query, so desktop is untouched.
   Burger: script-new.js adds .has-burger to <header>. Without the script the
   nav simply wraps under the logo and stays usable.
   ========================================================================== */
.burger {
    display: none;
}

@media (max-width: 768px) {
    img,
    video {
        max-width: 100%;
    }

    .container {
        width: auto;
        margin: 2.5rem 16px;
    }

    /* Header */
    header {
        top: 0;
        padding-top: 12px;
    }
    header > div {
        position: relative;
        flex: 1;
        width: auto;
        margin: 0 16px;
        padding-bottom: 12px;
        flex-wrap: wrap;
        gap: 10px 16px;
    }
    header > div > a:first-child img {
        display: block;
        width: 132px;
        height: auto;
    }
    header .nav {
        flex-wrap: wrap;
        gap: 6px 16px;
        width: 100%;
    }
    header .nav a {
        font-size: 15px;
        font-family: "OnestRegular";
    }

    /* Burger mode */
    header.has-burger > div {
        flex-wrap: nowrap;
    }
    header.has-burger .burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        margin-right: -8px;
        padding: 8px;
        border: 0;
        background: none;
        cursor: pointer;
    }
    .burger span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: #2E3192;
        transition: transform .25s, opacity .25s;
    }
    header:has(.nav.white) .burger span {
        background: #fff;
    }
    header.nav-open .burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    header.nav-open .burger span:nth-child(2) {
        opacity: 0;
    }
    header.nav-open .burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    header.has-burger .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: -16px;
        right: -16px;
        z-index: 10;
        flex-direction: column;
        gap: 0;
        width: auto;
        padding: 4px 16px 12px;
        background: #2A2849;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
    }
    header.has-burger.nav-open .nav {
        display: flex;
    }
    header.has-burger .nav a,
    header.has-burger .nav.white a {
        padding: 13px 0;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
        color: #fff;
        font-size: 18px;
    }
    header.has-burger .nav a:last-child {
        border-bottom: 0;
    }

    /* Inner pages start with .container right under the absolute header */
    main > .container:first-child {
        margin-top: 84px;
    }

    /* Page headings shared by catalog / product / certificates / contract */
    .catalog-title,
    .product-title {
        flex-wrap: wrap;
        gap: .5rem 1rem;
        margin: 0 0 1.5rem;
    }
    .catalog-title .title,
    .product-title .title,
    .catalog-title.alt .title {
        font-size: 30px;
        line-height: 1.1;
    }
    .catalog-title .title.big {
        font-size: 34px;
    }
    .catalog-title.alt {
        margin: 0 0 2rem;
    }
    .catalog-title.alt .text {
        left: 0;
        width: auto;
        margin-top: .75rem;
        font-size: 17px;
        line-height: 1.4;
    }
    .catalog-title .text,
    .product-title .text {
        font-size: 16px;
    }
    .contract-offset {
        margin-bottom: 3rem;
    }

    /* Running line (main + contract) */
    .running-line {
        font-size: 40px;
    }

    /* Footer */
    footer .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin: 0 auto;
        padding: 20px 16px;
    }
    footer .container img {
        width: 132px;
        height: auto;
    }
}

@media (max-width: 360px) {
    .catalog-title .title.big {
        font-size: 28px;
    }
}

/* ---- Mobile: main page ---- */

/* ==========================================================================
   Mobile (<=768px) — main page sections: hero, numbers, power, production,
   purple band, production cycle, contacts. Desktop is untouched: every rule
   lives inside the media queries. Reveal-on-scroll targets keep their
   opacity/transform/transition (owned by html.anim-ready / .reveal-in).
   ========================================================================== */
@media (max-width: 768px) {

    /* ---------- Hero ---------- */
    .video-container {
        position: relative;
        height: 100vh;
        height: 100svh;
        min-height: 480px;
    }
    .video-container video {
        display: block;
    }
    .video-text {
        left: 16px;
        right: 16px;
        bottom: 2.5rem;
        font-size: 32px;
        line-height: 1.1;
    }

    /* ---------- Numbers ---------- */
    .numbers-container {
        flex-direction: column;
        gap: 2rem;
    }
    .numbers-container > .numbers {
        width: 100%;
    }
    .numbers {
        font-size: 18px;
    }
    .number {
        font-size: 50px;
        line-height: 1.05;
    }
    .number.total {
        font-size: clamp(36px, 13vw, 76px);
        white-space: nowrap;
    }
    .number.total + .text {
        float: none;
        width: auto;
        top: 0;
        margin-top: .5rem;
        font-size: 18px;
        line-height: 1.3;
    }
    .small-numbers {
        flex-direction: column;
    }
    /* each counter = a row: number column + caption */
    .small-numbers .numbers,
    .small-numbers .numbers:last-child {
        display: grid;
        grid-template-columns: 7.5rem 1fr;
        align-items: center;
        column-gap: 12px;
        width: 100%;
        padding: 14px 0;
        border-top: 1px solid #E4E9FF;
        text-align: start;
    }
    .small-numbers .numbers:last-child {
        border-bottom: 1px solid #E4E9FF;
    }
    .small-numbers .text {
        font-size: 17px;
        line-height: 1.3;
    }
    div.counter {
        font-size: 44px;
        line-height: 1.05;
    }

    /* ---------- Power ---------- */
    .alt-theme:has(> .container > .power) {
        padding: 2.5rem 0;
    }
    .alt-theme:has(> .container > .power) > .container {
        margin-top: 0;
        margin-bottom: 0;
    }
    .power-title {
        margin-bottom: 1.25rem;
        font-size: clamp(24px, 8vw, 30px); /* "ПРОИЗВОДСТВЕННЫЕ" must fit at 320px */
        line-height: 1.1;
    }
    .power {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 12px;
    }
    .power .block,
    .power .block.big,
    .power .block:first-child,
    .power .block:nth-child(3),
    .power .block:nth-child(4),
    .power .block:last-child {
        animation: none;
        transform: none;
    }
    .power .block {
        margin-bottom: 0;
        padding: 12px;
        border-radius: 18px;
        gap: 12px;
    }
    .power .block.big {
        grid-row: auto;
        grid-column: auto;
    }
    .power .block div {
        margin-bottom: 0;
        font-size: 19px;
        line-height: 1.25;
    }
    .power .block img,
    .power .block video {
        display: block;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 12px;
    }

    /* ---------- Production ---------- */
    .production-title {
        margin-bottom: 1.25rem;
        font-size: 30px;
        line-height: 1.1;
    }
    .production {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }
    .production .block {
        align-items: center;
        gap: 16px;
        padding: 20px 4px;
    }
    .production .block .text {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    .production .block .text div:first-child {
        font-size: 18px;
        line-height: 1.2;
        overflow-wrap: anywhere; /* safety for "Полиэтилентерефталат" */
    }
    .production .block .text div:nth-child(2) {
        font-size: 15px;
        line-height: 1.4;
    }
    .production .block img {
        flex: none;
        width: 96px;
        height: 96px;
        filter: none;
    }

    /* ---------- Purple band ---------- */
    .bg-purple .container {
        margin: 0;
        padding: 2.5rem 16px;
    }
    .bg-purple .container div {
        font-size: 30px;
        line-height: 1.1;
    }
    .bg-purple .container div:last-child {
        width: auto;
        margin-top: 1rem;
        font-size: 16px;
        line-height: 1.45;
    }

    /* ---------- Production cycle ---------- */
    .cycle-title {
        width: auto;
        margin-bottom: 1.25rem;
        font-size: clamp(26px, 9vw, 34px);
        line-height: 1.05;
    }
    .cycle {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: auto;
    }
    .cycle-step,
    .cycle-step:first-child,
    .cycle-step:last-child {
        display: block;
        grid-column: auto;
        grid-row: auto;
    }
    .cycle-step:first-child { order: 1; }
    .cycle-step.two         { order: 2; }
    .cycle-step.three       { order: 3; }
    .cycle-step.four        { order: 4; }
    .cycle-step .circle {
        display: flex;
        align-items: center;
        width: 100%;
        height: auto;
        min-height: 84px;
        padding: 16px 20px 16px 84px;
        border-radius: 20px;
        font-size: 16px;
        line-height: 1.3;
        text-align: left;
    }
    .cycle-step .circle::before,
    .cycle-step.two .circle::before,
    .cycle-step.three .circle::before,
    .cycle-step.four .circle::before {
        left: 20px;
        top: 50%;
        z-index: 0;
        transform: translateY(-50%);
        font-size: 56px;
        line-height: 1;
    }
    .cycle-step .circle svg,
    .pellet {
        display: none;
    }

    /* ---------- Contacts ---------- */
    .contacts-title {
        margin-top: 3rem;
        margin-bottom: 1.25rem;
        font-size: 34px;
        line-height: 1.1;
    }
    .contacts-container > div {
        grid-template-rows: none;
        gap: 2rem;
    }
    .consult-form {
        margin: 0 -16px;
    }
    .consult-container {
        width: auto;
        padding: 2.5rem 16px;
    }
    .consult-form .title {
        padding-bottom: .5rem;
        font-size: 28px;
        line-height: 1.1;
    }
    .consult-form .text {
        width: auto;
        margin-bottom: 1.5rem;
        padding: 0;
        font-size: 15px;
        font-weight: 400;
        line-height: 1.45;
    }
    .consult-form form {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 12px;
    }
    .consult-form input {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        font-size: 16px;
    }
    .consult-form .button-div {
        grid-column: auto;
        grid-row: auto;
        margin-top: 4px;
    }
    .consult-form .button-div button {
        width: 100%;
        min-width: 0;
        min-height: 52px;
        font-family: "OnestMedium";
        font-size: 16px;
        cursor: pointer;
    }
    .contacts-container .contacts-btns {
        flex-direction: column;
        gap: .75rem;
        width: auto;
        margin: 0;
    }
    .contacts-container .contacts-btns > div a {
        padding: 8px 0; /* tap target */
    }
    .contacts-container .contacts-btns > div a:first-child {
        font-size: 24px;
    }
    .contacts-container .contacts-btns > div a:last-child {
        font-size: 20px;
    }
    .contacts-container .address {
        width: auto;
        font-size: 17px;
        line-height: 1.4;
    }
}

/* Large phones / small tablets (560–768px): two-column grids read better */
@media (min-width: 560px) and (max-width: 768px) {
    .power {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row dense;
    }
    .power .block.big {
        grid-column: 1 / -1;
    }
    .production {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .production .block {
        padding: 20px 16px;
    }
    .cycle {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Narrow phones (320–420px): give the production cards' text more room */
@media (max-width: 420px) {
    .production .block {
        gap: 12px;
        padding: 20px 0;
    }
    .production .block img {
        width: 72px;
        height: 72px;
    }
    .production .block .text div:first-child {
        font-size: 17px;
    }
}

/* ---- Mobile: contract page ---- */

/* ==========================================================================
   Mobile (<=768px) — contract manufacturing page (?page=contract)
   Sections: .pros, .contract-production, dark .press-form, .polygraph.
   Reveal-on-scroll / .slideUp opacity+transform are intentionally untouched.
   ========================================================================== */
@media (max-width: 768px) {

    /* --- Pros: 6 cards in one 2-column grid. The two .row wrappers become
       display:contents so all cards flow together (navy cards land in the
       middle row as a pair). Desktop <br>s are kept: hiding them would glue
       words together (markup has no whitespace around them). --- */
    .pros {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding-top: 2.25rem; /* room for the absolute section label */
    }
    .pros .row,
    .pros .row.end {
        display: contents;
    }
    .pros .row .item {
        width: auto;
        min-width: 0;
        min-height: 0;
        padding: 14px;
        border-radius: 16px;
        font-size: 15px;
        line-height: 1.3;
        overflow-wrap: break-word;
    }
    .pros .row .item img {
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
    }
    /* "Почему выбирают TARAPLASTIC" — section label above the grid */
    .pros .row .item .text {
        top: -2.25rem;
        left: 0;
        width: max-content;
        max-width: calc(100vw - 32px);
        font-size: 19px;
        line-height: 1.3;
        white-space: nowrap;
    }

    /* --- Contract production --- */
    .contract-production .title {
        font-size: 30px;
        line-height: 1.1;
        margin-bottom: 1.25rem;
    }
    .prod-container {
        flex-direction: column;
        gap: 1rem;
    }
    .contract-production .prod-container > div:nth-child(n) {
        width: auto;
        padding: 14px;
        border-radius: 16px;
        animation: none;
    }
    .prod-container .name {
        height: auto;
        margin-bottom: .75rem;
        font-size: 20px;
        line-height: 1.25;
    }
    .prod-container img {
        display: block;
        height: auto;
    }
    .prod-container .text {
        margin-top: .75rem;
        font-size: 16px;
        line-height: 1.45;
    }

    /* --- Press forms (dark section) --- */
    /* the container's margins collapse through .alt-theme, so the dark band
       gets its inner spacing from paddings (same approach as desktop) */
    .press-form .title {
        padding: 2.5rem 0 1.25rem;
        font-size: 30px;
        line-height: 1.1;
        text-align: left;
    }
    .press-form .text,
    .press-form .text.contract-offset {
        margin-bottom: 2rem;
        font-size: 16px;
        line-height: 1.45;
    }
    .press-form .types {
        flex-direction: column;
        gap: 1rem;
        padding-bottom: 2.5rem;
    }
    .press-form .types > div:nth-child(n) {
        width: auto;
        padding: 14px;
        border-radius: 16px;
    }
    .press-form .name {
        margin-bottom: .75rem;
        font-size: 20px;
        line-height: 1.25;
    }
    .press-form .types img {
        display: block;
        height: auto;
        margin: 0 auto;
    }
    .press-form .img-2 {
        border-radius: 12px;
        overflow: hidden;
    }

    /* --- Polygraph: each row stacks, media above text --- */
    .polygraph .title {
        font-size: 30px;
        line-height: 1.1;
        margin-bottom: 1.25rem;
    }
    .polygraph .row {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2.5rem;
    }
    .polygraph .row:last-child {
        margin-bottom: 0;
    }
    .polygraph .row > div:nth-child(n) {
        width: auto;
    }
    .polygraph .row > .full {
        order: -1;
        padding: 12px;
        border-radius: 16px;
    }
    .polygraph .row .full img,
    .polygraph .row .full video {
        height: auto;
        border-radius: 8px;
    }
    .polygraph .name {
        font-size: 21px;
        line-height: 1.25;
    }
    .polygraph .text {
        font-size: 16px;
        line-height: 1.45;
    }
}

@media (max-width: 420px) {
    .pros .row .item {
        padding: 12px;
        font-size: 14px;
    }
    .pros .row .item img {
        width: 40px;
        height: 40px;
    }
    .pros .row .item .text {
        font-size: 18px;
    }
}

/* Very narrow phones (320–360): 2 columns would split long Russian words,
   so the cards become a one-column list with the icon on the left. */
@media (max-width: 360px) {
    .pros {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .pros .row .item {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: center;
        column-gap: 14px;
        font-size: 15px;
    }
    .pros .row .item img {
        margin-bottom: 0;
    }
    .contract-production .title,
    .press-form .title,
    .polygraph .title {
        font-size: 26px;
    }
}

/* ---- Mobile: catalog / product / certificates ---- */

/* ==========================================================================
   Mobile (<=768px) — catalog, product and certificates pages.
   Everything lives inside the media queries, so desktop is untouched.
   Header / footer / .container / page headings live in mobile-shared.css.
   ========================================================================== */
@media (max-width: 768px) {

    /* ---------- Catalog / product: sidebar above the content ---------- */
    .catalog-container,
    .product-container {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 1.5rem;
    }
    .category-tree {
        width: 100%;
    }
    .category-tree .search {
        display: block;
        width: 100%;
        height: 48px;
        margin: 0 0 12px;
        padding: 0 16px;
        border: 1px solid #DFDFDF;
        border-radius: 12px;
        font-size: 16px; /* >=16px keeps iOS from zooming on focus */
    }
    .category-tree .search:focus {
        outline: none;
        border-color: #2E3192;
    }
    #category-tree-sidebar {
        margin: 0;
        overflow: hidden;
    }
    #category-tree-sidebar > li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        min-height: 48px;
        margin-bottom: 2px;
        padding: 0 12px 0 8px;
        -webkit-tap-highlight-color: transparent;
    }
    #category-tree-sidebar > li > svg,
    #category-tree-sidebar > li > a > svg {
        flex: none;
        top: 0;
        width: 28px;
        height: 28px;
    }
    #category-tree-sidebar > li > a {
        color: inherit;
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        text-decoration: none;
    }
    #category-tree-sidebar .category {
        flex: 1;
        padding: 12px 0 12px 6px;
        font-size: 16px;
        line-height: 1.3;
    }
    #category-tree-sidebar > li::before {
        top: 9px;
    }
    /* Sub-categories as a 2-column grid of chips: compact, each >=44px tall.
       jQuery show()/slideDown() leave either no inline display or
       "display: block" — both are turned into the grid here. */
    #category-tree-sidebar .nested {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        margin: 0;
        padding: 0 0 12px 6px;
        cursor: default;
    }
    #category-tree-sidebar li.active > .nested:not([style*="none"]) {
        display: grid;
    }
    #category-tree-sidebar .nested[style*="block"] {
        display: grid !important;
    }
    #category-tree-sidebar ul li:not(:last-child) {
        margin-bottom: 0;
    }
    #category-tree-sidebar .nested li {
        background: none;
    }
    #category-tree-sidebar .nested a {
        display: flex;
        align-items: center;
        height: 100%;
        min-height: 44px;
        padding: 6px 10px;
        border: 1px solid #CFCFCF;
        border-radius: 10px;
        background: #fff;
        color: #2A2849;
        font-size: 14px;
        line-height: 1.2;
        text-decoration: none;
    }
    #category-tree-sidebar .nested a.active {
        border-color: #2E3192;
        background: #2E3192;
        color: #fff;
    }

    /* ---------- Catalog list ---------- */
    .catalog-list {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .catalog-list .product-item {
        align-items: stretch;
        padding: 12px;
        border-radius: 14px;
    }
    .catalog-list .product-item img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0 auto 10px;
        object-fit: contain;
    }
    .catalog-list .product-item .name {
        gap: 6px;
        min-width: 0;
    }
    .catalog-list .product-item .name .title {
        font-size: 14px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    .catalog-list .product-item .name .article {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 13px;
    }
    .catalog-list > p {
        grid-column: 1 / -1;
        font-size: 16px;
    }

    /* ---------- Product ---------- */
    /* page_product starts with an inline <style>, so the shared
       "main > .container:first-child" header offset does not match here */
    main > style:first-child + .container {
        margin-top: 84px;
    }
    .product {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        gap: 2rem;
        width: 100%;
    }
    .photo-block,
    .product .about {
        min-width: 0;
    }
    /* script-new.js (fixBigImageBlockSize) writes inline px sizes here */
    .product .photo-block .big {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: min(calc(100vw - 32px), 440px) !important;
        min-height: 0 !important;
        max-height: none !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        margin-bottom: 10px;
        padding: 12px;
        border-radius: 14px;
        /* desktop has "transition: all" — don't animate the inline px size away */
        transition: border-color .5s, box-shadow .5s;
    }
    .product .photo-block .big #mainimage {
        width: auto !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain;
    }
    .product .photo-block .big .product-color-layered {
        height: 100%;
        max-height: 100%;
    }
    .product .photo-block .big .product-color-layered__base {
        width: auto;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
    }
    .product .photo-block .mini {
        gap: 10px;
    }
    .product .photo-block .mini > div {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        padding: 8px;
        border-radius: 12px;
        cursor: pointer;
    }
    /* keep the colour-mode thumb hidden (desktop rule is less specific) */
    .product .photo-block .mini > .prod-thumb[data-mode="color"] {
        display: none;
    }
    .product .photo-block .mini > div.active {
        border-color: #2E3192;
    }
    .product .photo-block .mini > div img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: contain;
    }

    .product .about .back-to-catalog {
        gap: 10px;
    }
    .product .about .back-to-catalog a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: 16px;
    }
    .product .about .back-to-catalog svg {
        width: 32px;
        height: 32px;
    }
    .product .about > .name {
        margin: 1rem 0 1.5rem;
    }
    .product .about .name .title {
        font-size: 24px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
    .product .about .name .article {
        flex-wrap: wrap;
        min-height: 44px;
        font-size: 16px;
    }
    .product .about .spec-row {
        align-items: flex-end;
        gap: 0;
        margin-bottom: 12px;
        font-size: 15px;
        line-height: 1.35;
    }
    .product .about .spec-row::after {
        bottom: 4px;
    }
    .product .spec-row div:first-child {
        padding-right: 8px;
    }
    .product .spec-name {
        min-width: 0;
        max-width: 58%;
    }
    .product .spec-value {
        flex: none;
        width: 42%;
        padding-left: 8px;
        overflow-wrap: anywhere;
    }
    .size-variants {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 1.5rem;
        font-size: 15px;
    }
    .size-variants__list {
        gap: 8px;
    }
    .size-variants__item {
        min-width: 56px;
        min-height: 44px;
        padding: 0 14px;
        font-size: 16px;
    }
    .product .color {
        margin-top: 2rem;
    }
    .product .color .name {
        margin-bottom: 12px;
        font-size: 18px;
    }
    .product .color .pallete {
        display: block;
        height: 52px;
        margin: 0;
        border-radius: 16px;
        touch-action: pan-y;
    }
    .product .color .pallete::-webkit-slider-thumb {
        width: 24px;
        height: 52px;
        border-radius: 16px;
        box-shadow: 0 0 0 2px rgba(0, 0, 0, .12);
    }
    .product .color .pallete::-moz-range-thumb {
        width: 24px;
        height: 52px;
        border: 0;
        border-radius: 16px;
        background: #fff;
    }

    /* Consultation form */
    .get-consultation {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        padding: 20px 16px;
        border-radius: 14px;
    }
    .get-consultation .title {
        font-size: 24px;
        line-height: 1.15;
    }
    .get-consultation .text {
        gap: 10px;
    }
    .get-consultation .text .end,
    .get-consultation .text .text {
        font-size: 16px;
        line-height: 1.4;
    }
    .get-consultation .form-container {
        text-align: left;
    }
    .get-consultation .form-container form {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        gap: 10px;
        margin-bottom: 12px;
    }
    .get-consultation input,
    .get-consultation button {
        width: 100%;
        min-height: 52px;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 16px;
    }
    .get-consultation button {
        align-items: center;
        cursor: pointer;
    }
    .get-consultation .message {
        width: auto;
        font-size: 13px;
        line-height: 1.4;
        text-align: left;
    }

    /* Similar products */
    .similar-products {
        margin-top: 3rem;
    }
    .similar-products .category a {
        display: inline-block;
        padding: 6px 0;
        font-size: 16px;
    }
    .similar-products .text {
        margin-bottom: 1rem;
        font-size: 24px;
        line-height: 1.2;
    }
    .similar-products .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .similar-products .product-item {
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
    }
    .similar-products .product-item img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: contain;
    }
    .similar-products .product-item .name {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
    }
    .similar-products .product-item .name .title {
        font-size: 14px;
        line-height: 1.25;
        text-transform: uppercase;
        overflow-wrap: anywhere;
    }
    .similar-products .name .article {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 13px;
    }

    /* ---------- Certificates ---------- */
    .certificates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        gap: 20px 12px;
    }
    .certificates .item {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .certificates .item .name {
        flex: 1;
        margin-bottom: 6px;
        font-size: 15px;
        line-height: 1.3;
    }
    .certificates .item img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 210 / 297;
        padding: 8px;
        border-radius: 12px;
        object-fit: contain;
        cursor: zoom-in;
    }
}

/* Large phones / small tablets (still the mobile layout): more columns */
@media (min-width: 560px) and (max-width: 768px) {
    .catalog-list,
    .certificates {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #category-tree-sidebar .nested {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .catalog-list .product-item .name .title {
        font-size: 15px;
    }
    .product .photo-block .mini {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
@media (min-width: 700px) and (max-width: 768px) {
    .similar-products .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Narrow phones (<375px): uppercase titles would break mid-word in 2 columns */
@media (max-width: 374px) {
    .catalog-list .product-item,
    .similar-products .product-item {
        padding: 10px;
    }
    .catalog-list .product-item .name .title,
    .similar-products .product-item .name .title {
        font-size: 13px;
        text-transform: none;
        overflow-wrap: break-word;
    }
    .product .about .name .title {
        font-size: 22px;
    }
}

/* Mobile: pros cards wrap naturally — hard <br>s (desktop line breaks) are hidden; markup has a space before each <br>. */
@media (max-width: 768px) {
    .pros .row .item br {
        display: none;
    }
}

/* ==========================================================================
   Mobile (<=768px) — main page: "Мощности" as swipe carousel,
   "Мы производим" as 2x2 tiles (so two sections don't read as two lists).
   ========================================================================== */
@media (max-width: 768px) {
    .power {
        display: flex;
        gap: 12px;
        margin: 0 -16px;
        padding: 4px 16px 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 16px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        counter-reset: power;
    }
    .power::-webkit-scrollbar {
        display: none;
    }
    .power .block,
    .power .block.big {
        position: relative;
        flex: 0 0 82%;
        aspect-ratio: 4 / 5;
        justify-content: flex-end;
        padding: 0;
        border: none;
        border-radius: 22px;
        overflow: hidden;
        scroll-snap-align: start;
        counter-increment: power;
        background: #1d1c38;
    }
    .power .block img,
    .power .block video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
        object-fit: cover;
        z-index: 0;
    }
    .power .block::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(180deg, rgba(42,40,73,0) 35%, rgba(42,40,73,.55) 60%, rgba(42,40,73,.95) 100%);
    }
    .power .block::before {
        content: counter(power, decimal-leading-zero) " / 05";
        position: absolute;
        top: 14px;
        left: 14px;
        z-index: 2;
        padding: 5px 11px;
        border-radius: 999px;
        background: rgba(42,40,73,.6);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        color: #fff;
        font-size: 13px;
        letter-spacing: .04em;
    }
    .power .block div {
        position: relative;
        z-index: 2;
        padding: 0 20px 22px;
        font-size: 20px;
        line-height: 1.25;
    }

    .production {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        background: none;
    }
    .production .block {
        position: relative;
        flex-direction: column-reverse;
        justify-content: flex-end;
        align-items: stretch;
        gap: 10px;
        padding: 12px 12px 16px;
        border-radius: 20px;
        background: linear-gradient(160deg, #F4F5FC 0%, #E3E5F4 100%);
    }
    .production .block img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        object-fit: contain;
        filter: none;
    }
    .production .block .text {
        width: auto;
        min-width: 0;
        flex: none;
    }
    .production .block .text div:first-child {
        margin-bottom: 0;
        font-size: 15px;
        line-height: 1.2;
        overflow-wrap: normal;
        hyphens: manual;
    }
    .production .block .text div:nth-child(2) {
        display: none;
    }
}
@media (min-width: 560px) and (max-width: 768px) {
    .power .block,
    .power .block.big {
        flex-basis: 58%;
    }
    .production .block .text div:first-child {
        font-size: 18px;
    }
}
@media (max-width: 374px) {
    .production .block {
        padding: 10px 10px 14px;
    }
    .production .block .text div:first-child {
        font-size: 13px;
    }
}
/* Mobile production tiles: colour only on tap */
@media (max-width: 768px) {
    .production .block img {
        filter: grayscale(1);
        transition: filter .4s;
    }
    .production .block:active img,
    .production .block:focus-visible img {
        filter: grayscale(0);
    }
    .production .block {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==========================================================================
   Mobile (<=768px) — production cycle as a zigzag path of circles
   connected by the brand arrows (echoes the desktop cycle).
   ========================================================================== */
@media (max-width: 768px) {
    .cycle {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: auto;
        padding: 44px 0 0;
    }
    .cycle-step,
    .cycle-step:first-child,
    .cycle-step:last-child {
        display: flex;
        justify-content: flex-start;
        padding-left: 6%;
    }
    .cycle-step.two,
    .cycle-step.four {
        justify-content: flex-end;
        padding-left: 0;
        padding-right: 6%;
    }
    .cycle-step + .cycle-step {
        margin-top: -28px;
    }
    .cycle-step.four { margin-top: -28px; }
    .cycle-step:first-child { margin-top: 0; }
    .cycle-step .circle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: clamp(150px, 50vw, 200px);
        height: clamp(150px, 50vw, 200px);
        min-height: 0;
        padding: 18px;
        border-radius: 50%;
        background-color: rgba(217, 217, 217, .35);
        font-size: clamp(13px, 3.8vw, 15px);
        line-height: 1.25;
        text-align: center;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }
    .cycle-step .circle::before,
    .cycle-step.two .circle::before,
    .cycle-step.three .circle::before,
    .cycle-step.four .circle::before {
        top: -0.32em;
        left: -0.18em;
        right: auto;
        transform: none;
        z-index: -1;
        font-size: clamp(96px, 32vw, 130px);
        line-height: 1;
        opacity: .9;
    }
    .cycle-step.two .circle::before,
    .cycle-step.four .circle::before {
        left: auto;
        right: -0.12em;
    }
    .cycle-step .circle svg {
        display: block;
        position: absolute;
        top: 58%;
        left: 100%;
        right: auto;
        width: clamp(52px, 17vw, 72px);
        height: auto;
        margin-left: 2px;
        transform: none;
    }
    .cycle-step.two .circle svg {
        left: auto;
        right: 100%;
        margin-left: 0;
        margin-right: 2px;
        transform: scaleX(-1);
    }
    .cycle-step:last-child .circle svg,
    .cycle-step:nth-child(3) .circle svg {
        transform: none;
    }
    .cycle-step.two:nth-child(3) .circle svg {
        transform: scaleX(-1);
    }

    /* steps pop in one after another when the section is revealed */
    html.anim-ready .cycle .cycle-step {
        opacity: 0;
        transform: scale(.85);
        transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .3, 1.2);
    }
    html.anim-ready .cycle.reveal-in .cycle-step {
        opacity: 1;
        transform: none;
    }
    html.anim-ready .cycle.reveal-in .cycle-step.two   { transition-delay: .2s; }
    html.anim-ready .cycle.reveal-in .cycle-step.three { transition-delay: .4s; }
    html.anim-ready .cycle.reveal-in .cycle-step.four  { transition-delay: .6s; }
}

/* ==========================================================================
   Mobile (<=768px) — the burger is pinned to exactly the spot it occupies in
   the header, so nothing jumps; once the page is scrolled (header.is-scrolled,
   set in script-new.js) only a subtle translucent backdrop fades in.
   ========================================================================== */
@media (max-width: 768px) {
    header.has-burger {
        z-index: 100;
    }
    header.has-burger .burger {
        position: fixed;
        top: 12px;
        right: 8px;
        z-index: 102;
        margin: 0;
        border-radius: 50%;
        background: rgba(42, 40, 73, 0);
        -webkit-tap-highlight-color: transparent;
        transition: background-color .45s ease;
    }
    header.has-burger .burger span {
        transition: transform .25s, opacity .25s, background-color .45s ease;
    }
    header.has-burger.is-scrolled .burger {
        background: rgba(42, 40, 73, .45);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
    header.has-burger.is-scrolled .burger span {
        background: #fff;
    }
    header.has-burger.is-scrolled .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 101;
        padding: 64px 16px 12px;
    }
}

/* Mobile: colour slider moved under the product photo by script-new.js */
@media (max-width: 768px) {
    .product .photo-block .color {
        margin: 0 0 12px;
    }
    .product .photo-block .color .name {
        margin-bottom: 8px;
        font-size: 16px;
    }
    .product .photo-block .color .pallete {
        height: 44px;
    }
    .product .photo-block .color .pallete::-webkit-slider-thumb {
        height: 44px;
    }
    .product .photo-block .color .pallete::-moz-range-thumb {
        height: 44px;
    }
}

/* Mobile: "Обратно в каталог" goes after the specs / size variants */
@media (max-width: 768px) {
    .product .about {
        display: flex;
        flex-direction: column;
    }
    .product .about > .back-to-catalog {
        order: 10;
        margin-top: 1.5rem;
    }
    .product .about > .name {
        margin-top: 0;
    }
}

/* Mobile: logo shows in the opened menu after the page is scrolled */
@keyframes menuLogoIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@media (max-width: 768px) {
    header.has-burger.is-scrolled.nav-open > div > a:first-child {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 102;
        animation: menuLogoIn .25s ease both;
    }
}

/* Mobile: purple band heading aligned left */
@media (max-width: 768px) {
    .bg-purple .container div:first-child {
        text-align: left;
    }
}

/* Mobile: slightly tighter vertical spacing between sections */
@media (max-width: 768px) {
    .container {
        margin-top: 28px;
        margin-bottom: 28px;
    }
    main > .container:first-child {
        margin-top: 84px;
    }
    .alt-theme:has(> .container > .power) {
        padding: 28px 0;
    }
    .bg-purple .container {
        padding-top: 28px;
        padding-bottom: 28px;
    }
    .contacts-title {
        margin-top: 2rem;
    }
    .cycle {
        padding-top: 36px;
    }
}

/* Counters: ">30" years, "500+" product types */
div.counter.lifespan::after {
    content: ">" counter(num);
}
div.counter.product-types::after {
    content: counter(num) "+";
}
div.counter.number-clients::after {
    content: counter(num) "+";
}
@media (max-width: 768px) {
    .small-numbers .numbers,
    .small-numbers .numbers:last-child {
        grid-template-columns: 8.5rem 1fr;
    }
    div.counter {
        font-size: 40px;
    }
}

/* Article numbers: explicit Onest (Safari fell back to a system font) */
.catalog-list .product-item .name .article,
.catalog-list .product-item .name .article div,
.product .about .name .article,
.product .about .name .article div,
.similar-products .name .article,
.similar-products .name .article div {
    font-family: 'OnestRegular', 'Onest', Arial, sans-serif;
    font-weight: 400;
}

/* Counters rendered by script-new.js (text), CSS counter() switched off */
div.counter.js-counter {
    font-family: "OnestExtraBold", "Onest", Arial, sans-serif;
    white-space: nowrap;
}
div.counter.js-counter::after {
    content: none;
}

/* ==========================================================================
   Серии (?page=catalog&type=serii)
   ========================================================================== */
.catalog-list:has(.series-card),
.catalog-list:has(.series-heading) {
    align-content: start;
}
.series-card__images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 250px;
}
/* Each product gets an equal share of the width and is fully contained —
   no overlapping, nothing is cropped. */
.catalog-list .product-item .series-card__images img {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    max-width: 200px;
    object-fit: contain;
}
.series-card .name {
    width: 100%;
}
.series-heading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .5rem;
}
.series-heading__back {
    color: #2E3192;
    text-decoration: none;
    font-family: 'OnestRegular';
    font-size: 16px;
}
.series-heading__back::before {
    content: "\2190\00a0";
}
.series-heading__title {
    color: #2E3192;
    font-family: 'OnestBold';
    font-size: 32px;
    text-transform: uppercase;
    line-height: 1.1;
}
@media (max-width: 768px) {
    .series-card__images {
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .catalog-list .product-item .series-card__images img {
        height: 100%;
        padding: 0;
        aspect-ratio: auto;
    }
    /* narrow cards: two products read better than three tiny ones */
    .catalog-list .product-item .series-card__images img:nth-child(n+3) {
        display: none;
    }
    .series-heading__title {
        font-size: 22px;
    }
}

/* ==========================================================================
   Правки заказчика (окт 2026)
   ========================================================================== */
/* 1. Header logo: logo.png is now a crisp 4x render of the vector logo with an
   even frame — pin its display size (mobile keeps its own 132px rule). */
@media (min-width: 769px) {
    header > div > a:first-child img {
        display: block;
        width: 171px;
        height: auto;
    }
}
/* 2. Main page bottom: contacts block used two equal grid rows (1fr 1fr), so
   the phone/address row was stretched to the form's height and left ~150px
   of empty space above and below it. Size rows to their content instead. */
@media (min-width: 769px) {
    .contacts-container > div {
        grid-template-rows: auto auto;
        row-gap: 4rem;
    }
}
/* 3. Polygraph video: rounded corners like the photos in the same block */
@media (min-width: 769px) {
    .row .full video {
        border-radius: 16px;
    }
}
/* 5. Catalog: with few products the grid rows stretched to the sidebar's
   height — keep rows at their natural height. */
.catalog-list {
    align-content: start;
}
/* 7. Product consultation form: "Ваш запрос" on its own full-width row
   (name | phone / request / email | button). Mobile is already one column. */
@media (min-width: 769px) {
    .get-consultation .form-container form {
        grid-template-rows: none;
    }
    .get-consultation .form-container form .request {
        grid-column: 1 / -1;
    }
}
/* "КОНСУЛЬТАЦИЮ" overflowed into the form below ~1900px;
   scale the title with the viewport (36px from ~1950px up). */
@media (min-width: 769px) {
    .get-consultation .title {
        font-size: clamp(16px, 1.85vw, 36px);
    }
}
/* Colour slider: disclaimer under the heading + "contact a manager" line */
.product .color .color-note {
    margin: -.5rem 0 1rem;
    color: #77778B;
    font-family: 'OnestRegular';
    font-size: 13px;
    line-height: 1.35;
}
.product .color .color-help {
    margin-top: 1rem;
    color: #2A2849;
    font-family: 'OnestRegular';
    font-size: 15px;
    line-height: 1.4;
}
.product .color .color-help a {
    color: #2E3192;
    font-family: 'OnestMedium';
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (max-width: 768px) {
    .product .color .color-note {
        margin: -2px 0 10px;
        font-size: 12px;
    }
    .product .color .color-help {
        margin-top: 10px;
        font-size: 13px;
    }
}
/* Polygraph videos fill their framed box even when the text beside is taller */
@media (min-width: 769px) {
    .polygraph .row .full video {
        height: 100%;
        object-fit: cover;
    }
}

/* Consent checkbox (152-ФЗ) in the main-page and product consultation forms */
.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    grid-column: 1 / -1;
    cursor: pointer;
    font-family: 'OnestRegular';
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}
.consent input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 1px 0 0;
    padding: 0;
    accent-color: #2E3192;
    cursor: pointer;
}
.consent a {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.consult-form .consent {
    grid-row: 3;
    color: #FFFFFFCC;
}
.consult-form .consent a {
    color: #fff;
}
.get-consultation .consent {
    color: #00000099;
}
.get-consultation .consent a {
    color: #2E3192;
}
.consult-form form button:disabled,
.get-consultation form button:disabled {
    opacity: .45;
    cursor: not-allowed;
}
@media (min-width: 769px) {
    .consult-form form {
        grid-template-rows: auto auto auto;
    }
}
@media (max-width: 768px) {
    .consult-form .consent {
        grid-row: auto;
    }
}
@media (max-width: 768px) {
    /* one column: consent above the submit button */
    .consult-form .consent,
    .get-consultation .consent {
        order: 1;
    }
    .consult-form .button-div,
    .get-consultation form button {
        order: 2;
    }
}


/* ==========================================================================
   Main page «Мы производим» (desktop): freer typesetting + product motion.
   Layout/colours unchanged. Image motion uses independent transform props:
   translate = idle float, scale/rotate = hover, transform = reveal-in.
   ========================================================================== */
@media (min-width: 769px) {
    .production .block {
        gap: 2rem;
        padding: 5rem 4rem 5rem 4.5rem;
        transition: background-color .5s;
        overflow: hidden; /* conveyor slide-in must not cause h-scroll */
    }
    .production .block:hover {
        background-color: #FAFAFE;
    }
    .production .block .text {
        width: auto;
        flex: 1 1 0;
        max-width: 460px;
    }
    .production .block .text div:first-child {
        font-size: 25px;
        line-height: 1.25;
        letter-spacing: -0.01em;
        margin-bottom: 1rem;
    }
    .production .block .text div:nth-child(2) {
        font-size: 17px;
        line-height: 1.6;
        max-width: 400px;
        text-wrap: pretty;
    }
    /* Products: calm, premium motion. Reveal = soft rise + focus
       (blur → sharp), staggered. Hover = gentle zoom + colour.
       scale = hover, transform/filter in keyframes = reveal-in. */
    .production .block img {
        flex: none;
        transform-origin: 50% 60%;
        filter: grayscale(1);
        transition: filter .6s ease, scale .8s cubic-bezier(.22, .61, .36, 1);
    }
    .production .block:hover img {
        scale: 1.05;
        filter: grayscale(0);
    }

    /* Reveal: cards come in one by one when the block scrolls into view */
    html.anim-ready .production:not(.reveal-in) .block img,
    html.anim-ready .production:not(.reveal-in) .block .text {
        opacity: 0;
    }
    html.anim-ready .production.reveal-in .block .text {
        animation: prodTextIn .9s cubic-bezier(.22, .61, .36, 1) both;
    }
    html.anim-ready .production.reveal-in .block img {
        animation: prodFocusIn 1.3s cubic-bezier(.22, .61, .36, 1) backwards; /* backwards: release filter after, so hover colour works */
    }
    html.anim-ready .production.reveal-in .block:nth-child(1) .text { animation-delay: .1s; }
    html.anim-ready .production.reveal-in .block:nth-child(2) .text { animation-delay: .25s; }
    html.anim-ready .production.reveal-in .block:nth-child(3) .text { animation-delay: .4s; }
    html.anim-ready .production.reveal-in .block:nth-child(4) .text { animation-delay: .55s; }
    html.anim-ready .production.reveal-in .block:nth-child(1) img { animation-delay: .2s; }
    html.anim-ready .production.reveal-in .block:nth-child(2) img { animation-delay: .35s; }
    html.anim-ready .production.reveal-in .block:nth-child(3) img { animation-delay: .5s; }
    html.anim-ready .production.reveal-in .block:nth-child(4) img { animation-delay: .65s; }
}
@keyframes prodFocusIn {
    from { opacity: 0; transform: translateY(28px) scale(.96); filter: grayscale(1) blur(8px); }
    to   { opacity: 1; transform: none; filter: grayscale(1) blur(0); }
}
@keyframes prodTextIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .production .block img,
    html.anim-ready .production.reveal-in .block img,
    html.anim-ready .production.reveal-in .block .text {
        animation: none !important;
    }
    .production .block:hover img { scale: none; }
}

/* ==========================================================================
   Main page «Производственные мощности» (desktop) — as Figma v2 mockup:
   full-bleed photos, «01 / 05» pill, captions on a soft gradient
   (top for cards 1–3, bottom for 4–5). Mobile keeps its own carousel.
   ========================================================================== */
@media (min-width: 769px) {
    /* Title was glued to the top edge: the container's margin collapsed
       outside the dark section. Move that space inside as padding. */
    .alt-theme:has(> .container > .power) {
        padding-top: 76px;
    }
    .alt-theme:has(> .container > .power) > .container {
        margin-top: 0;
    }
    .power-title {
        margin: 0;
        line-height: 1;
    }
    .power {
        grid-template-columns: minmax(0, 35fr) minmax(0, 65fr);
        grid-template-rows: repeat(3, clamp(340px, 23vw, 440px));
        gap: 32px 28px;
        padding-top: 76px;
        padding-bottom: 104px;
        counter-reset: power;
    }
    .power .block,
    .power .block.big {
        position: relative;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 20px;
        overflow: hidden;
        justify-content: flex-start;
        background: #1d1c38;
        counter-increment: power;
        isolation: isolate;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 48px -12px rgba(8, 7, 24, .6);
        transition: box-shadow .5s, transform .6s cubic-bezier(.22, .61, .36, 1);
    }
    .power .block:hover {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), 0 32px 60px -14px rgba(8, 7, 24, .75);
    }
    .power .block:nth-child(4),
    .power .block:nth-child(5) {
        justify-content: flex-end;
    }
    .power .block img,
    .power .block video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        object-fit: cover;
        z-index: -2;
        transition: transform 1.2s cubic-bezier(.22, .61, .36, 1);
    }
    .power .block:hover img,
    .power .block:hover video {
        transform: scale(1.04);
    }
    .power .block::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(16, 15, 38, .82) 0%, rgba(16, 15, 38, .4) 32%, rgba(16, 15, 38, 0) 58%);
    }
    .power .block:nth-child(4)::after,
    .power .block:nth-child(5)::after {
        background: linear-gradient(0deg, rgba(16, 15, 38, .86) 0%, rgba(16, 15, 38, .45) 32%, rgba(16, 15, 38, 0) 60%);
    }
    .power .block::before {
        content: counter(power, decimal-leading-zero) " / 05";
        position: absolute;
        top: 28px;
        left: 36px;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .14);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        color: #fff;
        font-size: 15px;
        line-height: 1;
        letter-spacing: .05em;
        font-family: "OnestRegular";
    }
    .power .block div {
        margin: 0;
        padding: 88px 36px 0;
        max-width: 640px;
        font-size: 26px;
        line-height: 1.3;
        color: #fff;
        text-wrap: pretty;
    }
    .power .block:nth-child(4) div,
    .power .block:nth-child(5) div {
        padding: 0 36px 40px;
    }
}

/* «Мы производим» (desktop): optical balance of the product images —
   PET is narrow and the polygraphy fan is wide, so at the same 260px box
   they read smaller than the canisters/cans. Images are 2x (EDSR). */
@media (min-width: 769px) {
    .production .block:nth-child(3) img {
        height: 290px;
        margin: -15px 0;
    }
    .production .block:nth-child(4) img {
        width: 340px;
    }
}

/* ==========================================================================
   Main page section titles (desktop): each title sits exactly in the
   middle between the content above and the content below it. Total
   distance between the blocks is unchanged — only the title moves.
   (Container margin-top 80px collapses with the title's negative margin.)
   ========================================================================== */
@media (min-width: 769px) {
    /* 80 above / 8 below  →  44 / 44 */
    .production-title,
    .cycle-title {
        margin-top: -36px;
        margin-bottom: 44px;
    }
    /* Above «Контакты» the big «3» of the cycle hangs ~147px below its box:
       visible gap was 141 above / 16 below  →  78 / 78 */
    .contacts-title {
        margin-top: 225px;
        margin-bottom: 78px;
    }
}

/* ==========================================================================
   Main page «Цикл производства» (desktop): arrows placed exactly as in the
   Figma mockup (file 5AYfyu67zupwdDJk1KfBGy, page 12314, «Frame 104»).
   The mockup arrow (137.76×138.29, mirrored vertically) is drawn as the
   <svg> background; the original inline path is hidden.
   For each arrow the mockup gives, relative to the two circles it joins:
     f    – where its centre sits along the centre-to-centre line (0…1)
     p    – its offset from that line, px (negative = outside the cycle)
     rel  – its angle relative to the line
       1→2: f .4901, p −109.5px, rel −41.92deg
       2→3: f .4744, p −125.6px, rel −32.30deg
       3→4: f .5275, p −125.2px, rel −42.33deg
   Site geometry: circle centres at 50%/75%/50%/25% of .cycle width, rows
   260px → between neighbours W = 25cqw, H = 260px, th = atan2(H, W).
   Steps appear one by one: 1 → arrow → 2 → arrow → 3 → arrow → 4.
   ========================================================================== */
@media (min-width: 769px) {
    .cycle {
        container-type: inline-size;
    }
    .cycle-step .circle svg,
    .cycle-step:last-child .circle svg,
    .cycle-step:nth-child(3) .circle svg {
        --t: atan2(260px, 25cqw);
        position: absolute;
        left: 50%;
        top: 50%;
        right: auto;
        width: 137.76px;
        height: 138.29px;
        margin: -69.14px 0 0 -68.88px;
        transform-origin: 50% 50%;
        transform: none;
        pointer-events: none;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 137.7644 138.2858'%3E%3Cpath fill='%232E3192' d='M137.7644 62.0496L114.6947 54.3597C97.3261 102.0902 51.8495 136.8274 0.6718 138.2858C-1.0518 138.2858 1.0696 119.9892 1.2022 118.5307C1.4673 116.4094 2.9258 99.3059 5.71 99.1734C42.8338 98.1127 79.9575 78.0924 102.0991 48.526L80.3552 40.8361L127.4228 0L137.7644 62.0496Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
        scale: 1 -1; /* the mockup arrow is mirrored */
    }
    .cycle-step .circle svg path {
        display: none;
    }
    /* 1 → 2: line (W, H) */
    .cycle-step:first-child .circle svg {
        translate: calc(.4901 * 25cqw + 109.5px * sin(var(--t))) calc(.4901 * 260px - 109.5px * cos(var(--t)));
        rotate: calc(var(--t) - 41.92deg);
    }
    /* 2 → 3: line (−W, H) */
    .cycle-step.two .circle svg {
        translate: calc(-.4744 * 25cqw + 125.6px * sin(var(--t))) calc(.4744 * 260px + 125.6px * cos(var(--t)));
        rotate: calc(180deg - var(--t) - 32.3deg);
    }
    /* 3 → 4: line (−W, −H) */
    .cycle-step.three .circle svg {
        translate: calc(-.5275 * 25cqw - 125.2px * sin(var(--t))) calc(-.5275 * 260px + 125.2px * cos(var(--t)));
        rotate: calc(180deg + var(--t) - 42.33deg);
    }

    /* Appear one by one (the block itself no longer fades as a whole):
       circle softly settles in → its big number rises up behind it →
       the arrow "draws" itself from tail to tip → the next circle
       arrives as the tip gets there. */
    html.anim-ready .cycle {
        opacity: 1;
        transform: none;
    }
    html.anim-ready .cycle:not(.reveal-in) .circle {
        opacity: 0;
    }
    html.anim-ready .cycle.reveal-in .circle {
        animation: cycleStepIn .8s cubic-bezier(.22, .61, .36, 1) backwards;
    }
    html.anim-ready .cycle.reveal-in .circle::before {
        animation: cycleNumIn .9s cubic-bezier(.22, .61, .36, 1) backwards;
    }
    html.anim-ready .cycle.reveal-in .circle svg {
        animation: cycleArrowDraw .6s cubic-bezier(.65, 0, .35, 1) backwards;
    }
    html.anim-ready .cycle.reveal-in .cycle-step:first-child .circle         { animation-delay: .1s; }
    html.anim-ready .cycle.reveal-in .cycle-step:first-child .circle::before { animation-delay: .25s; }
    html.anim-ready .cycle.reveal-in .cycle-step:first-child .circle svg     { animation-delay: .6s; }
    html.anim-ready .cycle.reveal-in .cycle-step.two .circle                 { animation-delay: 1.05s; }
    html.anim-ready .cycle.reveal-in .cycle-step.two .circle::before         { animation-delay: 1.2s; }
    html.anim-ready .cycle.reveal-in .cycle-step.two .circle svg             { animation-delay: 1.55s; }
    html.anim-ready .cycle.reveal-in .cycle-step.three .circle               { animation-delay: 2s; }
    html.anim-ready .cycle.reveal-in .cycle-step.three .circle::before       { animation-delay: 2.15s; }
    html.anim-ready .cycle.reveal-in .cycle-step.three .circle svg           { animation-delay: 2.5s; }
    html.anim-ready .cycle.reveal-in .cycle-step.four .circle                { animation-delay: 2.95s; }
    html.anim-ready .cycle.reveal-in .cycle-step.four .circle::before        { animation-delay: 3.1s; }
}
@keyframes cycleStepIn {
    from { opacity: 0; scale: .92; }
    to   { opacity: 1; scale: 1; }
}
@keyframes cycleNumIn {
    from { opacity: 0; translate: 0 28px; }
    to   { opacity: 1; translate: 0 0; }
}
/* The arrow is revealed by a circle growing from its tail corner
   (bottom-left of the un-mirrored box), so it draws along the curve. */
@keyframes cycleArrowDraw {
    from { clip-path: circle(0% at 0% 100%); }
    to   { clip-path: circle(142% at 0% 100%); }
}
@media (prefers-reduced-motion: reduce) {
    html.anim-ready .cycle.reveal-in .circle,
    html.anim-ready .cycle.reveal-in .circle::before,
    html.anim-ready .cycle.reveal-in .circle svg {
        animation: none !important;
    }
}


/* ==========================================================================
   Contract page: interview block (Егор Геневский)
   ========================================================================== */
.interview-head {
    margin-bottom: 40px;
}
.interview-label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 16px;
    border-radius: 999px;
    background: #EEF0FB;
    color: #2E3192;
    font-family: 'OnestMedium';
    font-size: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.interview .title {
    margin: 0;
    font-family: 'OnestMedium';
    font-weight: 500;
    font-size: 64px;
    line-height: 1.1;
    text-transform: uppercase;
    color: #2E3192;
}
.interview-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    align-items: start;
}
.interview-person {
    position: sticky;
    top: 100px;
    padding: 40px;
    border-radius: 24px;
    background: linear-gradient(160deg, #F4F5FC 0%, #E3E5F4 100%);
}
.interview-person img {
    display: block;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.interview-name {
    font-family: 'OnestBold';
    font-size: 28px;
    color: #2E3192;
}
.interview-role {
    margin-top: 4px;
    font-family: 'OnestRegular';
    font-size: 18px;
    color: #5B5E77;
}
.interview-quote {
    position: relative;
    margin: 32px 0 0;
    padding: 64px 0 0;
    border-top: 1px solid #CDD0EC;
    font-family: 'OnestMedium';
    font-size: 26px;
    line-height: 1.35;
    color: #1C1D47;
}
.interview-quote::before {
    content: "«";
    position: absolute;
    top: 18px;
    left: -2px;
    font-family: 'OnestBold';
    font-size: 64px;
    line-height: 1;
    color: #2E3192;
    opacity: .18;
}
.interview-lead {
    margin: 0 0 28px;
    font-family: 'OnestLight';
    font-size: 24px;
    line-height: 1.45;
}
.interview-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.interview-facts > div {
    padding: 24px;
    border: 1.5px solid #D8D9EE;
    border-radius: 20px;
}
.interview-facts b {
    display: block;
    margin-bottom: 6px;
    font-family: 'OnestBold';
    font-weight: 700;
    font-size: 22px;
    color: #2E3192;
}
.interview-facts span {
    font-family: 'OnestRegular';
    font-size: 16px;
    line-height: 1.4;
    color: #4B4D63;
}
.interview-more {
    margin-top: 28px;
}
.interview-more summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    background: #2E3192;
    color: #fff;
    font-family: 'OnestMedium';
    font-size: 18px;
    cursor: pointer;
    list-style: none;
    transition: background .2s;
}
.interview-more summary::-webkit-details-marker {
    display: none;
}
.interview-more summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s;
}
.interview-more[open] summary::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}
.interview-more summary:hover {
    background: #1d1f6e;
}
.interview-more .less,
.interview-more[open] .more {
    display: none;
}
.interview-more[open] .less {
    display: inline;
}
.interview-qa {
    margin-top: 28px;
    font-family: 'OnestLight';
    font-size: 20px;
    line-height: 1.5;
}
.interview-qa p {
    margin: 0 0 20px;
}
.interview-qa .q {
    margin: 32px 0 10px;
    font-family: 'OnestBold';
    font-size: 22px;
    color: #2E3192;
}
.interview-qa .q:first-child {
    margin-top: 0;
}
@media (max-width: 1200px) {
    .interview .title {
        font-size: 48px;
    }
    .interview-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 768px) {
    .interview-head {
        margin-bottom: 24px;
    }
    .interview-label {
        font-size: 13px;
        padding: 5px 12px;
    }
    .interview .title {
        font-size: 30px;
    }
    .interview-grid {
        gap: 16px;
    }
    .interview-person {
        padding: 24px;
        border-radius: 20px;
    }
    .interview-person img {
        width: 88px;
        height: 88px;
        margin-bottom: 14px;
    }
    .interview-name {
        font-size: 22px;
    }
    .interview-role {
        font-size: 15px;
    }
    .interview-person {
        position: static;
    }
    .interview-quote {
        margin-top: 20px;
        padding-top: 50px;
        font-size: 19px;
    }
    .interview-quote::before {
        top: 14px;
        font-size: 48px;
    }
    .interview-lead {
        margin-bottom: 20px;
        font-size: 17px;
    }
    .interview-facts {
        gap: 10px;
    }
    .interview-facts > div {
        padding: 16px;
        border-radius: 16px;
    }
    .interview-facts b {
        font-size: 17px;
    }
    .interview-facts span {
        font-size: 14px;
    }
    .interview-more summary {
        width: 100%;
        justify-content: center;
        font-size: 16px;
    }
    .interview-qa {
        font-size: 16px;
    }
    .interview-qa .q {
        font-size: 18px;
    }
}


/* ==========================================================================
   Contract page (desktop): appear animations.
   First screen + .pros run on load; the rest hooks into the shared
   html.anim-ready / .reveal-in observer (extra targets are registered in
   script-new.js). Fill mode "backwards" so hover/transforms are free after.
   ========================================================================== */
@media (min-width: 769px) {
    /* first screen: lines rise one by one */
    .catalog-title.contract-offset:has(+ .pros) > * {
        animation: ctrRise 1s cubic-bezier(.22,.61,.36,1) backwards;
    }
    .catalog-title.contract-offset:has(+ .pros) > :nth-child(1) { animation-delay: .1s; }
    .catalog-title.contract-offset:has(+ .pros) > :nth-child(2) { animation-delay: .25s; }
    .catalog-title.contract-offset:has(+ .pros) > :nth-child(3) { animation-delay: .45s; }

    /* "Why choose us" cards: cascade inside the legacy slideUp */
    .pros.slideUp.show .item { animation: ctrUp .8s cubic-bezier(.22,.61,.36,1) backwards; }
    .pros.slideUp.show .row:first-child .item:nth-child(1) { animation-delay: .35s; }
    .pros.slideUp.show .row:first-child .item:nth-child(2) { animation-delay: .45s; }
    .pros.slideUp.show .row:first-child .item:nth-child(3) { animation-delay: .55s; }
    .pros.slideUp.show .row:last-child  .item:nth-child(1) { animation-delay: .65s; }
    .pros.slideUp.show .row:last-child  .item:nth-child(2) { animation-delay: .75s; }
    .pros.slideUp.show .row:last-child  .item:nth-child(3) { animation-delay: .85s; }

    /* sections are no longer faded as one big unit, their parts are */
    html.anim-ready .press-form,
    html.anim-ready .polygraph {
        opacity: 1;
        transform: none;
        transition: none;
    }

    /* hidden until revealed */
    html.anim-ready .press-form > .title:not(.reveal-in),
    html.anim-ready .press-form > .text:not(.reveal-in),
    html.anim-ready .press-form .types:not(.reveal-in) > div,
    html.anim-ready .polygraph > .title:not(.reveal-in),
    html.anim-ready .polygraph > .row:not(.reveal-in) > div:not(.full),
    html.anim-ready .interview-head:not(.reveal-in) .title,
    html.anim-ready .interview-grid:not(.reveal-in) .interview-person,
    html.anim-ready .interview-grid:not(.reveal-in) .interview-lead,
    html.anim-ready .interview-grid:not(.reveal-in) .interview-facts > div,
    html.anim-ready .interview-grid:not(.reveal-in) .interview-more {
        opacity: 0;
    }

    /* press moulds */
    html.anim-ready .press-form > .title.reveal-in { animation: ctrFromRight 1s cubic-bezier(.22,.61,.36,1) backwards; }
    html.anim-ready .press-form > .text.reveal-in  { animation: ctrUp .9s cubic-bezier(.22,.61,.36,1) .1s backwards; }
    html.anim-ready .press-form .types.reveal-in > div { animation: ctrUp .9s cubic-bezier(.22,.61,.36,1) backwards; }
    html.anim-ready .press-form .types.reveal-in > div:nth-child(2) { animation-delay: .15s; }
    html.anim-ready .press-form .types.reveal-in img { animation: ctrCurtainUp 1.2s cubic-bezier(.65,0,.35,1) .25s backwards; }
    html.anim-ready .press-form .types.reveal-in > div:nth-child(2) img { animation-delay: .4s; }

    /* polygraphy: text slides in from its side, video wipes open towards it */
    html.anim-ready .polygraph > .title.reveal-in { animation: ctrUp .9s cubic-bezier(.22,.61,.36,1) backwards; }
    html.anim-ready .polygraph > .row.reveal-in > div:not(.full) { animation: ctrUp .7s cubic-bezier(.22,.61,.36,1) backwards; }
    /* video boxes are not animated: they are motion already, and animating
       layers with playing video stutters on weaker machines */

    /* interview */
    html.anim-ready .interview-head.reveal-in .title { animation: ctrUp .9s cubic-bezier(.22,.61,.36,1) backwards; }
    html.anim-ready .interview-grid.reveal-in .interview-person { animation: ctrUp .9s cubic-bezier(.22,.61,.36,1) backwards; }
    html.anim-ready .interview-grid.reveal-in .interview-person > * { animation: ctrUp .8s cubic-bezier(.22,.61,.36,1) backwards; }
    html.anim-ready .interview-grid.reveal-in .interview-person > img { animation: ctrPop .9s cubic-bezier(.34,1.3,.64,1) .25s backwards; }
    html.anim-ready .interview-grid.reveal-in .interview-name  { animation-delay: .4s; }
    html.anim-ready .interview-grid.reveal-in .interview-role  { animation-delay: .5s; }
    html.anim-ready .interview-grid.reveal-in .interview-quote { animation-delay: .65s; }
    html.anim-ready .interview-grid.reveal-in .interview-lead { animation: ctrUp .9s cubic-bezier(.22,.61,.36,1) .2s backwards; }
    html.anim-ready .interview-grid.reveal-in .interview-facts > div { animation: ctrUp .8s cubic-bezier(.22,.61,.36,1) backwards; }
    html.anim-ready .interview-grid.reveal-in .interview-facts > div:nth-child(1) { animation-delay: .35s; }
    html.anim-ready .interview-grid.reveal-in .interview-facts > div:nth-child(2) { animation-delay: .45s; }
    html.anim-ready .interview-grid.reveal-in .interview-facts > div:nth-child(3) { animation-delay: .55s; }
    html.anim-ready .interview-grid.reveal-in .interview-facts > div:nth-child(4) { animation-delay: .65s; }
    html.anim-ready .interview-grid.reveal-in .interview-more { animation: ctrUp .8s cubic-bezier(.22,.61,.36,1) .8s backwards; }
}
@keyframes ctrRise      { from { opacity: 0; translate: 0 36px; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
@keyframes ctrUp        { from { opacity: 0; translate: 0 32px; } to { opacity: 1; translate: 0 0; } }
@keyframes ctrFromLeft  { from { opacity: 0; translate: -48px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes ctrFromRight { from { opacity: 0; translate: 48px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes ctrPop       { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes ctrZoomOut   { from { scale: 1.12; } to { scale: 1; } }
@keyframes ctrCurtainUp { from { clip-path: inset(100% 0 0 0); scale: 1.06; } to { clip-path: inset(0 0 0 0); scale: 1; } }
@keyframes ctrWipeRight { from { clip-path: inset(0 100% 0 0 round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
@keyframes ctrWipeLeft  { from { clip-path: inset(0 0 0 100% round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
@media (prefers-reduced-motion: reduce) {
    .catalog-title.contract-offset > *, .pros .item,
    .press-form *, .polygraph *, .interview-head *, .interview-grid * { animation: none !important; }
}


/* Product gallery (desktop): square, centred thumbs whatever the image ratio
   (tall/wide drawings used to stretch the row, e.g. art. 224015) */
@media (min-width: 769px) {
    .product .photo-block .mini { align-items: start; }
    .product .photo-block .mini > div {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        cursor: pointer;
    }
    .product .photo-block .mini > .prod-thumb[data-mode="color"] { display: none; }
    .product .photo-block .mini > div img {
        display: block;
        width: 100%;
        max-width: 160px;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: contain;
    }
}
