/* Dec 4 2026 homepage layout: LDT letter art, Impact Labs chips, programme card baselines.
   Loaded after flyer-cards.css so these rules win. Wording and colours stay as they are. */

/* LDT: park the three pills in a top row, clear of the letter.
   The letter sits high enough that "GracedLife" stays out of the envelope flap. */
html body #pb-ldt .pb-p1 { left: 10px; right: auto; top: 12px; }
html body #pb-ldt .pb-p2 { left: 0; right: 0; top: 12px; width: max-content; margin-inline: auto; }
html body #pb-ldt .pb-p3 { right: 10px; left: auto; top: 12px; }
html body #pb-ldt .pb-letter img { width: 28px; height: 28px; object-fit: contain; }
html body #pb-ldt .pb-letter { animation-name: pbrise-safe; }
@keyframes pbrise-safe {
  0%, 10% { transform: translateY(40px); }
  35%, 70% { transform: translateY(-56px); }
  90%, 100% { transform: translateY(40px); }
}
@media (prefers-reduced-motion: reduce) {
  html body #pb-ldt .pb-letter { animation: none; transform: translateY(-56px); }
  html body #pb-ldt .pb-pill { opacity: 1; }
}

/* Mid widths keep the scaled envelope, so the stage is a little taller for clearance. */
@media (min-width: 761px) and (max-width: 899px) {
  html body #pb-ldt .pb-st { height: 200px; }
}

/* Phones: two pill rows, a slightly taller stage, and the letter raised under the pills. */
@media (max-width: 760px) {
  html body #pb-ldt .pb-st { height: 224px; }
  html body #pb-ldt .pb-p1,
  html body #pb-ldt .pb-p2,
  html body #pb-ldt .pb-p3 { font-size: 10.5px; padding: 5px 8px; }
  html body #pb-ldt .pb-p1 { left: 8px; right: auto; top: 8px; width: auto; margin-inline: 0; }
  html body #pb-ldt .pb-p2 { left: auto; right: 8px; top: 8px; width: auto; margin-inline: 0; }
  html body #pb-ldt .pb-p3 { left: auto; right: 8px; top: 36px; }
  html body #pb-ldt .pb-letter { animation-name: pbrise-safe-m; }
  @keyframes pbrise-safe-m {
    0%, 10% { transform: translateY(16px); }
    35%, 70% { transform: translateY(-68px); }
    90%, 100% { transform: translateY(16px); }
  }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  html body #pb-ldt .pb-letter { animation: none; transform: translateY(-68px); }
}

/* Impact Labs: show all five lab names as chips, so no lab is easy to miss. */
html body #pb-labs .pb-names {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: auto;
  margin-top: 0;
  transform: translateY(-42%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
html body #pb-labs .pb-names b {
  position: static;
  inset: auto;
  display: inline-flex;
  opacity: 1;
  animation: none;
  transform: none;
  font: 600 12px/1.25 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  color: #0D3C87;
  box-shadow: 0 4px 12px -6px rgba(13, 60, 135, .28);
  text-align: center;
  text-wrap: balance;
  white-space: normal;
}
html body #pb-labs .pb-ticks { display: none; }
@media (max-width: 760px) {
  html body #pb-labs .pb-labk { top: 10px; font-size: 10.5px; }
  html body #pb-labs .pb-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    left: 10px;
    right: 10px;
    top: 54%;
    transform: translateY(-50%);
  }
  html body #pb-labs .pb-names b {
    font-size: 10.5px;
    padding: 5px 7px;
    line-height: 1.2;
  }
  html body #pb-labs .pb-names b:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 90%;
  }
}

/* Programme cards: titles, text and "Learn more" line up across the grid. */
html body .pb-grid { align-items: stretch; }
html body .pb-c { display: flex; flex-direction: column; align-self: stretch; }
html body .pb-tx { flex: 1; display: flex; flex-direction: column; }
html body .pb-tx h3 { min-height: 2.6em; }
html body .pb-tx p { min-height: 7.75em; }
html body .pb-tx .rm { margin-top: auto; }

/* When a heading sits on the left and a short side line sits on the right,
   that side line is right-aligned so its wrapped lines share one edge.
   Stacked (mobile) layouts stay left-aligned. Queries match each row's
   existing side-by-side breakpoint. */
@media (min-width: 900px) {
  html body .hx .hx-tx .hx-cta,
  html body .hx .hx-tx .hx-cta p,
  html body .jb-hd > p {
    text-align: right;
  }
  html body .hx .hx-tx .hx-cta p,
  html body .jb-hd > p {
    margin-left: auto;
  }
}
@media (min-width: 1000px) {
  html body .ct-hd > p {
    text-align: right;
    margin-left: auto;
  }
}
@media (min-width: 1024px) {
  html body .yth-hd > .yth-l {
    text-align: right;
    margin-left: auto;
  }
}
