/* Shared visual details for the new topic hubs. The guide typography stays in guide-pages.css. */

.topic-visual-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  background: var(--line);
  border: 1px solid var(--line);
}

.topic-visual-strip figure {
  display: flex;
  min-width: 0;
  flex-direction: column;
  margin: 0;
  background: var(--cream);
}

.topic-visual-strip figure:nth-child(2) {
  background: var(--paper-deep);
}

.topic-visual-strip figure:nth-child(3) {
  background: #d8e1d3;
}

.topic-visual-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.topic-visual-strip figcaption {
  display: flex;
  min-height: 10.5rem;
  flex-direction: column;
  padding: 1.05rem;
}

.topic-visual-strip figcaption > span,
.topic-card__topline,
.topic-card__meta {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  line-height: 1.45;
  text-transform: uppercase;
}

.topic-visual-strip figcaption > a {
  margin-top: auto;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-decoration: none;
}

.topic-visual-strip figcaption > a span {
  color: var(--rust);
  font-family: var(--sans);
  font-size: 0.8em;
}

.topic-visual-strip figcaption p {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
}

.topic-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  background: var(--line);
  border: 1px solid var(--line);
}

.topic-card {
  display: flex;
  min-width: 0;
  min-height: 15.5rem;
  flex-direction: column;
  padding: 1.35rem;
  background: var(--paper);
  transition: background 180ms ease, transform 180ms ease;
}

.topic-card:nth-child(4n + 2) {
  background: var(--cream);
}

.topic-card:nth-child(4n + 3) {
  background: var(--paper-deep);
}

.topic-card:nth-child(4n + 4) {
  background: #d8e1d3;
}

.topic-card:hover {
  position: relative;
  z-index: 1;
  background: #fffdf8;
  transform: translateY(-3px);
}

.topic-card__topline,
.topic-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.topic-card__number {
  color: var(--rust-dark);
}

.topic-card h3 {
  max-width: 12ch;
  margin: auto 0 0.65rem;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.topic-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.topic-card h3 i {
  color: var(--rust);
  font-style: italic;
}

.topic-card p {
  max-width: 31rem;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.62;
}

.topic-card__meta {
  margin-top: 1.1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.topic-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  background: var(--line);
  border: 1px solid var(--line);
}

.topic-note-grid > div {
  min-height: 10rem;
  padding: 1.15rem;
  background: var(--cream);
}

.topic-note-grid > div:nth-child(2) {
  background: var(--paper-deep);
}

.topic-note-grid > div:nth-child(3) {
  background: #d8e1d3;
}

.topic-note-grid h3 {
  margin-bottom: 0.6rem;
  font-size: 1.45rem;
}

.topic-note-grid p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.58;
}

@media (max-width: 780px) {
  .topic-visual-strip,
  .topic-card-grid,
  .topic-note-grid {
    grid-template-columns: 1fr;
  }

  .topic-visual-strip figure {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .topic-visual-strip img {
    height: 100%;
  }

  .topic-visual-strip figcaption {
    min-height: 0;
  }

  .topic-card {
    min-height: 14.5rem;
  }
}

@media (max-width: 520px) {
  .topic-visual-strip figure {
    display: block;
  }

  .topic-visual-strip img {
    height: auto;
  }

  .topic-visual-strip figcaption {
    min-height: 10rem;
  }
}
