@charset "UTF-8";

@keyframes shake-inline {
    0%, 100% {
        transform: translateX(0);
    }

    25%, 75% {
        transform: translateX(5px);
    }

    50% {
        transform: translateX(-5px);
    }
}

@keyframes jump-up {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0, 0, 0);
    }

    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -20px, 0);
    }

    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -10px, 0);
    }

    90% {
        transform: translate3d(0, -4px ,0);
    }
}

@keyframes appear-1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes appear-2 {
    0% {
        opacity: 1;
        transform: translateY(2em);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

*,
*::after,
*::before {
    box-sizing: border-box;
    user-select: none;
    touch-action: manipulation;
}

html, body,
p, h1, ol, li,
button {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

html {
    background-color: #f0f2f4;
    font: 100%/1.4 "Helvetica Neue", "Helvetica", system-ui, sans-serif;
    text-align: center;
}

section > header {
    overflow-y: hidden;
    margin-bottom: 2.5rem 0;
}

section > header > * + * {
    margin-top: var(--space, 1rem);
}

section > footer {
    display: flex;
    gap: 0.625rem;
    justify-content: space-between;
    align-items: baseline;
}

h1,
.merry-xmas {
    font-size: 1.25rem;
    font-size: clamp(1.25rem, -0.044rem + 6.47vw, 4rem);
    font-weight: 400;
}

h1 + * {
    font-size: clamp(1rem, 0.882rem + 0.59vw, 1.25rem);
}

h1 {
    animation: appear-1 ease-in forwards 0.4s;
}

ul,
ol {
    list-style: none;
}

img {
    display: block;
    height: auto;
    width: 100%;
}

svg {
    display: block;
    fill: none;
    height: 100%;
    object-fit: contain;
    stroke: #030303;
    stroke-linejoin: round;
    stroke-width: 3px;
    width: 100%;
}

button,
samp,
kbd {
    font: inherit;
}

button {
    background: rgb(0 0 0 / 0);
    border: 0;
    color: #f6d378;
    font-size: clamp(0.875rem, 0.699rem + 0.88vw, 1.25rem);
    font-weight: 700;
    line-height: 1;
    position: relative;
}

button::before {
    content: '';
    display: block;
    padding-top: 100%;
}

button > span {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    grid-auto-flow: column;
}

button:disabled {
    color: #f6d378;
    opacity: 1;
}

button:not(:active) .effect {
    display: none;
}

a {
    color: currentcolor;
    text-decoration: none;
}

samp {
    border: 0.125em solid #f6d378;
    border-radius: 50%;
    color: #f6d378;
    display: grid;
    font-weight: 700;
    height: 2em;
    width: 2em;
    place-items: center;
}

samp.completed {
    animation: jump-up forwards 0.25s;
    background-color: #f6d378;
    color: #fff;
}

/* Instruction Container */
.list-group {
    animation: appear-2 ease-in 0.2s;

    align-items: center;
    display: flex;
    flex-direction: column;
    max-height: 2em;
    transform: translateY(var(--offset, 0px));
    transition:
        transform 0.4s 0.25s
}

.list-group > ol {
    display: flex;
    gap: 0.625rem;
    transition:
        opacity 0.4s 0.25s;
}

.list-group > ol.completed {
    opacity: 0;
}

.list-group > ol.failed {
    animation: shake-inline 0.25s;
}

/* Layout Buttons */
.soundboard {
    justify-self: flex-end;
    display: grid;
    grid:
        ". a ."
        "b c d"
        ". e ."
        / minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.625rem;
    margin-top: auto;
    margin-bottom: auto;
}

.soundboard > *:nth-child(1) { grid-area: a; }
.soundboard > *:nth-child(2) { grid-area: b; }
.soundboard > *:nth-child(3) { grid-area: c; }
.soundboard > *:nth-child(4) { grid-area: d; }
.soundboard > *:nth-child(5) { grid-area: e; }

@media (min-width: 28em) {
    .soundboard {
        grid: "a b c d e" / 1fr 1fr 1fr 1fr 1fr;
    }
}

/* Fit the card in the viewport, restricting it's size on larger displays. */
.xmas-card {
    background: #fff;
    box-shadow:
        0 1px 3px rgb(0 0 0 / 0.14),
        0 1px 2px rgb(0 0 0 / 0.24);
    color: #030303;
    display: flex;
    height: 100%;
    margin: max((100vh - 40.625rem) / 2, 0px) auto;
    max-height: 40.625rem;
    max-width: 67.625rem;
    overflow-x: hidden;
}

.xmas-card > * {
    display: flex;
    flex: 0 0 100%;
    flex-direction: column;
    padding: 0.625rem;
    padding: clamp(0.625rem, -0.057rem + 3.41vw, 2.5rem);
    transform: translateX(var(--slide-offset, 0px));
    transition: transform 0.2s;
}

.xmas-card > *:last-child {
    background: url('https://rtisports.de/img/xmas/bg.png') center center/min(calc(100% - 1.25rem), 23rem) auto no-repeat
}

.xmas-card.is-done {
    --slide-offset: -100%;
}

/* Utilities */
.merry-xmas {
    margin: auto 0;
}


.uppercase {
    text-transform: uppercase;
}

.logo {
    max-width: 5rem;
    max-width: clamp(5rem, 2.647rem + 11.76vw, 10rem);
}
