/* Themes page styles — scoped to page-owned components */

.themes-hero {
  position: relative;
  background-color: var(--color-paper);
  padding-block: var(--space-2xl) var(--space-xl);
}

.themes-hero__frame {
  width: 100%;
  height: 10px;
  border-top: var(--border-hairline);
  border-bottom: var(--border-hairline);
  background-image: repeating-linear-gradient(
    to right,
    var(--color-sepia-30) 0,
    var(--color-sepia-30) 2px,
    transparent 2px,
    transparent 12px
  );
  opacity: 0.6;
}

.themes-hero__frame--bottom {
  margin-top: var(--space-xl);
}

.themes-hero__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: start;
  padding-block-start: var(--space-xl);
}

.themes-hero__year-block {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.themes-hero__year {
  font-size: clamp(2.5rem, 5vw, 3rem);
  line-height: 1;
  color: var(--color-brass);
}

.themes-hero__content {
  grid-column: span 8;
  min-width: 0;
}

.themes-hero__lead {
  max-width: 65ch;
}

.themes-hero__content p:not(.themes-hero__lead) {
  max-width: 65ch;
  margin-top: var(--space-md);
}

/* Thematic index */
.themes-index {
  padding-block: var(--space-2xl);
  background-color: var(--color-paper);
}

.themes-index__lead {
  max-width: 65ch;
  margin-bottom: var(--space-xl);
}

.themes-index__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-md);
}

.theme-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  background-color: var(--color-paper-dark);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  text-decoration: none;
  color: var(--color-ink);
  min-width: 0;
  min-height: 160px;
  transition: box-shadow var(--transition-medium), border-color var(--transition-medium);
}

.theme-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--color-brass);
}

.theme-card:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

.theme-card__range {
  font-size: var(--text-caption-size);
  line-height: var(--text-caption-line-height);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-sepia);
}

.theme-card h3 {
  font-size: var(--text-h4-size);
  line-height: 1.3;
  margin: 0;
  text-decoration: underline transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color var(--transition-fast);
}

.theme-card:hover h3 {
  text-decoration-color: var(--color-brass);
}

/* Theme sections */
.theme-section {
  padding-block: var(--space-2xl);
  border-top: var(--border-hairline);
}

.theme-section:nth-of-type(even) {
  background-color: var(--color-paper);
}

.theme-section:nth-of-type(odd) {
  background-color: var(--color-paper-dark);
}

.theme-section__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: start;
}

.theme-section__text {
  grid-column: span 7;
  min-width: 0;
}

.theme-section__text p {
  max-width: 65ch;
}

.theme-section__media {
  grid-column: span 5;
  min-width: 0;
}

.theme-section__figure {
  margin: 0;
}

.theme-section__figure img {
  width: 100%;
  height: auto;
  filter: grayscale(1);
  transition: filter var(--transition-medium);
}

.theme-section__figure:hover img {
  filter: grayscale(0);
}

.theme-section__quote {
  grid-column: 1 / -1;
  max-width: 65ch;
  margin: var(--space-md) 0 0;
  padding-top: var(--space-sm);
  border-top: 2px solid var(--color-brass);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  color: var(--color-sepia);
}

.theme-section__filmstrip {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.theme-section__frame {
  flex: 1 1 0;
  min-width: 0;
  height: 80px;
  border: var(--border-hairline);
  background-color: var(--color-paper-dark);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--color-sepia-20) 0,
    var(--color-sepia-20) 2px,
    transparent 2px,
    transparent 8px
  );
}

/* Reverse layout for alternating sections */
.theme-section__grid--reverse .theme-section__media {
  order: -1;
}

/* CTA */
.themes-cta {
  background-color: var(--color-paper-dark);
  padding-block: var(--space-3xl);
  border-top: var(--border-hairline);
  border-bottom: var(--border-hairline);
}

.themes-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-lg);
}

.themes-cta__text {
  max-width: 65ch;
  margin-inline: auto;
}

.themes-cta__actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  width: 100%;
  max-width: 48rem;
}

.themes-cta__actions .btn {
  width: 100%;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .themes-hero__inner {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .themes-hero__year-block {
    grid-column: span 3;
  }

  .themes-hero__content {
    grid-column: span 5;
  }

  .themes-index__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .theme-card {
    min-height: 140px;
  }

  .theme-section__grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .theme-section__text {
    grid-column: span 5;
  }

  .theme-section__media {
    grid-column: span 3;
  }

  .themes-cta__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  .themes-hero {
    padding-block: var(--space-xl) var(--space-lg);
  }

  .themes-hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding-block-start: var(--space-lg);
  }

  .themes-hero__year-block,
  .themes-hero__content {
    grid-column: 1 / -1;
  }

  .themes-hero__year {
    font-size: 2.5rem;
  }

  .themes-hero__frame--bottom {
    margin-top: var(--space-lg);
  }

  .themes-index {
    padding-block: var(--space-xl);
  }

  .themes-index__grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .theme-card {
    min-height: 0;
    padding: var(--space-sm);
  }

  .theme-section {
    padding-block: var(--space-xl);
  }

  .theme-section__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .theme-section__text,
  .theme-section__media,
  .theme-section__quote,
  .theme-section__filmstrip {
    grid-column: 1 / -1;
  }

  .theme-section__grid--reverse .theme-section__media {
    order: 0;
  }

  .theme-section__filmstrip {
    flex-direction: column;
  }

  .theme-section__frame {
    height: 60px;
  }

  .themes-cta {
    padding-block: var(--space-2xl);
  }

  .themes-cta__actions {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .themes-hero__year {
    font-size: 2rem;
  }

  .theme-section__quote {
    font-size: 1.25rem;
  }
}
