/* Set like the site's page intro (PageIntro): the same spacing, label, title, text and motion */
.article-header {
  padding-top: 4rem;
  padding-bottom: 1rem;
  background-color: var(--offwhite);
  color: var(--black);
}

/* Tablet Landscape Up - Min 900px */
@media (min-width: 900px) {
  .article-header {
    padding-top: 7rem;
    padding-bottom: 2rem;
  }
}

.article-header__wrapper {
  padding-left: 20px;
  padding-right: 20px;
}

/* Tablet Portrait Up - Min 600px */
@media (min-width: 600px) {
  .article-header__wrapper {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Desktop Up - Min 1200px */
@media (min-width: 1200px) {
  .article-header__wrapper {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* ============================================ */
/* HEADLINE */
/* ============================================ */

.article-header__text {
  max-width: 1200px;
}

/* Planet Dyna and the topics, as the label */
.article-header__trail ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  list-style: none;
  animation: article-header-rise 1200ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
}

.article-header__trail li:not(:last-child)::after {
  content: "·";
  margin-left: 0.6rem;
  color: var(--secondary-color-darkened);
}

.article-header__trail a {
  color: var(--secondary-color-darkened);
  text-decoration: none;
}

.article-header__trail a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-header__text h1 {
  max-width: 1100px;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.045em;
  animation: article-header-rise 1300ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}

/* Tablet Portrait Up - Min 600px */
@media (min-width: 600px) {
  .article-header__text h1 {
    font-size: 64px;
  }
}

/* Desktop Up - Min 1200px */
@media (min-width: 1200px) {
  .article-header__text h1 {
    font-size: 88px;
  }
}

.article-header__summary {
  max-width: 640px;
  margin-top: 1.75rem;
  margin-bottom: 0;
  color: var(--dark-gray);
  font-size: 19px;
  line-height: 1.55;
  animation: article-header-rise 1300ms cubic-bezier(0.16, 1, 0.3, 1) 350ms both;
}

.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.3;
  animation: article-header-rise 1300ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both;
}

@keyframes article-header-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion shows the page at rest */
@media (prefers-reduced-motion: reduce) {
  .article-header__trail ul,
  .article-header__text h1,
  .article-header__summary,
  .article-header__meta {
    animation: none;
  }
}

/* ============================================ */
/* PHOTOGRAPH */
/* ============================================ */

/* As in the page intro: 12px from the screen's edges and 16:9 below 1200px, 40px and 21:9 from 1200px */
.article-header__photo {
  overflow: hidden;
  margin-top: 3rem;
  margin-bottom: 0;
  margin-left: -8px;
  margin-right: -8px;
  aspect-ratio: 16 / 9;
  background-color: var(--sand);
}

/* Tablet Portrait Up - Min 600px */
@media (min-width: 600px) {
  .article-header__photo {
    margin-left: -20px;
    margin-right: -20px;
  }
}

/* Desktop Up - Min 1200px */
@media (min-width: 1200px) {
  .article-header__photo {
    margin-top: 4rem;
    margin-left: 0;
    margin-right: 0;
    aspect-ratio: 21 / 9;
  }
}

/* A small photograph keeps its own shape and is never drawn wider than it is */
.article-header__photo[data-article-header-small] {
  max-width: var(--article-header-photo-width, 100%);
  margin-left: 0;
  margin-right: 0;
  aspect-ratio: auto;
}

/* From 1200px it lines up with the article's reading column */

/* Desktop Up - Min 1200px */
@media (min-width: 1200px) {
  .article-header__photo[data-article-header-small] {
    max-width: min(760px, var(--article-header-photo-width, 100%));
    margin-left: 26vw;
  }
}

.article-header__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The house grade, as near as CSS gets: the site's own photographs are graded muted and warm in their files */
  filter: saturate(0.65) contrast(1.05) brightness(0.96) sepia(0.08);
}
