/* Upcoming S-Grade announcement. The current A-Grade server features stay unchanged. */
#s-grade-update {
    position: absolute;
    top: 2.2vw;
    left: 2.8vw;
    width: clamp(240px, 27vw, 380px);
    padding: 18px 18px 20px;
    box-sizing: border-box;
    border: 2px solid #b9822e;
    border-radius: 5px;
    background: radial-gradient(ellipse at 50% 20%, #65110d 0%, #300607 58%, #120304 100%);
    box-shadow: 0 0 0 1px #2a0905, 0 0 0 4px #753912a6,
        0 10px 35px #000b, inset 0 0 35px #0009;
    color: #f0c97e;
    font-family: "Trajan Pro", Georgia, serif;
    text-align: center;
    z-index: 7;
}

#s-grade-update::before,
#s-grade-update::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d9a550, transparent);
    pointer-events: none;
}

#s-grade-update::before { top: 8px; }
#s-grade-update::after { bottom: 8px; }

.s-grade-kicker {
    color: #efd4a2;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2.5px;
}

.s-grade-banner {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

/* Small decorative layers: motion changes only transform and opacity. */
.s-grade-aura {
    position: absolute;
    inset: 0;
    border: 1px solid #ffe3a2;
    border-radius: inherit;
    box-shadow: inset 0 0 15px #f6a73d38, 0 0 12px #e69b3538;
    opacity: 0.28;
    pointer-events: none;
    animation: s-grade-breathe 6s ease-in-out infinite;
}

.s-grade-banner-frame {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    margin: 12px auto 8px;
}

.s-grade-sheen {
    position: absolute;
    inset: 0;
    -webkit-mask-image: url('../images/s-grade-coming-soon.webp');
    mask-image: url('../images/s-grade-coming-soon.webp');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    pointer-events: none;
}

.s-grade-sheen::after {
    content: "";
    position: absolute;
    inset: -10% 0;
    background: linear-gradient(110deg, transparent 32%, #ffd37700 40%,
        #ffe3a239 47%, #fff6d988 50%, #ffe3a239 53%, #ffd37700 60%, transparent 68%);
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
    animation: s-grade-polish 9s ease-in-out infinite;
}

.s-grade-spark {
    position: absolute;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, #fff9e2 0 7%, #ffe09d 10%, transparent 30%),
        linear-gradient(90deg, transparent 43%, #ffe7b2 50%, transparent 57%),
        linear-gradient(0deg, transparent 43%, #ffe7b2 50%, transparent 57%);
    opacity: 0;
    pointer-events: none;
    animation: s-grade-twinkle 7s ease-in-out infinite;
}

.s-grade-spark-one { top: 26%; left: 17%; animation-delay: -0.4s; }
.s-grade-spark-two { top: 45%; left: 77%; width: 13px; height: 13px; animation-delay: -2.2s; }
.s-grade-spark-three { top: 67%; left: 37%; width: 12px; height: 12px; animation-delay: -4.3s; }
.s-grade-spark-four { top: 19%; left: 64%; animation-delay: -5.8s; }

@keyframes s-grade-polish {
    0%, 8% { transform: translateX(-120%); opacity: 0; }
    12% { opacity: 0.75; }
    30% { opacity: 0.75; }
    36%, 100% { transform: translateX(120%); opacity: 0; }
}

@keyframes s-grade-twinkle {
    0%, 38%, 100% { transform: scale(0.4) rotate(0deg); opacity: 0; }
    48% { transform: scale(1) rotate(15deg); opacity: 0.95; }
    60% { transform: scale(0.55) rotate(35deg); opacity: 0; }
}

@keyframes s-grade-breathe {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.85; }
}

#s-grade-title {
    margin: 8px 0 14px;
    color: #ffda96;
    font-size: clamp(21px, 2vw, 28px);
    line-height: 1.15;
    letter-spacing: 2px;
    text-shadow: 0 2px 3px #000, 0 0 15px #d3442570;
}

#s-grade-title span {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    letter-spacing: 1.5px;
}

.s-grade-equipment {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #9e5d3066;
    border-bottom: 1px solid #9e5d3066;
    padding: 12px 0 14px;
    background: #08020240;
}

.s-grade-item-group + .s-grade-item-group {
    border-left: 1px solid #9e5d304d;
}

.s-grade-item-group h2 {
    margin: 0 0 10px;
    color: #d7b886;
    font-size: 9px;
    font-weight: normal;
    letter-spacing: 1.5px;
}

.s-grade-icons {
    display: flex;
    gap: clamp(3px, 0.5vw, 8px);
    justify-content: center;
}

.s-grade-icons img {
    display: block;
    box-sizing: border-box;
    width: clamp(29px, 2.8vw, 40px);
    height: clamp(29px, 2.8vw, 40px);
    border: 1px solid #a0783e;
    border-radius: 3px;
    padding: 2px;
    background: #120b09;
    box-shadow: 0 2px 5px #000a;
    image-rendering: pixelated;
    transition: transform 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .s-grade-icons img:hover {
        transform: translateY(-3px) scale(1.08);
        border-color: #ffe0a1;
        box-shadow: 0 0 10px #f8b34666;
    }
}

.s-grade-status {
    margin: 15px 0 5px;
    font-size: clamp(17px, 1.5vw, 22px);
    font-weight: bold;
    letter-spacing: 3px;
    color: #ffdb8f;
    text-shadow: 0 2px 3px #000, 0 0 14px #d66b294d;
}

.s-grade-release {
    margin: 0 0 14px;
    color: #c9ab89;
    font: 11px/1.5 Georgia, serif;
}

.s-grade-more-info { font-family: Georgia, serif; }
.s-grade-more-info:focus-visible { outline: 2px solid #ffda96; outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
    .s-grade-aura,
    .s-grade-sheen::after,
    .s-grade-spark { animation: none; }
    .s-grade-sheen,
    .s-grade-spark { display: none; }
    .s-grade-icons img { transition: none; }
    .s-grade-icons img:hover { transform: none; }
}

/* Flow the announcement between the logo and buttons on smaller screens. */
@media (max-width: 768px) {
    html:has(body.s-grade-page) {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.s-grade-page {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100svh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .s-grade-page #logo {
        order: 0;
        flex: 0 0 auto;
        top: auto;
        margin: 18px auto 20px;
    }

    .s-grade-page #content {
        order: 1;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible;
        background: none;
    }

    #s-grade-update {
        position: relative;
        top: auto;
        left: auto;
        width: min(88vw, 350px);
        margin: 0 auto;
        padding: 17px 17px 18px;
    }

    .s-grade-icons { gap: 7px; }
    .s-grade-icons img { width: 36px; height: 36px; }

    .s-grade-page #buttons {
        order: 2;
        position: relative;
        top: auto;
        margin: 22px auto 24px;
    }

    .s-grade-page #footer {
        order: 3;
        position: relative;
        left: auto;
        transform: none;
        width: 100%;
        height: auto;
        padding: 0 0 20px;
        z-index: 5;
    }

    .s-grade-page #footer #text {
        height: auto;
        margin: 0 auto !important;
    }
}
