/* Paper, ink and one spot colour, lifted from skillshop's contact sheet: a
   listing is read in one pass, so the page is rules and type rather than
   cards and shadows. */

:root {
  --paper: #f4f1ea;
  --tint: #e5dece;
  --rule: #b3a98f;
  --ink: #100f0a;
  --muted: #514c3c;
  --spot: #9c2a15;
  --serif: "Iowan Old Style", "Palatino Linotype", palatino, "Book Antiqua",
    georgia, ui-serif, serif;
  --mono: ui-monospace, sfmono-regular, menlo, monospace;
  --poster-track: 128px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--serif);
}

a {
  color: var(--spot);
  text-underline-offset: 3px;
}

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

.navbar {
  border-bottom: 2px solid var(--ink);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  max-width: 1340px;
  margin: 0 auto;
  padding: 22px 40px 14px;
}

.nav-logo a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
}

/* One step down from the logo in size and weight, on the same baseline: the
   site's own name stays the loudest thing in the band. */
.nav-links {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 18px 40px 96px;
}

/* Read aloud, never drawn: clip rather than display:none, which takes the
   element out of the accessibility tree along with the layout. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.page-title {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* Weeks own the heavy rule, days the hairline, so three levels of heading
   read as three levels without three sizes of type. */
.week {
  margin-top: 26px;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

/* The navbar's own rule already closes the top of the page, so a second one
   under it is two rules and the band of nothing between them. */
.week:first-of-type {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.week-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.week-range {
  margin-left: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* A day is a block of its own: a dateline, the rule under it, and that day's
   films. The blocks flow left to right and wrap as units, so two quiet days
   share a line rather than each taking one, and the rule under a dateline
   runs the width of the day it heads, which is what shows where one day ends
   and the next starts. */
.day-list {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 40px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

/* No shrinking: a day keeps the width its films need and moves to the next
   line when it does not fit. max-width is what makes a day wider than the
   page wrap its own films instead of overflowing it. */
.day {
  flex: 0 0 auto;
  max-width: 100%;
}

.day-heading {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ink);
}

.day-weekday {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.day-date {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}

/* Posters at a fixed width, wrapping within their day: a day with two films
   is two posters wide, not two posters stretched across the page. */
.film-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.coming .film-grid {
  margin-top: 16px;
}

/* A column, so the cinema line can sit at the bottom of whatever the tallest
   card in the row is: without it every card's text starts wherever the one
   above it ended. */
.film-card {
  display: flex;
  flex: 0 0 var(--poster-track);
  flex-direction: column;
  width: var(--poster-track);
}

.film-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.poster {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--tint);
  border: 1px solid var(--rule);
}

/* Title and year, then the cinema, then the times. The day heading beside
   the card carries the date, so a card carries the clock alone. */
.film-date {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

/* Two lines held open for the title and two for the cinema, which is what
   most cards need: a card with a short title then starts its date where its
   neighbours do rather than a line higher. */
.film-title {
  display: block;
  min-height: 2.5em;
  overflow-wrap: break-word;
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
}

/* The year on its own line, so a two-word title keeps the whole width to
   wrap in and the years line up down a column. */
.film-year {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.film-card:hover .poster,
.film-card:has(.film-link:focus-visible) .poster {
  border-color: var(--ink);
}

.film-card:hover .film-title,
.film-card:has(.film-link:focus-visible) .film-title {
  color: var(--spot);
}

.film-meta {
  min-height: 2.6em;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.empty {
  margin-top: 20px;
  color: var(--muted);
  font-style: italic;
}

.film-detail {
  max-width: 860px;
  margin-top: 28px;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.backdrop {
  display: block;
  width: 100%;
  margin-bottom: 22px;
  border: 1px solid var(--rule);
}

.original-title,
.english-title {
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

.unconfirmed {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

.tagline {
  margin: 10px 0 0;
  font-size: 18px;
  font-style: italic;
}

.film-facts {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  margin: 26px 0 0;
}

.film-facts dt,
.film-facts dd {
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.film-facts dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.film-facts dd {
  margin: 0;
  font-size: 15px;
}

.section-heading {
  margin: 26px 0 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.showing-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.showing {
  display: grid;
  grid-template-columns: 1fr 4rem 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.showing-time {
  font-family: var(--mono);
  font-size: 14px;
}

.showing-where {
  color: var(--muted);
  font-size: 13px;
}

/* The cinemas write their descriptions in paragraphs, and the API carries the
   blank lines. Without this they collapse into one block. */
.overview {
  max-width: 62ch;
  margin: 26px 0 0;
  white-space: pre-line;
}

.film-source {
  margin: 26px 0 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* The error page and the flashed messages, which every page can carry. */
.profile-card {
  max-width: 62ch;
  margin-top: 28px;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.profile-card h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.error-message {
  color: var(--spot);
}

.info-message {
  color: var(--muted);
  font-style: italic;
}

.profile-info p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-info strong {
  display: inline-block;
  width: 150px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 12px;
}

/* The container's own bottom padding is the gap; the rule closes the page the
   way the navbar's opens it. The notice runs one line with the logo after it,
   and flex-wrap drops the logo onto its own line once the viewport is too
   narrow to hold both. */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  max-width: 1340px;
  margin: 0 auto;
  border-top: 2px solid var(--ink);
  padding: 14px 40px 40px;
}

/* 48px against the navbar's 14px caps: TMDB's terms want their mark less
   prominent than the site's own. Half opacity drops their gradient to about
   the weight of the notice beside it, which recoloring the file would
   breach. */
.tmdb-logo img {
  display: block;
  width: 48px;
  height: auto;
  opacity: 0.5;
}

.tmdb-notice {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
}

@media (width <= 720px) {
  :root {
    --poster-track: 102px;
  }

  .nav-container {
    padding: 18px 20px 12px;
  }

  .container {
    padding: 14px 20px 72px;
  }

  .site-footer {
    padding: 12px 20px 32px;
  }

  .page-title {
    font-size: 30px;
  }

  .day-list {
    gap: 26px 24px;
  }

  .film-grid {
    gap: 16px 10px;
  }

  .film-facts {
    grid-template-columns: 1fr;
  }

  .film-facts dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
}
