/* ==========================================================================
   HOME — everything under the home hero ("voice and rhythm"). Each section
   takes its own form, and the grounds alternate:
     voice     Page   the statement, a quotation, the numbers
     new       Stage  the newest film at length (node--performance--hero as
                      the lead), then the next four as a short list
     ranked    Stage  most watched as a typographic list, no boxes
     feature   Page   the feature's words beside its films, staggered
     free      Stage  the free films, two across on phones, five on desktop
     artists   Stage  (raised) every artist's name in a running line
   The hero itself is in hero.css; the ways to watch are on How it works.
   Markup: templates/page/page--front.html.twig.
   ========================================================================== */

/* The sections carry their own space; the last one meets the footer. */
main.main--front {
  padding-bottom: 0;
}

/* ---------- ROW HEADERS ---------- */

/* "Most watched this month — By plays in the last 30 days". */
.otb-section__header.otb-section__header--start {
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
}

.otb-section__note {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}

/* "Free to watch — No account needed", the link to all of them at the end. */
.otb-section__header--start .otb-section__more {
  margin-left: auto;
}

/* ---------- VOICE ---------- */

.otb-home-voice {
  margin-top: var(--space-16);
  padding: var(--space-16) 0 var(--space-12);
}

.otb-home-voice__main {
  display: grid;
  gap: var(--space-6) var(--space-20);
}

.otb-home-voice__title {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--font-size-display-m);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
}

.otb-home-voice__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 620px;
}

.otb-home-voice__text {
  margin: 0;
  font-size: var(--font-size-md);
  line-height: var(--line-height-body);
}

.otb-home-voice__quote {
  margin: 0;
}

.otb-home-voice__quote blockquote {
  margin: 0;
}

.otb-home-voice__quote p {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-style: italic;
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-snug);
}

.otb-home-voice__quote figcaption {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
}

.otb-home-voice__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
}

.otb-home-voice__links a {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
  text-underline-offset: 4px;
}

.otb-home-voice__figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin: var(--space-12) 0 0;
  padding-top: var(--space-8);
  border-top: var(--border-width-thin) solid var(--color-border-light);
}

/* The number above its label; the label comes first for screen readers. */
.otb-home-voice__figure {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--space-2);
}

.otb-home-voice__figure dt {
  color: var(--color-text-muted);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug);
}

.otb-home-voice__figure dd {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--font-size-display-m);
  font-weight: var(--font-weight-light);
  line-height: 1;
}

/* ---------- NEW ON OTB TV ---------- */

.otb-home-new.otb-section {
  padding-top: var(--space-16);
}

.otb-lead {
  display: grid;
  gap: var(--space-6) var(--space-12);
  align-items: center;
}

.otb-lead__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--border-radius-lg);
  object-fit: cover;
}

.otb-lead__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.otb-lead__eyebrow {
  color: var(--color-primary);
}

.otb-lead__title {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--font-size-display-m);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
}

.otb-lead__link {
  color: inherit;
  text-decoration: none;
}

.otb-lead__link:hover,
.otb-lead__link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.otb-lead__meta {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.otb-lead__summary {
  margin: 0;
  font-size: var(--font-size-md);
  line-height: var(--line-height-body);
}

.otb-lead__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.otb-home-also {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5) var(--space-7);
  margin: var(--space-10) 0 0;
  padding: var(--space-6) 0 0;
  border-top: var(--border-width-thin) solid var(--color-border-light);
  list-style: none;
}

.otb-home-also__link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-primary);
  text-decoration: none;
}

.otb-home-also__image {
  flex: none;
  width: 112px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  background: var(--color-bg-card);
}

.otb-home-also__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.otb-home-also__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.otb-home-also__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.otb-home-also__link:hover .otb-home-also__title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.otb-home-also__meta {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug);
}

/* ---------- MOST WATCHED ---------- */

.otb-home-ranked.otb-section {
  padding-top: var(--space-16);
}

.otb-rank {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--space-16);
  margin: 0;
  padding: 0;
  border-bottom: var(--border-width-thin) solid var(--color-border-light);
  list-style: none;
}

.otb-rank__item {
  border-top: var(--border-width-thin) solid var(--color-border-light);
}

.otb-rank__link {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  color: var(--color-text-primary);
  text-decoration: none;
}

.otb-rank__number {
  flex: none;
  width: 3rem;
  color: var(--color-primary);
  font-family: var(--font-family-display);
  font-size: var(--font-size-display-m);
  font-weight: var(--font-weight-light);
  line-height: 0.9;
}

.otb-rank__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.otb-rank__title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-snug);
}

.otb-rank__link:hover .otb-rank__title,
.otb-rank__link:focus-visible .otb-rank__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.otb-rank__meta {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug);
}

/* ---------- THE FEATURE ---------- */

.otb-home-feature {
  margin-top: var(--space-16);
  padding: var(--space-16) 0;
}

.otb-home-feature__inner {
  display: grid;
  gap: var(--space-10) var(--space-16);
  align-items: center;
}

.otb-home-feature__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.otb-home-feature__eyebrow {
  color: var(--color-primary);
}

.otb-home-feature__title {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--font-size-display-m);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
}

.otb-home-feature__title a {
  color: inherit;
  text-decoration: none;
}

.otb-home-feature__title a:hover,
.otb-home-feature__title a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.otb-home-feature__intro {
  max-width: 560px;
  font-size: var(--font-size-md);
  line-height: var(--line-height-body);
}

.otb-home-feature__intro p {
  margin: 0 0 var(--space-3);
}

.otb-home-feature__intro p:last-child {
  margin-bottom: 0;
}

.otb-home-feature__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-2) 0 0;
}

.otb-home-feature__films {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.otb-home-feature__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--color-text-primary);
  text-decoration: none;
}

.otb-home-feature__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  background: var(--color-bg-sunk);
}

.otb-home-feature__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.otb-home-feature__name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.otb-home-feature__link:hover .otb-home-feature__name {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.otb-home-feature__meta {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug);
}

/* ---------- FREE TO WATCH ---------- */

.otb-home-free.otb-section {
  padding-top: var(--space-16);
}

/* Two across on phones, as many as fit (five on desktop) from tablets. */
.otb-grid.otb-home-free__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-4);
}

/* ---------- EVERY ARTIST ---------- */

.otb-home-artists {
  margin-top: var(--space-16);
  padding: var(--space-16) 0 var(--space-20);
  border-top: var(--border-width-thin) solid var(--color-border-light);
  background: var(--color-bg-surface);
}

.otb-home-artists__title {
  margin: 0 0 var(--space-6);
  color: var(--color-primary);
}

.otb-home-artists__names {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-light);
  line-height: 1.5;
}

.otb-home-artists__names li::after {
  content: "/" / "";
  margin: 0 0.45em;
  color: var(--color-text-muted);
}

.otb-home-artists__names li:last-child::after {
  content: none;
}

.otb-home-artists__names a {
  color: var(--color-text-primary);
  text-decoration: none;
}

.otb-home-artists__names a:hover,
.otb-home-artists__names a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.otb-home-artists__all {
  display: inline-block;
  margin-top: var(--space-8);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  text-underline-offset: 4px;
}

/* ---------- WIDER SCREENS ---------- */

@media (min-width: 769px) {
  .otb-grid.otb-home-free__grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-6) var(--space-5);
  }

  .otb-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(var(--otb-rank-rows, 4), auto);
    grid-auto-flow: column;
  }

  .otb-rank__number {
    width: 4rem;
    font-size: var(--font-size-display-l);
  }

  .otb-home-artists__names {
    font-size: var(--font-size-2xl);
  }
}

@media (min-width: 995px) {
  .otb-home-voice {
    padding: var(--space-20) 0 var(--space-16);
  }

  .otb-home-voice__main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .otb-home-voice__title,
  .otb-home-feature__title {
    font-size: var(--font-size-display-l);
  }

  .otb-home-voice__figures {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .otb-home-voice__figure dd {
    font-size: var(--font-size-display-l);
  }

  .otb-lead {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .otb-lead__title {
    font-size: var(--font-size-display-l);
  }

  .otb-home-feature {
    padding: var(--space-20) 0;
  }

  .otb-home-feature__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  /* The films staggered like prints laid on a table. */
  .otb-home-feature__films:not(.otb-home-feature__films--1) .otb-home-feature__film:nth-child(even) {
    margin-top: var(--space-12);
  }
}
