@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-700-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Caveat";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("../fonts/caveat-latin-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg-color: #040914;
    --surface-color: #0f172a;
    --border-color: #1e293b;
    --accent-color: #f59e0b;
    --accent-hover: #d97706;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-sans: "Inter", sans-serif;
    --font-display: "Space Grotesk", sans-serif;
    --brand-gradient: linear-gradient(90deg, #60a5fa 0%, #6ee7b7 50%, #f59e0b 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: clip;
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.atmosphere-slide {
    position: absolute;
    inset: 0;
    background-color: var(--bg-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: atmosphere-fade 32s ease-in-out infinite;
}

.atmosphere-slide:nth-child(1) {
    opacity: 1;
    animation-name: atmosphere-fade-first;
}

.atmosphere-slide:nth-child(2) { animation-delay: 8s; }
.atmosphere-slide:nth-child(3) { animation-delay: 16s; }
.atmosphere-slide:nth-child(4) { animation-delay: 24s; }

.atmosphere::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(4, 9, 20, 0.82) 0%, rgba(4, 9, 20, 0.68) 45%, rgba(4, 9, 20, 0.9) 100%),
        radial-gradient(ellipse 90% 65% at 50% 32%, rgba(96, 165, 250, 0.12), transparent 62%),
        radial-gradient(ellipse 70% 50% at 82% 88%, rgba(245, 158, 11, 0.08), transparent 58%);
}

@keyframes atmosphere-fade {
    0% { opacity: 0; }
    6% { opacity: 1; }
    25% { opacity: 1; }
    31% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes atmosphere-fade-first {
    0%, 19% { opacity: 1; }
    25%, 94% { opacity: 0; }
    100% { opacity: 1; }
}

.portal-header,
.portal,
.portal-footer {
    position: relative;
    z-index: 1;
}

.portal-header {
    display: flex;
    justify-content: center;
    padding: 28px 20px 0;
}

.portal-logo {
    display: inline-flex;
}

.portal-logo img {
    display: block;
    height: 64px;
    width: auto;
}

.portal {
    flex: 1;
    isolation: isolate;
    overflow: clip;
    padding: clamp(28px, 6vh, 56px) 0 clamp(24px, 5vh, 48px);
    text-align: center;
}

.portal-glow {
    position: absolute;
    inset: -12% -8%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 36% 52% at 12% 48%, rgba(96, 165, 250, 0.32), transparent 70%),
        radial-gradient(ellipse 34% 48% at 88% 52%, rgba(245, 158, 11, 0.28), transparent 72%);
}

.portal-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(260px, 1.05fr) minmax(300px, 520px) minmax(260px, 1.05fr);
    align-items: center;
    gap: clamp(8px, 1.5vw, 20px);
    width: 100%;
    max-width: min(1360px, 100%);
    margin: 0 auto;
    min-height: clamp(420px, 52vw, 560px);
    padding-inline: clamp(8px, 1.5vw, 20px);
}

.portal-center {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    width: 100%;
    max-width: min(540px, 100%);
    padding: 12px 8px;
}

.portal-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.portal-title-icon {
    display: inline-block;
    width: 1.05em;
    height: 1.05em;
    background-image: var(--brand-gradient);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2' width='10' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2' width='10' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.portal-title span {
    position: relative;
    padding-bottom: 10px;
}

.portal-title em {
    font-style: normal;
    background-image: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.portal-title span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.8rem;
    height: 3px;
    border-radius: 999px;
    background: var(--brand-gradient);
}

.portal-tagline {
    margin: 0 0 16px;
    max-width: min(18ch, 100%);
    font-size: clamp(1.55rem, 4.2vw, 2.45rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.portal-script {
    position: relative;
    display: inline-block;
    font-family: "Caveat", cursive;
    font-weight: 500;
    font-size: 1.22em;
    line-height: 1;
    color: var(--accent-color);
    letter-spacing: 0.01em;
    padding-bottom: 0.12em;
}

.portal-script::after {
    content: "";
    position: absolute;
    left: 0.05em;
    right: 0.05em;
    bottom: 0;
    height: 0.08em;
    border-radius: 999px;
    background: var(--accent-color);
    transform: rotate(-2deg);
}

.portal-lead {
    margin: 0 0 18px;
    max-width: min(34rem, 100%);
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.portal-device {
    display: none;
    margin: 0 0 16px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.portal.is-android .portal-device,
.portal.is-ios .portal-device {
    display: inline-flex;
}

.portal-stores {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 24px;
}

.portal-store {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 210px;
    max-width: min(260px, 100%);
    padding: 14px 18px 14px 14px;
    border: 1px solid rgba(248, 250, 252, 0.14);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(7, 13, 28, 0.88));
    color: inherit;
    text-decoration: none;
    text-align: left;
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.08),
        0 14px 36px rgba(4, 9, 20, 0.35),
        0 0 28px rgba(96, 165, 250, 0.12);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.portal-store::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(110deg, rgba(96, 165, 250, 0.75), rgba(110, 231, 183, 0.35), rgba(245, 158, 11, 0.7));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.85;
}

.portal-store--appstore {
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.1),
        0 14px 36px rgba(4, 9, 20, 0.35),
        0 0 28px rgba(96, 165, 250, 0.18);
}

.portal-store--googleplay {
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.08),
        0 14px 36px rgba(4, 9, 20, 0.35),
        0 0 28px rgba(245, 158, 11, 0.14);
}

.portal-store:hover,
.portal-store:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(248, 250, 252, 0.22);
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.16),
        0 18px 40px rgba(4, 9, 20, 0.45),
        0 0 34px rgba(245, 158, 11, 0.18);
    outline: none;
}

.portal-store.is-match {
    transform: translateY(-2px);
}

.portal-store-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
}

.portal-store--googleplay .portal-store-icon {
    background: linear-gradient(135deg, #34a853 0%, #4285f4 48%, #ea4335 100%);
}

.portal-store--appstore .portal-store-icon {
    background: linear-gradient(135deg, #5ac8fa, #007aff);
}

.portal-store-icon svg {
    display: block;
}

.portal-store-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.portal-store-kicker {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.portal-store-name {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.15;
}

.portal-store-arrow {
    display: inline-grid;
    place-items: center;
    color: var(--text-muted);
    opacity: 0.85;
}

.portal-perks {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 0;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 8px auto 0;
    padding: 0;
    list-style: none;
    color: var(--text-muted);
    font-size: clamp(0.84rem, 1.5vw, 0.95rem);
    font-weight: 600;
}

.portal-perks li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 clamp(10px, 1.6vw, 18px);
}

.portal-perks li + li {
    border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.portal-perk-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-color);
}

.portal-phone {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
    pointer-events: none;
}

.portal-phone--left { justify-content: flex-start; }
.portal-phone--right { justify-content: flex-end; }

.portal-mock {
    --tilt-x: 8deg;
    --tilt-y: 18deg;
    --tilt-z: -4deg;
    display: block;
    width: min(100%, 380px);
    height: auto;
    transform-origin: center center;
    transform:
        perspective(900px)
        rotateX(var(--tilt-x))
        rotateY(var(--tilt-y))
        rotateZ(var(--tilt-z));
    transition: transform 0.18s ease-out;
    will-change: transform;
    backface-visibility: hidden;
    filter: drop-shadow(18px 28px 30px rgba(4, 9, 20, 0.55));
}

.portal-mock--right {
    --tilt-y: -18deg;
    --tilt-z: 4deg;
    filter: drop-shadow(-18px 28px 30px rgba(4, 9, 20, 0.55));
}

.portal.is-tilting .portal-mock {
    transition: transform 0.07s linear;
}

.portal-footer {
    margin-top: auto;
    overflow: hidden;
    color: var(--text-muted);
    background: #070d1c;
    font-size: 0.86rem;
}

.portal-footer::before {
    content: "";
    display: block;
    height: 2px;
    background-image: var(--brand-gradient);
}

.portal-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px 22px;
}

.portal-footer p {
    margin: 0;
}

.portal-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: flex-end;
}

.portal-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}

.portal-footer a:hover,
.portal-footer a:focus-visible {
    color: var(--text-main);
    outline: none;
}

@media (max-width: 1100px) {
    .portal-stage {
        grid-template-columns: minmax(200px, 0.9fr) minmax(280px, 1fr) minmax(200px, 0.9fr);
        min-height: clamp(360px, 48vw, 480px);
    }

    .portal-mock {
        width: min(100%, 300px);
    }
}

@media (max-width: 980px) {
    .portal-mock {
        width: min(100%, 240px);
    }
}

@media (max-width: 860px) {
    .portal {
        overflow-x: clip;
    }

    .portal-stage {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .portal-phone {
        display: none;
    }

    .portal-center {
        max-width: 100%;
        padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
    }

    .portal-tagline {
        max-width: min(20ch, 100%);
    }

    .portal-stores {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-store {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .portal-logo img {
        height: 52px;
    }

    .portal-title {
        font-size: clamp(1.15rem, 5.2vw, 1.45rem);
    }

    .portal-tagline {
        font-size: clamp(1.28rem, 6.4vw, 1.75rem);
    }

    .portal-lead {
        font-size: 0.92rem;
    }

    .portal-store {
        padding: 12px 14px 12px 12px;
        gap: 12px;
    }

    .portal-store-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .portal-perks {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: max-content;
        max-width: 100%;
        margin-inline: auto;
        font-size: 0.88rem;
    }

    .portal-perks li {
        padding: 0;
        width: 100%;
    }

    .portal-perks li + li {
        border-left: 0;
        padding-top: 12px;
        border-top: 1px solid rgba(148, 163, 184, 0.22);
    }

    .portal-footer-inner,
    .portal-footer nav {
        justify-content: center;
        text-align: center;
    }
}

@media (min-width: 861px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    body {
        height: 100dvh;
        max-height: 100dvh;
    }

    .portal {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
        padding-block: clamp(8px, 2vh, 28px);
    }

    .portal-stage {
        flex: 1 1 auto;
        min-height: 0;
        max-height: 100%;
    }

    .portal-mock {
        width: auto;
        height: auto;
        max-width: min(100%, 380px);
        max-height: calc(100dvh - 270px);
    }
}

@media (max-width: 1100px) and (min-width: 861px) {
    .portal-mock {
        max-width: min(100%, 300px);
    }
}

@media (max-width: 980px) and (min-width: 861px) {
    .portal-mock {
        max-width: min(100%, 240px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .atmosphere-slide {
        animation: none;
        opacity: 0;
    }

    .atmosphere-slide:nth-child(1) {
        opacity: 1;
    }

    .portal-mock,
    .portal-store {
        transition: none;
    }
}
