/* albi prime — streaming-service parody. Edit the tokens below to restyle the whole site. */
:root {
  color-scheme: dark;
  --bg: #0f171e;
  --nav: #00050d;
  --surface: #1a242f;
  --surface-2: #232f3c;
  --line: #2f3d4a;
  --text: #ffffff;
  --muted: #8197a4;
  --blue: #1a98ff;
  --blue-hover: #4db1ff;
  --cyan: #00a8e1;
  --radius: 6px;
  --gutter: clamp(16px, 3.6vw, 56px);
  font-family: "Amazon Ember", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input { touch-action: manipulation; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { display: block; }

.skip { position: absolute; top: -80px; left: 16px; z-index: 100; background: #fff; color: #000; padding: 12px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

/* ---------- Top nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: 0 var(--gutter);
  background: linear-gradient(180deg, var(--nav) 0%, rgba(0, 5, 13, .85) 55%, rgba(0, 5, 13, 0) 100%);
}
.brand { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; color: var(--text); flex: none; }
.brand-word { font-size: 25px; font-weight: 700; letter-spacing: -.6px; }
.brand-word b { color: var(--blue); font-weight: 700; }
.swoosh { width: 52px; height: 10px; color: var(--blue); margin: 1px 0 0 28px; }
.tabs { display: flex; gap: clamp(14px, 2vw, 28px); overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 8px 2px; font-size: 16px; font-weight: 500; color: #c9d4db; white-space: nowrap; transition: color .15s; }
.tabs a:hover, .tabs a.on { color: var(--text); }
.tabs a.on { font-weight: 700; }
.tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--text); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; padding: 0; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.search { display: flex; align-items: center; border: 1px solid transparent; border-radius: 22px; transition: background .2s, border-color .2s; }
.search input { width: 0; padding: 0; border: 0; background: transparent; outline: 0; font-size: 15px; transition: width .25s, padding .25s; }
.search input::placeholder { color: var(--muted); }
.search.open { background: rgba(15, 23, 30, .92); border-color: #526574; }
.search.open input { width: clamp(120px, 22vw, 260px); padding: 0 14px 0 0; }
.search:focus-within { border-color: var(--text); }
.search input:focus-visible { outline: 0; }
.profile { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 22px; color: #c9d4db; font-size: 14px; }
.profile:hover { background: rgba(255, 255, 255, .12); color: var(--text); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--cyan), #6c5ce7); font-weight: 700; font-size: 15px; }

/* ---------- Hero carousel (thumbnails; speed and count in site.json "hero") ---------- */
main { min-height: 80vh; }
.hero { position: relative; height: clamp(440px, 62vw, 760px); overflow: hidden; background: var(--nav); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.slide.on { opacity: 1; visibility: visible; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 25%; }
.slide::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(15, 23, 30, .92) 22%, rgba(15, 23, 30, .45) 52%, rgba(15, 23, 30, 0) 75%),
    linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 30, 0) 38%),
    linear-gradient(180deg, rgba(0, 5, 13, .7) 0%, rgba(0, 5, 13, 0) 22%); }
.slide-copy { position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(56px, 9vw, 120px); width: min(560px, calc(100% - 2 * var(--gutter))); }
.kicker { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--cyan); font-size: 14px; font-weight: 700; }
.tick { width: 16px; height: 16px; flex: none; }
.slide h2 { margin: 0 0 12px; font-size: clamp(30px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -1px; font-weight: 700; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.synopsis { margin: 14px 0 0; color: #d3dce2; font-size: clamp(14px, 1.3vw, 17px); max-width: 52ch; }
.hero-ctrl { position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(70px, 9vw, 120px); display: flex; align-items: center; gap: 8px; }
.pause { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 5, 13, .6); }
.pause:hover { background: rgba(0, 5, 13, .9); }
.pause svg { width: 16px; height: 16px; }
.dots { display: flex; gap: 2px; }
.dots button { width: 22px; height: 24px; padding: 0; border: 0; background: transparent; display: grid; align-items: center; }
.dots button::before { content: ""; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35); transition: background .2s; }
.dots button.on::before, .dots button:hover::before { background: var(--text); }

/* ---------- Badges + buttons ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 7px; border-radius: 3px; background: rgba(255, 255, 255, .14); color: #e6edf1; }
.badge-res { background: var(--text); color: #0f171e; }
.badge-hdr { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cyan); color: var(--cyan); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border: 0; border-radius: var(--radius); font-size: 16px; font-weight: 700; transition: background .15s, transform .15s; }
.btn-icon { width: 20px; height: 20px; }
.btn-primary { background: var(--blue); color: var(--text); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { background: rgba(255, 255, 255, .16); color: var(--text); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .28); }
.btn-disabled { background: var(--surface-2); color: var(--muted); cursor: default; }
.btn:active { transform: scale(.98); }

/* ---------- Rows ---------- */
#rows { position: relative; z-index: 4; margin-top: -48px; padding-bottom: 40px; }
.row { margin-bottom: clamp(22px, 3vw, 38px); }
.row-head { display: flex; align-items: baseline; gap: 14px; padding: 0 var(--gutter); margin-bottom: 8px; }
.row-head h2 { margin: 0; font-size: clamp(18px, 1.7vw, 22px); font-weight: 700; letter-spacing: -.2px; }
.row-link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--blue); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.row-link svg { width: 14px; height: 14px; }
.row:hover .row-link, .row-link:focus-visible { opacity: 1; transform: none; }
.rail { position: relative; }
.track { display: flex; gap: 10px; overflow-x: auto; padding: 14px var(--gutter) 30px; margin-top: -14px; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.arrow { position: absolute; z-index: 5; top: 0; bottom: 16px; width: var(--gutter); min-width: 44px; border: 0; padding: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; color: var(--text); }
.arrow svg { width: 30px; height: 30px; }
.arrow.left { left: 0; background: linear-gradient(90deg, rgba(15, 23, 30, .95), transparent); }
.arrow.right { right: 0; background: linear-gradient(270deg, rgba(15, 23, 30, .95), transparent); }
.rail:hover .arrow { opacity: 1; }
@media (hover: none) { .arrow { display: none; } }

/* ---------- Cards ---------- */
.card { flex: 0 0 clamp(220px, 21vw, 330px); min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; scroll-snap-align: start; display: block; transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.card-art { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 0 0 0 transparent; transition: box-shadow .2s; }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 5, 13, .55), transparent 45%); pointer-events: none; }
.card-tag { position: absolute; z-index: 1; left: 8px; top: 8px; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 3px; background: rgba(0, 5, 13, .78); }
.card-info { display: block; padding: 9px 2px 0; }
.card-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.card-sub .tick { width: 13px; height: 13px; color: var(--cyan); }
@media (hover: hover) {
  .card:hover { transform: scale(1.06); z-index: 3; }
  .card:hover .card-art { box-shadow: 0 0 0 3px var(--text), 0 12px 28px rgba(0, 0, 0, .55); }
}
.card:focus-visible { outline: 0; }
.card:focus-visible .card-art { box-shadow: 0 0 0 3px var(--text); }

/* ---------- Browse grid ---------- */
.browse { padding: 96px var(--gutter) 56px; }
.browse-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.browse h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.6px; }
#results { margin: 0; color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 14px; }
.grid .card { flex: none; }
.empty { padding: 80px 0; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 12px; }
.load-error { padding: 140px var(--gutter); text-align: center; color: var(--muted); }

/* ---------- Category page ---------- */
.blurb { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 60ch; }
.blurb:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 26px; }
.chip { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 19px; background: transparent; color: #c9d4db; font-size: 14px; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.chip:hover { border-color: #5c7083; color: var(--text); }
.chip.on { background: var(--text); color: #0f171e; border-color: var(--text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px var(--gutter) 40px; color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }
.footer p { margin: 0; max-width: 78ch; }
.footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Detail dialog ---------- */
dialog { padding: 0; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); width: min(760px, calc(100% - 24px)); max-height: 92dvh; overflow: auto; box-shadow: 0 24px 80px rgba(0, 0, 0, .7); }
dialog[open] { animation: pop .25s cubic-bezier(.2, .8, .2, 1); }
dialog::backdrop { background: rgba(0, 5, 13, .78); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.close { position: absolute; z-index: 3; right: 12px; top: 12px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 5, 13, .75); }
.close:hover { background: rgba(0, 5, 13, 1); }
.close svg { width: 20px; height: 20px; }
.detail-art { position: relative; aspect-ratio: 16 / 9; background: var(--nav); }
.detail-art img { width: 100%; height: 100%; object-fit: cover; }
.detail-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface) 0%, rgba(26, 36, 47, 0) 55%); }
.detail-body { padding: 0 clamp(18px, 4vw, 36px) 32px; margin-top: -48px; position: relative; z-index: 2; }
dialog h2 { margin: 0 0 12px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -.6px; }
.submission-credit { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--blue); border-radius: 0 4px 4px 0; background: rgba(26, 152, 255, .1); color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.detail-synopsis { margin: 14px 0 0; color: #d3dce2; }
.detail-synopsis:empty { display: none; }
dl { margin: 24px 0 0; font-size: 14px; }
dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 10px; padding-bottom: 4px; }
  .brand-word { font-size: 22px; }
  .swoosh { width: 44px; margin-left: 24px; }
  .profile-name { display: none; }
  .profile { padding: 4px; }
  .tabs { order: 3; flex: 1 0 100%; padding: 4px 0 6px; gap: 20px; }
  .tabs a { font-size: 15px; }
  .hero { height: 78vw; min-height: 420px; }
  #rows { margin-top: 0; }
  .slide-img { object-position: 60% 0; }
  .slide::before { background: linear-gradient(0deg, var(--bg) 0%, var(--bg) 34%, rgba(15, 23, 30, 0) 66%), linear-gradient(180deg, rgba(0, 5, 13, .85) 0%, rgba(0, 5, 13, 0) 25%); }
  .slide-copy { bottom: 52px; }
  .slide h2 { font-size: 30px; }
  .synopsis { display: none; }
  .hero-ctrl { right: auto; left: calc(var(--gutter) - 4px); bottom: 14px; }
  .dots button { width: 14px; }
  .actions { margin-top: 16px; }
  .btn { min-height: 46px; padding: 0 20px; }
  .btn-ghost { flex: 0 1 auto; }
  .browse { padding-top: 124px; }
  .row-link { opacity: 1; transform: none; }
  .track { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: calc((100% - 10px) / 2); gap: 18px 10px; align-items: start; padding-bottom: 18px; }
  .arrow { display: none; }
  .card { transition: none; }
  .card:hover { transform: none; }
  .card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; height: 2.6em; font-size: 13px; white-space: normal; }
  .card-sub { font-size: 11px; white-space: nowrap; }
  .card-sub .tick { width: 11px; height: 11px; }
  .card-tag { left: 6px; top: 6px; padding: 3px 4px; font-size: 10px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
