@font-face {
    font-family: Archivo;
    src: url("/site/fonts/archivo.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
}

@font-face {
    font-family: "Martian Mono";
    src: url("/site/fonts/martian-mono.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Permanent Marker";
    src: url("/site/fonts/permanent-marker.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --base: #0c0b0a;
    --sleeve: #181613;
    --film: #1e1b18;
    --perf: #2b2824;
    --stroke: #4a4640;
    --text: #f1eee6;
    --quiet: #cfcac0;
    --muted: #a39e93;
    --marker: #ffd60a;
    --blue: #5bc8f5;
    --pink: #ff8fb8;
    --gutter: clamp(16px, 4vw, 48px);
    --section-space: clamp(72px, 10vw, 136px);
    --marker-font: "Permanent Marker", "Comic Sans MS", cursive;
    --mono-font: "Martian Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    background: var(--base);
    color: var(--text);
    font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, p { margin: 0; }

a { color: var(--marker); }
a:hover { color: #ffe566; }

:focus-visible {
    outline: 3px solid var(--marker);
    outline-offset: 3px;
}

.container {
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 24px;
    padding-block: 14px;
}

.site-brand, .page-nav a, .legal-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.site-brand {
    gap: 10px;
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.page-nav, .legal-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 22px;
}

.page-nav a, .legal-nav a {
    min-width: 44px;
    color: var(--quiet);
    font-size: 15px;
    font-weight: 600;
}

.page-nav .get-link {
    padding-inline: 18px;
    border: 1px solid var(--stroke);
    border-radius: 22px;
    background: var(--sleeve);
    color: var(--text);
    font-weight: 700;
}

.hero {
    display: flex;
    flex-direction: column;
    gap: clamp(22px, 3vw, 36px);
    padding-block: clamp(12px, 2.4vw, 32px) clamp(28px, 4vw, 48px);
}

.hero h1 {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 1.8vw, 24px);
}

.display-title, .section-title, .legal-page h1 {
    font-stretch: 62%;
    font-weight: 900;
    text-transform: uppercase;
}

.display-title {
    font-size: clamp(72px, 11.5vw, 143px);
    line-height: 0.8;
    letter-spacing: -0.012em;
}

.hero-subtitle {
    max-width: 26ch;
    font-size: clamp(22px, 2.7vw, 36px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.hero-intro, .final-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
}

.hero-intro { gap: 22px 48px; }

.hero-intro > p, .ratings > p {
    color: var(--quiet);
    font-size: clamp(16px, 1.4vw, 18px);
}

.hero-intro > p {
    flex: 1 1 min(420px, 100%);
    max-width: 52ch;
    line-height: 1.5;
    text-wrap: pretty;
}

.store-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.store-button {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding-inline: 24px;
    border: 1px solid var(--stroke);
    border-radius: 28px;
    background: var(--sleeve);
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}

.store-button-primary, .store-button-primary:hover {
    border-width: 0;
    background: var(--marker);
    color: var(--base);
}

.store-button-pending { cursor: default; }

.film-band {
    position: relative;
    background: var(--film);
    box-shadow: inset 0 1px 0 var(--perf), inset 0 -1px 0 var(--perf);
}

.perforated::before, .perforated::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    height: 8px;
    background: repeating-linear-gradient(90deg, var(--base) 0 10px, transparent 10px 26px);
    pointer-events: none;
}

.perforated::before { top: 9px; }
.perforated::after { bottom: 9px; }

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 2px;
    background: var(--poster-color, var(--sleeve));
}

.poster-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
    font-size: 0;
}

.poster-unavailable { opacity: 0; }

.poster-arrival { --poster-color: linear-gradient(180deg, #59626d 0%, #2b3138 50%, #14171a 100%); }
.poster-amelie { --poster-color: linear-gradient(180deg, #4e7a3a 0%, #142010 100%); }
.poster-parasite { --poster-color: linear-gradient(180deg, #3e5c4b 0%, #101a14 100%); }
.poster-whiplash { --poster-color: linear-gradient(180deg, #7a2e2e 0%, #1c0b0b 100%); }
.poster-moonlight { --poster-color: linear-gradient(180deg, #5a4fcf 0%, #141033 100%); }
.poster-heat { --poster-color: linear-gradient(180deg, #2f6f8f 0%, #0e2430 100%); }
.poster-her { --poster-color: linear-gradient(180deg, #d9654a 0%, #5a1f16 100%); }
.poster-rififi { --poster-color: linear-gradient(180deg, #8c7a5b 0%, #2a2318 100%); }

.small-film .poster-knives-out, .rated-film .poster-paddington-2, .seen-poster {
    --poster-color: linear-gradient(180deg, #f2b544 0%, #c2452d 100%);
}
.small-film .poster-paddington-2 { --poster-color: linear-gradient(180deg, #b8506e 0%, #2e0f1b 100%); }
.small-film .poster-inside-man { --poster-color: linear-gradient(180deg, #e08a3c 0%, #5a2410 100%); }
.small-film .poster-enchanted { --poster-color: linear-gradient(180deg, #3f7c86 0%, #0f2428 100%); }
.poster-logan-lucky, .rated-film .poster-knives-out {
    --poster-color: linear-gradient(180deg, #6e6a62 0%, #1e1c19 100%);
}
.poster-spirited-away, .rated-film .poster-logan-lucky {
    --poster-color: linear-gradient(180deg, #c9973b 0%, #3d2a0c 100%);
}
.poster-mad-max, .rated-film .poster-inside-man {
    --poster-color: linear-gradient(180deg, #4a5a78 0%, #121826 100%);
}
.poster-the-master, .rated-film .poster-enchanted {
    --poster-color: linear-gradient(180deg, #8e5bb5 0%, #24133a 100%);
}

.hero-film {
    height: 324px;
    overflow: hidden;
}

.hero-track {
    position: absolute;
    top: 0;
    left: 50%;
    display: flex;
    gap: 16px;
    width: 9216px;
    height: 324px;
    margin-left: -3544px; /* Centre poster 19 at a 192px pitch. */
    padding-top: 30px;
}

.hero-track::before, .hero-track::after {
    height: 9px;
    background: repeating-linear-gradient(90deg, var(--base) 0 12px, transparent 12px 32px);
}

.hero-track::after { bottom: 5px; }

.hero-frame {
    position: relative;
    flex: 0 0 176px;
}

.frame-number {
    position: absolute;
    top: 269px;
    left: 2px;
    color: var(--muted);
    font: 500 9px var(--mono-font);
    letter-spacing: 0.14em;
}

.hero-ring {
    position: absolute;
    top: 3px;
    left: 50%;
    width: 236px;
    height: 318px;
    margin-left: -118px;
    pointer-events: none;
}

.marker-stroke {
    stroke-dasharray: 1800;
    stroke-dashoffset: 0;
}

.shuffle-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 28px;
    padding-top: 20px;
}

.tonight {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--marker);
    font: 400 32px / 44px var(--marker-font);
    transform: rotate(-2deg);
}

.name-window {
    display: block;
    height: 44px;
    overflow: hidden;
}

.name-track {
    display: flex;
    flex-direction: column;
}

.name-track > span {
    height: 44px;
    white-space: nowrap;
}

.pause-button {
    min-width: 44px;
    height: 44px;
    padding-inline: 16px;
    border: 1px solid var(--stroke);
    border-radius: 22px;
    background: transparent;
    color: var(--quiet);
    font: 600 14px Archivo, sans-serif;
    cursor: pointer;
}

.section-title {
    max-width: 9em;
    font-size: clamp(48px, 7.4vw, 104px);
    line-height: 0.84;
    letter-spacing: -0.01em;
}

.answers, .ratings {
    display: flex;
    flex-direction: column;
    padding-top: var(--section-space);
}

.answers { gap: clamp(28px, 4vw, 48px); }

.answer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 36px clamp(20px, 3vw, 40px);
}

.answer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.answer-band {
    height: 262px;
    overflow: hidden;
}

.answer-poster, .pass-track {
    position: absolute;
    top: 32px;
    left: 50%;
    width: 132px;
    margin-left: -66px;
}

.seen-poster { opacity: 0.55; }

.answer-mark {
    position: absolute;
    top: 13px;
    left: 50%;
    width: 176px;
    height: 240px;
    margin-left: -88px;
}

.seen-tick { stroke-dasharray: 440; }

.pass-track {
    display: grid;
    gap: 24px;
    transform: translateY(-116px);
}

.answer h3 {
    font: 400 30px / 1 var(--marker-font);
    transform-origin: left center;
}

.want-title {
    color: var(--marker);
    transform: rotate(-2deg);
}

.seen-title { transform: rotate(1.5deg); }
.pass-title { transform: rotate(-1deg); }

.answer p {
    max-width: 34ch;
    color: var(--quiet);
    font-size: 16px;
    line-height: 1.5;
}

.ratings { gap: clamp(24px, 3vw, 36px); }

.rating-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 460px;
}

.rating-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.rating-label label {
    font-size: 17px;
    font-weight: 700;
}

#rating-value {
    font-size: 64px;
    font-stretch: 62%;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 0.8;
}

#rmg-bar {
    width: 100%;
    height: 44px;
    margin: 0;
    accent-color: var(--marker);
}

#rmg-bar:enabled { cursor: pointer; }

#rating-count {
    color: var(--marker);
    font: 400 22px / 1.2 var(--marker-font);
}

.rated-films {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(104px, 100%), 1fr));
    gap: 22px 10px;
    padding: 30px 14px;
}

.rated-film {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rated-film .poster { background: none; }

.rated-film .poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--poster-color, var(--sleeve));
}

.poster-fallback {
    position: absolute;
    inset: auto 0 0;
    min-height: 20%;
    display: grid;
    align-items: center;
    padding-block: 3px;
    padding-inline: 6px;
    overflow-wrap: anywhere;
    background: var(--base);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.05;
}

.rated-film .poster-image {
    position: absolute;
    inset: 0;
}

.rated-film.below-bar .poster::before,
.rated-film.below-bar .poster-image {
    filter: brightness(0.35);
}

.rating-cross {
    position: absolute;
    top: 20%;
    left: 8%;
    width: 84%;
    height: 60%;
}

.rated-film:not(.below-bar) :is(.rating-cross, .below-bar-label) { display: none; }

.rating-caption {
    color: var(--text);
    font: 500 10px var(--mono-font);
    letter-spacing: 0.1em;
}

.below-bar .rating-caption { color: var(--muted); }

.ratings > p {
    max-width: 68ch;
    line-height: 1.55;
}

.together {
    margin-top: var(--section-space);
    background: var(--sleeve);
}

.together-inner {
    display: flex;
    flex-wrap: wrap-reverse;
    align-items: center;
    gap: 48px clamp(32px, 7vw, 104px);
    padding-block: clamp(64px, 9vw, 120px);
}

.match-preview, .together-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.match-preview {
    flex: 0 1 320px;
    align-items: center;
    gap: 22px;
    margin-inline: auto;
}

.match-frame {
    position: relative;
    width: 250px;
    max-width: 78%;
}

.match-frame .poster { border-radius: 3px; }

.match-rings {
    position: absolute;
    top: -5%;
    left: -9%;
    width: 118%;
    height: 110%;
    pointer-events: none;
}

.match-blue, .match-pink { transform-origin: 181px 258px; }
.match-blue { transform: rotate(-3deg) scale(0.97); }
.match-pink { transform: rotate(2.5deg) scale(1.02); }

.match-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 40px;
    margin-left: -66px;
    border-radius: 20px;
    background: var(--marker);
    color: var(--base);
    font-size: 15px;
    font-weight: 800;
}

.match-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--quiet);
    font-size: 14px;
    font-weight: 600;
}

.match-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.match-legend span::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--legend);
}

.legend-blue { --legend: var(--blue); }
.legend-pink { --legend: var(--pink); }
.legend-yellow { --legend: var(--marker); }

.together-copy {
    flex: 1 1 min(460px, 100%);
    gap: 24px;
}

.together-copy .section-title { max-width: 7.6em; }

.together-copy p {
    max-width: 46ch;
    color: var(--quiet);
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.5;
}

.together-copy ol {
    max-width: 52ch;
    margin: 0;
    padding: 0;
    list-style: none;
}

.together-copy li {
    display: flex;
    gap: 16px;
    padding-block: 14px;
    border-top: 1px solid var(--stroke);
    color: var(--quiet);
    font-size: 16px;
    line-height: 1.5;
}

.together-copy li:last-child { border-bottom: 1px solid var(--stroke); }

.together-copy li > span {
    flex: 0 0 18px;
    color: var(--marker);
    font-weight: 800;
}

.together-copy strong { color: var(--text); }

.small-film {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.small-track {
    position: absolute;
    top: 24px;
    left: 0;
    display: flex;
    gap: 8px;
    width: max-content;
}

.small-track .poster { width: 64px; }

.faq {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 28px clamp(32px, 6vw, 88px);
    padding-block: clamp(40px, 6vw, 80px) var(--section-space);
}

.faq .section-title {
    flex: 1 1 min(300px, 100%);
    max-width: 5em;
}

.faq-questions {
    flex: 2 1 min(520px, 100%);
    min-width: 0;
    border-top: 2px solid var(--text);
}

.faq details { border-bottom: 1px solid var(--stroke); }

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    font-size: 19px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font: inherit; }
.faq summary svg { flex-shrink: 0; }
.faq details[open] summary svg { transform: rotate(45deg); }

.faq details p {
    max-width: 62ch;
    padding-bottom: 22px;
    color: var(--quiet);
    font-size: 16px;
    line-height: 1.55;
}

.final-cta {
    background: var(--marker);
    color: var(--base);
}

.final-cta :focus-visible { outline-color: var(--base); }

.final-inner {
    gap: 28px 48px;
    padding-block: clamp(56px, 8vw, 112px);
}

.final-inner .store-actions { padding-bottom: clamp(0px, 1vw, 14px); }

.final-inner .store-button {
    border: 2px solid var(--base);
    background: transparent;
    color: var(--base);
}

.final-inner .store-button-primary {
    background: var(--base);
    color: var(--text);
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px 48px;
    padding-block: 32px 48px;
}

.footer-credit {
    display: flex;
    flex: 1 1 min(420px, 100%);
    flex-direction: column;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.footer-brand {
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
}

.attribution {
    display: flex;
    align-items: center;
    gap: 12px;
}

.attribution p { max-width: 60ch; }

.attribution img {
    flex-shrink: 0;
    object-fit: contain;
}

.legal-nav {
    align-items: flex-start;
    gap: 4px 24px;
}

.legal-page {
    max-width: 78ch;
    padding-block: clamp(48px, 8vw, 100px);
    color: var(--quiet);
    font-size: 17px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.legal-page h1 {
    margin-bottom: 0.3em;
    color: var(--text);
    font-size: clamp(48px, 7.4vw, 80px);
    line-height: 0.9;
}

.legal-page h1 + p {
    color: var(--muted);
    font-size: 15px;
}

.legal-page h2, .legal-page h3 {
    margin-block: 1.5em 0.4em;
    color: var(--text);
    line-height: 1.15;
}

.legal-page ul {
    margin-block: 0;
    padding-inline-start: 1.5em;
}

.legal-page p + p, .legal-page p + ul, .legal-page ul + p { margin-top: 1em; }
.legal-page li + li { margin-top: 0.5em; }
.legal-page strong { color: var(--text); }
.legal-page a { text-underline-offset: 0.15em; }

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.94em;
    line-height: 1.5;
}

.legal-page th, .legal-page td {
    padding: clamp(8px, 2vw, 12px);
    border: 1px solid var(--stroke);
    text-align: start;
    vertical-align: top;
}

.legal-page th {
    background: var(--sleeve);
    color: var(--text);
}

.legal-page th:first-child { width: 34%; }

@media (max-width: 629px) {
    .hero-title-line { display: block; }
    .store-actions { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 374px) {
    .hero .display-title { font-size: clamp(56px, 18vw, 72px); }
    .tonight { font-size: 28px; }
}

@media (min-width: 360px) and (max-width: 400px) {
    .rated-films { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The base styles are the complete still. The script opts into motion together. */
@media (prefers-reduced-motion: no-preference) {
    .motion-enabled .hero-track { animation: rmg-deal 20.8s infinite; }
    .motion-enabled .hero-catch { animation: rmg-catch 2.6s ease-out infinite; }
    .motion-enabled .name-track { animation: rmg-name 20.8s infinite; }
    .motion-enabled .want-ring { animation: rmg-draw 4.2s ease-out infinite both; }
    .motion-enabled .seen-tick { animation: rmg-tick 4.2s ease-out 1.4s infinite both; }
    .motion-enabled .pass-track { animation: rmg-pass 4.2s ease-in-out 2.8s infinite both; }
    .motion-enabled .match-blue { animation: rmg-draw 7s ease-out infinite both; }
    .motion-enabled .match-pink { animation: rmg-draw 7s ease-out 0.5s infinite both; }
    .motion-enabled .match-yellow { animation: rmg-draw 7s ease-out 1s infinite both; }
    .motion-enabled .match-label { animation: rmg-pop 7s ease-out 1s infinite both; }
    .motion-enabled .small-track { animation: rmg-roll 60s linear infinite; }
    .motion-enabled.motion-paused .motion { animation-play-state: paused; }
    .motion-enabled:not(.motion-paused) .rated-film .poster::before,
    .motion-enabled:not(.motion-paused) .rated-film .poster-image {
        transition: filter 0.25s;
    }
    .motion-enabled:not(.motion-paused) .faq summary svg { transition: transform 0.25s; }
}

@media (prefers-reduced-motion: reduce) {
    .pause-button { display: none; }
}

@keyframes rmg-deal {
    0%, 9.1% { transform: translateX(0); }
    12.5%, 21.6% { transform: translateX(-192px); }
    25%, 34.1% { transform: translateX(-384px); }
    37.5%, 46.6% { transform: translateX(-576px); }
    50%, 59.1% { transform: translateX(-768px); }
    62.5%, 71.6% { transform: translateX(-960px); }
    75%, 84.1% { transform: translateX(-1152px); }
    87.5%, 96.6% { transform: translateX(-1344px); }
    100% { transform: translateX(-1536px); }
}

@keyframes rmg-name {
    0%, 9.1% { transform: translateY(0); }
    12.5%, 21.6% { transform: translateY(-44px); }
    25%, 34.1% { transform: translateY(-88px); }
    37.5%, 46.6% { transform: translateY(-132px); }
    50%, 59.1% { transform: translateY(-176px); }
    62.5%, 71.6% { transform: translateY(-220px); }
    75%, 84.1% { transform: translateY(-264px); }
    87.5%, 96.6% { transform: translateY(-308px); }
    100% { transform: translateY(-352px); }
}

@keyframes rmg-catch {
    0% { stroke-dashoffset: 1800; opacity: 1; }
    24% { stroke-dashoffset: 0; opacity: 1; }
    64% { stroke-dashoffset: 0; opacity: 1; }
    72% { stroke-dashoffset: 0; opacity: 0; }
    100% { stroke-dashoffset: 1800; opacity: 0; }
}

@keyframes rmg-roll {
    from { transform: translateX(-1152px); }
    to { transform: translateX(0); }
}

@keyframes rmg-draw {
    0% { stroke-dashoffset: 1800; opacity: 1; }
    30% { stroke-dashoffset: 0; opacity: 1; }
    86% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes rmg-tick {
    0%, 12% { stroke-dashoffset: 440; opacity: 1; }
    32% { stroke-dashoffset: 0; opacity: 1; }
    86% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes rmg-pass {
    0% { transform: translateY(0); opacity: 0; }
    8% { transform: translateY(0); opacity: 1; }
    30% { transform: translateY(0); }
    56% { transform: translateY(-222px); }
    88% { transform: translateY(-222px); opacity: 1; }
    100% { transform: translateY(-222px); opacity: 0; }
}

@keyframes rmg-pop {
    0%, 34% { opacity: 0; transform: scale(0.9); }
    42%, 86% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1); }
}
