*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    font-family: Roboto, sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 1.6vw, 28px);
    line-height: 1.5;
    letter-spacing: 0;
    color: #000000;
    margin: 0 auto;
    overflow-x: clip;
}

header {
    font-weight: 500;
    font-size: 20px;
    line-height: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;

}

img {
    max-width: 100%;
    height: auto;
}

nav {
    color: #333333;
}

a {
    text-decoration: none;
    color: #000000;
}

.lead {
    background-image: url('../img/lead.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    border-radius: 50px;
}

h1 {
    font-weight: 900;
    font-size: clamp(40px, 6vw, 100px);
    line-height: 1.13;
    letter-spacing: 0.05em;
    color: #FFEBC6;
}

.lead p {
    font-weight: 400;
    font-size: clamp(18px, 2.5vw, 32px);
    line-height: 1.4;
    color: #FFFFFF;
}

.lead a {
    font-weight: 400;
    font-size: clamp(18px, 2vw, 30px);
    letter-spacing: 0.05em;

    text-align: center;

    padding: 24px 40px;

    width: min(456px, 100%);
    min-height: 72px;

    border-radius: 54px;
    background: #FFFFFF;
    box-shadow: 0px 0px 7.2px 5px #00000040;
}

h2 {
    font-weight: 200;
    font-size: clamp(32px, 5vw, 96px);
    line-height: 1.2;
    letter-spacing: 0.23em;
    color: #897D66;
}

.second {
    color: #000000
}

button {
    font-family: Roboto;
    font-weight: 300;
    font-size: clamp(18px, 2.2vw, 32px);
    line-height: 1.4;
    letter-spacing: 0;
    vertical-align: middle;
    background-color: #FFFFFF;
    border: none;
}

.benefits-item span {
    line-height: 0px;
    text-align: center;
    color: #897D66;
}

h3 {
    font-weight: 400;
    font-size: clamp(20px, 2.2vw, 32px);
}

.benefits-description {
    font-size: clamp(18px, 2.2vw, 32px);
    line-height: 1.4;
    letter-spacing: 0.03em;
}

.store-middle-container {

    border-radius: 44px;
    box-shadow: 0px 0px 74.3px -4px #00000040;
    background: #FFFFFF;

}

.store-middle-container h3 {
    font-size: 90px;
    letter-spacing: 0.02em;
    color: #00000080;
}

.store-middle-container p {
    color: #000000CC;
}

.store-middle-container a {
    font-weight: 400;
    font-size: 26px;
    letter-spacing: 0.05em;
    color: #000000CC;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 240px;
    height: 72px;

    border-radius: 54px;
    background: #FFFFFF;
    border: 1px solid #000000;
}

.services-list {

    border-radius: 96px;
    background: linear-gradient(289.8deg, #D3AD64 -0.15%, #FDDC9D 48.71%, #FFEAC4 101.26%);
}

.services-item h3 {
    font-weight: 500;
    font-size: clamp(22px, 2.4vw, 34px);
    line-height: 1.3;
    text-align: center;
}

.services-item {

    border-radius: 36px;
    background: #FFFFFF08;
    box-shadow: 0px 0px 68px 0px #FFFFFF42 inset, 0px 4px 4px 0px #FFFFFF45 inset;
}

.partners-item {
    font-weight: 500;
    font-size: clamp(22px, 3vw, 40px);
    line-height: 1.25;
    letter-spacing: 0.07em;
    display: flex;
    align-items: center;
    text-align: center;
    vertical-align: middle;
    justify-content: center;


    border-radius: 39px;
    background: #FFFFFF;
    box-shadow: 0px 0px 39.6px 5px #00000040;
}

.call {
    border-radius: 33px;

    background: linear-gradient(289.8deg, #2F2717 -0.15%, #403727 48.71%, #4B4438 101.26%);
}

.call-header {
    margin-top: 0;
    margin-bottom: 80px;
    font-weight: 500;
    font-size: clamp(32px, 5vw, 96px);
    line-height: 36px;
    color: #FFFFFF;
}

.call-text {
    margin: 0;
    font-weight: 300;
    font-size: clamp(20px, 3vw, 40px);
    line-height: 1.3;
    color: #FFFFFF;
}

footer {
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    color: #FFFFFF;
    font-size: clamp(18px, 2vw, 28px);

    width: 100%;
    min-height: 484px;
    margin: 0 auto;
    padding: 60px clamp(16px, 5vw, 80px);
    background: #000000;
}

footer h2 {
    font-weight: 500;
    font-size: clamp(22px, 3vw, 40px);
    line-height: 1.3;
    letter-spacing: 0;
    color: #FFFFFF;
}

header {
    background: #FAF6EF;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header {
    width: 100%;
    max-width: 1920px;
    padding: clamp(20px, 4vw, 50px) clamp(16px, 10vw, 200px);
    margin: 0 auto;


}

.benefits,
.store,
.products,
.services,
.partners {
    scroll-margin-top: 140px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navigation-list {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.navigation-item {
    margin: 10px;
}

.navigation-item:last-child {
    margin-right: 0;
}

.slogan {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 20px;
    text-align: center;
}

.main-inner {
    max-width: 1920px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 80px);
}

.lead {
    width: 100%;
    height: 856px;
    /*margin: 0 auto;*/
    margin-bottom: 100px;
    margin-top: clamp(24px, 4vw, 60px);
    display: flex;
    box-sizing: border-box;
    justify-content: space-between;
    align-items: center;
}

h1 {
    margin: 0 0 0 50px;
    max-width: 541px;
}

.title-container p {
    max-width: 496px;
    margin: 0 0 0 50px;
}

.lead a {
    margin-right: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

}

.benefits {
    width: 100%;
    margin-bottom: 100px;
}

.benefits h2 {
    margin: 0;
}

.benefits .second {
    margin-top: -12px;
    margin-bottom: 56px;
    text-align: right;
}

.benefits-columns {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(24px, 4vw, 71px);
}

.benefits-list-first {
    padding: 0;
    margin: 0;
    list-style: none;
    flex: 1 1 320px;
}

.benefits-list-second {
    padding: 0;
    margin: 0;
    list-style: none;
    flex: 1 1 320px;
}

.benefits-button {
    display: flex;
    align-items: center;
    padding: 0;
    min-height: 63px;
}

.benefits-item span {
    width: 112px;
    margin-right: 16px;
}

.benefits-button p {
    flex: 1;
    text-align: left;
    margin: 0;
}

.benefits-item {
    margin-bottom: 40px;
}

.benefits-item:last-child {
    margin-bottom: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Белое всплывающее окошко по макету */
.benefits-window {
    background: #FFFFFFC4;
    border-radius: 59px;
    width: min(923px, 92vw);
    position: relative;
    backdrop-filter: blur(15.699999809265137px);
    box-shadow: 0px 0px 12.3px 219px #FFFFFF1F inset, 0px 0px 64.6px 7px #00000040;
}

/* Класс-включатель, который мы будем добавлять через JavaScript */
.modal-overlay.is-open {
    display: flex;
}

.benefits-name {
    display: flex;
    align-items: center;
    padding: 0;
    margin-left: 18px;
}

.benefits-window p {
    margin-top: 0;
    margin-left: 46px;
    margin-right: 35px;
}

.store {
    width: 100%;
    margin-bottom: 100px;
}

.store h2 {
    margin-top: 0;
    margin-bottom: 40px;
}

.store-container {
    display: flex;
}

.store-left {
    margin: 0;
    margin-right: 73px;
}

.store-right {
    margin: 0;
    margin-left: 70px;
    margin-top: 117px;
}

.store-middle-container {
    margin-top: 121px;
    margin-bottom: 121px;
    padding-top: 97px;
    padding-right: 73px;
    padding-bottom: 96px;
    padding-left: 72px;

}

.store-middle-container h3 {
    font-size: clamp(32px, 5vw, 90px);
    margin-top: 0;
    margin-bottom: 40px;
}

.store-middle-container p {
    margin-bottom: 29px;
}

.products {
    width: 100%;
    margin-bottom: 100px;
}

.products h2 {
    margin-top: 0;
    margin-bottom: 37px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 380px));
    justify-content: center;
    gap: clamp(24px, 4vw, 90px);
    padding: 0;
    list-style: none;
}

.cards p {
    font-size: clamp(20px, 2.4vw, 34px);
    text-align: center;

    max-width: 284px;
    margin: 0 auto;
    margin-top: 26px;
}

.services {
    width: 100%;
    margin-bottom: 100px;
}

.services h2 {
    margin: 0;
}

.services .second {
    margin-bottom: 41px;
    margin-top: -12px;
    text-align: right;
}

.services-list {
    padding: clamp(32px, 6vw, 63px) clamp(20px, 8vw, 128px);
    margin: 0;
    list-style: none;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 55px 80px;
}

.services-item {
    position: relative;
    padding: 0;
    margin: 0;
    flex: 0 1 368px;
    min-height: 456px;
}

.services-item h3 {
    margin-top: 27px;
    margin-bottom: 27px;
}

.services-item p {
    margin-left: 23px;
    margin-right: 22px;
}


.services-item span {
    position: absolute;
    bottom: 21px; /* Расстояние от нижнего края карточки */
    right: 22px; /* Расстояние от правого края карточки */
}

.partners {
    width: 100%;
    margin-bottom: 200px;
}

.partners-container {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;

    overflow-x: auto;
    white-space: nowrap; /* Запрещаем карточкам переноситься на новую строку */
    user-select: none; /* Запрещаем выделение текста при перетаскивании */
    cursor: grab; /* Показываем, что ленту можно тянуть мышкой */
    touch-action: pan-y; /* Горизонтальный жест обрабатываем сами (без нативной */
                         /* инерции), вертикальный скролл страницы оставляем браузеру */

    padding: 50px 16px;

    /* Компенсируем добавленные отступы отрицательным маржином, */
    /* чтобы карусель не двигала соседние блоки на странице вниз */
    margin-top: -50px;
    margin-bottom: calc(199px - 50px);
}

.partners-container::-webkit-scrollbar {
    display: none;
}

.partners-container.active {
    cursor: grabbing; /* Пока тянем — курсор «зажатой руки» */
}

.partners-list {
    padding: 0;
    margin: 0 auto;
    list-style: none;
    display: flex;
    width: max-content;
}

.partners-item {
    margin-right: 80px;
    height: 139px;
    padding-left: 40px;
    padding-right: 40px;
}

.partners-item:last-child {
    margin-right: 0;
}

.call-main {
    display: flex;
    justify-content: center;
}

.call {
    width: 100%;
    max-width: 1437px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 100px;
}

.main-footer {
    margin-top: 100px;
}

.main-footer li {
    list-style: none;
}

.footer-container {
    display: flex;
    justify-content: center;
}

.footer-navigation-topics {
    padding: 0;
    margin: 0;
    max-width: 1014px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px 100px;
}

.footer-navigation-topics ul {
    padding: 0;
}

.footer-navigation-topics .contacts {
    width: 260px;
}

.footer-navigation-topics .address {
    width: 299px;
}

.footer-navigation-topics .schedule {
    width: 255px;
}

.codes {
    margin-top: 75px;
    margin-left: -50px;
    font-size: 20px;
    color: #888888;
    line-height: 20px;
}

.but {
    background-color: #ffffff;
    color: #333333;
    padding: 10px 20px;
    border: 2px solid #000000; /* Толщина, тип (solid/dashed/dotted), цвет */
    border-radius: 6px;        /* Закругление углов */
    cursor: pointer;
}

form {
    width: 500px;
    display: flex;
    flex-direction: column; /* Выстраивает дочерние элементы вертикально */
    gap: 10px;              /* Отступ между элементами */
    margin: auto;
}


/* ИНТЕРАКТИВ (наведение, клик, анимации) */

a,
button,
.card,
.services-item,
.partners-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.navigation-item a {
    padding-bottom: 4px;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s ease, color 0.25s ease;
}

.benefits-button {
    cursor: pointer;
}

.benefits-button p,
.benefits-button span {
    transition: color 0.2s ease;
}

.card {
    border-radius: 30px;
    overflow: hidden;
    padding: 20px;
}

.card-img {
    border-radius: 16px;
    transition: transform 0.4s ease;
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.25);
}

.lead a:active,
.store-middle-container a:active {
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #897D66;
    outline-offset: 3px;
}

@media (hover: hover) {
    .navigation-item a:hover {
        background-size: 100% 2px;
    }

    .lead a:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 26px 4px #00000045;
    }

    .benefits-button:hover {
        transform: translateX(6px);
    }

    .benefits-button:hover p {
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    .benefits-button:hover span {
        color: #000000;
    }

    .store-middle-container a:hover {
        background-color: #000000;
        color: #FFFFFF;
        transform: translateY(-3px);
    }

    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 18px 40px -8px #00000033;
    }

    .card:hover .card-img {
        transform: scale(1.05);
    }

    .services-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 16px 40px 0 #00000026, 0px 0px 68px 0px #FFFFFF42 inset, 0px 4px 4px 0px #FFFFFF45 inset;
    }

    .partners-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 30px 5px #00000030;
    }
}

.modal-overlay.is-open {
    animation: overlay-in 0.25s ease;
}

.modal-overlay.is-open .benefits-window {
    animation: window-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes overlay-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes window-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* АДАПТИВНОСТЬ!!! */

@media (max-width: 1400px) {
    .store-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .store-left,
    .store-right {
        display: none;
    }

    .store-middle-container {
        margin: 0;
        padding: clamp(32px, 5vw, 97px) clamp(24px, 5vw, 73px);
    }
}

@media (max-width: 1280px) {
    .main-inner {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 900px) {
    .benefits-columns {
        flex-direction: column;
        gap: 40px;
    }

    .benefits-list-first,
    .benefits-list-second {
        width: 100%;
    }

    .benefits .second,
    .services .second {
        margin-left: 0;
        margin-top: 10px
    }

    header {
        position: static;
        box-shadow: none;
    }

    .lead {
        flex-direction: column;
        height: auto;
        padding: 40px 20px;
        align-items: center;
        text-align: center;
        background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('../img/lead.jpg');
    }

    h1 {
        margin: 0 0 20px 0;
        width: auto;
    }

    .title-container p {
        width: auto;
        margin: 0;
    }

    .lead a {
        margin: 40px 0 0 0;
        width: 100%;
        max-width: 456px;
    }

    .benefits-window {
        width: 90%;
    }

    .benefits-list-first .benefits-button p,
    .benefits-list-second .benefits-button p {
        width: auto;
    }

    .benefits-button {
        height: auto;
    }

    .services-list {
        padding: 40px 20px;
        gap: 20px;
    }

    .services-item {
        flex: 0 1 calc(50% - 10px);
        max-width: none;
        min-height: 380px;
        padding-bottom: 40px;
    }

    .navigation {
        flex-direction: column;
        gap: 16px;
    }

    .slogan {
        margin-right: 0;
    }

    .navigation-list {
        width: auto;
        justify-content: center;
        gap: 12px;
    }

    .navigation-item {
        margin-right: 0;
    }

    .footer-navigation-topics {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px;
    }

    .benefits-name {
        width: auto;
    }

    .card {
        border-radius: 30px;
        overflow: hidden;
        padding: 0;
    }
}

@media (max-width: 600px) {
    .main-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .call {
        height: auto;
        padding: 32px 24px;
    }

    .call-header {
        margin-bottom: 24px;
    }

    .call-text {
        font-size: clamp(20px, 4vw, 40px);
    }

    .footer-navigation-topics {
        /*flex-direction: column;*/
        gap: 32px;
        text-align: center;
        width: 100%;
        justify-content: center;
    }

    footer {
        min-height: auto;
        padding: 40px 16px;
    }

    .card {
        border-radius: 30px;
        overflow: hidden;
        padding: 0;
    }
}
