.rich-text {
  position: relative;
  background-color: rgb(var(--color-page-background));
}

.rich-text .block-heading {
  width: 100%;
}

.rich-text .block-button-group .button {
  white-space: normal;
}

.rich-text__background-image {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  user-select: none;
}

.rich-text__background-image img,
.rich-text__background-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rich-text__content {
  position: relative;
}

.rich-text__content .block-heading,
.rich-text__content .rte,
.rich-text__content .block-button-group {
  position: relative;
  z-index: 3;
}

.migration-rich-text {
  display: block;
  flex-direction: row;
  align-items: normal;
  justify-content: normal;
  color: #222;
  gap: normal;
  background: rgba(var(--color-background));
}

.migration-rich-text--page-intro {
  padding: clamp(40px, 6vw, 80px) 20px;
}

.migration-rich-text--page-intro .migration-rich-text__inner {
  max-width: 1280px;
}

.migration-rich-text__breadcrumb {
  margin: 0 0 14px;
  color: #5c6b60;
  font-size: 11px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.migration-rich-text__breadcrumb a {
  color: inherit !important;
  transition: color 0.2s ease;
}

.migration-rich-text--page-intro:not(.migration-rich-text--page-intro-inverse) .migration-rich-text__breadcrumb a:hover {
  color: #173824 !important;
}

.migration-rich-text--page-intro h1 {
  margin: 0 0 16px;
  color: #173824;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
}

.migration-rich-text--page-intro p {
  max-width: 600px;
  margin: 0;
  color: #3d4c42;
  font-size: 16px;
  line-height: 1.7;
}

.migration-rich-text--centered-narrative {
  display: block;
  padding: 96px 20px !important;
}

.migration-rich-text--centered-narrative .migration-rich-text__narrative-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.migration-rich-text--centered-narrative .migration-rich-text__eyebrow {
  margin: 0 0 16px;
  color: #214e34;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.migration-rich-text--centered-narrative h1 {
  margin: 0 0 20px;
  color: #173824;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}

.migration-rich-text--centered-narrative p {
  margin: 0;
  color: #3d4c42;
  font-size: 17px;
  line-height: 1.8;
}

/* Full-bleed yard photograph behind the narrative, white type over it
   (v2 #21). The scrim keeps the copy legible whatever the photo is doing. */
.migration-rich-text--centered-narrative.migration-rich-text--has-media {
  position: relative;
  background-image: linear-gradient(rgba(11, 28, 18, 0.62), rgba(11, 28, 18, 0.62)), var(--narrative-image);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* Both class names, so this outranks the narrative-secondary heading colour
   defined further down the file at equal specificity. */
.migration-rich-text--centered-narrative.migration-rich-text--has-media .migration-rich-text__eyebrow,
.migration-rich-text--centered-narrative.migration-rich-text--has-media h1,
.migration-rich-text--centered-narrative.migration-rich-text--has-media h2,
.migration-rich-text--centered-narrative.migration-rich-text--has-media p,
.migration-rich-text--centered-narrative.migration-rich-text--has-seasons .migration-rich-text__eyebrow,
.migration-rich-text--centered-narrative.migration-rich-text--has-seasons h1,
.migration-rich-text--centered-narrative.migration-rich-text--has-seasons h2,
.migration-rich-text--centered-narrative.migration-rich-text--has-seasons p {
  color: #f7f4ec;
}

.migration-rich-text--centered-narrative.migration-rich-text--has-media h1,
.migration-rich-text--centered-narrative.migration-rich-text--has-media h2,
.migration-rich-text--centered-narrative.migration-rich-text--has-seasons h1,
.migration-rich-text--centered-narrative.migration-rich-text--has-seasons h2 {
  text-shadow: 0 1px 18px rgba(9, 24, 15, 0.4);
}

/* Sep 1 #43: the same band, but the photograph moves through the year. The
   layers are stacked in one box behind the copy and each is on screen for its
   own slot of the cycle, fading into the next — so "season after season" is
   shown rather than claimed. No script: the whole thing is four elements and
   a keyframe. The band carries the first season as its own background, which
   is what shows before the cycle reaches it and what a reduced-motion visitor
   keeps, since the global reset collapses these animations to nothing. */
.migration-rich-text--centered-narrative.migration-rich-text--has-seasons {
  position: relative;
  isolation: isolate;
}

.migration-rich-text__seasons {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-color: #0b1c12;
  background-position: center center;
  background-size: cover;
}

.migration-rich-text__season {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  opacity: 0;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* The scrim sits above the photographs and below the copy, so the type keeps
   the contrast it has over a single photograph. */
.migration-rich-text__seasons::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 28, 18, 0.62);
}

/* A season holds for 8s whatever the count, so only the cycle length changes
   with it — hence one keyframe set per count, selected by counting the layers
   that are actually there. Two and three are for a half-configured band; four
   is the case this was built for. */
.migration-rich-text__seasons > :first-child:nth-last-child(2),
.migration-rich-text__seasons > :first-child:nth-last-child(2) ~ .migration-rich-text__season {
  animation-name: bpn-seasons-2;
  animation-duration: 16s;
}

.migration-rich-text__seasons > :first-child:nth-last-child(3),
.migration-rich-text__seasons > :first-child:nth-last-child(3) ~ .migration-rich-text__season {
  animation-name: bpn-seasons-3;
  animation-duration: 24s;
}

.migration-rich-text__seasons > :first-child:nth-last-child(4),
.migration-rich-text__seasons > :first-child:nth-last-child(4) ~ .migration-rich-text__season {
  animation-name: bpn-seasons-4;
  animation-duration: 32s;
}

.migration-rich-text__season:nth-child(2) {
  animation-delay: 8s;
}

.migration-rich-text__season:nth-child(3) {
  animation-delay: 16s;
}

.migration-rich-text__season:nth-child(4) {
  animation-delay: 24s;
}

@keyframes bpn-seasons-2 {
  0% { opacity: 0; }
  6%, 50% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

@keyframes bpn-seasons-3 {
  0% { opacity: 0; }
  4%, 33.33% { opacity: 1; }
  37.33%, 100% { opacity: 0; }
}

@keyframes bpn-seasons-4 {
  0% { opacity: 0; }
  3%, 25% { opacity: 1; }
  28%, 100% { opacity: 0; }
}

.migration-rich-text--page-intro-inverse {
  padding: clamp(40px, 6vw, 72px) 20px;
  color: #f7f4ec;
}

.migration-rich-text--page-intro-inverse .migration-rich-text__breadcrumb,
.migration-rich-text--page-intro-inverse .migration-rich-text__breadcrumb a {
  color: rgba(247, 244, 236, 0.7) !important;
}

.migration-rich-text--page-intro-inverse h1 {
  color: #f7f4ec;
}

.migration-rich-text--page-intro-inverse p {
  color: rgba(247, 244, 236, 0.85);
}

.migration-rich-text--centered-cta {
  padding: clamp(48px, 7vw, 90px) 20px;
  text-align: center;
}

.migration-rich-text__cta-inner {
  max-width: 680px;
  margin: 0 auto;
}

.migration-rich-text--centered-cta h2 {
  margin: 0 0 16px;
  color: #173824;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.12;
}

.migration-rich-text--centered-cta p {
  margin: 0 0 28px;
  color: #3d4c42;
  font-size: 15px;
  line-height: 1.75;
}

.migration-rich-text__button {
  display: inline-block;
  padding: 18px 32px;
  color: #f7f4ec !important;
  font-size: 13px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #214e34;
  border-radius: 999px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.migration-rich-text__button:hover {
  background: #173824;
}

.migration-rich-text__button:focus-visible {
  outline: 2px solid #214e34;
  outline-offset: 3px;
}

@media (min-width: 750px) and (max-width: 1079px) {
  .migration-rich-text--centered-narrative {
    padding-block: 53.76px !important;
  }

  .migration-rich-text--centered-narrative h1 {
    font-size: 33.792px;
  }
}

@media (max-width: 749px) {
  .migration-rich-text--centered-narrative {
    padding-block: 48px !important;
  }

  .migration-rich-text--centered-narrative h1 {
    font-size: 30px;
  }
}

.migration-rich-text .migration-rich-text__inline-link {
  color: inherit !important;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.migration-rich-text .migration-rich-text__inline-link:hover {
  color: #173824 !important;
}

/* Secondary centered narrative (in-page band with an h2 and tighter measure) */
.migration-rich-text--narrative-secondary {
  padding: clamp(56px, 8vw, 100px) 20px !important;
  text-align: center;
}

.migration-rich-text--narrative-secondary .migration-rich-text__narrative-inner {
  max-width: 760px;
}

.migration-rich-text--narrative-secondary h2 {
  margin: 0 0 18px;
  color: #173824;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}

.migration-rich-text--narrative-secondary p {
  font-size: 16px;
  line-height: 1.75;
}
