/*
 * Timeline and photo (plan-photo-timeline-reverse-bnr): on the darkest teal, an eyebrow, a heading, who the plan
 * suits as points along one teal line, each marked with a dot, and a "Talk to us" link, beside a photo filling the
 * right half (Partnership's "Ideal for"). On phones the photo sits above.
 */

.wp-block-group.plan-pattern.plan-pattern--photo-timeline-reverse-bnr {
  display: flex;
  flex-wrap: wrap-reverse;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: #0d3d39;
  color: #f4f3ee;
}

.plan-pattern--photo-timeline-reverse-bnr .wp-block-group__inner-container {
  display: contents;
}

/* The photo */

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-photo {
  position: relative;
  flex: 1 1 520px;
  min-width: 0;
  min-height: 600px;
  margin: 0;
  background: var(--teal-darker);
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-photo img[src=""] {
  display: none;
}

/* The words */

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-content {
  display: flex;
  flex: 1 1 520px;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  min-width: 0;
  padding: 64px 56px;
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-heading {
  margin: 0;
  color: var(--white);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: none;
}

/* The timeline: one line down the left, a dot on it beside each point */

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--teal-dark);
  list-style: none;
  font-size: 17px;
  line-height: 1.45;
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-list li {
  position: relative;
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-list li::before {
  position: absolute;
  top: 4px;
  left: -37px;
  box-sizing: content-box;
  width: 14px;
  height: 14px;
  border: 2px solid #0d3d39;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-link {
  margin: 0;
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-link a {
  color: var(--teal);
  font-weight: 600;
}

.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-link a:hover,
.plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-link a:focus-visible {
  color: var(--white);
}

/*
 * Side by side: the photo keeps the wireframe's near-square shape as the page widens, so it stays cropped close
 * on its subject instead of turning into a wide strip.
 */

@media (min-width: 1040px) {
  .plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-photo {
    aspect-ratio: 16 / 15;
  }
}

/*
 * Tablets and phones: the photo is a window over the words, as on the banner but without its arrow.
 *
 * The photo comes first and the words follow, held to the bottom of the screen (sticky) and tucked beneath it.
 * Scrolling moves the photo up while the words stay put, uncovering them, until they reach their own place and
 * scroll on with the page. Visitors who ask for less motion get the photo above the words, with nothing moving.
 */

@media (max-width: 1039px) {
  .wp-block-group.plan-pattern.plan-pattern--photo-timeline-reverse-bnr {
    flex-direction: column;
  }

  .plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-photo {
    z-index: 1;
    flex: none;
    order: -1;
    height: 75vh;
    height: 75svh;
    min-height: 320px;
    box-shadow: 0 18px 32px rgba(4, 30, 28, 0.3);
  }

  .plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-content {
    position: sticky;
    bottom: 0;
    z-index: 0;
    flex: none;
  }
}

@media (max-width: 1039px) and (prefers-reduced-motion: reduce) {
  .plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-photo {
    box-shadow: none;
  }

  .plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-content {
    position: static;
  }
}

/* Phones */

@media (max-width: 700px) {
  .plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-photo {
    min-height: 280px;
  }

  .plan-pattern--photo-timeline-reverse-bnr .plan-pattern__photo-timeline-reverse-bnr-content {
    padding: 44px 16px;
  }
}
