/*
 * Photo and checklist (plan-photo-checklist-bnr): a photo filling the left half, beside an eyebrow, a heading and
 * a list of who the plan suits.
 *
 * - photo-checklist-bnr: warm cream, each point ticked (Foundation's "Who it's for").
 * - photo-checklist-bnr-dark: the darkest teal, each point between fine teal rules (Executive's "Ideal for").
 *
 * The photo is chosen in WordPress Admin; until then its half shows a soft teal. On phones it sits above.
 */

.wp-block-group.plan-pattern.plan-pattern--photo-checklist-bnr {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: #f4f3ee;
  color: var(--text);
}

.wp-block-group.plan-pattern.plan-pattern--photo-checklist-bnr-dark {
  background: #0d3d39;
  color: #f4f3ee;
}

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

/* The photo */

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

.plan-pattern--photo-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-photo {
  min-height: 600px;
  background: var(--teal-darker);
}

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

.plan-pattern--photo-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-photo img {
  object-position: 60% center;
}

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

/* The words */

.plan-pattern--photo-checklist-bnr .plan-pattern__photo-checklist-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-checklist-bnr .plan-pattern__photo-checklist-bnr-eyebrow {
  margin: 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-pattern--photo-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-eyebrow {
  color: var(--teal);
}

.plan-pattern--photo-checklist-bnr .plan-pattern__photo-checklist-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-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-heading {
  color: #f4f3ee;
}

/* The list: ticked points, or points between fine rules on the dark design */

.plan-pattern--photo-checklist-bnr .plan-pattern__photo-checklist-bnr-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.45;
}

.plan-pattern--photo-checklist-bnr .plan-pattern__photo-checklist-bnr-list li {
  position: relative;
  padding-left: 34px;
}

.plan-pattern--photo-checklist-bnr .plan-pattern__photo-checklist-bnr-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  background: var(--teal-dark);
  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-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-list {
  gap: 0;
  font-size: 17px;
}

.plan-pattern--photo-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-list li {
  padding: 16px 0;
  border-top: 1px solid var(--teal-dark);
}

.plan-pattern--photo-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-list li:last-child {
  border-bottom: 1px solid var(--teal-dark);
}

.plan-pattern--photo-checklist-bnr-dark .plan-pattern__photo-checklist-bnr-list li::before {
  content: none;
}

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

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

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

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

/* Phones */

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

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