.fp-film {
    position: relative;
    container-type: inline-size;
}

.fp-film video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-film--wide {
    aspect-ratio: 16 / 10;
}

.fp-film--phone {
    aspect-ratio: 1 / 2;
}

.fp-film--phone video {
    clip-path: inset(4.1% 5.4% 4.05% 5.4% round 13.4% / 6.7%);
}

.fp-media--film .fp-film {
    position: absolute;
    inset: 0;
}

.fp-timer {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}

.fp-sound {
    position: absolute;
    right: clamp(10px, 1.6cqw, 18px);
    bottom: clamp(10px, 1.6cqw, 18px);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: rgba(9, 9, 11, .78);
    color: #fafafa;
    transition: background-color .2s ease, border-color .2s ease;
}

.fp-sound svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.fp-sound svg path:first-child {
    fill: currentColor;
}

.fp-sound[aria-pressed="true"] .fp-sound__off,
.fp-sound[aria-pressed="false"] .fp-sound__on {
    display: none;
}

.fp-sound:hover {
    border-color: rgba(255, 255, 255, .32);
    background: rgba(39, 39, 42, .92);
}

.fp-sound:focus-visible {
    outline: 2px solid rgba(83, 162, 235, .8);
    outline-offset: 3px;
}

.fp-phones {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2.4vw, 40px);
}

.fp-phones::before {
    position: absolute;
    inset: 12% 10%;
    z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 34%, transparent), transparent);
    content: "";
    filter: blur(40px);
    pointer-events: none;
}

.fp-phones .fp-film {
    min-width: 0;
    flex: 0 1 calc(var(--fp-h) / 2);
}

.fp-steps {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0 0 calc(var(--fp-h) - 24px);
    gap: clamp(14px, 2.4vw, 36px);
    list-style: none;
}

.fp-step__label {
    display: flex;
    align-items: center;
    height: 24px;
    color: #a1a1aa;
    font-size: clamp(13px, 1vw, 15px);
    font-weight: 600;
    gap: 9px;
    opacity: .45;
    transition: opacity .5s ease, color .5s ease;
}

.fp-step__label b {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #3f3f46;
    border-radius: 50%;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    transition: background-color .5s ease, border-color .5s ease, color .5s ease;
}

.fp-step__box {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    place-items: center;
    height: calc(var(--fp-h) - 40px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}

.fp-step .fp-film {
    width: auto;
    height: 100%;
}

.fp-step--wide .fp-film {
    overflow: hidden;
    border-radius: clamp(12px, 1.4vw, 20px);
    background: #0b0b0d;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 100px -40px color-mix(in srgb, var(--c) 55%, transparent);
}

.fp-step.is-open .fp-step__box {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility 0s;
}

.fp-step.is-done:not(:last-child) .fp-step__box {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}

.fp-step.is-open .fp-step__label {
    color: #fafafa;
    opacity: 1;
}

.fp-step.is-open .fp-step__label b {
    border-color: #fafafa;
    background: #fafafa;
    color: #09090b;
}

@media (max-width: 900px) {
    .fp-phones .fp-film {
        flex-basis: min(300px, 70vw);
    }

    .fp-steps {
        --fp-h: calc((100vw - 40px) / 1.6 + 40px);
    }
}

@media (max-width: 700px) {
    .fp-phones--2,
    .fp-phones--3 {
        justify-content: flex-start;
        margin-inline: -20px;
        padding: 8px 20px 4px;
        overflow-x: auto;
        gap: 14px;
        scroll-padding-inline: 20px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .fp-phones--2::-webkit-scrollbar,
    .fp-phones--3::-webkit-scrollbar {
        display: none;
    }

    .fp-phones--2 .fp-film,
    .fp-phones--3 .fp-film {
        flex: 0 0 min(68vw, 280px);
        scroll-snap-align: start;
    }

    .fp-phones--3 .fp-film:nth-child(2) {
        order: -1;
    }

    .fp-sound {
        width: 36px;
        height: 36px;
    }

    .fp-sound svg {
        width: 18px;
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fp-step__box,
    .fp-step__label {
        transition: none;
    }
}
