/* Built like the other pages' heroes and the opening of a story (ArticleHero): the same height, shading, type
   and motion, so the photograph holds still as the story opens */
.magazine-lead {
  position: relative;
  height: 92vh;
  height: 92svh;
  min-height: 620px;
  overflow: hidden;
  background-color: var(--night);
  color: var(--offwhite);
}

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

.magazine-lead__photo {
  position: absolute;
  inset: 0;
  margin: 0;
  animation: magazine-lead-settle 2400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes magazine-lead-settle {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1);
  }
}

/* On phones a story's headline, summary and button stand taller than a page's statement, so the shading
   reaches higher up the photograph (the headline measured at 3:1 or better) */
.magazine-lead__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(ellipse 85% 85% at 18% 88%, rgba(10, 26, 18, 0.9) 0%, rgba(10, 26, 18, 0.76) 50%, rgba(10, 26, 18, 0) 82%), linear-gradient(to top, rgba(10, 26, 18, 0.92) 0%, rgba(10, 26, 18, 0.82) 46%, rgba(10, 26, 18, 0.5) 72%, rgba(10, 26, 18, 0) 92%), linear-gradient(to bottom, rgba(10, 26, 18, 0.5) 0%, rgba(10, 26, 18, 0) 24%);
}

/* From 600px, the page heroes' shading: it gathers behind the headline at the lower left */
/* Tablet Portrait Up - Min 600px */
@media (min-width: 600px) {
  .magazine-lead__photo::after {
    background-image: radial-gradient(ellipse 85% 85% at 18% 88%, rgba(10, 26, 18, 0.9) 0%, rgba(10, 26, 18, 0.76) 50%, rgba(10, 26, 18, 0) 82%), linear-gradient(to top, rgba(10, 26, 18, 0.92) 0%, rgba(10, 26, 18, 0.72) 40%, rgba(10, 26, 18, 0.2) 70%, rgba(10, 26, 18, 0) 84%), linear-gradient(to bottom, rgba(10, 26, 18, 0.5) 0%, rgba(10, 26, 18, 0) 24%);
  }
}

.magazine-lead__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);
}

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

.magazine-lead__wrapper {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 4rem;
}

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

/* Desktop Up - Min 1200px */
@media (min-width: 1200px) {
  .magazine-lead__wrapper {
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 4.5rem;
  }
}

.magazine-lead__label {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--secondary-color-lighter);
  font-family: var(--body-font-family);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  animation: magazine-lead-rise 1200ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}

.magazine-lead__title {
  max-width: 1240px;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: -0.045em;
  animation: magazine-lead-rise 1400ms cubic-bezier(0.16, 1, 0.3, 1) 320ms both;
}

/* Tablet Portrait Up - Min 600px */
@media (min-width: 600px) {
  .magazine-lead__title {
    font-size: 60px;
  }
}

/* Tablet Landscape Up - Min 900px */
@media (min-width: 900px) {
  .magazine-lead__title {
    font-size: 72px;
  }
}

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

/* Big Desktop Up - Min 1800px */
@media (min-width: 1800px) {
  .magazine-lead__title {
    max-width: 1500px;
    font-size: 112px;
  }
}

.magazine-lead__title a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.1em;
  transition: text-decoration-color 400ms ease;
}

.magazine-lead__title a:hover {
  text-decoration-color: rgba(244, 242, 236, 0.6);
}

.magazine-lead__title a:focus-visible {
  outline: 2px solid var(--secondary-color-lighter);
  outline-offset: 6px;
}

/* ============================================ */
/* SUMMARY AND BUTTON */
/* ============================================ */

/* The summary and the date at the left, the button at the right from 900px, as on the home page */
.magazine-lead__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
  margin-top: 1.75rem;
  animation: magazine-lead-rise 1400ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both;
}

/* Tablet Landscape Up - Min 900px */
@media (min-width: 900px) {
  .magazine-lead__footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 3rem;
  }
}

.magazine-lead__summary {
  max-width: 560px;
  margin-top: 0;
  margin-bottom: 0;
  color: rgba(244, 242, 236, 0.86);
  font-size: 17px;
  line-height: 1.55;
}

/* Desktop Up - Min 1200px */
@media (min-width: 1200px) {
  .magazine-lead__summary {
    font-size: 18px;
  }
}

/* The topic and the date */
.magazine-lead__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  margin-top: 1rem;
  margin-bottom: 0;
  color: rgba(244, 242, 236, 0.78);
  font-size: 14px;
  line-height: 1.3;
}

.magazine-lead__meta span::after {
  content: "·";
  margin-left: 0.6rem;
}

.magazine-lead__footer .button {
  flex-shrink: 0;
}

@keyframes magazine-lead-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion shows the opening at rest */
@media (prefers-reduced-motion: reduce) {
  .magazine-lead__photo,
  .magazine-lead__label,
  .magazine-lead__title,
  .magazine-lead__footer {
    animation: none;
  }
}
