/* * {
    outline: 1px solid red;
} */

:root {
    --color-black: #2D2D2D;
    --color-white: #FFFFFF;
    --color-blue: #3647FF;
    --color-grey: #797979;
}

::-webkit-scrollbar {
    width: 0rem;
    /* ширина скроллбара */
}

html {
    font-size: calc(100vw/1920);
}

body {
    font-family: "Manrope", sans-serif;
    color: var(--color-black);
}

.container {
    width: 100%;
    padding: 0 40rem;
    height: 100%;
}

.inner_grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 20rem;

    height: 100%;
}

section {
    background-color: var(--color-white);
    position: relative;
    z-index: 9998;
}

.section_pad {
    padding: 150rem 0;
}

.big_text {
    font-size: 120rem;
    font-weight: bold;
    letter-spacing: -0.06em;
    line-height: 90%;
}

.min_text {
    font-size: 20rem;
    font-weight: 500;
    letter-spacing: -0.06em;
}

.btn_text {
    font-size: 26rem;
    font-weight: 500;
    letter-spacing: -0.06em;
}

.snos {
    color: var(--color-grey);
}

.mid_text {
    font-size: 52rem;
    font-weight: 600;
    letter-spacing: -0.06em;
}

/* header */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;

    padding: 20rem 0;

    z-index: 9999;

    /* background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0) 100%
    ); */
}

.header__logo img {
    width: 160rem;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 100rem;
}

.header__nav a {
    color: var(--color-black);
    font-weight: medium;
}

.header__contact {
    padding: 10rem 20rem;
    background-color: var(--color-black);
    color: var(--color-white);

    display: flex;
    align-items: center;
    gap: 10rem;
}

.header__contact_sq {
    width: 10rem;
    height: 10rem;
    background-color: var(--color-blue);
}

/* hero */

.hero {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    padding: 40rem 0;
    filter: brightness(1);

    z-index: 999;
}

.hero__visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: difference;
}

.hero__visual video {
    width: 100%;
    /* height: 100%; */
    opacity: 0.3;
    z-index: 1;
}

.hero__content {
    align-self: end;
    grid-column-start: 7;
    grid-column-end: 13;

    position: relative;
    z-index: 9998;
}

.hero__highlight {
    position: relative;
    display: inline-block;
    isolation: isolate;
    color: var(--color-black);
}

.hero__highlight::before {
    content: "";
    position: absolute;
    inset: -0.05em -0.03em;
    z-index: -1;
    background-color: var(--color-blue);
    transform: scaleX(0);
    transform-origin: left center;
}

.hero__highlight::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: var(--color-white);
    white-space: nowrap;
    clip-path: inset(0 100% 0 0);
}

.hero__highlight::before {
    transform: scaleX(var(--highlight-progress, 0));
}

.hero__highlight::after {
    clip-path: inset(0 var(--highlight-clip, 100%) 0 0);
}


/* opacity */

.opacity_block {
    height: 100vh;
}

/* princip */

.princip {
    /* height: 100vh; */
}

.princip-word {
    opacity: 0;
}

.princip__content {
    grid-column-start: 7;
    grid-column-end: 13;

    padding-left: 10rem;
    border-left: 1px solid var(--color-grey);
    height: fit-content;
}

.princip__content_text {
    display: flex;
    flex-direction: column;
    gap: 20rem;

    margin-bottom: 200rem;
}

.princip__content_btn {
    display: flex;
    align-items: center;
    gap: 10rem;
    color: var(--color-black);
}

/* works */

.works__list {
    grid-row-gap: 200rem;
    margin-bottom: 160rem;

    align-items: end;
}

.works__title {
    margin-bottom: 100rem;
}

.works__title p:nth-child(1) {
    grid-column-start: 1;
    grid-column-end: 5;
}

.works__title p:nth-child(2) {
    grid-column-start: 7;
    grid-column-end: 13;
    margin-bottom: 20rem;
}

.works__title p:nth-child(3) {
    grid-column-start: 7;
    grid-column-end: 13;
}

.works__item {
    display: flex;
    flex-direction: column;
    gap: 10rem;
    cursor: pointer;
}

.works__item:hover .works__item_blue {
    opacity: 0;
}

.works__item_blue {
    position: absolute;
    background-color: var(--color-blue);
    width: 100%;
    height: 100%;
    mix-blend-mode:multiply;
    backdrop-filter: blur(10rem);
    transition: all .3s ease-in-out;
}


.works__item_small {
    grid-column: span 3;
}

.works__item_big {
    grid-column: span 6;
}

.works__item_plac {
    grid-column: span 3;
}

.works__item_img {
    width: 100%;
    background-color: var(--color-grey);
    position: relative;
    overflow: hidden;
}

.works__item_small .works__item_img {
    height: 333rem;
}

.works__item_big .works__item_img {
    height: 682rem;
}

.works .princip__content_btn {
    justify-content: center;
}

.works__item_img img {
    width: 100%;
    object-fit: cover;
    height: 100%;
}

.works__highlight {
    position: relative;
    display: inline-block;
    isolation: isolate;
    color: var(--color-black);
}

.works__highlight::before {
    content: "";
    position: absolute;
    inset: -0.05em -0.03em;
    z-index: -1;
    background-color: #3647FF;
    transform: scaleX(var(--highlight-progress, 0));
    transform-origin: left center;
}

.works__highlight::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: #fff;
    white-space: nowrap;
    clip-path: inset(0 var(--highlight-clip, 100%) 0 0);
}

/* empty */

.empty {
    height: 350vh;
}

.empty-word {
    opacity: 0;
}

.empty .mid_text {
    grid-column-start: 4;
    grid-column-end: 10;
    text-align: center;

    padding: 0 30rem;

    height: fit-content;

    position: sticky;
    top: 46%;
}

/* benefits */

/* BENEFITS — POSTER TRAIL */

.benefits {
    position: relative;
    overflow-x: hidden;
}

.benefits__poster_layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    z-index: 5;
    pointer-events: none;
}

.benefits__poster {
    position: absolute;
    width: 180rem;
    height: 240rem;

    object-fit: cover;

    pointer-events: none;
    will-change: transform, opacity;

    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
}

.benefits__title_block {
    grid-column-start: 2;
    grid-column-end: 12;

    margin-bottom: 40rem;
}

.benefits__title_block p {
    text-align: center;
}

.benefits__title_block .big_text {
    margin-bottom: 60rem;
}

.benefits__title_block {
    position: relative;
}

/* .benefits__posters {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
}

.benefits__poster {
    position: absolute;
    width: 180rem;
    height: 240rem;
    background: #D9D9D9;
} */

/* Позиции постеров */

.benefits__poster--1 {
    left: 10%;
    top: 50%;
}

.benefits__poster--2 {
    left: 60%;
    top: 120%;
    width: 150rem;
    height: 200rem;
}

.benefits__poster--3 {
    right: 4%;
    top: 80%;
    width: 200rem;
    height: 270rem;
}

.benefits_line {
    height: 400rem;
    width: 1rem;
    background-color: var(--color-grey);
    margin: 0 auto;
}

.benefits__item_wrap {
    padding: 30rem 0;
    border-top: 1rem solid var(--color-grey);
    display: flex;
    justify-content: center;
}

.benefits__item_wrap:last-child {
    border-bottom: 1rem solid var(--color-grey);
}

.benefits__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10rem;
    width: fit-content;
}

.benefits__item_num {
    background-color: var(--color-blue);
    color: var(--color-white);
}

.benefits__highlight {
    position: relative;
    display: inline-block;
    isolation: isolate;
    color: var(--color-black);
}

.benefits__highlight::before {
    content: "";
    position: absolute;
    inset: -0.05em -0.03em;
    z-index: -1;
    background-color: #3647FF;
    transform: scaleX(var(--highlight-progress, 0));
    transform-origin: left center;
}

.benefits__highlight::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: #fff;
    white-space: nowrap;
    clip-path: inset(0 var(--highlight-clip, 100%) 0 0);
}

/* big */

.big_photo {
    height: 400vh;
    position: relative;
    padding: 0;
}

.big_photo__text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 998;
}

.big_photo__text .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: fit-content;
}

.big_photo__wrap {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100vw;
    display: grid;
    justify-content: center;
    align-items: center;
    /* background-color: var(--color-black); */
    /* opacity: 0.5; */
}

.big_photo__anim {
    background-color: var(--color-grey);
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 999;
}

/* contacts */

.contacts__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 40rem;

    margin-bottom: 40rem;
}

.contacts__item {
    display: flex;
    align-items: center;
    gap: 20rem;
}

.contacts__link {
    color: var(--color-black);
}

.contacts .btn_text {
    text-align: center;
}

.contacts__highlight {
    position: relative;
    display: inline-block;
    isolation: isolate;
    color: var(--color-black);
    text-decoration: none;
}

.contacts__highlight::before {
    content: "";
    position: absolute;
    inset: -0.05em -0.03em;
    z-index: -1;
    background-color: #3647FF;
    transform: scaleX(var(--highlight-progress, 0));
    transform-origin: left center;
}

.contacts__highlight::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: #fff;
    white-space: nowrap;
    clip-path: inset(0 var(--highlight-clip, 100%) 0 0);
    pointer-events: none;
}

/* page projects */

.projects {
    position: relative;
    height: 100vh;
    overflow: hidden;

    /* opacity: 0; */
}

.projects__content {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

.projects__viewport {
    width: 100%;
    /* overflow: hidden; */
}

.projects__track {
    display: flex;
    flex-direction: column;
    /* will-change: transform; */

    /* position: relative;
    z-index: 2; */
}

.projects__list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;

    padding-left: 40%;

    /* position: relative; */
}

.projects__item {
    display: block;
    width: fit-content;
    text-decoration: none;
    color: var(--color-black);

    margin-bottom: 60rem;
    text-transform: uppercase;

    font-size: 100rem;
    font-weight: bold;
    letter-spacing: -0.06em;
    line-height: 90%;

    opacity: 0.4;
}

/* Превью */

.projects__preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-100%, -50%);
    width: 428rem;
    height: 600rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8rem;
    z-index: 10;
    pointer-events: none;
}

.projects__item.is-active{
    position: relative;
    z-index: 20;

    opacity: 1;
}

/* .projects__preview--left {
    left: 40rem;
}

.projects__preview--right {
    right: 40rem;
} */

.projects__preview_item {
    overflow: hidden;
    background: #e5e5e5;
}

.projects__preview_item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projects__item {
    position: relative;
    display: block;
    width: fit-content;
    /* isolation: isolate; */
    color: var(--color-black);
    text-decoration: none;
    cursor: pointer;

    /* --highlight-progress: 0;
    --highlight-clip: 100%; */

    transition: transform 0.2s ease;

    z-index: 5;
}

.projects__item p{
    transition: all .2s ease;
}

.projects__item.is-active p{
    transform: translateX(-90rem);

}

/* .projects__item::before {
    content: "";
    position: absolute;
    inset: -0.05em -0.03em;
    z-index: -1;
    background-color: #3647FF;
    transform: scaleX(var(--highlight-progress, 0));
    transform-origin: left center;
}

.projects__item::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    clip-path: inset(0 var(--highlight-clip, 100%) 0 0);
} */

/* ================================
   PROJECT TEMPLATE
================================ */

.ptemplate {
    position: relative;
    width: 100%;
    height: 100vh;

}

.ptemplate .inner_grid {
    align-items: start;
}

/* Левая колонка */

.ptemplate__left {
    grid-column: span 5;
    min-width: 0;
    box-sizing: border-box;
    padding-top: 120rem;
}

/* Заголовок с постоянной синей подложкой */

.ptemplate__title {
    display: table;
    max-width: 100%;
    width: fit-content;
    color: #fff;
    background: #3647FF;
    overflow-wrap: anywhere;

    grid-column-start: 1;
}

/* Год и тип работы */

.ptemplate__bullets {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 100rem;
    margin-top: 30rem;
    margin-bottom: 60rem;
}

/* Аккордеон */

.ptemplate__descr {
    width: 600rem;
}

.ptemplate__descr_line {
    border-top: 1rem solid var(--color-grey);
    padding: 10rem 0;
    cursor: pointer;
}

.ptemplate__descr_line:last-child {
    border-bottom: 1rem solid var(--color-grey);
}

/* Заголовок строки и стрелка */

.ptemplate__vis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20rem;
    width: 100%;
    cursor: pointer;
    outline: none;
}

.ptemplate__descr_line_title {
    flex: 1;
}

.ptemplate__vis img {
    display: block;
    flex: 0 0 auto;
    width: 12rem;
    height: auto;
    transition: transform 0.3s ease;
}

/* .ptemplate__descr_line_text {
    opacity: 1 !important;
} */

/* Поворот стрелки */

.ptemplate__descr_line.is-open .ptemplate__vis img {
    transform: rotate(180deg);
}

/* Раскрываемый текст */

.ptemplate__descr_line_text {
    height: 0;

    /* opacity: 0; */
    overflow: hidden;
    visibility: hidden;
    box-sizing: border-box;
    padding-top: 0;
    padding-right: 20rem;

}

.ptemplate__descr_line.is-open .ptemplate__descr_line_text {
    visibility: visible;
    padding-top: 15rem;
}

.ptemplate__descr_line_text p {
    margin: 0;
}

.ptemplate__descr_line_text p+p {
    margin-top: 10rem;
}

/* ================================
   RIGHT MEDIA COLUMN
================================ */

/* Правая колонка — область просмотра */
.ptemplate__right {
    position: relative;
    width: 100%;
    height: 100vh;
    min-width: 0;
    overflow: hidden;

    grid-column: 6 / 13;

}

/* Вертикальная движущаяся лента */
.ptemplate__media_track {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: -1px;

    width: 100%;
    height: auto;
    flex-shrink: 0;

    will-change: transform;
}

/* Отдельный элемент ленты */
.ptemplate__media_item {
    display: block;
    position: relative;

    width: 100%;
    height: auto;
    flex: 0 0 auto;
    min-width: 0;
}

/* Изображения и видео */
.ptemplate__media_item img,
.ptemplate__media_item video {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;

    object-fit: cover;
}

/* footer */
footer {
    /* padding-top: 120rem; */
    background-color: var(--color-white);
    position: relative;
    z-index: 9998;

    /* max-height: 300rem; */
}

.footer__mask{
    background-color: var(--color-white);
}

footer video{
    height: 500rem;
    mix-blend-mode: difference;
}

/* Видео в галерее проекта */
.ptemplate__media_track video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Вертикальные видео */
.ptemplate__media_track video.is-vertical {
    width: auto;
    height: 60vh;
    max-height: 800px;
    max-width: 100%;
    margin: 0 auto;
}

/* Ряд из двух вертикальных медиа */
.ptemplate__media_pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20rem;
    width: 100%;
    flex: 0 0 auto;
    align-items: start;
}

/* Элементы внутри пары */
.ptemplate__media_pair .ptemplate__media_item {
    width: 100%;
    min-width: 0;
}

/* Вертикальное видео внутри пары */
.ptemplate__media_pair video.is-vertical {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    margin: 0;
    object-fit: contain;
}

/* На всякий случай сохраняем адаптивность */
.ptemplate__media_pair img,
.ptemplate__media_pair video {
    display: block;
    width: 100%;
    height: auto;
}


.footer__mask {
    width: 100%;
    height: 100%;
    position: relative;

    -webkit-mask-image: url("../img/REUSE.png");
    mask-image: url("../img/REUSE.png");

    -webkit-mask-size: contain;
    mask-size: contain;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.footer__mask video {
    display: block;
    width: 100%;
    /* height: 100%; */
    object-fit: cover;

    mix-blend-mode: difference;
}