/*
 * Points with icons and a photo (plan-photo-points-reverse-bnr): on pale teal, an eyebrow, a heading, a paragraph
 * and three points, each with its own icon and a bold lead-in, beside a photo filling the right half (Growth's
 * "About the plan"). The icons are drawn in CSS: a shield, three lines and a rising line. On phones the photo sits
 * above.
 */

.wp-block-group.plan-pattern.plan-pattern--photo-points-reverse-bnr {
  display: flex;
  flex-wrap: wrap-reverse;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: var(--teal-pale);
  color: var(--text);
}

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

/* The photo */

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

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

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

/* The words */

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

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

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

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* The three points, each with its icon on the left */

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 6px;
}

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-point {
  position: relative;
  margin: 0;
  padding-left: 38px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-point strong {
  color: #0d3d39;
}

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-point::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background: var(--teal-darker);
  content: "";
  -webkit-mask: var(--plan-point-icon) center / contain no-repeat;
  mask: var(--plan-point-icon) center / contain no-repeat;
}

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-point--shield {
  --plan-point-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z'/%3E%3C/svg%3E");
}

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-point--lines {
  --plan-point-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
}

.plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-point--growth {
  --plan-point-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E");
}

/*
 * 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-points-reverse-bnr .plan-pattern__photo-points-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-points-reverse-bnr {
    flex-direction: column;
  }

  .plan-pattern--photo-points-reverse-bnr .plan-pattern__photo-points-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-points-reverse-bnr .plan-pattern__photo-points-reverse-bnr-content {
    position: sticky;
    bottom: 0;
    z-index: 0;
    flex: none;
  }
}

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

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

/* Phones */

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

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