/* Общие значения сайта */
:root {
    --app-font-family: "Geologica", sans-serif;
    --app-color-background: #000;
    --app-color-text: #C5C3C3;
    --app-color-accent: #D3C29F;
    --app-header-height: 76px;
    --app-main-padding-top: 74px;
}

/* Мягкая привязка прокрутки к секциям-слайдам. */
html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    scrollbar-color: var(--app-color-accent) var(--app-color-background);
    scrollbar-width: thin;
}

/* Полоса прокрутки для браузеров с WebKit-псевдоэлементами. */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--app-color-background);
}

::-webkit-scrollbar-thumb {
    background-color: var(--app-color-accent);
    border: 2px solid var(--app-color-background);
    border-radius: 8px;
}

.app-section[id]:not(.app-hero):not(.app-scroll-section),
#pre-order {
    scroll-margin-top: calc(var(--app-header-height) + 24px);
}

/* Класс добавляется только блокам, которые ещё находятся за экраном. */
.app-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 1000ms ease,
        transform 1200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--app-reveal-delay, 0ms);
}

.app-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Базовый reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

body {
    line-height: 1;
    background-color: var(--app-color-background);
    color: var(--app-color-text);
    font-family: var(--app-font-family);
}

.app-break--desktop {
    display: none;
}

@media (min-width: 701px) {
    .app-break--desktop {
        display: initial;
    }
}

.app-link {
    color: inherit;
    text-decoration: none;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img,
video {
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

.app-header__menu,
.app-footer__menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Общая типографика компонентов */
.app-header,
.app-footer {
    font-family: var(--app-font-family);
    color: var(--app-color-text);
    line-height: 1;
}

.app-header__link,
.app-footer__link {
    font-size: 14px;
    letter-spacing: -2%;
    font-weight: 300;
}

.app-header__link:hover,
.app-footer__link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.app-link:focus-visible {
    outline: 2px solid var(--app-color-accent);
    outline-offset: 4px;
}

/* Шапка */
.app-header {
    position: relative;
    z-index: 2;
    width: 100%;
    height: var(--app-header-height);
}

.app-header, .app-main, .app-footer {
    padding-inline: clamp(16px, 8vw, 120px);
}

.app-header__inner {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.app-header__logo {
    width: 175px;
}

.app-header__menu {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    gap: clamp(12px, 4vw, 100px);
}

.app-header__cart-icon {
    display: block;
    width: 24px;
    height: 24px;
    background-color: var(--app-color-text);
    mask: url("https://static.tildacdn.com/tild6466-6166-4362-b061-653739323831/cart.svg")
        center / contain no-repeat;
}

.app-header__cart:hover .app-header__cart-icon {
    background-color: var(--app-color-accent);
    transition-duration: 0.5s;
}

/* Подвал */
.app-footer {
    padding-top: 32px;
    padding-bottom: 48px;
}

.app-footer__inner {
    display: flex;
    justify-content: space-between;
}

.app-footer__main {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.app-footer__logo {
    width: 198px;
}

.app-footer__menu {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-footer__menu--legal {
    flex-direction: row;
    gap: 72px;
}

.app-footer__back-to-top {
    display: inline-grid;
    place-items: center;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    background-color: var(--app-color-accent);
}

.app-footer__back-to-top:hover .app-footer__back-to-top-icon {
    width: 30px;
    height: 30px;
}

.app-footer__secondary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.app-footer__link--legal {
    letter-spacing: 0;
}

/*main*/
.app-main {
    padding-top: var(--app-main-padding-top);
    padding-bottom: 24px;
}

/*hero*/
.app-hero__title {
    font-size: 40px;
    font-weight: 200;
    letter-spacing: -3%;
    text-transform: uppercase;
    color: var(--app-color-accent);
}

.app-hero__subtitle {
    font-size: 24px;
    font-weight: 200;
    line-height: 32px;
    letter-spacing: -1%;
}

.app-button {
    width: 264px;

    position: relative;

    display: inline-block;
    padding: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.app-button__default {
    display: block;
    width: 100%;
    height: auto;
}

.app-button__hover {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;
    transition: opacity 0.25s ease;

    pointer-events: none;
}

.app-button:hover .app-button__hover,
.app-button:focus-visible .app-button__hover {
    opacity: 1;
}

.app-hero__inner {
    position: relative;
    z-index: 1;
    padding-inline: clamp(16px, 8vw, 120px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.app-hero__content {
    align-items: flex-end;
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-hero__tagline {
    font-size: 18px;
}

.app-hero__caption {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.app-hero__chevron-icon {
    transform: rotate(180deg);
    display: block;
    width: 28px;
    height: 28px;
    background-color: var(--app-color-text);
    mask: url("https://static.tildacdn.com/tild3636-3963-4961-a263-373036393937/chevron.svg")
    center / contain no-repeat;
}

.app-hero {
    position: relative;
    isolation: isolate;
    margin-inline: calc(-1 * clamp(16px, 8vw, 120px));
    height: 100vh;
}

.app-hero__video {
    position: absolute;
    inset: calc(-1 * (var(--app-header-height) + var(--app-main-padding-top))) 0 0;
    width: 100%;
    height: calc(100% + var(--app-header-height) + var(--app-main-padding-top));
    object-fit: cover;
    pointer-events: none;
}

.app-scroll {
    --app-scroll-inset-left: 10%;
    --app-scroll-inset-right: 65%;
    --app-scroll-center-offset: calc((var(--app-scroll-inset-right) - var(--app-scroll-inset-left)) / 2);

    position: relative;

    width: min(1637px, calc(100% / 1.08));
    aspect-ratio: 1637 / 771;
    margin-inline: auto;

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

    overflow: visible;
}

/* Бумага */

.app-scroll__sheet {
    position: relative;

    width: 100%;
    min-width: 0;
    clip-path: inset(0 var(--app-scroll-inset-right) 0 var(--app-scroll-inset-left));
    transform: translateX(var(--app-scroll-center-offset));

    transition:
            clip-path 1100ms cubic-bezier(0.65, 0, 0.35, 1),
            transform 1100ms cubic-bezier(0.65, 0, 0.35, 1);

}

.app-scroll__content {
    display: block;
}

.app-scroll__content img {
    display: block;

    width: 100%;
    height: auto;
}


/* Роллеры */

.app-scroll__roller {
    position: absolute;
    top: 50%;

    height: 100%;
    width: auto;

    z-index: 2;

    pointer-events: none;

    transition:
            left 1100ms cubic-bezier(0.65, 0, 0.35, 1),
            transform 1100ms cubic-bezier(0.65, 0, 0.35, 1);

}


/* Валики стоят на краях видимого участка бумаги. */

.app-scroll__roller--left {
    left: calc(var(--app-scroll-inset-left) + var(--app-scroll-center-offset));
    transform: translate(-50%, -50%);
}

.app-scroll__roller--right {
    left: calc(100% - var(--app-scroll-inset-right) + var(--app-scroll-center-offset));
    transform: translate(-50%, -50%);
}


/* Открываем бумагу */

.app-scroll.is-revealed .app-scroll__sheet {
    clip-path: inset(0);
    transform: translateX(0);
}


/* Раздвигаем роллеры */

.app-scroll.is-revealed .app-scroll__roller--left {
    left: 0;
    transform: translate(-50%, -50%);
}

.app-scroll.is-revealed .app-scroll__roller--right {
    left: 100%;
    transform: translate(-50%, -50%);
}


/* Место шапки сохраняется при переходе к position: fixed. */
.app-header-slot {
    height: var(--app-header-height);
}

.app-header--fixed {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background-color: #000;
    animation: app-header-enter 300ms ease-out;
}

@keyframes app-header-enter {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.app-scroll-section {
    min-height: 100svh;
    padding-top: calc(var(--app-header-height) + 80px);
    scroll-snap-align: start;
    /* Обрезаем только невидимую часть смещённого изображения. */
    overflow-x: clip;
}

.app-hero {
    scroll-snap-align: start;
    scroll-margin-top: calc(var(--app-header-height) + var(--app-main-padding-top));
}

.app-scroll:focus-visible {
    outline: 2px solid var(--app-color-accent);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .app-header--fixed {
        animation: none;
    }

    .app-scroll__sheet,
    .app-scroll__roller {
        transition: none;
    }
}


/* Меню и подвал не расширяют страницу на узких экранах. */
.app-header__nav,
.app-footer__main,
.app-footer__secondary {
    min-width: 0;
}

.app-footer__inner {
    gap: 32px;
    flex-wrap: wrap;
}

.app-footer__menu--legal {
    flex-wrap: wrap;
    gap: 24px 72px;
}

.app-about-collection__inner {
    display: flex;
    flex-direction: row;
    gap: 102px;
}

.app-about-collection__portrait {
    width: 762px;
}

.app-about-collection__title {
    font-size: 20px;
    letter-spacing: -1%;
    font-weight: 300;
    color: #919191;
}

.app-about-collection__paragraph {
    font-size: 20px;
    line-height: 26px;
    letter-spacing: -1%;
    font-weight: 300;
}

.app-about-collection__story {
    display: flex;
    flex-direction: column;
    gap: 46px;
}

.app-about-collection__paragraph--accent {
    font-weight: 500;
}

.app-about-collection__text {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.app-about-collection__signature {
    display: flex;
    flex-direction: row;
    gap: 28px;
    align-self: flex-end;
    align-items: center;
}

.app-about-collection__content {
    display: flex;
    flex-direction: column;
    gap: 46px;
}

.app-about-collection__author {
    font-size: 14px;
    font-weight: 200;
    letter-spacing: -1%;
}

.app-about-collection__autograph {
    width: 94px;
}

.app-keyboard {
    padding-top: 162px;
    margin-bottom: 40px;
}

.app-keyboard__inner {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.app-keyboard__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.app-keyboard__cta {
    margin-top: 12px;
}

.app-keyboard__specs,
.app-mouse__specs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    isolation: isolate;
}

.app-keyboard__specs::before,
.app-mouse__specs::before {
    content: "";
    grid-area: 1 / 1;
    justify-self: center;
    width: calc(100% + 2 * clamp(16px, 8vw, 120px));
    max-width: 1920px;
    height: 1084px;
    background: url("https://static.tildacdn.com/tild6338-6430-4864-b531-306166356466/section-keyboard-det.png")
        center / 100% auto no-repeat;
    pointer-events: none;
}

.app-keyboard__specs-body,
.app-mouse__specs-body {
    grid-area: 1 / 1;
    z-index: 1;
    min-width: 0;
}

.app-keyboard__title {
    text-transform: uppercase;
    color: var(--app-color-accent);
    font-size: 40px;
    font-weight: 200;
    letter-spacing: -3%;
}

.app-keyboard__subtitle {
    letter-spacing: -1%;
    font-weight: 200;
    font-size: 24px;
    line-height: 32px;
}

.app-keyboard__image {
    width: min(100%, 1193px);
    height: auto;
}

.app-mouse__visual {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    isolation: isolate;
    min-width: 0;
}

.app-mouse__visual > img {
    grid-area: 1 / 1;
    place-self: center;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.app-mouse__background--default {
    z-index: 0;
}

.app-mouse__background--hover {
    z-index: 1;
    opacity: 0;
    transition: opacity 400ms ease;
}

.app-mouse__visual .app-mouse__image {
    z-index: 2;
}

.app-mouse__visual.is-revealed .app-mouse__background--hover {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .app-mouse__background--hover {
        transition: none;
    }
}

.app-keyboard__visual {
    display: grid;
    isolation: isolate;
    margin-inline: calc(-1 * clamp(16px, 8vw, 120px));
    overflow: clip;
}

/* Обе пары изображений занимают одну ячейку. */
.app-keyboard__view {
    display: contents;
}

.app-keyboard__visual .app-keyboard__image,
.app-keyboard__background {
    grid-area: 1 / 1;
    place-self: center;
    pointer-events: none;
}

.app-keyboard__visual .app-keyboard__image {
    width: min(1193px, calc(100% - 2 * clamp(16px, 8vw, 120px)));
    z-index: 2;
}

.app-keyboard__background {
    width: min(100%, 1920px);
    height: auto;
    z-index: 0;
}

.app-keyboard__view--hover > img {
    opacity: 0;
    transition: opacity 400ms ease;
}

.app-keyboard__background--hover {
    z-index: 1;
}

.app-keyboard__visual .app-keyboard__image--hover {
    z-index: 3;
}

.app-keyboard__features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 148px;
    row-gap: 100px;
    padding-bottom: 108px;
}

.app-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.app-feature__icon {
    width: 56px;
    height: 56px;
}

.app-feature__title {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: -3%;
    color: var(--app-color-accent);
    text-transform: uppercase;
}

.app-keyboard__image--detail {
    width: 1174px;
}

.app-feature__description {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 200;
    line-height: 18px;
    letter-spacing: -1%;
}

.app-keyboard__specs-title {
    font-weight: 200;
    font-size: 16px;
    letter-spacing: -3%;
    color: #919191;
    text-transform: uppercase;
    margin-top: 26px;
    text-align: center;
    margin-bottom: 63px;
}

.app-keyboard__specs-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 37px;
}

.app-specs-table {
    width: min(100%, 1174px);
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: #0B0B0B;
}

.app-specs-table__cell {
    padding: 24px;
    border: 1px solid #252525;
    vertical-align: middle;
    text-align: left;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: -1%;
    line-height: 1;
    color: #919191;
    overflow-wrap: anywhere;
}

.app-specs-table__cell--label {
    width: 14%;
    background-color: #101010;
}

.app-specs-table__row:nth-child(even) .app-specs-table__cell--label {
    background-color: #0B0B0B;
}

.app-specs-table__cell--value {
    width: 37.4%;
}

.app-mouse__title {
    font-size: 40px;
    letter-spacing: -3%;
    color: #D3C29F;
    font-weight: 300;
}

.app-mouse__subtitle {
    font-weight: 200;
    letter-spacing: -1%;
    font-size: 18px;
    line-height: 26px;
}

.app-mouse__overview {
    display: flex;
    flex-direction: row;
    gap: 120px;
}

.app-mouse__background {
    max-width: 702px;
}

.app-mouse__image {
    max-width: 602px;
}

.app-mouse__intro {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.app-mouse__cta {
    margin-top: 20px;
}

.app-mouse__content {
    display: flex;
    flex-direction: column;
    gap: 83px;
}
.app-mouse__features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 64px;
    row-gap: 64px;
}

.app-feature--horizontal {
    gap: 20px;
    flex-direction: row;
}

.app-mouse__features .app-feature__icon{
    width: 40px;
    height: 40px;
}

.app-mouse__features .app-feature__text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-mouse__specs-title {
    font-weight: 200;
    font-size: 16px;
    letter-spacing: -3%;
    color: #919191;
    text-transform: uppercase;
    margin-top: 26px;
    text-align: center;
    margin-bottom: 62px;
}

.app-mouse__image--detail {
    max-width: 608px;
}

.app-mouse__specs-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 37px;
}

@media (max-width: 700px) {
    .app-specs-table__cell {
        font-size: 12px;
        line-height: 1.3;
    }

    .app-specs-table__cell--label {
        width: 20%;
    }

    .app-specs-table__cell--value {
        width: 30%;
    }
}

.app-keyboard__visual.is-revealed .app-keyboard__view--hover > img {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .app-keyboard__view--hover > img {
        transition: none;
    }
}

@media (max-width: 700px) {
    :root {
        --app-header-height: 112px;
    }

    .app-header__inner {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        align-content: center;
        gap: 16px;
    }

    .app-header__menu {
        gap: 12px;
    }

    .app-header__link {
        font-size: 12px;
    }

    .app-hero__content {
        max-width: 100%;
    }

    .app-hero__title {
        overflow-wrap: anywhere;
    }

    .app-footer__secondary {
        align-items: flex-start;
        gap: 32px;
    }
}

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


@media (prefers-reduced-motion: reduce) {
    .app-reveal,
    .app-reveal.is-revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
}