@font-face {
    font-family: "Fredoka";
    src: url("resources/fonts/Fredoka-VariableFont_wdth,wght.ttf") format("truetype");
    font-weight: 300 700;
    font-display: swap;
}

:root {
    --ink: #180e1c;
    --coral: #ff4358;
    --pink: #ef2a87;
    --yellow: #ffd45f;
    --cream: #fff4e3;
    --white: #fffaf2;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--white);
    background: var(--ink) url("resources/img/bg_1_1.jpg") center / cover fixed;
    font-family: "Fredoka", "Avenir Next", Avenir, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 40%, rgba(239, 42, 135, .05), rgba(24, 14, 28, .4) 62%),
        linear-gradient(180deg, rgba(24, 14, 28, .65), rgba(24, 14, 28, .88));
    backdrop-filter: blur(5px);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

.demo-shell {
    display: grid;
    min-height: 100svh;
    grid-template-rows: auto 1fr;
    align-items: center;
    width: min(1240px, calc(100% - 48px));
    margin-inline: auto;
    padding: 20px 0 30px;
}

.demo-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 16px;
}

.demo-nav p {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}

.demo-nav p span {
    display: inline-grid;
    width: 32px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--ink);
    background: var(--yellow);
    border-radius: 50%;
    letter-spacing: 0;
    transform: rotate(-6deg);
}

.home-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    color: var(--white);
    background: rgba(24, 14, 28, .72);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    box-shadow: 0 7px 22px rgba(0, 0, 0, .22);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
    transition: transform .2s var(--ease), background-color .2s ease;
}

.home-button:hover { background: rgba(239, 42, 135, .78); transform: translateY(-2px); }
.home-button svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.game-frame {
    width: min(100%, calc((100svh - 112px) * 5 / 3));
    aspect-ratio: 5 / 3;
    justify-self: center;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 28px;
    box-shadow: 0 35px 90px rgba(10, 2, 15, .62), 0 10px 25px rgba(10, 2, 15, .42);
}

.game-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.demo-complete {
    width: min(590px, calc(100% - 32px));
    max-height: calc(100svh - 32px);
    padding: 0;
    overflow: visible;
    color: var(--ink);
    background: transparent;
    border: 0;
}

.demo-complete::backdrop { background: rgba(17, 6, 20, .82); backdrop-filter: blur(9px); }

.demo-complete__card {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 6vw, 54px);
    background:
        radial-gradient(circle at 100% 0, rgba(255, 67, 88, .17), transparent 36%),
        var(--cream);
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 30px;
    box-shadow: 0 35px 100px rgba(0, 0, 0, .55);
    text-align: center;
}

.demo-complete__card::before {
    content: "";
    position: absolute;
    inset: 13px;
    border: 1px solid rgba(236, 47, 77, .15);
    border-radius: 21px;
    pointer-events: none;
}

.demo-complete__close {
    position: absolute;
    z-index: 1;
    top: 18px;
    right: 18px;
    display: grid;
    width: 42px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--ink);
    background: rgba(24, 14, 28, .08);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.demo-complete__close:hover { background: rgba(255, 67, 88, .18); }
.demo-complete__close svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }

.demo-complete__heading { display: flex; align-items: center; justify-content: center; gap: 10px; }
.demo-complete__heading p { margin: 0; color: #ec2f4d; font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.demo-complete__badge { display: inline-grid; width: 34px; aspect-ratio: 1; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; font-weight: 800; transform: rotate(-7deg); }

.demo-complete h1 {
    margin: 18px 0 20px;
    font-size: clamp(2.7rem, 9vw, 4.8rem);
    font-weight: 700;
    line-height: .88;
    letter-spacing: -.055em;
    text-transform: uppercase;
}

.demo-complete h1 em { color: var(--pink); font-style: normal; }
.demo-complete__card > p { max-width: 450px; margin: 0 auto 28px; color: #594750; font-size: clamp(.95rem, 2.2vw, 1.08rem); line-height: 1.55; }

.steam-button {
    position: relative;
    display: inline-flex;
    min-width: min(280px, 100%);
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--ink);
    background: var(--yellow);
    border-radius: 17px;
    box-shadow: 0 8px 0 #b56740, 0 18px 35px rgba(25, 4, 29, .25);
    font-weight: 700;
    line-height: 1.05;
    text-align: left;
    text-decoration: none;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.steam-button:hover { box-shadow: 0 11px 0 #b56740, 0 20px 38px rgba(25, 4, 29, .3); transform: translateY(-3px); }
.steam-button svg { width: 30px; fill: currentColor; }
.steam-button small { display: block; margin-bottom: 4px; font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; }
.steam-button span { font-size: 1.05rem; }

.continue-button {
    display: block;
    margin: 23px auto 0;
    padding: 8px;
    color: #6c5361;
    background: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
    font-weight: 650;
}

.continue-button:hover { color: var(--pink); }

@media (max-width: 720px) {
    body { overflow: hidden; }
    body::before { display: none; }

    .demo-shell {
        display: block;
        width: 100%;
        height: 100svh;
        min-height: 0;
        padding: 0;
    }

    .demo-nav {
        position: fixed;
        z-index: 2;
        top: max(10px, env(safe-area-inset-top));
        left: 10px;
        width: auto;
        padding: 0;
    }

    .demo-nav p { display: none; }
    .home-button { min-height: 39px; padding: 7px 12px; background: rgba(24, 14, 28, .78); }
    .home-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

    .game-frame {
        width: 100vw;
        height: 100svh;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .demo-complete { width: min(520px, calc(100% - 20px)); }
    .demo-complete__card { padding: 45px 24px 32px; border-radius: 24px; }
}

@media (max-height: 610px) and (orientation: landscape) {
    .demo-complete { overflow: auto; }
    .demo-complete__card { padding: 28px 34px 24px; }
    .demo-complete h1 { margin: 8px 0 10px; font-size: 2.8rem; }
    .demo-complete__card > p { margin-bottom: 18px; font-size: .88rem; }
    .steam-button { min-height: 54px; }
    .continue-button { margin-top: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
