/* Set like a printed TV listings page: paper, ink, hairline rules. Bricolage is only
   for the wordmark, to match the app. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/Archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4ecdc;
  --ink: #1b1610;
  --muted: #5f5546;
  --hair: #cfc3ad;
  --mash: #b1361d;
  --keep: #36642f;
  --on-poster: #fbf5e8;
  --gold: #f2b84b;
  --sans: "Archivo", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.5 var(--serif);
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--mash);
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--sans);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.9rem, 7vw, 5.9rem);
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.012em;
  line-height: 0.98;
}

h2 {
  font-size: 1.75rem;
  font-weight: 750;
  font-stretch: 80%;
  line-height: 1.08;
}

h3,
h4 {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.25;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus {
  top: 12px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 740 1.5rem/1 "Bricolage Grotesque", var(--sans);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.site-nav {
  display: flex;
  gap: 20px;
  font: 500 0.9375rem/1.2 var(--sans);
}

.site-nav a {
  display: inline-block;
  padding-block: 10px;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  color: inherit;
}

.site-nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Hero */
.hero {
  padding-block: clamp(20px, 3vw, 32px) clamp(40px, 6vw, 64px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1.25fr);
  gap: clamp(24px, 3.4vw, 40px);
  align-items: start;
  margin-top: clamp(20px, 2.6vw, 28px);
}

.lede {
  font-size: clamp(1.25rem, 1.8vw, 1.4rem);
  line-height: 1.32;
}

.facts {
  margin: 24px 0 0;
  font: 400 0.9375rem/1.3 var(--sans);
}

.facts div {
  padding-block: 9px;
  border-top: 1px solid var(--hair);
}

.facts dt {
  color: var(--muted);
  font-size: 0.8125rem;
}

.facts dd {
  margin: 1px 0 0;
  font-weight: 550;
}

/* Swipe demo */
.demo {
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
}

.stack {
  position: relative;
  aspect-ratio: 2 / 3;
  margin-bottom: 8px;
}

.card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-poster);
  font-family: var(--sans);
  box-shadow: 0 16px 28px -16px rgb(27 22 16 / 60%);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.card.dragging {
  cursor: grabbing;
}

.card.settling {
  transition: transform 240ms cubic-bezier(0.22, 0.8, 0.3, 1);
}

.card.behind {
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
}

.card-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 36% 0 0;
  background: linear-gradient(to bottom, transparent, rgb(14 11 8 / 88%) 46%, rgb(14 11 8 / 96%));
  pointer-events: none;
}

.card-text {
  position: relative;
  z-index: 1;
}

.card-reason {
  color: var(--gold);
  font-size: 0.8125rem;
  font-weight: 600;
}

.card-title {
  margin-top: 3px;
  font-size: 2.125rem;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
}

.card-blurb {
  margin-top: 7px;
  font: 400 1.0625rem/1.28 var(--serif);
}

.card-meta {
  margin-top: 8px;
  color: #d8cdb9;
  font-size: 0.8125rem;
}

.stamp {
  position: absolute;
  top: 26px;
  z-index: 2;
  padding: 1px 10px;
  background: var(--paper);
  border: 3px solid currentcolor;
  border-radius: 3px;
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.2;
  opacity: 0;
}

.stamp-keep {
  left: 16px;
  color: var(--keep);
  transform: rotate(-9deg);
}

.stamp-mash {
  right: 16px;
  color: var(--mash);
  transform: rotate(9deg);
}

.end-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  text-align: center;
}

.end-card img {
  width: 96px;
  height: 96px;
}

.end-card h3 {
  font-size: 1.5rem;
  font-stretch: 80%;
}

.end-card p {
  color: var(--muted);
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.choice {
  min-height: 48px;
  padding: 8px 12px;
  background: none;
  border: 1.5px solid currentcolor;
  border-radius: 4px;
  font: 650 1.0625rem/1 var(--sans);
  cursor: pointer;
}

.choice-mash {
  color: var(--mash);
}

.choice-keep {
  color: var(--keep);
}

.choice-mash:hover:not(:disabled) {
  background: var(--mash);
  border-color: var(--mash);
  color: var(--paper);
}

.choice-keep:hover:not(:disabled) {
  background: var(--keep);
  border-color: var(--keep);
  color: var(--paper);
}

.choice:disabled {
  opacity: 0.4;
  cursor: default;
}

.taste {
  min-height: 3.9em;
  font-size: clamp(1.25rem, 1.8vw, 1.4rem);
  line-height: 1.3;
}

.label {
  margin-top: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
  font-stretch: 100%;
  line-height: 1.3;
}

.queue-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
}

.queue-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  padding-block: 7px;
  border-bottom: 1px solid var(--hair);
}

.queue-list img {
  width: 34px;
  height: 51px;
  border-radius: 2px;
  object-fit: cover;
}

.queue-name {
  font-size: 1rem;
  font-weight: 620;
  line-height: 1.2;
}

.queue-genres {
  color: var(--muted);
  font-size: 0.8125rem;
}

.queue-move {
  font-weight: 700;
  text-align: right;
}

.queue-move.up {
  color: var(--keep);
}

.queue-move.down {
  color: var(--mash);
}

.demo-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.button {
  display: inline-block;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  color: var(--paper);
  font: 600 1rem/1.5 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--mash);
  color: var(--paper);
}

/* Sections: a heading in the margin, with ruled rows beside it */
.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr);
  gap: 16px clamp(24px, 3.4vw, 40px);
  padding-block: 18px clamp(48px, 7vw, 80px);
  border-top: 2px solid var(--ink);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 4px clamp(20px, 3vw, 32px);
  padding-block: 12px;
  border-bottom: 1px solid var(--hair);
}

.row:first-child {
  padding-top: 4px;
}

.rows-heading {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
}

.row + .rows-heading {
  margin-top: 32px;
}

.more-link {
  display: inline-block;
  margin-top: 18px;
  font: 600 1rem/1.5 var(--sans);
}

/* Long-form pages */
.page {
  padding-block: clamp(28px, 5vw, 56px) clamp(56px, 8vw, 96px);
}

.prose {
  max-width: 42rem;
}

.prose h1 {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
}

.prose h2 {
  margin-top: 40px;
  font-size: 1.5rem;
}

.prose p,
.prose ul {
  margin-top: 12px;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 8px;
}

.prose strong {
  font-weight: 650;
}

.updated {
  color: var(--muted);
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-block: 56px 96px;
}

.centered img {
  width: 120px;
  height: 120px;
}

/* Footer */
.site-footer {
  padding-bottom: 40px;
  color: var(--muted);
  font: 400 0.9375rem/1.45 var(--sans);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
}

.footer-grid::before {
  content: "";
  grid-column: 1 / -1;
  border-top: 2px solid var(--ink);
}

.tmdb-logo {
  width: 130px;
  height: auto;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 20px;
}

.footer-links a {
  display: inline-block;
  padding-block: 6px;
}

.site-footer p + p {
  margin-top: 6px;
}

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Puts the demo straight after the intro text on small screens. */
  .intro {
    display: contents;
  }

  .lede {
    order: 1;
  }

  .demo {
    order: 2;
  }

  .queue {
    order: 3;
  }

  .facts {
    order: 4;
    margin-top: 0;
  }

  .taste {
    min-height: 0;
  }

  .queue-list li:nth-child(n + 4) {
    display: none;
  }

  .section {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .row,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card.settling {
    transition: none;
  }
}
