/* Bands 7–10: who's in the room, reach and press, partners, get involved. The footer lives in footer.css. */

/* ---------- 7 · Who's in the room ---------- */

.band--room {
  background-color: var(--color-surface-soft);
}

.room {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.room__split {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.room__split li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: center;
  padding-top: 1rem;
  background-image: var(--stitch);
  background-size: var(--stitch-pitch) var(--stitch-dot);
  background-repeat: repeat-x;
  background-position: 0 0;
}

/* The figure is dot-matrix; the percent sign is plain body type in the same hue, sitting on the dots' baseline. */
.room__figure {
  --dot: 10px;
  --dot-gap: 1px;
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: calc(7 * var(--dot) + 6 * var(--dot-gap) + 0.35rem + 2.6rem);
}

.room__pct {
  font-size: 2.75rem;
  font-style: normal;
  font-weight: 600;
  line-height: 0.8;
  color: var(--hue);
}

.room__split li > span {
  line-height: 1.4;
  color: var(--color-navy);
}

.room__chart {
  justify-self: center;
  display: grid;
  width: 100%;
  max-width: 480px;
  gap: 1.25rem;
}

/* Three blocks, areas 40 / 30 / 30: the tall block takes 40% of the width, the other two share the rest */
.quilt {
  --quilt-gap: 12px;
  display: grid;
  grid-template-columns: 40fr 60fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--quilt-gap);
  aspect-ratio: 1;
}

.quilt__block {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  color: var(--hue);
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.quilt__block:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.quilt__block:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.quilt__block:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

/* The SVG is sized in px by the script (square cells); the block centres it */
.quilt__svg {
  display: block;
  width: auto;
  height: auto;
}

/* Hovering a row of the list lights its block and calms the other two */
.room:has(.room__split li:nth-child(1):hover) .quilt__block:not(:nth-child(1)),
.room:has(.room__split li:nth-child(2):hover) .quilt__block:not(:nth-child(2)),
.room:has(.room__split li:nth-child(3):hover) .quilt__block:not(:nth-child(3)) {
  opacity: 0.3;
}

.room__caption {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
}

/* ---------- 8 · Reach and press ---------- */

.band--press {
  padding-block: var(--space-band-tight);
}

/* One eyebrow across the band; the figure and the title start on the same line below it */
.press__eyebrow {
  margin-bottom: 1.75rem;
}

.press {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.press__figure {
  --dot: clamp(7px, 0.3rem + 0.55vw, 13px);
  --dot-gap: 3px;
  --hue: var(--color-violet);
}

.press__figure-label {
  max-width: 34ch;
  margin-top: 1rem;
  font-size: var(--text-base);
  line-height: 1.45;
  color: var(--color-navy);
}

.press__title {
  margin: -0.12em 0 0; /* cap height level with the top row of the figure */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--display-4);
  line-height: 1;
  color: var(--color-plum);
}

.clippings {
  margin-top: 1.25rem;
  background-image: var(--stitch);
  background-size: var(--stitch-pitch) var(--stitch-dot);
  background-repeat: repeat-x;
  background-position: 0 0;
}

.clipping {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  align-items: center;
  padding: 1rem 0;
  background-image: var(--stitch);
  background-size: var(--stitch-pitch) var(--stitch-dot);
  background-repeat: repeat-x;
  background-position: 0 100%;
}

/* The outlet's own logo (public-domain wordmark SVGs from Wikimedia Commons), greyscale so the three sit
   quietly beside the headlines. Each row sets its own width so the wordmarks look equally weighty. */
.clipping__outlet {
  display: flex;
  align-items: center;
}

.clipping__logo {
  display: block;
  width: min(100%, var(--logo-w, 180px));
  height: auto;
  filter: grayscale(1);
}

.clipping__headline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--display-6);
  line-height: 1.15;
  color: var(--color-navy);
  quotes: "“" "”";
  hanging-punctuation: first;
}

/* ---------- 9 · Partners ---------- */

.logo-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background-image: var(--stitch), var(--stitch);
  background-size: var(--stitch-pitch) var(--stitch-dot), var(--stitch-dot) var(--stitch-pitch);
  background-repeat: repeat-x, repeat-y;
  background-position: 0 0, 0 0;
}

.logo-wall li {
  --logo-w: min(64%, 160px);
  --logo-h: 40px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 1rem;
  background-image: var(--stitch), var(--stitch);
  background-size: var(--stitch-pitch) var(--stitch-dot), var(--stitch-dot) var(--stitch-pitch);
  background-repeat: repeat-x, repeat-y;
  background-position: 0 100%, 100% 0;
  color: var(--color-plum);
  transition: background-color var(--duration-normal) var(--ease-out-expo);
}

/* At rest every mark is the same plum ink, drawn through the logo's alpha as a mask (image set inline) */
.logo-wall__ink {
  display: block;
  width: var(--logo-w);
  height: var(--logo-h);
  background: currentColor;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  opacity: 0.8;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

/* The true colours sit underneath and come up on hover */
.logo-wall__colour {
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--logo-w);
  height: var(--logo-h);
  object-fit: contain;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

@media (hover: hover) {
  .logo-wall li:hover {
    background-color: var(--color-surface-soft);
  }

  .logo-wall li:hover .logo-wall__ink {
    opacity: 0;
  }

  .logo-wall li:hover .logo-wall__colour {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-wall__ink,
  .logo-wall__colour {
    transition-duration: 1ms;
  }
}

.academic {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem 3rem;
  margin-top: var(--space-band-tight);
  padding: clamp(2.5rem, 2rem + 2vw, 3.75rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: 24px;
  background-color: var(--color-surface-soft);
}

.academic__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--display-5);
  line-height: 1.1;
  color: var(--color-plum);
}

.academic__list {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-navy);
}

.academic__list li {
  padding-left: 1.1rem;
  position: relative;
}

.academic__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: var(--dot-marker);
  height: var(--dot-marker);
  border-radius: 50%;
  background: var(--color-oxblood);
}

/* ---------- 10 · Get involved: seven doors ---------- */

.doors {
  margin: 0;
  padding: 0;
  list-style: none;
  background-image: var(--stitch);
  background-size: var(--stitch-pitch) var(--stitch-dot);
  background-repeat: repeat-x;
  background-position: 0 0;
}

.door {
  display: grid;
  grid-template-columns: 3rem minmax(200px, 0.5fr) minmax(0, 1fr) 3rem;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.25rem 0.75rem;
  background-image: var(--stitch);
  background-size: var(--stitch-pitch) var(--stitch-dot);
  background-repeat: repeat-x;
  background-position: 0 100%;
  transition: background-color var(--duration-normal) var(--ease-out-expo);
}

.door:focus-visible {
  background-color: var(--color-surface-soft);
}

.door__index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.door__name {
  font-family: var(--font-display);
  font-size: var(--display-4);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-plum);
  transition: color var(--duration-normal) var(--ease-out-expo);
}

.door:focus-visible .door__name {
  color: var(--hue);
}

.door__line {
  line-height: 1.4;
  color: var(--color-navy);
  text-wrap: pretty;
}

/* Three dots in the door's hue; they stay put (the row tint and name colour carry the hover) */
.door__arrow {
  position: relative;
  width: 2.5rem;
  height: 8px;
  justify-self: end;
  color: var(--hue);
}

.door__arrow::before,
.door__arrow::after {
  content: "";
  position: absolute;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.door__arrow::before {
  left: 0;
  box-shadow: 14px 0 0 currentColor;
}

.door__arrow::after {
  left: 28px;
}

@media (hover: hover) {
  .door:hover {
    background-color: var(--color-surface-soft);
  }

  .door:hover .door__name {
    color: var(--hue);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .room,
  .press,
  .academic {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  /* No stitch dots on phones: the text gets the whole row */
  .door {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .door__line {
    grid-column: 2;
  }

  .door__arrow {
    display: none;
  }

  /* Stacked: room between the outlet's logo and its headline */
  .clipping {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem 0;
  }

  /* The audience composition is a third smaller on phones, centred, with the caption full width */
  .quilt {
    width: 67%;
    justify-self: center;
  }

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