.rh-hero {
    --rh-hero-duration: 20s;
    position: relative;
    display: block;
    background: #080a09;
    color: #fff;
    overflow: hidden;
}

.rh-hero__stage {
    position: relative;
    min-height: clamp(660px, calc(100vh - 82px), 900px);
    isolation: isolate;
    overflow: hidden;
    background: #070908;
}

.rh-hero__footage,
.rh-hero__scene,
.rh-hero__wash,
.rh-hero__grain,
.rh-hero__scan {
    position: absolute;
    inset: 0;
}

.rh-hero__footage {
    z-index: 0;
    background: #070908;
    overflow: hidden;
}

.rh-hero__scene {
    opacity: 0;
    overflow: hidden;
}

.rh-hero__scene.is-active,
.rh-hero__beat.is-active {
    opacity: 1;
}

.rh-hero__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.72) contrast(1.08) brightness(0.82);
}

.rh-hero__wash {
    background:
        linear-gradient(90deg, rgba(5, 7, 6, 0.9) 0%, rgba(5, 7, 6, 0.7) 43%, rgba(5, 7, 6, 0.18) 73%, rgba(5, 7, 6, 0.36) 100%),
        linear-gradient(0deg, rgba(5, 7, 6, 0.76) 0%, transparent 42%, rgba(5, 7, 6, 0.18) 100%);
}

.rh-hero__wash::after {
    content: "";
    position: absolute;
    inset: -25% -15%;
    background: linear-gradient(108deg, transparent 32%, rgba(237, 52, 59, 0.18) 48%, transparent 64%);
    transform: translate3d(-35%, 0, 0);
    animation: rh-hero-light 10s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.rh-hero__grain {
    opacity: 0.17;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.36'/%3E%3C/svg%3E");
    animation: rh-hero-grain 0.22s steps(2) infinite;
}

.rh-hero__scan {
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(255, 255, 255, 0.018) 4px);
    mix-blend-mode: screen;
}

.rh-hero__frame {
    position: relative;
    z-index: 1;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(34px, 5vh, 62px) var(--pad) clamp(50px, 7vh, 78px);
}

.rh-hero__beats {
    position: relative;
    flex: 1;
    min-height: 470px;
}

.rh-hero__beat {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    pointer-events: none;
    padding-right: calc(min(390px, 31vw) + clamp(28px, 3vw, 48px));
}

.rh-hero__index {
    margin: 0 0 clamp(18px, 3vh, 30px);
    color: #f0f3f1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rh-hero__index::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 1px;
    margin: 0 12px 3px 0;
    background: var(--red);
}

.rh-hero h1,
.rh-hero h2 {
    max-width: 1150px;
    margin: 0;
    color: #fff;
    font-family: var(--sans);
    font-size: clamp(52px, 7.6vw, 119px);
    font-weight: 700;
    letter-spacing: -0.072em;
    line-height: 0.82;
    text-wrap: balance;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.38);
}

.rh-hero h2 em {
    color: #ff3c43;
    font-style: normal;
}

.rh-hero__beat:nth-child(4) h2 {
    font-size: clamp(45px, 6.3vw, 101px);
}

.rh-hero__lockup {
    position: absolute;
    right: var(--pad);
    bottom: clamp(56px, 7vh, 82px);
    z-index: 3;
    width: min(390px, 31vw);
    padding-left: 22px;
    border-left: 3px solid var(--red);
}

.rh-hero__lockup p {
    margin: 0 0 20px;
    color: #e1e6e3;
    font-size: clamp(14px, 1.25vw, 17px);
    line-height: 1.5;
}

@media (min-width: 901px) {
    .rh-hero__stage {
        min-height: 800px;
        height: 800px;
    }

    .rh-hero__frame {
        padding-block: 44px 64px;
    }

    .rh-hero__beat {
        padding-right: 432px;
    }

    .rh-hero h1,
    .rh-hero h2 {
        font-size: 104px;
    }

    .rh-hero__beat:nth-child(4) h2 {
        font-size: 88px;
    }

    .rh-hero__lockup {
        bottom: 64px;
        width: 390px;
    }

    .rh-hero__lockup p {
        font-size: 16px;
    }
}

.rh-hero__edge {
    position: absolute;
    right: 0;
    top: 50%;
    z-index: 2;
    display: flex;
    gap: 22px;
    transform: translate(42%, -50%) rotate(90deg);
    transform-origin: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rh-hero__edge span + span::before {
    content: "×";
    margin-right: 22px;
    color: var(--red);
}

.rh-hero__join {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--red) 0 19%, #111413 19% 100%);
}

.rh-hero[data-count="4"] .rh-hero__scene:nth-child(1) { animation: rh-scene-one var(--rh-hero-duration) linear infinite; }
.rh-hero[data-count="4"] .rh-hero__scene:nth-child(2) { animation: rh-scene-two var(--rh-hero-duration) linear infinite; }
.rh-hero[data-count="4"] .rh-hero__scene:nth-child(3) { animation: rh-scene-three var(--rh-hero-duration) linear infinite; }
.rh-hero[data-count="4"] .rh-hero__scene:nth-child(4) { animation: rh-scene-four var(--rh-hero-duration) linear infinite; }
.rh-hero[data-count="4"] .rh-hero__media { animation: rh-hero-camera var(--rh-hero-duration) ease-in-out infinite alternate; }
.rh-hero[data-count="4"] .rh-hero__beat:nth-child(1) { animation: rh-beat-one var(--rh-hero-duration) ease infinite; }
.rh-hero[data-count="4"] .rh-hero__beat:nth-child(2) { animation: rh-beat-two var(--rh-hero-duration) ease infinite; }
.rh-hero[data-count="4"] .rh-hero__beat:nth-child(3) { animation: rh-beat-three var(--rh-hero-duration) ease infinite; }
.rh-hero[data-count="4"] .rh-hero__beat:nth-child(4) { animation: rh-beat-four var(--rh-hero-duration) ease infinite; }

@keyframes rh-scene-one { 0%, 20% { opacity: 1; } 26%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rh-scene-two { 0%, 20% { opacity: 0; } 27%, 44% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes rh-scene-three { 0%, 45% { opacity: 0; } 52%, 69% { opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes rh-scene-four { 0%, 70% { opacity: 0; } 77%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rh-hero-camera { 0% { transform: scale(1.03) translate3d(-0.6%, 0, 0); } 100% { transform: scale(1.13) translate3d(1.4%, -1.2%, 0); } }
@keyframes rh-hero-light { 0%, 8% { transform: translate3d(-38%, 0, 0); opacity: 0; } 35% { opacity: 1; } 68%, 100% { transform: translate3d(38%, 0, 0); opacity: 0; } }
@keyframes rh-hero-grain { 0% { transform: translate(0); } 25% { transform: translate(-1.5%, 1%); } 50% { transform: translate(1%, -1.5%); } 75% { transform: translate(1.5%, 1%); } 100% { transform: translate(-1%, 0); } }
@keyframes rh-beat-one { 0%, 3% { opacity: 0; transform: translate3d(0, 26px, 0); } 7%, 19% { opacity: 1; transform: none; } 24%, 100% { opacity: 0; transform: translate3d(0, -18px, 0); } }
@keyframes rh-beat-two { 0%, 24% { opacity: 0; transform: translate3d(0, 26px, 0); } 28%, 43% { opacity: 1; transform: none; } 48%, 100% { opacity: 0; transform: translate3d(0, -18px, 0); } }
@keyframes rh-beat-three { 0%, 48% { opacity: 0; transform: translate3d(0, 26px, 0); } 52%, 68% { opacity: 1; transform: none; } 73%, 100% { opacity: 0; transform: translate3d(0, -18px, 0); } }
@keyframes rh-beat-four { 0%, 72% { opacity: 0; transform: translate3d(0, 26px, 0); } 76%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate3d(0, -18px, 0); } }

@media (max-width: 900px) {
    .rh-hero__stage { min-height: 740px; }
    .rh-hero__beats { min-height: 515px; }
    .rh-hero__beat { padding-right: 0; padding-bottom: 128px; }
    .rh-hero__lockup {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(580px, 82%);
        margin-top: -110px;
    }
    .rh-hero__edge { display: none; }
}

@media (max-width: 620px) {
    .rh-hero__stage { min-height: 680px; }
    .rh-hero__frame { padding-top: 28px; padding-bottom: 32px; }
    .rh-hero__beats { min-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
    .rh-hero__scene,
    .rh-hero__beat,
    .rh-hero__media,
    .rh-hero__wash::after,
    .rh-hero__grain {
        animation: none;
    }

    .rh-hero__scene:first-child,
    .rh-hero__beat:first-child {
        opacity: 1;
        transform: none;
    }
}
