html:has(.national-day-splash[open]),
body:has(.national-day-splash[open]) {
    overflow: hidden;
    overscroll-behavior: none;
}

.national-day-splash[open] {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: radial-gradient(ellipse, #194637, #061c15 75%);
    animation: national-day-overlay var(--national-day-duration) both;
}

.national-day-splash::backdrop {
    background: transparent;
}

.national-day-splash__scene {
    position: relative;
    width: min(max(100vw, 177.68dvh), 116vw);
    max-width: none;
    aspect-ratio: 1672 / 941;
    grid-area: 1 / 1;
    align-self: center;
    justify-self: center;
    isolation: isolate;
    animation: national-day-zoom var(--national-day-duration) ease-out both;
}

.national-day-splash__backdrop-artwork {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 56% center;
    filter: blur(24px) brightness(.48) saturate(1.2);
    transform: scale(1.12);
}

.national-day-splash__artwork {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.national-day-splash__effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    animation: national-day-effects var(--national-day-duration) both;
}

.national-day-splash__effects::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 7% 22%, #ffe3a2 0 1px, transparent 3px),
        radial-gradient(circle at 92% 30%, #fff4cf 0 1px, transparent 3px),
        radial-gradient(circle at 88% 77%, #eab454 0 1px, transparent 3px),
        radial-gradient(circle at 5% 82%, #ffe3a2 0 1px, transparent 3px);
    animation: national-day-drift var(--national-day-duration) ease-out both;
}

.national-day-splash__burst {
    position: absolute;
    top: 13%;
    left: 69.6%;
    width: 13%;
    aspect-ratio: 1;
    translate: -50% -50%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 9deg, #ffe2a1 0deg 1deg, transparent 2deg 15deg);
    mask-image: radial-gradient(circle, transparent 10%, #000 34%, transparent 69%);
    filter: drop-shadow(0 0 3px #f3ae49);
    animation: national-day-burst 850ms 500ms ease-out both;
}

.national-day-splash__burst:nth-child(2) {
    top: 14.5%;
    left: 80.7%;
    width: 8%;
    rotate: 17deg;
    animation-delay: 620ms;
}

.national-day-splash__burst:nth-child(3) {
    top: 26%;
    left: 77.5%;
    width: 8%;
    rotate: 32deg;
    animation-delay: 800ms;
}

.national-day-splash__glow,
.national-day-splash__sweep {
    position: absolute;
    mix-blend-mode: screen;
}

.national-day-splash__glow {
    inset: 0 40% 66% 44%;
    background: radial-gradient(ellipse, #e5bb683d, transparent 74%);
    animation: national-day-glow var(--national-day-duration) both;
}

.national-day-splash__sweep {
    inset: 30% 24% 40% 36%;
    background: linear-gradient(110deg, transparent 45%, #ffeaca38 50%, transparent 55%);
    background-size: 250% 100%;
    animation: national-day-sweep 1s 500ms ease-in-out both;
}

.national-day-splash__ribbon {
    position: absolute;
    inset: auto 2% 2% auto;
    width: 14%;
    height: 12%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: #e4eadc;
    box-shadow: 0 3px #168454, 0 6px #cf343b, 0 9px #121915;
    animation: national-day-ribbon var(--national-day-duration) ease-in-out both;
}

.national-day-splash__skip {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    min-width: 64px;
    min-height: 44px;
    padding: 6px 14px;
    border: 1px solid #dfba71;
    border-radius: 999px;
    background: #09251e;
    color: #fff4da;
    font-size: .875rem;
    cursor: pointer;
}

.national-day-splash__skip:focus-visible {
    outline: 2px solid #fff4da;
    outline-offset: 3px;
}

@keyframes national-day-overlay {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

@keyframes national-day-zoom {
    from { scale: 1; }
    to { scale: 1.025; }
}

@keyframes national-day-effects {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: .85; }
}

@keyframes national-day-drift {
    from { transform: translateY(1%); }
    to { transform: translateY(-2%); }
}

@keyframes national-day-burst {
    from { scale: .15; opacity: 0; }
    24% { opacity: .85; }
    to { scale: 1.35; opacity: 0; }
}

@keyframes national-day-glow {
    0%, 30%, 100% { opacity: 0; }
    42%, 90% { opacity: .65; }
}

@keyframes national-day-sweep {
    from { background-position: 100%; opacity: 0; }
    25%, 65% { opacity: 1; }
    to { background-position: 0%; opacity: 0; }
}

@keyframes national-day-ribbon {
    0%, 10%, 100% { opacity: 0; transform: rotate(-7deg); }
    24%, 90% { opacity: .65; transform: rotate(6deg); }
}

.national-day-splash--portrait .national-day-splash__scene {
    width: clamp(38dvh, 100vw, 51dvh);
    aspect-ratio: 841 / 1870;
}

.national-day-splash--portrait .national-day-splash__burst {
    top: 20%;
    left: 22%;
    width: 24%;
}

.national-day-splash--portrait .national-day-splash__burst:nth-child(2) {
    top: 15.6%;
    left: 79%;
    width: 23%;
}

.national-day-splash--portrait .national-day-splash__burst:nth-child(3) {
    top: 23%;
    left: 84%;
    width: 16%;
}

.national-day-splash--portrait .national-day-splash__glow {
    inset: 7% 32% 73%;
}

.national-day-splash--portrait .national-day-splash__sweep {
    inset: 26% 12% 58%;
}

@media (max-aspect-ratio: 4/5) {
    .national-day-splash__scene {
        width: 169vw;
        translate: -9vw 0;
        mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 86%, transparent);
    }

    .national-day-splash__backdrop-artwork {
        object-position: 12% center;
        filter: blur(9px) brightness(.57) saturate(1.15);
    }

    .national-day-splash--portrait .national-day-splash__scene {
        translate: none;
        mask-image: none;
    }
}

@media (min-aspect-ratio: 2/1) {
    .national-day-splash__scene {
        width: min(100vw, 184dvh);
        mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .national-day-splash[open],
    .national-day-splash__scene {
        animation: none;
    }

    .national-day-splash__effects {
        display: none;
    }
}
