@font-face {
    font-display: swap;
    font-family: "Nunito";
    font-style: normal;
    font-weight: 800;
    src: url("./fonts/nunito-v32-latin-800.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Nunito";
    font-style: normal;
    font-weight: 900;
    src: url("./fonts/nunito-v32-latin-900.woff2") format("woff2");
}

:root {
    --bg: #efefeb;
    --accent: #39c7bf;
}

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

html,
body {
    font-family: "Nunito", "Arial Rounded MT Bold", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    background-image: url("bg_pattern.svg");
    background-repeat: repeat;
    background-position: center;
    background-size: 360px auto;
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.58) 0%,
        rgba(255, 255, 255, 0.34) 20%,
        rgba(255, 255, 255, 0.14) 38%,
        rgba(255, 255, 255, 0) 60%
    );
    z-index: 0;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 180% 65% at 50% -22%,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.12) 34%,
        transparent 68%
    );
    z-index: 0;
}

.card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 30px;
    padding: 40px 56px 34px;
    width: min(420px, 88vw);
    text-align: center;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 0 0 1px rgba(232, 232, 232, 0.95),
        0 18px 48px rgba(0, 0, 0, 0.08);
    animation: card-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: scale(0.82) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.miis {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    margin-bottom: 22px;
}

.mii-fig {
    height: 62px;
    width: auto;
    transform-origin: bottom center;
    animation: sway 3s ease-in-out infinite;
    /* stagger via inline style */
}

@keyframes sway {
    0%,
    100% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(4deg);
    }
}

h1 {
    font-size: clamp(42px, 10vw, 56px);
    font-weight: 900;
    color: #101010;
    letter-spacing: -1.8px;
    line-height: 0.95;
    margin-bottom: 10px;
    opacity: 0;
    animation: title-pop 0.4s 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes title-pop {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.accent {
    color: var(--accent);
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.95);
    paint-order: stroke fill;
}

.sub {
    font-size: 12px;
    font-weight: 800;
    color: #9a9a9a;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fade-up 0.4s 0.48s ease both;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
