/* Section: events, workshops and posts. The list of rows, the line with
   type, date and event details, and the single article page. */

/* Type, date, time and place, split by hairlines */
.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-muted);
}
.update-meta > div { padding-inline-end: .875rem; }
.update-meta > div + div {
  padding-inline-start: .875rem;
  border-inline-start: 1px solid var(--rule);
}
.update-meta__type { font-weight: 600; color: var(--ink); }
.update-meta__upcoming { font-weight: 600; color: var(--terracotta-ink); }

.page-header .update-meta { margin-block-start: 1.5rem; color: var(--on-dark-muted); }
.page-header .update-meta > div + div { border-inline-start-color: var(--rule-on-dark); }
.page-header .update-meta__type { color: var(--on-dark); }
.page-header .update-meta__upcoming { color: var(--amber); }

/* The list */
.updates { padding-block: clamp(2.5rem, 5vw, 4rem) var(--section); }

.updates__filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.25rem, 2.4vw, 2.25rem);
}
.updates__filter-list a {
  display: inline-block;
  padding-block: .65rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(var(--terracotta), var(--terracotta)) no-repeat 0 100% / 0 2px;
  transition: background-size .25s;
}
[dir="rtl"] .updates__filter-list a { background-position: 100% 100%; }
.updates__filter-list a:hover,
.updates__filter-list a[aria-current] { background-size: 100% 2px; }
.updates__filter-list a[aria-current] { font-weight: 600; }

.updates__list {
  margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
  border-block-start: 1px solid var(--rule);
}
.update-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: 1.25rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-block-end: 1px solid var(--rule);
}
/* Rows without a photo keep their text in the same column */
.update-row__text { grid-column: 1; grid-row: 1; }
.update-row__photo {
  grid-column: 2;
  grid-row: 1;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--forest-deep);
}
.update-row__photo img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.update-row__title { font-size: clamp(1.6rem, 1.4vw + 1.2rem, 2.5rem); }
.update-row__link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .15em;
  transition: text-decoration-color .25s;
}
/* The whole row is the target; the title stays the only link */
.update-row__link::after { content: ""; position: absolute; inset: 0; }
.update-row:hover .update-row__link,
.update-row__link:focus-visible { text-decoration-color: var(--terracotta); }
.update-row .update-meta { margin-block-start: .875rem; }
.update-row__summary { max-inline-size: 34rem; margin-block-start: .875rem; }

.updates__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-block-start: 2.5rem;
  font-size: 1rem;
  color: var(--ink-muted);
}
.updates__pages a { color: var(--ink); }
.updates__empty { margin-block-start: 2rem; color: var(--ink-muted); }

/* The article */
.update__inner { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
/* The lead photo is wider than the text; its caption keeps to the text column */
.update__figure {
  max-inline-size: var(--measure-wide);
  margin-inline: auto;
  margin-block-end: clamp(2.5rem, 5vw, 4rem);
}
.update__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--forest-deep);
}
.update__frame img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.update__caption {
  max-inline-size: var(--measure);
  margin-inline: auto;
  margin-block-start: .875rem;
  font-size: 1rem;
  color: var(--ink-muted);
}
.update__back {
  max-inline-size: var(--measure);
  margin-inline: auto;
  margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
}
a:hover > .arrow--back { transform: translateX(-.25em); }
[dir="rtl"] a:hover > .arrow--back { transform: scaleX(-1) translateX(-.25em); }

/* One closing prompt, on the action ground */
.update-close {
  background: var(--amber);
  color: var(--forest-deep);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.update-close__title { font-size: clamp(2.1rem, 3.4vw + .8rem, 3.75rem); }
.update-close__text {
  max-inline-size: 34rem;
  margin-block: 1rem 1.75rem;
  font-size: 1.25rem;
  line-height: 1.45;
}

@media (max-width: 53.75em) {
  .update-row { grid-template-columns: minmax(0, 1fr); }
  .update-row__text,
  .update-row__photo { grid-column: auto; grid-row: auto; }
  .update-row__photo { order: -1; }
  .update__frame { aspect-ratio: 4 / 3; }
}
