/* /video/ — motion studies: a wall of phones. Builds on /qw/qw.css. */

.mo {
    padding-top: 28px;
}

/* ---- header ------------------------------------------------------------ */

.mo-head {
    position: relative;
    text-align: center;
    margin: 6px auto 26px;
    max-width: 760px;
}

.mo-head__tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.mo-head__tags .qw-tag:nth-child(2) {
    transform: rotate(3deg) translateY(-3px);
}

.mo-head__title {
    display: block;
    width: max-content;
    margin: 0 auto;
    font-size: clamp(64px, 12vw, 132px);
}

.mo-head__lead {
    max-width: 560px;
    margin: 14px auto 0;
    font-family: var(--font-pixel);
    font-size: 15px;
    line-height: 1.35;
    text-transform: uppercase;
}

.mo-head__hand {
    margin-top: 10px;
    font-size: 18px;
}

/* ---- the wall of phones ------------------------------------------------ */

.mo-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px 22px;
    align-items: start;
}

.mo-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mo-card:nth-child(3n + 1) .mo-phone { transform: rotate(-2.2deg); }
.mo-card:nth-child(3n + 2) .mo-phone { transform: rotate(1.6deg) translateY(10px); }
.mo-card:nth-child(3n) .mo-phone { transform: rotate(-1deg); }

/* a phone: red frame like the site itself, rounded screen, poster + video */
.mo-phone {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    padding: 10px;
    border-radius: 44px;
    background: var(--tone, var(--pink));
    box-shadow: 0 0 0 1px rgba(253, 253, 253, 0.7), 0 18px 40px rgba(0, 60, 140, 0.22);
    transition: transform 0.45s var(--ease-pop), box-shadow 0.3s;
    cursor: pointer;
    overflow: hidden;
}

.mo-phone:hover,
.mo-phone:focus-visible {
    transform: rotate(0deg) scale(1.03) !important;
    box-shadow: 0 0 0 1px rgba(253, 253, 253, 0.9), 0 26px 50px rgba(0, 60, 140, 0.28);
}

.mo-phone:active {
    transform: rotate(0deg) scale(0.985) !important;
}

.mo-phone__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 36px;
    background: var(--sky);
}

.mo-phone__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(253, 253, 253, 0.8);
    color: var(--ink);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.9) inset, 0 10px 24px rgba(0, 60, 140, 0.2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transform: translate(-50%, -50%);
    transition: opacity 0.25s, transform 0.3s var(--ease-pop);
}

.mo-phone__play svg {
    width: 34px;
    height: 34px;
    margin-left: 3px;
}

.mo-phone.is-playing .mo-phone__play {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}

.mo-phone__code {
    position: absolute;
    left: 24px;
    top: 24px;
    padding: 4px 10px 3px;
    border-radius: 4px;
    background: var(--white);
    color: var(--blue);
    font-family: var(--font-pixel);
    font-size: 13px;
    text-transform: uppercase;
    box-shadow: 0 3px 0 rgba(0, 60, 140, 0.12);
    transform: rotate(-4deg);
}

.mo-card__text {
    padding: 0 6px;
}

.mo-card__title {
    font-family: var(--font-pixel);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    text-transform: lowercase;
    color: var(--ink);
}

.mo-card__line {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(22, 22, 22, 0.8);
}

.mo-card__cast {
    margin-top: 8px;
    font-family: var(--font-pixel);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--blue);
}

.mo-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.mo-card__meta .qw-tag {
    transform: rotate(-3deg);
}

.mo-card__ref {
    font-family: var(--font-pixel);
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(22, 22, 22, 0.6);
    text-decoration: none;
}

.mo-card__ref:hover {
    color: var(--ink);
}

/* ---- how it's made ----------------------------------------------------- */

.mo-how {
    margin: 56px auto 20px;
    max-width: 760px;
    padding: 28px 28px 22px;
}

.mo-how__title {
    font-family: var(--font-pixel);
    font-size: 28px;
    font-weight: 400;
    text-transform: lowercase;
    margin-bottom: 14px;
}

.mo-how__steps {
    list-style: none;
    display: grid;
    gap: 12px;
    counter-reset: step;
}

.mo-how__steps li {
    position: relative;
    padding-left: 44px;
    font-size: 15px;
    line-height: 1.5;
}

.mo-how__steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--lime);
    color: var(--ink);
    font-family: var(--font-pixel);
    font-size: 16px;
}

.mo-how__steps b {
    font-family: var(--font-pixel);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 13px;
}

.mo-how__note {
    margin-top: 16px;
    font-size: 16px;
}

/* ---- player sheet ------------------------------------------------------ */

.mo-sheet {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: var(--frame);
    background: rgba(22, 22, 22, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mo-sheet.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mo-sheet__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    width: min(880px, 100%);
    max-height: calc(100vh - 2 * var(--frame) - 20px);
    padding: 28px;
    border-radius: 44px;
    background: var(--white);
    box-shadow: 0 30px 80px rgba(0, 20, 60, 0.4);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.45s var(--ease-pop);
    overflow: auto;
}

.mo-sheet.is-open .mo-sheet__panel {
    transform: none;
}

.mo-sheet__close {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 2;
}

.mo-sheet__phone {
    padding: 10px;
    border-radius: 44px;
    background: var(--red);
    box-shadow: 0 0 0 1px rgba(253, 253, 253, 0.7), 0 18px 40px rgba(0, 60, 140, 0.22);
}

.mo-sheet__video {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    height: auto;
    object-fit: cover;
    border-radius: 36px;
    background: var(--sky);
}

.mo-sheet__code {
    margin-bottom: 6px;
}

.mo-sheet__title {
    font-family: var(--font-pixel);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 400;
    line-height: 0.95;
    text-transform: lowercase;
    color: var(--accent);
    -webkit-text-stroke: 0.1em var(--white);
    paint-order: stroke fill;
    filter: drop-shadow(0 3px 0 rgba(22, 22, 22, 0.12));
}

.mo-sheet__line {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.5;
}

.mo-sheet__facts {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.mo-sheet__facts dt {
    font-family: var(--font-pixel);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--blue);
}

.mo-sheet__facts dd {
    font-size: 14px;
    line-height: 1.45;
}

.mo-sheet__facts a {
    color: var(--ink);
}

.mo-sheet__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

@media (max-width: 720px) {
    .mo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 14px;
    }

    .mo-card__title {
        font-size: 19px;
    }

    .mo-phone,
    .mo-sheet__phone {
        border-radius: 32px;
        padding: 7px;
    }

    .mo-phone__video,
    .mo-sheet__video {
        border-radius: 26px;
    }

    .mo-phone__play {
        width: 56px;
        height: 56px;
    }

    .mo-sheet__panel {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
        border-radius: 32px;
    }

    .mo-sheet__phone {
        width: min(100%, 300px);
        margin: 0 auto;
    }
}

@media (max-width: 420px) {
    .mo-grid {
        grid-template-columns: 1fr;
    }

    .mo-phone {
        max-width: 320px;
        margin: 0 auto;
    }
}
