.CoasterPage
{
    overflow: hidden;
    color: white;
    background: #bb0a05;
    border-bottom: 26px solid #000;
}

.CoasterHero
{
    background: #825232 url('./assets/wooden-background-2.webp') center top / auto 100% repeat-x;
}

.CoasterHeroInner
{
    position: relative;
    isolation: isolate;
    width: min(100%, 984px);
    aspect-ratio: 984 / 656;
    margin: 0 auto;
}

.CoasterHeroInner > *
{
    position: absolute;
    display: block;
}

.CoasterRideVideo
{
    top: 9.5%;
    left: 11.18%;
    width: 75.3%;
    height: 83.6%;
    object-fit: cover;
    background: #182019;
}

.CoasterCutout
{
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.CoasterRider
{
    bottom: 0;
    left: 0;
    width: 55.69%;
    height: auto;
}

.CoasterSpeed
{
    top: -1.7%;
    left: 30.8%;
    width: 46.95%;
    height: auto;
}

.CoasterDetails
{
    position: relative;
    width: min(100%, 984px);
    margin: auto;
    padding: 0 clamp(1rem, 5vw, 4rem) clamp(1.5rem, 4vw, 2.75rem);
}

.CoasterBadges
{
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
    margin-top: clamp(-50px, -5vw, -14px);
}

.CoasterBadges h1
{
    width: min(35%, 260px);
    margin: 0;
}

.CoasterBadges h1 img,
.CoasterGallery img
{
    display: block;
    width: 100%;
    height: auto;
}

.CoasterBadges > img
{
    width: min(47%, 357px);
    height: auto;
    margin-top: clamp(12px, 4vw, 50px);
}

.CoasterGallery
{
    display: grid;
    grid-template-columns: 205fr 188fr 209fr 219fr;
    align-items: center;
    gap: clamp(.4rem, 1.25vw, 1rem);
    margin: clamp(-24px, -2.4vw, -6px) 0 0;
}

.CoasterRules
{
    margin: 0 auto;
    max-width: 840px;
    line-height: 1.65;
}

.CoasterRules h2,
.CoasterClosing
{
    font-family: 'Arial Black', system-ui, sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: 1000;
    line-height: 1.1;
    text-transform: uppercase;
}

.CoasterRules h2
{
    margin: .5em 0;
}

.CoasterRules ol
{
    margin: 0;
    padding-left: 1.3rem;
}

.CoasterRules a
{
    text-underline-offset: .16em;
}

.CoasterClosing
{
    text-align: center;
    margin: .65em 0 0;
}

.CoasterClosing em
{
    font-family: cursive;
    text-transform: none;
}

@media (max-width: 580px)
{
    .CoasterGallery
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 400px;
        margin: .75rem auto 0;
    }
}

@media (prefers-reduced-motion: no-preference)
{
    .CoasterMotionReady [data-coaster-motion]
    {
        opacity: 0;
    }

    .CoasterMotionReady .CoasterMotionVisible[data-coaster-motion="Expand"]
    {
        animation: CoasterFadeIn var(--CoasterDuration, 1.2s) linear var(--CoasterDelay) both,
                   CoasterExpandIn var(--CoasterDuration, 1.2s) cubic-bezier(.645, .045, .355, 1) var(--CoasterDelay) both;
    }

    .CoasterMotionReady .CoasterMotionVisible[data-coaster-motion="Tilt"]
    {
        animation: CoasterFadeIn .24s cubic-bezier(.215, .61, .355, 1) var(--CoasterDelay) both,
                   CoasterTiltIn 1.2s cubic-bezier(.215, .61, .355, 1) var(--CoasterDelay) both,
                   CoasterTiltClip .96s cubic-bezier(.215, .61, .355, 1) var(--CoasterDelay) both;
    }

    .CoasterRider { --CoasterDelay: 1.2s; }
    .CoasterSpeed { --CoasterDelay: 1.8s; }
    .CoasterBadges h1 { --CoasterDelay: 1.5s; }
    .CoasterBadges > img { --CoasterDelay: 1.3s; }
    .CoasterGallery img:nth-child(1) { --CoasterDelay: 1.8s; }
    .CoasterGallery img:nth-child(2) { --CoasterDelay: 2.3s; --CoasterDuration: .9s; }
    .CoasterGallery img:nth-child(3) { --CoasterDelay: 2.4s; }
    .CoasterGallery img:nth-child(4) { --CoasterDelay: 2.7s; }

    @keyframes CoasterFadeIn
    {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes CoasterExpandIn
    {
        from { transform: scale(.8); }
        to { transform: scale(1); }
    }

    @keyframes CoasterTiltIn
    {
        from { transform: perspective(800px) rotateX(40deg) rotateY(-24deg); }
        to { transform: perspective(800px) rotateX(0) rotateY(0); }
    }

    @keyframes CoasterTiltClip
    {
        from { clip-path: inset(0 0 100% 0); }
        to { clip-path: inset(0); }
    }
}
