/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
html,
body {
    width: 100%;
    min-height: 100%;
}
body {
	line-height: 1;
    font-family: 'PT Sans', Arial, sans-serif;
    color: #fff;
    overflow: hidden;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

.main {
    height: 100vh;
    height: 100dvh;
    min-height: 360px;
    overflow: hidden;
    position: relative;
}
.main .background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    position: absolute;
    inset: 0;
    display: block;
}
.main .logo {
    width: clamp(128px, 18vw, 280px);
    max-width: calc(100vw - 32px);
    max-height: min(22vh, 170px);
    max-height: min(22dvh, 170px);
    height: auto;
    object-fit: contain;
    position: absolute;
    left: max(16px, env(safe-area-inset-left));
    top: max(16px, env(safe-area-inset-top));
    z-index: 1;
    display: block;
    filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.55));
}
.main .buttons {
    box-sizing: border-box;
    width: fit-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 0;
    position: absolute;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2.4vw, 18px);
    overflow: auto;
}
.main .buttons-title {
    font-size: clamp(24px, 4.2vw, 38px);
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}
.main .store-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 2.4vw, 18px);
    width: 100%;
}

.main .store-links a {
    width: clamp(58px, 14vw, 96px);
    height: clamp(58px, 14vw, 96px);
    flex: 0 0 auto;
    display: block;
    border-radius: 8px;
    transition: transform 160ms ease, filter 160ms ease;
}
.main .store-links a:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}
.main .store-links a:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 4px;
}
.main .store-links a.btn-vk {
    background-image: url('VK.png');
    background-position:  center;
    background-size:cover;
    background-repeat: no-repeat;
}
.main .store-links a.btn-yandex {
    background-image: url('Yandex.png');
    background-position:  center;
    background-size:cover;
    background-repeat: no-repeat;
}
.main .store-links a.btn-ok {
    background-image: url('OK.png');
    background-position:  center;
    background-size:contain;
    background-repeat: no-repeat;
}
.main .store-links a.btn-rustore {
    background-image: url('Rustore.png');
    background-position:  center;
    background-size:contain;
    background-repeat: no-repeat;
}

@media (max-width: 420px) {
    .main .logo {
        width: clamp(104px, 44vw, 168px);
        max-width: calc(100vw - 20px);
        max-height: min(18vh, 124px);
        max-height: min(18dvh, 124px);
        left: max(10px, env(safe-area-inset-left));
        top: max(10px, env(safe-area-inset-top));
    }

    .main .buttons {
        width: calc(100vw - 20px);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .main .buttons-title {
        font-size: clamp(24px, 8vw, 30px);
    }

    .main .store-links {
        gap: 8px;
        justify-content: center;
    }

    .main .store-links a {
        width: clamp(52px, 19vw, 68px);
        height: clamp(52px, 19vw, 68px);
    }
}

@media (min-width: 421px) and (max-width: 760px) {
    .main .logo {
        width: clamp(118px, 34vw, 220px);
        max-height: min(20vh, 150px);
        max-height: min(20dvh, 150px);
    }

    .main .buttons {
        width: calc(100vw - 28px);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .main .store-links a {
        width: clamp(68px, 18vw, 86px);
        height: clamp(68px, 18vw, 86px);
    }
}

@media (max-width: 760px) and (orientation: portrait) {
    .main .logo {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: min(30vh, 230px);
        max-height: min(30dvh, 230px);
        left: 12px;
        top: max(10px, env(safe-area-inset-top));
    }

    .main .background-video {
        animation: mobile-video-pan 9s ease-in-out infinite alternate;
    }
}

@media (max-height: 520px) and (min-width: 560px) {
    .main {
        min-height: 260px;
    }

    .main .logo {
        width: clamp(90px, 14vw, 150px);
        max-height: min(26vh, 100px);
        max-height: min(26dvh, 100px);
    }

    .main .buttons {
        width: min(760px, calc(100vw - 32px));
        flex-direction: row;
        justify-content: space-between;
        gap: 18px;
    }

    .main .buttons-title {
        flex: 0 1 260px;
        font-size: clamp(22px, 3.5vw, 30px);
        text-align: left;
    }

    .main .store-links {
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 10px;
    }

    .main .store-links a {
        width: clamp(52px, 10vw, 68px);
        height: clamp(52px, 10vw, 68px);
    }
}

@keyframes mobile-video-pan {
    0% {
        object-position: 30% center;
    }

    100% {
        object-position: 70% center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .main .background-video {
        animation: none;
        object-position: center center;
    }
}
