/*
 * Components. Hand-written, layered on foundation.css. No build step.
 */

.site-header,
.site-footer {
  background: var(--surface);
  border-color: var(--line);
}

.site-header {
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 1px 0 rgba(20, 85, 135, .06);
}

.logo {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.logo img {
  display: block;
  width: auto;
  height: 80px;
}

.site-header .wrap,
.site-footer .wrap {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
}

.site-header .wrap {
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

.site-footer {
  margin-top: 2.5rem;
  background: var(--brand-dark);
  color: #e7f2fa;
}

.site-footer .wrap {
  display: block;
  min-height: 0;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.site-footer p { margin: 0 0 .75rem; }

.site-footer p:last-child { margin-bottom: 0; }

.site-footer a { color: #fff; }

.search-form {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  width: 100%;
  margin-left: auto;
}

.search-form input[type="search"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding: .45rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
}

.suggest {
  display: none;
  text-align: left;
  position: absolute;
  z-index: 20;
  top: calc(100% + .35rem);
  left: 0;
  right: 4.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.suggest.is-open:has(li) {
  display: block;
  padding: .25rem 0;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(20, 85, 135, .12);
}

.suggest[hidden] {
  display: none !important;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.suggest a {
  display: block;
  padding: .35rem .7rem;
  color: inherit;
  text-decoration: none;
}

.suggest a:hover { background: var(--paper); }

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
}

.header-bar { align-items: flex-start; padding-top: .75rem; padding-bottom: .75rem; }

.header-tools {
  margin-left: auto;
  width: min(42rem, 100%);
  text-align: right;
}

.hot-search {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0 .75rem;
  max-height: 1.4em;
  margin: .45rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.4;
}

.hot-search span,
.hot-search a {
  white-space: nowrap;
}

.site-nav {
  background: #343a40;
}

.site-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-height: 0;
}

.site-nav a {
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  padding: .65rem .75rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active { background: var(--brand); color: #fff; }

.btn {
  border: 0;
  border-radius: var(--radius);
  padding: .4rem .85rem;
  background: var(--brand);
  color: #fff;
}

.btn:hover { background: var(--brand-dark); }

@media (max-width: 720px) {
  .site-header .header-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
      "logo menu"
      "tools tools";
    align-items: center;
    gap: .75rem;
    padding-top: .65rem;
    padding-bottom: .65rem;
  }

  .header-bar .logo {
    grid-area: logo;
    min-width: 0;
  }

  .js .nav-toggle {
    display: inline-flex;
    grid-area: menu;
    align-items: center;
    justify-self: end;
    margin-left: 0;
    min-height: 2.5rem;
  }

  .header-tools {
    grid-area: tools;
    width: 100%;
    min-width: 0;
    margin-left: 0;
    text-align: left;
  }

  .search-form { margin-left: 0; }

  .search-form input[type="search"] { flex: 1; width: auto; }

  .search-form .btn { flex: 0 0 auto; }

  .logo img { height: 48px; max-width: 100%; }

  .hot-search {
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-height: none;
    overflow-x: auto;
    padding-bottom: .15rem;
  }

  .js .site-nav {
    display: none;
    padding-bottom: .35rem;
  }

  .js .site-nav.is-open { display: block; }

  .js .site-nav.is-open .wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .js .site-nav.is-open a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: .85rem 1rem;
    text-align: center;
  }
}

[x-cloak] { display: none !important; }

.home-section,
.movie-section { margin-top: 1.75rem; }

.poster-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.poster-strip .poster-card {
  flex: 0 0 10rem;
  scroll-snap-align: start;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}

@media (max-width: 900px) {
  .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.hero {
  position: relative;
  margin: 0 0 1.5rem;
  background: #111;
  overflow: hidden;
}

.hero-viewport { overflow: hidden; }

.hero-track {
  display: flex;
  transition: transform .45s ease;
}

.hero-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.hero-slide a { display: block; position: relative; color: #fff; text-decoration: none; }

.hero-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: #123;
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: .7rem 3rem;
  background: rgba(0, 0, 0, .62);
  font-size: 1.35rem;
  font-weight: 650;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 3.5rem;
  border: 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.hero-prev { left: 0; }
.hero-next { right: 0; }

@media (max-width: 640px) {
  .hero-caption { font-size: 1rem; padding-inline: 2.4rem; }
}

.poster-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 85, 135, .08);
  overflow: hidden;
}

.poster-card img,
.movie-poster {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #d7e4ee;
  border-radius: 0;
}

.movie-poster { border-radius: 0; max-width: none; }

.poster-title {
  display: block;
  margin: 0;
  padding: .55rem .65rem .7rem;
  font-size: .875rem;
  font-weight: 650;
}

.poster-meta {
  display: block;
  margin-top: -.35rem;
  padding: 0 .65rem .7rem;
  color: var(--muted);
  font-size: .75rem;
}

.intro-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intro-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: .85rem 1.25rem;
  align-items: start;
  padding: 1rem;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 85, 135, .06);
}

.intro-card-poster {
  display: block;
  border-radius: 10px;
  background: #d7e4ee;
  overflow: hidden;
}

.intro-card-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #d7e4ee;
}

.intro-card h2 {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: baseline;
  margin: 0 0 .4rem;
  font-size: 1.15rem;
}

.intro-card h2 a {
  color: inherit;
  text-decoration: none;
}

.intro-card h2 a:hover,
.intro-card h2 a:focus-visible { color: var(--link); }

.intro-card h2 span { color: var(--muted); font-size: .9rem; font-weight: 500; }

.intro-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .85rem;
  margin: 0 0 .35rem;
  color: var(--muted);
  font-size: .875rem;
}

.intro-card-meta strong { color: var(--ink); font-weight: 650; }

.intro-blurb {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: .35rem 0 0;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .intro-card { grid-template-columns: 92px minmax(0, 1fr); gap: .7rem; padding: .75rem; }

  .intro-card h2 { font-size: 1rem; }
}

.crumbs {
  color: var(--muted);
  font-size: .875rem;
}

.crumbs a { color: inherit; }

.crumbs ol {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li { display: inline; }

.crumbs li + li::before { content: " / "; }

.crumbs-label { margin-right: .35rem; }

.movie-heading {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.movie-heading h1 { margin: 0; }

.movie-score {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.movie-score a { color: inherit; }

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  margin: .75rem 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.tag-line a {
  display: inline-block;
  padding: .12rem .45rem;
  border-radius: 999px;
  background: #e7eef5;
  color: var(--ink);
  text-decoration: none;
}

.tag-line a:hover,
.tag-line a:focus-visible { background: #6eb2ec; color: #fff; }

.movie-top {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: start;
  margin-top: .5rem;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 85, 135, .06);
}

.movie-poster-frame {
  width: 200px;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #d7e4ee;
}

.movie-poster-frame .movie-poster {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

.movie h1 { font-size: 1.85rem; }

@media (max-width: 640px) {
  .movie-top {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 1rem;
    padding: 1rem;
  }

  .movie-top > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .movie-poster-frame { width: min(12.5rem, 62vw); }

  .movie-top > div:last-child { width: 100%; }

  .movie-heading { justify-content: flex-start; }

  .movie h1 { font-size: 1.45rem; }

  .movie-facts { grid-template-columns: 3.25rem minmax(0, 1fr); }
}

.orig-name {
  color: var(--muted);
  margin-top: -.25rem;
}

.movie-facts {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: .35rem .75rem;
  margin: 0;
}

.movie-facts dt { color: var(--muted); }

.movie-facts dd { margin: 0; }

.movie-section {
  margin-top: 1rem;
  padding: 1.1rem 1.25rem 1.25rem;
  background: var(--surface);
  border-radius: 14px;
}

.intro-body {
  white-space: pre-wrap;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.intro-body.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
}

.intro .btn { margin-top: .85rem; }

.movie .poster-card { min-width: 0; }

.movie .poster-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #d7e4ee;
}

.still-row {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}

.still-thumb {
  display: block;
  flex: 0 0 12rem;
  width: 12rem;
  color: inherit;
  text-decoration: none;
}

.still-thumb img {
  display: block;
  width: 100%;
  height: 7.5rem;
  object-fit: cover;
  background: var(--line);
  border-radius: var(--radius);
}

.still-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .88);
}

.still-frame {
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  min-width: 0;
  max-width: 100%;
}

.still-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: .75rem;
}

.still-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  min-width: 0;
  max-height: calc(100vh - 7rem);
  margin-inline: auto;
  object-fit: contain;
  background: #111;
}

.still-lightbox button {
  border: 0;
  border-radius: var(--radius);
  padding: .4rem .75rem;
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.still-lightbox button:hover,
.still-lightbox button:focus-visible {
  background: rgba(255, 255, 255, .28);
}

.still-count {
  margin-right: auto;
  color: rgba(255, 255, 255, .8);
  font-size: .875rem;
}

.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 .75rem;
}

.resource-tabs button[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.tab-count {
  display: inline-block;
  min-width: 1.15rem;
  margin-left: .35rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #d9534f;
  color: #fff;
  font-size: .75rem;
  line-height: 1.35;
}

.resource-panel { display: none; }

.resource-panel.is-on { display: block; }

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: baseline;
  margin: 0;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}

.resource-badge {
  flex: 0 0 auto;
  padding: .05rem .4rem;
  border-radius: 4px;
  background: #5c6770;
  color: #fff;
  font-size: .75rem;
}

.resource-row a {
  flex: 1 1 12rem;
  overflow-wrap: anywhere;
}

.resource-report {
  margin-left: auto;
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.resource-empty { color: var(--muted); }

.play-help {
  margin-top: .25rem;
  padding: .75rem 1rem;
  border-radius: 8px;
  background: #f4f7fa;
  color: var(--muted);
}

.play-help ul { margin: 0; padding-left: 1.1rem; }

.report-dialog {
  border: 0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  max-width: 22rem;
}

.report-dialog::backdrop { background: rgba(0, 0, 0, .45); }

.report-dialog p { margin: 0 0 1rem; }

.page-body { overflow-wrap: anywhere; }

.page-body > :first-child { margin-top: 0; }

.site-name {
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.site-main { padding: 1.5rem 0 3rem; }

.site-footer {
  border-top: 0;
  background: var(--brand-dark);
  color: #e7f2fa;
  font-size: .875rem;
}

.site-footer p,
.site-footer a { color: #e7f2fa; }

.friend-links a { text-decoration: underline; }

.btn {
  display: inline-block;
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.alert {
  padding: .75rem 1rem;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-group { margin: 0 0 .75rem; }

.filter-label {
  display: block;
  color: var(--muted);
  font-size: .875rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .25rem 0 0;
  padding: 0;
  list-style: none;
}

.filter-chips [data-tier="more"],
.filter-chips [data-tier="early"] { display: none; }

.filter-chips [data-tier="more"].is-shown,
.filter-chips [data-tier="early"].is-shown { display: list-item; }

@media (max-width: 720px) {
  .filter-chips [data-tier="mid"] { display: none; }
  .filter-chips [data-tier="mid"].is-shown { display: list-item; }
}

.chip {
  display: inline-block;
  padding: .15rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  font-size: .875rem;
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.pager-pages {
  display: flex;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pager-pages li { margin: 0; }

.pager a,
.pager .is-current,
.pager-step {
  display: inline-flex;
  min-width: 2.25rem;
  justify-content: center;
  align-items: center;
  padding: .35rem .65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.pager a:hover,
.pager a:focus-visible { border-color: var(--brand); color: var(--link); }

.pager .is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pager-step.is-disabled { color: var(--muted); }

.pager-gap {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  padding: 0 .1rem;
}

@media (max-width: 720px) {
  .pager { justify-content: space-between; }

  .pager-pages { display: none; }
}

.carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
}

.carousel-viewport { overflow-x: auto; }

.js .carousel-viewport { overflow: hidden; }

.carousel-track { display: flex; }

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.carousel-slide .poster-card {
  max-width: 16rem;
  margin-inline: auto;
}

.carousel-nav:disabled {
  opacity: .45;
  cursor: default;
}

.offscreen {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
