/* Legacy Pool Manager — added page sections
 *
 * Loaded after the theme's brand.css, and only on pages that have added
 * sections. Everything reuses the theme's tokens (--azure, --ink, --chalk,
 * --line, --r, --maxw…) and its own classes (.wrap, .sec-head, .eyebrow,
 * .lede, .card, .photo, .incl, .btn…), so an added section is drawn the same
 * way as the built-in ones. Rules are scoped to .lpx so nothing here can leak
 * into the rest of the page.
 */

/* ------------------------------------------------------------ the shell -- */

.lpx { position: relative; }
.lpx-white { background: #fff; }
.lpx-tint  { background: var(--chalk); }

/* Two sections with the same background meet: a fine rule at content width
   keeps them reading as separate sections. */
.lpx-rule-top::before,
.lpx-rule-bottom::after {
  content: "";
  position: absolute; left: 0; right: 0; margin: 0 auto;
  width: calc(100% - 44px); max-width: calc(var(--maxw) - 44px); height: 1px;
  background: var(--line); pointer-events: none;
}
.lpx-rule-top::before   { top: 0; }
.lpx-rule-bottom::after { bottom: 0; }

/* Hidden sections are only ever rendered for logged-in editors. */
.lpx-draft { outline: 2px dashed #D4A017; outline-offset: -12px; }
.lpx-draft-flag {
  position: absolute; z-index: 6; top: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; margin: 0; white-space: nowrap;
  padding: 5px 5px 5px 14px; border-radius: 999px;
  background: #FFF6DB; color: #6B4A00; border: 1px solid #EFD68A;
  font-size: .82rem; font-weight: 700; line-height: 1.3;
  box-shadow: 0 6px 16px rgba(18, 41, 46, .10);
}
.lpx-draft-flag a {
  background: #6B4A00; color: #fff; text-decoration: none;
  border-radius: 999px; padding: 4px 12px; font-size: .78rem;
}
.lpx-draft-flag a:hover { background: var(--ink); }

/* Icons inside buttons (the call button uses the site's phone icon). */
.lpx .btn svg {
  width: 18px; height: 18px; flex: 0 0 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.lpx .btn > span { text-align: center; }
.lpx-nowrap { white-space: nowrap; }

.lpx-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.lpx-actions.is-center,
.lpx-col.is-center .lpx-actions { justify-content: center; }

/* ----------------------------------------------------------------- text -- */

.lpx-col { max-width: 780px; margin: 0 auto; }
.lpx-col.is-center { text-align: center; }
.lpx-col.is-center .lede { max-width: 62ch; margin-left: auto; margin-right: auto; }
.lpx-col .lede:last-child { margin-bottom: 0; }

.lpx-ticks { margin-top: 22px; }
.lpx-col.is-center .lpx-ticks { display: inline-grid; text-align: left; justify-items: start; }

/* --------------------------------------------------------- text + photo -- */

.lpx-copy .lede:last-child { margin-bottom: 0; }
.lpx-split-grid.is-flip .lpx-media { order: -1; }

.lpx-media img { aspect-ratio: 4 / 3; object-fit: cover; }
.lpx-media.is-square img { aspect-ratio: 1 / 1; }
.lpx-media.is-portrait { width: 100%; max-width: 440px; justify-self: center; }
.lpx-media.is-portrait img { aspect-ratio: 4 / 5; object-position: center 25%; }

/* ------------------------------------------------- cards, team, gallery -- */

/* Flex rather than grid so a short last row sits centred under the gaps,
   the same way the service cards do. */
.lpx-grid {
  --cols: 3; --gap: 22px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap);
}
.lpx-grid > * {
  min-width: 0;
  flex: 0 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
}
.lpx-cols-1 { --cols: 1; }
.lpx-cols-2 { --cols: 2; }
.lpx-cols-3 { --cols: 3; }
.lpx-cols-4 { --cols: 4; }
.lpx-cols-1 > * { max-width: 820px; }
.lpx--cards .lpx-cols-2 { max-width: 920px; margin-left: auto; margin-right: auto; }
.lpx--cards .lpx-actions { margin-top: 34px; }

/* cards */
.lpx .card p { margin: 0; color: var(--muted); font-size: .96rem; }
.lpx .card h3:last-child { margin-bottom: 0; }

/* team */
.lpx--team .lpx-grid > * { max-width: 340px; }
.lpx-person {
  display: flex; flex-direction: column; margin: 0; overflow: hidden; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.lpx-person-img { background: var(--chalk); }
.lpx-person-img img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%;
}
.lpx-person-img.is-empty {
  aspect-ratio: 4 / 5; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--ink2) 0%, var(--azure-dk) 62%, var(--azure) 100%);
}
.lpx-person-img.is-empty span {
  font: 400 3.4rem/1 Anton, Impact, sans-serif; letter-spacing: .04em; color: #fff; opacity: .92;
}
.lpx-person figcaption { padding: 18px 20px 22px; }
.lpx-person-name { display: block; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.lpx-person-role { display: block; margin-top: 3px; color: var(--azure-dk); font-size: .92rem; font-weight: 700; }
.lpx-person p { margin: 10px 0 0; color: var(--muted); font-size: .94rem; line-height: 1.6; }

/* gallery */
.lpx-shot {
  display: flex; flex-direction: column; margin: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.lpx-shot img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.lpx-shot > img:only-child { flex: 1 0 auto; } /* no caption: the photo fills its tile instead of leaving a blank strip */
.lpx-cols-1 .lpx-shot img { aspect-ratio: 3 / 2; }
.lpx-shot figcaption {
  padding: 11px 15px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .84rem; line-height: 1.5;
}

/* ------------------------------------------------ call-to-action box -- */

/* The one bold element an added section can bring: the banner's ink-to-azure
   gradient, the gator badge and the site's own buttons. */
.lpx--cta { padding: 72px 0; }
.lpx-callout {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 26px 40px;
  padding: 48px 52px; border-radius: 24px; color: #fff;
  background: linear-gradient(150deg, var(--ink2) 0%, var(--azure-dk) 70%, var(--azure) 100%);
}
.lpx-callout.is-solo { grid-template-columns: auto minmax(0, 1fr); }
.lpx-glow {
  position: absolute; z-index: -1; right: -140px; top: -200px; width: 460px; height: 460px;
  border-radius: 50%; background: var(--azure); filter: blur(120px); opacity: .35; pointer-events: none;
}
.lpx-mark { width: 112px; height: auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .28)); }
.lpx-callout h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: .3em; }
.lpx-callout .lede { color: #C6E4E8; max-width: 58ch; }
.lpx-callout-copy > :last-child,
.lpx-callout-copy > :last-child > :last-child { margin-bottom: 0; }
.lpx-callout-btns { display: flex; flex-direction: column; gap: 12px; }
.lpx-callout-btns .btn { white-space: nowrap; }
.lpx-callout a:focus-visible { outline-color: #8FE3A0; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 980px) {
  .lpx-split-grid.is-flip .lpx-media { order: 0; } /* stacked: words first, like the rest of the site */
  .lpx-grid.lpx-cols-3,
  .lpx-grid.lpx-cols-4 { --cols: 2; }
  .lpx-callout { grid-template-columns: auto minmax(0, 1fr); padding: 40px 36px; }
  .lpx-callout-btns { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .lpx-grid.lpx-cols-2,
  .lpx-grid.lpx-cols-3,
  .lpx-grid.lpx-cols-4 { --cols: 1; }
  /* photos stay two-up on phones so a gallery doesn't become one long column */
  .lpx--gallery .lpx-grid.lpx-cols-2,
  .lpx--gallery .lpx-grid.lpx-cols-3,
  .lpx--gallery .lpx-grid.lpx-cols-4 { --cols: 2; --gap: 12px; }
  .lpx-shot figcaption { padding: 9px 11px; font-size: .8rem; }

  .lpx--cta { padding: 52px 0; }
  .lpx-callout {
    grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px;
    padding: 34px 22px 28px; border-radius: 20px;
  }
  .lpx-mark { width: 84px; }
  .lpx-callout .lede { margin-left: auto; margin-right: auto; }
  .lpx-callout-btns { width: 100%; flex-direction: column; }
  .lpx-callout-btns .btn { width: 100%; white-space: normal; }

  .lpx-draft-flag { top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .lpx .photo:hover { transform: none; }
}

/* Where one of the page's own sections was switched off and two blocks of the
   same colour now meet: the same fine divider, drawn at the join. */
.lpx-seam { position: relative; z-index: 5; height: 0; }
.lpx-seam[data-tone="dark"]::before,
.lpx-seam[data-tone="brand"]::before { background: rgba(255, 255, 255, .16); }
