:root {
  --black-soft: #161616;
  --black-card: #1a1a1a;
  --bone-dim: rgba(227, 218, 201, 0.55);
  --hairline: rgba(227, 218, 201, 0.12);
  --hairline-strong: rgba(227, 218, 201, 0.22);
  --cream: var(--color-base);
  --cream-dim: var(--bone-dim);
  --cream-mid: rgba(227, 218, 201, 0.65);
  --gray-mid: var(--bone-dim);
  --border: var(--hairline);
  --border-strong: var(--hairline-strong);
  /* On dark surfaces, the brand --red (#c0392b) keeps contrast; the
     light-surface AA variant --red-text loses it, so alias it back. */
  --red-text: var(--red);
}
html {
  background: var(--black);
}
body {
  background: var(--black);
  color: var(--off-white);
  font-family: "Lora", serif;
  font-size: 1.125rem;
  line-height: 1.75;
}
.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 36px;
}
.crumb {
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 20px;
}
.crumb a {
  color: var(--cream-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.crumb a:hover {
  color: var(--red-text);
  border-bottom-color: var(--red-text);
}
.page-kicker {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--cream-dim);
  margin-bottom: 20px;
}
.red-rule {
  height: 2px;
  width: 40px;
  background: var(--red);
  margin-bottom: 16px;
}
.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red-text);
  margin-bottom: 8px;
}
h1 {
  font-family: "Playfair Display", serif;
  font-size: 2.75rem;
  font-weight: 400;
  letter-spacing: -0.8px;
  line-height: 1.05;
  margin-bottom: 14px;
}
.region-line {
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 24px;
}
.history {
  font-family: "Lora", serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--off-white);
  max-width: 720px;
}
.history-source {
  font-family: "Inter", sans-serif;
  margin-top: 14px;
  font-size: 0.875rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.history-source a {
  color: var(--cream-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.history-source a:hover {
  color: var(--red-text);
  border-bottom-color: var(--red-text);
}
.section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-strong);
}
.section-label {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red-text);
  margin-bottom: 14px;
}
.directors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border-strong);
  margin-top: 16px;
}
.dir-card {
  background: var(--black-card);
  padding: 14px 18px;
}
.dir-name {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  line-height: 1.25;
}
.dir-name a,
.featured-title a,
.film-title a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(227, 218, 201, 0.45);
}
.dir-name a:hover,
.featured-title a:hover,
.film-title a:hover,
.director-link:hover {
  color: var(--red-text);
  border-bottom-color: var(--red-text);
}
.dir-meta {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 6px;
}
.dir-bio {
  font-family: "Lora", serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--cream-mid);
  margin-top: 10px;
}
.dir-card--plain {
  /* Non-atlas directors: name only, nothing to click. */
  cursor: default;
}
.dir-keywords {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.dir-keyword {
  font-size: 0.75rem;
  letter-spacing: 0;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  color: var(--off-white);
}
.director-link {
  color: inherit;
  border-bottom: 1px solid var(--border-strong);
  text-decoration: none;
}

/* ── Poster-card grid (Featured Films + decade blocks) ────────────────────
   The shared components/film-card.css only styles the poster/info overlay.
   The grid, card frame, placeholder, title/meta, and bookmark live per-page
   (see search.css / list_view.css); replicate them here, scoped dark. */
.film-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.film-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.film-card-link--static {
  cursor: default;
}
.film-card {
  width: 100%;
  aspect-ratio: 2 / 3;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    border-color 0.15s,
    transform 0.2s ease;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  background: var(--black-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.film-card:hover {
  border-color: var(--red);
}
.film-card-placeholder {
  width: 100%;
  height: 100%;
  background: var(--black-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: absolute;
  top: 0;
  left: 0;
}
.film-card-placeholder-text {
  font-family: "Playfair Display", serif;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--cream-dim);
  text-align: center;
  line-height: 1.4;
}
.film-card-title {
  font-family: "Playfair Display", serif;
  font-size: 1.125rem;
  font-weight: 700;
  font-style: normal;
  color: var(--off-white);
  line-height: 1.25;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: break-word;
}
.film-card-meta {
  font-family: "Inter", sans-serif;
  font-size: 0.8125rem;
  color: #8c8678;
  letter-spacing: 0.5px;
}
/* Empty layout slot — populated by neither drawer nor SSR; kept for parity. */
.streaming-badges {
  position: absolute;
  bottom: 8px;
  left: 10px;
  display: flex;
  gap: 4px;
  z-index: 5;
}
.film-card-bookmark {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s;
  background: rgba(15, 15, 15, 0.65);
  border: none;
  cursor: pointer;
  padding: 7px;
  border-radius: 2px;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.film-card:hover .film-card-bookmark,
.film-card-bookmark:focus-visible {
  opacity: 1;
}

/* ── "More films" decade toggle + collapsed panel ─────────────────────────*/
.country-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 12px 18px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream);
}
.country-more-toggle:hover {
  border-color: var(--red);
  color: var(--red-text);
}
.country-more-toggle .arrow {
  transition: transform 0.2s ease;
  color: var(--red-text);
}
.country-more-toggle.expanded .arrow {
  transform: rotate(90deg);
}
.country-more-panel[hidden] {
  display: none;
}
.country-more-panel {
  margin-top: 24px;
}
.country-decade-block {
  margin-top: 28px;
}
.country-decade-block:first-child {
  margin-top: 0;
}
.country-decade-label {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red-text);
  margin-bottom: 8px;
}
.country-decade-rule {
  height: 1px;
  background: var(--border-strong);
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 24px 18px;
  }
  h1 {
    font-size: 2rem;
  }
  .directors-grid {
    grid-template-columns: 1fr;
  }
  .film-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
