Streaming — Poster Card
A reusable cinematic poster and landscape card for streaming UIs. Each tile shows quality-badged artwork that expands on hover into a rich preview popover with title, match score, rating, runtime, genre chips, and quick play, add-to-list, like, and mute controls. Continue-watching variants surface an inline progress bar, while trending tiles add rank markers. Ships as a horizontal-scroll row plus a responsive catalogue grid, fully keyboard and touch friendly with toast feedback.
MCP
Code
:root {
--bg: #0b0b0f;
--surface: #15151c;
--surface-2: #1e1e27;
--ink: #f4f4f7;
--ink-2: #b6b7c3;
--muted: #83859a;
--brand: #e50914;
--accent: #ffffff;
--line: rgba(255, 255, 255, 0.1);
--line-2: rgba(255, 255, 255, 0.16);
--good: #46d369;
--r-sm: 8px;
--r-md: 12px;
--r-lg: 18px;
--shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
--glow: 0 0 0 1px var(--line-2), 0 20px 50px rgba(0, 0, 0, 0.65);
}
* {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: "Inter", system-ui, -apple-system, sans-serif;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
}
img {
max-width: 100%;
display: block;
}
svg {
width: 22px;
height: 22px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.skip {
position: absolute;
left: -999px;
top: 0;
background: var(--ink);
color: var(--bg);
padding: 8px 14px;
border-radius: 0 0 var(--r-sm) 0;
z-index: 100;
font-weight: 700;
}
.skip:focus {
left: 0;
}
/* ---------- Top bar ---------- */
.topbar {
position: sticky;
top: 0;
z-index: 50;
transition: background 0.3s ease;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}
.topbar.is-stuck {
background: rgba(8, 8, 12, 0.92);
backdrop-filter: blur(12px);
border-bottom: 1px solid var(--line);
}
.topbar__inner {
max-width: 1320px;
margin: 0 auto;
display: flex;
align-items: center;
gap: 28px;
padding: 16px 28px;
}
.brand {
display: flex;
align-items: center;
gap: 9px;
}
.brand__mark {
width: 14px;
height: 22px;
border-radius: 3px;
background: linear-gradient(180deg, var(--brand), #8b0008);
box-shadow: 0 0 14px rgba(229, 9, 20, 0.7);
}
.brand__name {
font-weight: 800;
letter-spacing: 0.22em;
font-size: 18px;
}
.nav {
display: flex;
gap: 22px;
margin-right: auto;
}
.nav__link {
color: var(--ink-2);
text-decoration: none;
font-size: 14px;
font-weight: 500;
transition: color 0.2s;
}
.nav__link:hover,
.nav__link:focus-visible {
color: var(--ink);
}
.nav__link.is-active {
color: var(--ink);
font-weight: 700;
}
.topbar__right {
display: flex;
align-items: center;
gap: 14px;
}
.icon-btn {
background: none;
border: 0;
color: var(--ink-2);
cursor: pointer;
padding: 6px;
border-radius: var(--r-sm);
display: grid;
place-items: center;
}
.icon-btn:hover {
color: var(--ink);
}
.avatar {
width: 32px;
height: 32px;
border-radius: var(--r-sm);
background: linear-gradient(135deg, #4338ca, #db2777);
display: grid;
place-items: center;
font-weight: 700;
font-size: 14px;
}
/* ---------- Hero ---------- */
.hero {
position: relative;
min-height: clamp(420px, 62vh, 620px);
display: flex;
align-items: flex-end;
margin-top: -76px;
padding: 0 28px 48px;
}
.hero__art {
position: absolute;
inset: 0;
background:
radial-gradient(120% 90% at 80% 20%, rgba(124, 58, 237, 0.5), transparent 60%),
radial-gradient(100% 120% at 15% 90%, rgba(229, 9, 20, 0.45), transparent 55%),
linear-gradient(120deg, #1a1530, #0c0c14 70%);
}
.hero__art::after {
content: "";
position: absolute;
inset: 0;
background-image:
repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 9px);
opacity: 0.5;
}
.hero__scrim {
position: absolute;
inset: 0;
background: linear-gradient(90deg, rgba(11, 11, 15, 0.92) 0 30%, transparent 70%),
linear-gradient(0deg, var(--bg) 2%, transparent 45%);
}
.hero__body {
position: relative;
max-width: 1320px;
width: 100%;
margin: 0 auto;
max-inline-size: 560px;
margin-inline-start: max(0px, calc((100% - 1320px) / 2));
}
.hero__eyebrow {
margin: 0 0 8px;
letter-spacing: 0.24em;
font-size: 12px;
font-weight: 700;
color: var(--brand);
text-transform: uppercase;
}
.hero__title {
margin: 0 0 14px;
font-size: clamp(34px, 6vw, 64px);
line-height: 1.02;
font-weight: 800;
letter-spacing: -0.02em;
}
.hero__meta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
margin-bottom: 16px;
}
.dot {
font-size: 13px;
color: var(--ink-2);
font-weight: 600;
}
.dot:first-of-type {
color: var(--good);
}
.hero__desc {
margin: 0 0 22px;
color: var(--ink-2);
font-size: 16px;
max-width: 48ch;
}
.hero__actions {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.btn {
display: inline-flex;
align-items: center;
gap: 9px;
border: 0;
cursor: pointer;
font-family: inherit;
font-weight: 700;
font-size: 15px;
padding: 12px 22px;
border-radius: var(--r-sm);
transition: transform 0.12s, background 0.2s, opacity 0.2s;
}
.btn svg {
width: 18px;
height: 18px;
}
.btn:active {
transform: scale(0.96);
}
.btn--play {
background: var(--accent);
color: #111;
}
.btn--play svg {
fill: #111;
stroke: none;
}
.btn--play:hover {
background: #dcdce4;
}
.btn--ghost {
background: rgba(110, 110, 130, 0.4);
color: var(--ink);
backdrop-filter: blur(6px);
}
.btn--ghost:hover {
background: rgba(110, 110, 130, 0.6);
}
.badge {
font-size: 11px;
font-weight: 800;
letter-spacing: 0.05em;
padding: 2px 7px;
border-radius: 5px;
line-height: 1.4;
}
.badge--quality {
background: linear-gradient(180deg, #f5d142, #d6a700);
color: #1a1400;
}
.badge--rating {
border: 1px solid var(--line-2);
color: var(--ink-2);
}
/* ---------- Rows ---------- */
.row,
.grid-section {
max-width: 1320px;
margin: 0 auto;
padding: 0 28px;
}
.row {
margin-bottom: 38px;
}
.row__head {
display: flex;
align-items: center;
gap: 12px;
margin: 0 0 14px;
}
.row__title {
font-size: clamp(17px, 2.2vw, 22px);
font-weight: 700;
margin: 0;
}
.row__nav {
margin-left: auto;
background: rgba(255, 255, 255, 0.06);
border: 1px solid var(--line);
color: var(--ink);
width: 34px;
height: 34px;
border-radius: 50%;
cursor: pointer;
font-size: 20px;
line-height: 1;
transition: background 0.2s, transform 0.12s;
}
.row__nav:hover {
background: rgba(255, 255, 255, 0.14);
}
.row__nav:active {
transform: scale(0.92);
}
.grid-count {
margin-left: auto;
color: var(--muted);
font-size: 13px;
font-weight: 600;
}
.track {
list-style: none;
margin: 0;
padding: 36px 0;
display: flex;
gap: 12px;
overflow-x: auto;
scroll-behavior: smooth;
scroll-snap-type: x proximity;
scrollbar-width: none;
}
.track::-webkit-scrollbar {
display: none;
}
.track .card {
flex: 0 0 auto;
width: clamp(180px, 24vw, 240px);
scroll-snap-align: start;
}
/* ---------- Grid ---------- */
.grid {
list-style: none;
margin: 0;
padding: 36px 0 8px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 12px;
}
/* ---------- Poster card ---------- */
.card {
position: relative;
cursor: pointer;
outline: none;
transition: z-index 0s 0.15s;
}
.card__poster {
position: relative;
aspect-ratio: 16 / 9;
border-radius: var(--r-md);
overflow: hidden;
border: 1px solid var(--line);
transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card__art {
position: absolute;
inset: 0;
}
.card__art::after {
content: attr(data-label);
position: absolute;
left: 12px;
bottom: 10px;
right: 12px;
font-weight: 800;
font-size: clamp(13px, 2vw, 17px);
letter-spacing: -0.01em;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
line-height: 1.1;
}
.card__badge {
position: absolute;
top: 8px;
right: 8px;
font-size: 10px;
font-weight: 800;
padding: 2px 6px;
border-radius: 5px;
background: rgba(0, 0, 0, 0.6);
border: 1px solid var(--line-2);
letter-spacing: 0.04em;
backdrop-filter: blur(4px);
}
.card__badge[data-quality="4K"] {
background: linear-gradient(180deg, #f5d142, #d6a700);
color: #1a1400;
border-color: transparent;
}
.card__rank {
position: absolute;
left: 6px;
top: 6px;
font-size: 11px;
font-weight: 800;
color: var(--brand);
background: rgba(0, 0, 0, 0.55);
padding: 1px 7px;
border-radius: 999px;
}
/* hover preview popover */
.card__preview {
position: absolute;
top: -22%;
left: -8%;
width: 116%;
opacity: 0;
visibility: hidden;
transform: translateY(8px) scale(0.96);
transform-origin: center bottom;
background: var(--surface);
border-radius: var(--r-md);
box-shadow: var(--shadow);
border: 1px solid var(--line);
overflow: hidden;
transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0.18s;
z-index: 5;
pointer-events: none;
}
.card__preview-art {
position: relative;
aspect-ratio: 16 / 9;
background: inherit;
}
.card__mute {
position: absolute;
bottom: 10px;
right: 10px;
width: 30px;
height: 30px;
border-radius: 50%;
border: 1px solid var(--line-2);
background: rgba(0, 0, 0, 0.5);
color: var(--ink);
cursor: pointer;
display: grid;
place-items: center;
z-index: 2;
}
.card__mute svg {
width: 16px;
height: 16px;
}
.card__mute:hover {
border-color: var(--ink);
}
.card__progress {
height: 4px;
background: rgba(255, 255, 255, 0.22);
}
.card__progress-bar {
display: block;
height: 100%;
background: var(--brand);
width: 0;
}
.card__info {
padding: 14px 14px 16px;
}
.card__controls {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
}
.round {
width: 36px;
height: 36px;
border-radius: 50%;
border: 1.5px solid var(--line-2);
background: rgba(255, 255, 255, 0.05);
color: var(--ink);
cursor: pointer;
display: grid;
place-items: center;
transition: border-color 0.2s, background 0.2s, transform 0.12s;
}
.round svg {
width: 18px;
height: 18px;
}
.round:hover {
border-color: var(--ink);
background: rgba(255, 255, 255, 0.12);
}
.round:active {
transform: scale(0.9);
}
.round--play {
background: var(--accent);
border-color: var(--accent);
color: #111;
}
.round--play svg {
fill: #111;
stroke: none;
}
.round--play:hover {
background: #dcdce4;
}
.round.is-on {
background: rgba(70, 211, 105, 0.18);
border-color: var(--good);
color: var(--good);
}
.card__title {
margin: 0 0 6px;
font-size: 15px;
font-weight: 700;
}
.card__meta {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--ink-2);
font-weight: 600;
margin-bottom: 8px;
}
.card__match {
color: var(--good);
font-weight: 700;
}
.card__age {
border: 1px solid var(--line-2);
border-radius: 4px;
padding: 0 5px;
color: var(--muted);
}
.card__genres {
display: flex;
flex-wrap: wrap;
gap: 6px 10px;
font-size: 12px;
color: var(--ink-2);
}
.card__genres span {
position: relative;
}
.card__genres span:not(:last-child)::after {
content: "•";
position: absolute;
right: -8px;
color: var(--muted);
}
/* hover / focus reveal */
@media (hover: hover) {
.card:hover,
.card:focus-within {
z-index: 20;
transition: z-index 0s;
}
.card:hover .card__poster,
.card:focus-within .card__poster {
transform: scale(1.04);
box-shadow: var(--glow);
}
.card:hover .card__preview,
.card:focus-within .card__preview {
opacity: 1;
visibility: visible;
transform: translateY(0) scale(1);
pointer-events: auto;
transition: opacity 0.22s ease 0.25s, transform 0.22s ease 0.25s,
visibility 0s;
}
}
.card.is-open {
z-index: 20;
}
.card.is-open .card__preview {
opacity: 1;
visibility: visible;
transform: translateY(0) scale(1);
pointer-events: auto;
transition: opacity 0.2s ease, transform 0.2s ease;
}
/* ---------- Toast ---------- */
.toast {
position: fixed;
left: 50%;
bottom: 28px;
transform: translate(-50%, 24px);
background: var(--surface-2);
color: var(--ink);
border: 1px solid var(--line-2);
padding: 12px 20px;
border-radius: 999px;
font-size: 14px;
font-weight: 600;
box-shadow: var(--shadow);
opacity: 0;
pointer-events: none;
transition: opacity 0.25s, transform 0.25s;
z-index: 80;
max-width: 90vw;
}
.toast.is-show {
opacity: 1;
transform: translate(-50%, 0);
}
/* ---------- Responsive ---------- */
@media (max-width: 760px) {
.nav {
display: none;
}
}
@media (max-width: 520px) {
.topbar__inner,
.hero,
.row,
.grid-section {
padding-left: 16px;
padding-right: 16px;
}
.hero {
padding-bottom: 32px;
}
.track .card {
width: 70vw;
}
.grid {
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
/* on small screens the popover would overflow — keep it tidy */
.card__preview {
left: 0;
width: 100%;
top: -14%;
}
.card__info {
padding: 12px;
}
}
@media (prefers-reduced-motion: reduce) {
* {
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}(function () {
"use strict";
/* ---------- Toast helper ---------- */
var toastEl = document.getElementById("toast");
var toastTimer;
function toast(msg) {
if (!toastEl) return;
toastEl.textContent = msg;
toastEl.classList.add("is-show");
clearTimeout(toastTimer);
toastTimer = setTimeout(function () {
toastEl.classList.remove("is-show");
}, 2200);
}
/* ---------- Fictional catalogue data ---------- */
var GRAD = [
"linear-gradient(150deg,#3b1d6e,#0d0b1f)",
"linear-gradient(150deg,#7a1320,#180a0c)",
"linear-gradient(150deg,#0d3b4f,#06121a)",
"linear-gradient(150deg,#5a3a12,#1a1206)",
"linear-gradient(150deg,#1f4d2e,#08130c)",
"linear-gradient(150deg,#43215c,#120a1c)",
"linear-gradient(150deg,#0e2a5e,#070d1d)",
"linear-gradient(150deg,#5e1245,#1a0814)",
];
function grad(i) {
return GRAD[i % GRAD.length];
}
var titles = [
{ t: "Nightfall Protocol", q: "4K", match: 98, age: "16", dur: "52m", g: ["Thriller", "Sci-Fi"], kind: "series" },
{ t: "Gilded Coast", q: "HD", match: 91, age: "13", dur: "1h 48m", g: ["Drama", "Romance"], kind: "movie" },
{ t: "The Quiet Mile", q: "4K", match: 87, age: "16", dur: "2h 06m", g: ["Crime", "Mystery"], kind: "movie" },
{ t: "Static Bloom", q: "HD", match: 94, age: "13", dur: "44m", g: ["Sci-Fi", "Drama"], kind: "series" },
{ t: "Harbour Lights", q: "HD", match: 82, age: "PG", dur: "1h 39m", g: ["Family", "Comedy"], kind: "movie" },
{ t: "Cold Aperture", q: "4K", match: 96, age: "18", dur: "58m", g: ["Thriller"], kind: "series" },
{ t: "Marrow & Bone", q: "HD", match: 79, age: "18", dur: "1h 52m", g: ["Horror"], kind: "movie" },
{ t: "Paper Empires", q: "4K", match: 90, age: "13", dur: "49m", g: ["History", "Drama"], kind: "series" },
{ t: "Velvet Circuit", q: "HD", match: 88, age: "13", dur: "1h 41m", g: ["Romance", "Comedy"], kind: "movie" },
{ t: "Drift Season", q: "4K", match: 93, age: "16", dur: "47m", g: ["Action", "Drama"], kind: "series" },
{ t: "The Salt Road", q: "HD", match: 85, age: "13", dur: "2h 11m", g: ["Adventure"], kind: "movie" },
{ t: "Lantern Bureau", q: "4K", match: 97, age: "16", dur: "55m", g: ["Mystery", "Crime"], kind: "series" },
{ t: "Glass Orchards", q: "HD", match: 80, age: "PG", dur: "1h 33m", g: ["Family"], kind: "movie" },
{ t: "Undertow", q: "4K", match: 92, age: "18", dur: "51m", g: ["Thriller", "Crime"], kind: "series" },
{ t: "Northwind", q: "HD", match: 84, age: "13", dur: "1h 57m", g: ["Western", "Drama"], kind: "movie" },
{ t: "Echo Chamber", q: "4K", match: 89, age: "16", dur: "46m", g: ["Sci-Fi"], kind: "series" },
];
var continueData = [
{ t: "Nightfall Protocol", q: "4K", match: 98, age: "16", dur: "S2:E4", g: ["Thriller", "Sci-Fi"], kind: "continue", progress: 68 },
{ t: "Cold Aperture", q: "4K", match: 96, age: "18", dur: "S1:E2", g: ["Thriller"], kind: "continue", progress: 31 },
{ t: "Paper Empires", q: "4K", match: 90, age: "13", dur: "S3:E9", g: ["History", "Drama"], kind: "continue", progress: 84 },
{ t: "The Quiet Mile", q: "4K", match: 87, age: "16", dur: "1h 12m left", g: ["Crime"], kind: "continue", progress: 42 },
{ t: "Lantern Bureau", q: "4K", match: 97, age: "16", dur: "S2:E1", g: ["Mystery"], kind: "continue", progress: 12 },
{ t: "Drift Season", q: "4K", match: 93, age: "16", dur: "S1:E6", g: ["Action"], kind: "continue", progress: 57 },
];
var tpl = document.getElementById("card-tpl");
/* ---------- Build one card ---------- */
function buildCard(data, idx, opts) {
opts = opts || {};
var node = tpl.content.firstElementChild.cloneNode(true);
node.setAttribute(
"aria-label",
data.t + ", " + (opts.rank ? "rank " + opts.rank + ", " : "") + data.match + " percent match"
);
var art = node.querySelector("[data-art]");
art.style.background = grad(idx);
art.setAttribute("data-label", data.t);
var pArt = node.querySelector("[data-preview-art]");
pArt.style.background = grad(idx);
var q = node.querySelector("[data-quality]");
q.textContent = data.q;
q.setAttribute("data-quality", data.q);
if (opts.rank) {
var rk = node.querySelector("[data-rank]");
rk.textContent = "#" + opts.rank;
rk.hidden = false;
}
node.querySelector("[data-title]").textContent = data.t;
node.querySelector("[data-match]").textContent = data.match + "% Match";
node.querySelector("[data-age]").textContent = data.age;
node.querySelector("[data-duration]").textContent = data.dur;
var genres = node.querySelector("[data-genres]");
data.g.forEach(function (g) {
var s = document.createElement("span");
s.textContent = g;
genres.appendChild(s);
});
if (typeof data.progress === "number") {
var prog = node.querySelector("[data-progress]");
prog.hidden = false;
node.querySelector("[data-progress-bar]").style.width = data.progress + "%";
}
/* --- interactions --- */
var play = node.querySelector("[data-play]");
play.addEventListener("click", function (e) {
e.stopPropagation();
toast("Playing — " + data.t);
});
var add = node.querySelector("[data-add]");
var addOn = false;
add.addEventListener("click", function (e) {
e.stopPropagation();
addOn = !addOn;
add.classList.toggle("is-on", addOn);
add.querySelector(".ic-add").hidden = addOn;
add.querySelector(".ic-check").hidden = !addOn;
add.setAttribute("aria-label", addOn ? "Remove from My List" : "Add to My List");
add.setAttribute("aria-pressed", String(addOn));
toast(addOn ? "Added " + data.t + " to My List" : "Removed " + data.t + " from My List");
});
var like = node.querySelector("[data-like]");
var likeOn = false;
like.addEventListener("click", function (e) {
e.stopPropagation();
likeOn = !likeOn;
like.classList.toggle("is-on", likeOn);
like.setAttribute("aria-pressed", String(likeOn));
if (likeOn) toast("You liked " + data.t);
});
var mute = node.querySelector("[data-mute]");
var muted = true;
mute.addEventListener("click", function (e) {
e.stopPropagation();
muted = !muted;
mute.querySelector(".ic-muted").hidden = !muted;
mute.querySelector(".ic-sound").hidden = muted;
mute.setAttribute("aria-label", muted ? "Unmute preview" : "Mute preview");
toast(data.t + (muted ? " — muted" : " — sound on"));
});
/* card click opens detail; touch devices toggle the preview */
node.addEventListener("click", function () {
toast("Opening details — " + data.t);
});
/* keyboard: Enter/Space activate, Escape closes touch-open preview */
node.addEventListener("keydown", function (e) {
if (e.key === "Enter" || e.key === " ") {
if (e.target === node) {
e.preventDefault();
toast("Opening details — " + data.t);
}
} else if (e.key === "Escape") {
node.classList.remove("is-open");
}
});
return node;
}
/* ---------- Populate tracks ---------- */
var tracks = document.querySelectorAll("[data-track]");
if (tracks[0]) {
continueData.forEach(function (d, i) {
tracks[0].appendChild(buildCard(d, i + 1, {}));
});
}
if (tracks[1]) {
titles.slice(0, 10).forEach(function (d, i) {
tracks[1].appendChild(buildCard(d, i, { rank: i + 1 }));
});
}
/* ---------- Populate grid ---------- */
var grid = document.querySelector("[data-grid]");
if (grid) {
titles.forEach(function (d, i) {
grid.appendChild(buildCard(d, i, {}));
});
var count = document.querySelector("[data-grid-count]");
if (count) count.textContent = titles.length + " titles";
}
/* ---------- Row scroll buttons ---------- */
document.querySelectorAll("[data-scroll]").forEach(function (btn) {
btn.addEventListener("click", function () {
var track = btn.closest(".row").querySelector("[data-track]");
if (track) track.scrollBy({ left: track.clientWidth * 0.8, behavior: "smooth" });
});
});
/* ---------- Sticky topbar shade ---------- */
var topbar = document.getElementById("topbar");
function onScroll() {
topbar.classList.toggle("is-stuck", window.scrollY > 40);
}
window.addEventListener("scroll", onScroll, { passive: true });
onScroll();
/* ---------- Touch: tap toggles preview (no hover) ---------- */
if (window.matchMedia("(hover: none)").matches) {
document.addEventListener("click", function (e) {
var card = e.target.closest(".card");
document.querySelectorAll(".card.is-open").forEach(function (c) {
if (c !== card) c.classList.remove("is-open");
});
if (card && !e.target.closest("button")) {
card.classList.toggle("is-open");
}
});
}
/* ---------- Hero actions ---------- */
document.querySelectorAll("[data-toast]").forEach(function (b) {
b.addEventListener("click", function () {
toast(b.getAttribute("data-toast"));
});
});
})();<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Streaming — Poster Card</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<a class="skip" href="#main">Skip to content</a>
<header class="topbar" id="topbar">
<div class="topbar__inner">
<div class="brand" aria-label="Lumière">
<span class="brand__mark" aria-hidden="true"></span>
<span class="brand__name">LUMIÈRE</span>
</div>
<nav class="nav" aria-label="Primary">
<a href="#" class="nav__link is-active">Home</a>
<a href="#" class="nav__link">Series</a>
<a href="#" class="nav__link">Films</a>
<a href="#" class="nav__link">My List</a>
</nav>
<div class="topbar__right">
<button class="icon-btn" type="button" aria-label="Search">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.5" y2="16.5"/></svg>
</button>
<div class="avatar" role="img" aria-label="Profile: Mara">M</div>
</div>
</div>
</header>
<main id="main">
<section class="hero" aria-label="Featured: Nightfall Protocol">
<div class="hero__art" aria-hidden="true"></div>
<div class="hero__scrim" aria-hidden="true"></div>
<div class="hero__body">
<p class="hero__eyebrow">Lumière Original Series</p>
<h1 class="hero__title">Nightfall Protocol</h1>
<div class="hero__meta">
<span class="badge badge--quality">4K</span>
<span class="badge badge--rating">TV-MA</span>
<span class="dot">98% Match</span>
<span class="dot">2025</span>
<span class="dot">Season 2</span>
</div>
<p class="hero__desc">
A burned-out cryptographer is pulled back into the field when a dormant
satellite begins broadcasting her own forgotten code.
</p>
<div class="hero__actions">
<button class="btn btn--play" type="button" data-toast="Playing — Nightfall Protocol">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5v14l11-7z"/></svg>
Play
</button>
<button class="btn btn--ghost" type="button" data-toast="Added Nightfall Protocol to My List">
<svg viewBox="0 0 24 24" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
My List
</button>
</div>
</div>
</section>
<section class="row" aria-labelledby="row-continue">
<div class="row__head">
<h2 class="row__title" id="row-continue">Continue Watching for Mara</h2>
<button class="row__nav" type="button" data-scroll="next" aria-label="Scroll Continue Watching forward">›</button>
</div>
<ul class="track" data-track aria-label="Continue watching titles"></ul>
</section>
<section class="row" aria-labelledby="row-trending">
<div class="row__head">
<h2 class="row__title" id="row-trending">Trending Now</h2>
<button class="row__nav" type="button" data-scroll="next" aria-label="Scroll Trending forward">›</button>
</div>
<ul class="track" data-track aria-label="Trending titles"></ul>
</section>
<section class="grid-section" aria-labelledby="grid-head">
<div class="row__head">
<h2 class="row__title" id="grid-head">Browse the Catalogue</h2>
<span class="grid-count" data-grid-count>0 titles</span>
</div>
<ul class="grid" data-grid aria-label="Catalogue grid"></ul>
</section>
</main>
<div class="toast" id="toast" role="status" aria-live="polite"></div>
<!-- Poster card template -->
<template id="card-tpl">
<li class="card" tabindex="0" role="group">
<div class="card__poster">
<div class="card__art" data-art></div>
<span class="card__badge" data-quality>HD</span>
<span class="card__rank" data-rank hidden></span>
</div>
<div class="card__preview" aria-hidden="true">
<div class="card__preview-art" data-preview-art>
<button class="card__mute" type="button" data-mute aria-label="Unmute preview">
<svg class="ic-muted" viewBox="0 0 24 24" aria-hidden="true"><path d="M11 5 6 9H2v6h4l5 4z"/><line x1="22" y1="9" x2="16" y2="15"/><line x1="16" y1="9" x2="22" y2="15"/></svg>
<svg class="ic-sound" viewBox="0 0 24 24" aria-hidden="true" hidden><path d="M11 5 6 9H2v6h4l5 4z"/><path d="M15.5 8.5a5 5 0 0 1 0 7"/><path d="M18.5 5.5a9 9 0 0 1 0 13"/></svg>
</button>
</div>
<div class="card__progress" data-progress hidden>
<span class="card__progress-bar" data-progress-bar></span>
</div>
<div class="card__info">
<div class="card__controls">
<button class="round round--play" type="button" data-play aria-label="Play">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5v14l11-7z"/></svg>
</button>
<button class="round" type="button" data-add aria-label="Add to My List">
<svg class="ic-add" viewBox="0 0 24 24" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
<svg class="ic-check" viewBox="0 0 24 24" aria-hidden="true" hidden><polyline points="20 6 9 17 4 12"/></svg>
</button>
<button class="round" type="button" data-like aria-label="Like">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10v11H4V10zM7 10l4-7a2 2 0 0 1 3 2l-1 5h5a2 2 0 0 1 2 2.4l-1.5 7A2 2 0 0 1 19 22H7"/></svg>
</button>
</div>
<h3 class="card__title" data-title></h3>
<div class="card__meta">
<span class="card__match" data-match></span>
<span class="card__age" data-age></span>
<span data-duration></span>
</div>
<div class="card__genres" data-genres></div>
</div>
</div>
</li>
</template>
<script src="script.js"></script>
</body>
</html>Poster Card
A dark, cinematic poster card built for streaming catalogues. At rest each tile is a clean 16:9 landscape thumbnail with a baked-in title and a quality badge (HD or a gold 4K chip). On hover or keyboard focus the tile scales up and an oversized preview popover rises into place, carrying the artwork, a quick-action control cluster (play, add-to-list, like), the match score, age rating, runtime, and genre chips.
The card ships in three variants from a single template: a plain catalogue tile, a trending tile with a #1–#10 rank marker, and a continue-watching tile that exposes an inline red progress bar showing how far through the episode you are. They are arranged into a horizontal scroll-snap row (with a forward nav button) and an auto-filling responsive grid, so you can drop the pattern into any shelf-based layout.
Every control is interactive vanilla JS: add-to-list and like toggle their pressed state, the preview mute button swaps speaker icons, and all actions raise a lightweight toast. The top nav fades to a blurred bar on scroll, hover previews collapse gracefully to tap-to-open on touch devices, and the whole thing reflows from widescreen down to ~360px while honouring prefers-reduced-motion.
Illustrative UI only — fictional titles, not a real streaming service.