/* =================================================================
   SNOWLEOPARD Studio & Research — fieldnote.css
   Field Note article pages (the-bisons-biological-archive.html): opening
   plate, essay column, sources and the newsletter band.
   Depends on the tokens, header and footer in base.css.
   ================================================================= */

/* ----- Opening plate ---------------------------------------------- */
/* Height scales with width (42vw against the 4:3 photograph) so the subject
   is never cropped on wide screens. */
.es-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(
    --apothecary
  ); /* Fallback ground if the photograph fails to load. */
}
.es-hero-bg {
  position: absolute;
  inset: 0;
  /* Keeps the near bull in frame at every aspect ratio. */
  background: url("../images/fieldnotes/living-prairie.jpg") 80% 90% / cover
    no-repeat;
}
.es-hero-veil {
  position: absolute;
  inset: 0;
  /* A heavier veil than the other banners, because the grass under the type is
     sunlit; deepest at the foot, released across the herd. */
}
.es-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 6rem var(--edge) 7rem;
}
.es-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone);
}
.es-hero h1 {
  color: var(--bone);
  font-weight: 600;
  font-size: clamp(2.4rem, 4.5vw, 3.95rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 1.1rem 0 1.2rem;
  max-width: 22ch;
  text-wrap: balance;
}
.es-standfirst {
  font-size: 1.16rem;
  font-weight: 400;
  line-height: 1.8;
  color: rgba(243, 239, 230, 0.92);
  max-width: 52ch;
  margin: 0;
  text-wrap: balance;
}
/* Photograph credit inside the veil; its opacity meets WCAG AA against the
   fallback ground as well as the photograph. */
.es-hero-cap {
  color: rgba(243, 239, 230, 0.72);
  margin-top: 1.8rem;
}

/* ----- Essay ------------------------------------------------------ */
/* One centred column on the site measure, with a guaranteed page edge. */
.es-article {
  padding-block: 4rem 5.5rem;
  padding-inline: max(var(--edge), calc((100% - var(--measure)) / 2));
}
.es-article h2 {
  font-weight: 600;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  line-height: 1.2;
  color: var(--apothecary);
  margin: 3.2rem 0 1.3rem;
}
.es-article section:first-child h2 {
  margin-top: 0;
}
.es-article p {
  font-weight: 400;
  margin-bottom: 1.7rem;
}
.es-article section > p:last-child {
  margin-bottom: 0;
}
.es-article section {
  margin-bottom: 0.5rem;
}

.es-fig {
  margin: 2.6rem 0 2.8rem;
}
.es-fig img {
  width: 100%;
  display: block;
}
.es-fig .media-caption a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(38, 38, 38, 0.35);
}
.es-fig .media-caption a:hover {
  border-color: var(--fireweed);
  color: var(--fireweed);
}

/* ----- Sources ---------------------------------------------------- */
.es-sources ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.es-sources li {
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 0.95rem;
  padding-left: 1.4rem;
  position: relative;
}
.es-sources li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.55rem;
  height: 1px;
  background: rgba(38, 38, 38, 0.45);
}
.es-sources a {
  color: var(--fireweed);
  text-decoration: none;
  border-bottom: 1px solid rgba(152, 38, 81, 0.35);
  overflow-wrap: anywhere;
}
.es-sources a:hover {
  border-color: var(--fireweed);
}

/* ----- Newsletter band -------------------------------------------- */
/* A Birch ground separates the band from the essay's parchment. */
.field-notes {
  background: var(--birch-light);
}
.field-notes::before {
  height: min(430px, 84%);
}

/* ----- Responsive ------------------------------------------------- */
@media (max-width: 600px),
  (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .es-hero-inner {
    padding: 4.5rem var(--edge) 5.5rem;
  }
  .es-article {
    padding-block: 3rem 4rem;
  }
}

/* The plate shows landscape around the subject, under a neutral veil. */
.es-hero {
  min-height: clamp(620px, 49.5vw, 760px);
}
.es-hero-bg {
  background-image: url("../images/fieldnotes/living-prairie.jpg");
  background-position: 80% 52%;
  background-size: cover;
  background-repeat: no-repeat;
}
.es-hero-veil {
  background: linear-gradient(
    to top,
    rgba(18, 18, 16, 0.72) 0%,
    rgba(18, 18, 16, 0.66) 48%,
    rgba(18, 18, 16, 0.42) 70%,
    rgba(18, 18, 16, 0.18) 86%,
    rgba(18, 18, 16, 0.05) 100%
  );
}
@media (min-width: 1025px) and (orientation: landscape),
  (min-width: 1025px) and (hover: hover),
  (min-width: 1367px) {
  .es-standfirst {
    font-weight: 600;
  }
}
@media (max-width: 1024px),
  (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .es-hero {
    min-height: clamp(460px, 64vw, 620px);
  }
  .es-hero-veil {
    background: linear-gradient(
      to top,
      rgba(18, 18, 16, 0.76) 0%,
      rgba(18, 18, 16, 0.72) 54%,
      rgba(18, 18, 16, 0.52) 76%,
      rgba(18, 18, 16, 0.28) 91%,
      rgba(18, 18, 16, 0.16) 100%
    );
  }
}
@media (max-width: 600px),
  (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .es-hero {
    min-height: clamp(430px, 118vw, 560px);
  }
  /* Phones: the image lifts and the type strengthens over the grass. */
  .es-hero-bg {
    background-image: url("../images/fieldnotes/living-prairie.jpg");
    /* A slight vertical zoom gives the image room to move in a tall band. */
    background-size: auto 112%;
    background-position: 80% 100%;
    background-repeat: no-repeat;
  }
  .es-hero-veil {
    background: linear-gradient(
      to top,
      rgba(18, 18, 16, 0.68) 0%,
      rgba(18, 18, 16, 0.64) 60%,
      rgba(18, 18, 16, 0.5) 81%,
      rgba(18, 18, 16, 0.32) 94%,
      rgba(18, 18, 16, 0.2) 100%
    );
  }
  .es-standfirst {
    font-weight: 600;
    color: rgba(243, 239, 230, 0.96);
  }
}
