@font-face {
    font-family: 'Helvetica';
    src: url(../fonts/helvetica.woff2) format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica-Bold';
    src: url(../fonts/helvetica-bold.woff2) format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    /* Палитра — не зависит от темы */
    --grey-color: #5C5C5E;
    --white-color: #F6F4F5;
    --light-grey-color: #CACAD6;
    --black-color: #070707;
    --gradient: linear-gradient(180deg, #BC10D8 0%, rgba(80, 0, 250, 0.93) 100%);
    --back-gradient: linear-gradient(180deg, rgba(80, 0, 250, 0.93) 0%, #BC10D8 100%);

    /* Роли — переопределяются в тёмной теме */
    --bg-color: #FFFFFF;
    --text-color: var(--grey-color);
    --heading-color: var(--black-color);
    --line-color: var(--black-color);

    color-scheme: light dark;

}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: var(--black-color);
        --text-color: var(--light-grey-color);
        --heading-color: var(--white-color);
        --line-color: var(--white-color);
    }
}

*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

li {
    list-style: none;
}

img {
    max-width: 100%;
}

button {
    border: none;
    background-color: transparent;
    color: inherit;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

figure {
    margin-inline: 0;
    margin-block: 0;
}

.container {
    padding: 0 1rem;
    margin: 0 auto;
    max-width: 122rem;
}


html {
    font-size: 62.5%;
}

body {
    font-family: 'Helvetica', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: grid;
    grid-template-rows: min-content 1fr min-content;
    min-width: 32rem;
    overflow-x: hidden;

}

.header {
    border-bottom: 1px solid var(--grey-color);

}

.nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    align-items: center;
    height: 8rem;
}

#navMenu {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1px;
    width: 4rem;
    aspect-ratio: 4/3;
}

#navMenu>span {
    width: 100%;
    height: 2px;
    border-radius: 9999px;
    background-color: var(--line-color);

}


.menu {
    display: flex;
    justify-content: flex-start;
    gap: 0 2rem;
}

.menu__link {
    text-transform: uppercase;
}

.logo {
    display: flex;
    vertical-align: bottom;
    place-items: center;
}

.basket {
    position: relative;
    justify-self: flex-end;
}

.basket-on span {
    position: absolute;
    top: 0;
    right: -0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65em;
    height: 1.65em;
    border-radius: 2rem;
    background-color: rgb(239 70 92);
    color: var(--white-color);
    font-size: 0.8rem;
}

.top {
    background-image: url(../images/main_bg.jpg);
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: calc(100vh - 8rem);
    /* Фото всегда светлое, поэтому текст не следует за темой */
    color: var(--grey-color);

}

.top__title {
    padding-top: 15%;
    font-size: clamp(3.6rem, 0.6rem + 12vw, 9.6rem);
    margin-bottom: 1rem;
    line-height: 1;
    font-weight: 400;

}

.top__subtitle {
    font-size: 3.6rem;
    margin-bottom: 0.5rem;

}

.top__text {
    font-size: 1.3rem;
    margin-bottom: 3rem;
}

.buy__btn {
    cursor: pointer;
    border: none;
    background-image: var(--gradient);
    display: flex;
    align-items: center;
    padding: 1px;
    margin-bottom: 1.5rem;

}

.buy__btn--text {
    color: var(--white-color);
    padding-block: 2rem;
    padding-inline: 11rem;
    text-transform: uppercase;
}

.buy__btn--text:hover {
    background-image: var(--back-gradient);
}

.buy__btn--price {
    background-color: #E9E7EA;
    /* Плашка всегда светлая, поэтому текст не следует за темой */
    color: var(--grey-color);
    padding-inline: 10.5rem;
    padding-block: 2rem;
}

/* Features section*/

.features {
    padding-block: 10rem;


}

.features__titles {
    display: flex;
}

.features__title {
    flex-basis: 30rem;
    padding-inline-end: 2rem;

}

.section__title {
    text-transform: uppercase;
    font-weight: 400;
    font-size: 1.6rem;

}

.content__title {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-transform: uppercase;
    font-size: 3.6rem;
    max-width: 33rem;
    text-align: left;
    margin-bottom: 0.2rem;

}

.tabs {
    display: grid;
    grid-template-columns: 30rem auto;
}

.feature__tabs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-inline-end: 2rem;
    text-wrap: nowrap;
}

.tab__btn {
    padding-block: 1rem;
    padding-inline-end: 1rem;
    transition: all .3s ease;
}

.tab__btn--active {
    color: var(--heading-color);
    font-weight: 700;
}

.features__tab__content-item {
    display: grid;
    grid-template-columns: auto 28rem;
    grid-template-rows: auto 15rem;
    gap: 4rem;

}

.hidden {
    display: none;
}

.tab__content--image {
    grid-row: 1 / -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding-right: 2rem;
    border-right: 1px solid var(--light-grey-color);

}

.tab__content--title {
    font-size: 2.4rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.tab__content--video {
    grid-column: 2 / 3;
    background-image: url('../images/video_cover.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 28rem;
    height: 15rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: end;
    gap: .3rem;
    padding: 9px 10px;

}

.video__btn {
    position: absolute;
    margin-block-end: 2.2rem;

}

.tab__content--video span {
    color: var(--white-color);
    font-size: 1.3rem;

}

/*  Games section*/
.game {
    padding: 10rem 0;

}

.game__title {
    margin-bottom: 5rem;
}

.game__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

}

.game__descr {
    padding-inline-end: 1rem;
}

.game__descr-text {
    padding-block-end: 2rem;
}

.game__link {
    display: inline-block;
    border: 1px solid #BC10D8;
    padding: 1.6rem 3rem;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
    background-clip: text;
    background-image: var(--gradient);
    color: transparent;
    -webkit-text-fill-color: transparent;
    transition: border-image 0.3s ease;
}

.game__link:hover {
    border-image: var(--back-gradient);
    border-image-slice: 1;
}

.game__item {
    border: 1px solid #BC10D8;
    max-width: 30rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block: 2rem;
    padding-inline: 2rem 1.8rem;
    box-shadow: -1px 17px 16px 0px rgba(188, 16, 216, 0.4);
    -webkit-box-shadow: -1px 17px 16px 0px rgba(188, 16, 216, 0.4);
    -moz-box-shadow: -1px 17px 16px 0px rgba(188, 16, 216, 0.4);
}

.game__img {
    /* width: 26rem;
    height: 28rem; */
    object-fit: cover;
    margin-bottom: 1rem;
}

.game__item-title {
    color: var(--heading-color);
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 1rem;

}

.game__item-text {
    text-wrap: balance;
    margin-bottom: 3rem;
}

.game__item-link {
    display: inline-block;
    color: #BC10D8;
    margin-top: auto;
}


/* Oculus BG */
.oculus {
    margin-bottom: 10rem;
    text-align: center;
    overflow-x: hidden;
    white-space: nowrap;
    position: relative;
}

.oculus__bg {
    font-size: 400px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    background-image: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: .1;
    position: absolute;
    z-index: -1;
    animation: slideFromRight 4s linear 1s infinite;
}


@keyframes slideFromRight {
    from {
        transform: translateX(115%);
        transform-origin: left center;
    }

    to {
        transform: translateX(-115%);
        transform-origin: right center;
    }
}

.oculus__image {
    margin-bottom: 5rem;
    /* width: 346px;
    height: 334px; */
}

.oculus .buy__btn {
    margin: 0 auto;
    margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
    .oculus__bg {
        filter: contrast(400%);
    }
}

/*  In the box */
.box {
    padding: 10rem 0;
}

.box__title {
    margin-bottom: 5rem;
}

.box__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
}

.item1 {
    grid-row: 1/ -1;
}


.metaverse__inner {
    min-height: 50rem;
    padding: 10rem 0;
    background-image: url(../images/metaverse.jpg);
    min-height: 50rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    text-align: center;

}

.metaverse__btn {
    background: var(--back-gradient);
    color: var(--white-color);
    text-transform: uppercase;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: absolute;
    bottom: 8rem;
    right: 0;
    left: 0;
    margin: 0 auto;
}

.metaverse__btn:disabled {
    cursor: default;
}

.metaverse__btn:focus-visible {
    outline: 2px solid #BC10D8;
    outline-offset: 4px;
}

/* Пульсация не опускается ниже полного размера: прежняя scaleRight уводила
   кнопку в scale(0), и в начале каждого цикла по ней нельзя было попасть */
@media (prefers-reduced-motion: no-preference) {
    .metaverse__btn:not(:disabled) {
        animation: metaversePulse 2s ease-in-out infinite;
    }
}

@keyframes metaversePulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.metaverse__status {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 14rem;
    width: min(80%, 32rem);
    margin: 0 auto;
    min-height: 2.4rem;
    /* Фото блока всегда светло-розовое, поэтому текст не следует за темой */
    color: var(--black-color);
    font-size: 1.6rem;
    text-transform: uppercase;
}

.metaverse__status::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    margin-top: 1rem;
    background-image: var(--back-gradient);
    transform: scaleX(0);
    transform-origin: left center;
}

.metaverse__inner--loading .metaverse__status::after {
    animation: metaverseProgress 2s linear forwards;
}

@keyframes metaverseProgress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}


.accessories {
    padding: 10rem 0;
}

.accessories__title {
    margin-bottom: 5rem;
}

.accessories__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex-flow: wrap;
    gap: 1rem;
}

.card {
    border: 1px solid #BC10D8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    box-shadow: -1px 17px 16px 0px rgba(188, 16, 216, 0.4);
    -webkit-box-shadow: -1px 17px 16px 0px rgba(188, 16, 216, 0.4);
    -moz-box-shadow: -1px 17px 16px 0px rgba(188, 16, 216, 0.4);

}


.card__img {
    width: 26rem;
    height: 28rem;
    margin-bottom: 1rem;

}

.card__title {
    font-weight: 400;
    font-size: 2.4rem;
    color: var(--heading-color);
    text-align: left;
    margin-bottom: 1rem;
}

.card__text {
    margin-bottom: 4.2rem;
}

.card__price {
    color: var(--heading-color);
    align-self: flex-start;
    margin-bottom: 2rem;
}

.card__btn {
    margin-top: auto;
    padding: 0.6rem 9rem;
    border: 1px solid #BC10D8;
    text-transform: uppercase;
    background: var(--gradient);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.subscription {
    padding: 10rem 0;
}

.subscription__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 2rem;
}

.subscription__title {
    color: var(--heading-color);
    font-size: 2.4rem;
}

.subscription__form {
    width: 50vw;


}

.subscription__input {
    width: 80%;
    min-height: 5.5rem;
    border: none;
    border-bottom: 1px solid var(--light-grey-color);
    margin-right: -5rem;
    font-size: 1.6rem;

    &::placeholder {
        color: var(--light-grey-color);
    }

    &:focus-visible {
        outline: 2px solid #BC10D8;
        outline-offset: 2px;
    }
}

.subscription__btn {
    position: relative;
    color: var(--white-color);
    background-color: var(--grey-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;

}

.subscription__btn:hover {
    background-color: #BC10D8;
    color: var(--white-color);

}

.subscribe__text {
    font-size: 1.3rem;
    line-height: 1;
    max-width: 60rem;
    text-wrap: balance;
    margin-top: 1rem;
}

.contact {
    align-self: flex-end;
}

.contact a:hover {
    text-decoration: solid underline #BC10D8 3px;
}

/* FOOTER */
.footer {
    height: 1rem;
    border-top: 1px solid var(--grey-color);
    margin-top: auto;
}

.footer__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-block: 3rem;
}

.footer__menu {
    display: flex;
    gap: 0 2rem;
}

.footer__link {
    text-transform: uppercase;
}

.footer__nav .logo {
    justify-self: center;
}

.footer__social {
    display: flex;
    align-items: center;
    gap: 0 2rem;
    justify-self: flex-end;
}

/* Иконки инлайновые, их path залит currentColor — красим ссылку */
.social {
    display: flex;
    transition: color .3s ease;
}

.social:hover {
    color: #BC10D8;
}



/* MEDIA */

@media (max-width:1140px) {
    .footer__nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .footer__menu {
        display: none;
    }


}

@media (max-width:990px) {
    .features {
        padding: 7rem 0;
    }

    .tabs {
        display: block;
    }

    .feature__tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .content__title {
        font-size: 2.6rem;
    }

    .tab__content--image {
        border: none;
    }

    .game {
        padding: 7rem 0;
    }

    .metaverse {
        padding: 7rem 0;
    }

    .box__inner {
        grid-template-columns: repeat(2, 2fr);
        grid-template-rows: 2fr 1fr;
    }


}

@media (max-width:880px) {
    .top {
        text-align: center;
    }

    .buy__btn {
        flex-direction: column;
        margin: 0 auto;
    }

    .game__inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .accessories__inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

@media (max-width:820px) {
    .subscription__inner {
        display: block;
    }

    .subscription__form {
        margin-bottom: 2rem;
    }

    #navMenu {
        display: flex;
    }

    .menu {
        transform: translateX(-100%);
        flex-direction: column;
        width: 32rem;
        background-color: var(--grey-color);
        opacity: .8;
        color: var(--white-color);
        position: absolute;
        z-index: 9999;
        top: 81px;
        left: 0;
        right: 0;
        aspect-ratio: 1;
        padding: 10rem 0;
        transition: transform 1s ease-in-out;
    }

    .active {
        transform: translateX(0%);

    }

    .menu__list {
        padding: 1rem;
        font-size: 2.4rem;
    }

    .box__inner {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 2fr 1fr;
    }



}

@media (max-width:768px) {

    .top__title {
        font-size: 6.6rem;
    }

    .top__subtitle {
        font-size: 2.6rem;
    }

    .buy__btn {
        flex-direction: column;
        margin: 0 auto;
    }

    .features__titles {
        display: block;
    }

    .features__tab__content-item {
        display: block;
    }

    .tab__content--video {
        margin-top: 2rem;
        width: auto;
        height: 25rem;
    }

    .game__inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .accessories__inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .subscription__form {
        /* Не 100vw: эта единица включает полосу прокрутки, поэтому форма
           получалась шире контентной области и уводила страницу вбок. */
        width: 100%;
    }

}

@media (max-width:568px) {
    .nav {
        grid-template-columns: 1fr 2fr 1fr;
    }

    .top__title {
        font-weight: 700;
        font-size: 4.6rem;
    }

    .top__subtitle {
        font-size: 1.6rem;
    }

    .buy__btn--price {
        padding-inline: 4rem;
    }

    .buy__btn--text {
        padding-inline: 4.5rem;
    }

    .features {
        padding-block: 4rem;
    }

    .game {
        padding-block: 4rem;
    }

    .game__inner {
        grid-template-columns: repeat(1, 1fr);
        place-items: center;
    }

    .game__item {
        max-width: 80%;
    }

    .box__inner {
        display: block;
        width: 100%;
    }

    .box__inner>.content__title {
        display: none;

    }

    .metaverse {
        padding-block: 4rem;
    }

    .metaverse__inner {
        min-height: 40rem;
    }

    .accessories__inner {
        grid-template-columns: repeat(1, 1fr);
    }

    .subscription {
        padding-block: 4rem;
    }

    .subscription__form {
        /* см. комментарий выше — 100vw учитывает полосу прокрутки */
        width: 100%;
    }

    .footer__nav {
        flex-direction: column;
        row-gap: 2rem;
        height: auto;
    }

    .footer__social {
        order: -1;
        gap: 2rem;
    }
}

@media (max-width:420px) {
    .game__inner {
        grid-template-columns: repeat(1, 1fr);
        gap: 2rem;
    }

    .game__item {
        max-width: 100%;
    }

    .menu {
        width: 100%;
    }
}

/* Модалка с видео */
.video-modal {
    /* Сброс * { margin: 0 } перебивает браузерное dialog { margin: auto },
       поэтому центрируем явно */
    margin: auto;
    width: min(90vw, 60rem);
    padding: 0;
    border: 1px solid #BC10D8;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.video-modal::backdrop {
    /* Цвет задан литералом, а не переменной: ::backdrop не наследует
       custom properties до Chrome 122, а мы поддерживаем Chrome 37+ / Firefox 98+ / Safari 15.4+ */
    background-color: rgba(7, 7, 7, .7);
}

.video-modal__inner {
    position: relative;
    padding: 2rem;
}

.video-modal__title {
    color: var(--heading-color);
    font-size: 2.4rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-inline-end: 4rem;
}

.video-modal__stage {
    display: flex;
    align-items: center;
    justify-content: end;
    flex-direction: column;
    aspect-ratio: 16 / 9;
    padding: 1rem;
    background-image: url('../images/video_cover.jpg');
    background-position: center;
    background-size: cover;
    color: var(--white-color);
    font-size: 1.3rem;
    text-transform: uppercase;
}

.video-modal__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    font-size: 3rem;
    line-height: 1;
    color: var(--heading-color);
    transition: color .3s ease;
}

.video-modal__close:hover {
    color: #BC10D8;
}

.video-modal__close:focus-visible {
    outline: 2px solid #BC10D8;
    outline-offset: 2px;
}
