/*
 * What's included with a photo (plan-photo-included-bnr, plan-photo-included-reverse-bnr): a photo filling one
 * half, beside the heading, a line, what the plan includes as ticked points on fine lines, and a link to every
 * service.
 *
 * - photo-included-bnr: the photo on the left, on white (Partnership).
 * - photo-included-reverse-bnr: the photo on the right.
 * - photo-included-bnr-teal: on light teal, with pale teal lines (Growth).
 * - photo-included-bnr-ledger: on warm cream, the points in two columns on dark lines (Executive).
 *
 * On phones the photo sits above.
 */

.wp-block-group.plan-pattern.plan-pattern--photo-included-bnr {
  --plan-included-line: #e8ebe5;
  --plan-included-tick: var(--teal-darker);

  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: var(--white);
  color: var(--text);
}

.wp-block-group.plan-pattern.plan-pattern--photo-included-reverse-bnr {
  flex-wrap: wrap-reverse;
}

.wp-block-group.plan-pattern.plan-pattern--photo-included-bnr-teal {
  --plan-included-line: var(--border);

  background: var(--teal-light);
}

.wp-block-group.plan-pattern.plan-pattern--photo-included-bnr-ledger {
  --plan-included-line: #0d3d39;

  background: #f4f3ee;
}

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

/* The photo */

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

.plan-pattern--photo-included-bnr-teal .plan-pattern__photo-included-bnr-photo {
  min-height: 560px;
  background: var(--teal-pale);
}

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

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

/* The words */

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

.plan-pattern--photo-included-bnr .plan-pattern__photo-included-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-included-bnr .plan-pattern__photo-included-bnr-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* The list: each point ticked, on a fine line; always two columns on the ledger design, one on phones */

.plan-pattern--photo-included-bnr .plan-pattern__photo-included-bnr-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.plan-pattern--photo-included-bnr-ledger .plan-pattern__photo-included-bnr-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.plan-pattern--photo-included-bnr .plan-pattern__photo-included-bnr-list li {
  position: relative;
  padding: 12px 0 12px 34px;
  border-bottom: 1px solid var(--plan-included-line);
}

.plan-pattern--photo-included-bnr-ledger .plan-pattern__photo-included-bnr-list li {
  padding-top: 14px;
  padding-bottom: 14px;
}

.plan-pattern--photo-included-bnr .plan-pattern__photo-included-bnr-list li::before {
  position: absolute;
  top: 12px;
  left: 0;
  width: 22px;
  height: 22px;
  background: var(--plan-included-tick);
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.plan-pattern--photo-included-bnr-ledger .plan-pattern__photo-included-bnr-list li::before {
  top: 14px;
}

.plan-pattern--photo-included-bnr .plan-pattern__photo-included-bnr-more {
  margin: 0;
}

.plan-pattern--photo-included-bnr .plan-pattern__photo-included-bnr-more a {
  color: var(--teal-darker);
  font-weight: 600;
}

.plan-pattern--photo-included-bnr .plan-pattern__photo-included-bnr-more a:hover,
.plan-pattern--photo-included-bnr .plan-pattern__photo-included-bnr-more a:focus-visible {
  color: #0d3d39;
}

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

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

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

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

/* Phones */

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

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

  .plan-pattern--photo-included-bnr-ledger .plan-pattern__photo-included-bnr-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
