/* Public "website" app: builder blocks and scheduled popups.
   Layered on top of company.css (same .ch-* shell, gold/sand palette). */

.wb-page { background: var(--sand, #fbf8f2); }

/* -- Preview banner (admin only) ------------------------------------------- */
.wb-preview {
  background: #14213d; color: #fff; font-size: 13.5px; line-height: 1.5;
  padding: 10px 20px; text-align: center;
}
.wb-preview a { color: var(--gold, #C8A96E); font-weight: 700; margin-left: 6px; }

/* -- Shared bits ------------------------------------------------------------ */
.wb-eyebrow-light { color: #e8d5b0 !important; }
.wb-lead { font-size: 16px; line-height: 1.65; color: var(--ink-soft, #5c5346); }
.wb-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.wb-actions--center { justify-content: center; }
.wb-prose p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.7; color: var(--ink-soft, #5c5346); }
.wb-prose p:last-child { margin-bottom: 0; }
.wb-figure { margin: 0; }
.wb-figure img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }

.wb-bg-light { background: var(--sand2, #F9F5EE); }
.wb-bg-sand { background: #f3ece0; }
.wb-bg-dark {
  background: linear-gradient(150deg, #14213d 0%, #0f3d5c 60%, #0b5f5a 100%);
  color: #fff;
}
.wb-bg-dark h2, .wb-bg-dark h3 { color: #fff; }
.wb-bg-dark p, .wb-bg-dark .wb-prose p { color: rgba(255, 255, 255, .86); }

/* -- Hero ------------------------------------------------------------------- */
.wb-hero { isolation: isolate; }
.wb-hero__image {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.wb-hero--media::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(150deg, rgba(20, 33, 61, .92), rgba(15, 61, 92, .78) 55%, rgba(11, 95, 90, .7));
}
.wb-hero .ch-wrap { position: relative; }

/* -- Story / split ---------------------------------------------------------- */
.wb-story__grid { display: grid; gap: 32px; align-items: start; }
.wb-story__grid--media { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.wb-story__grid .wb-figure { border-radius: 18px; overflow: hidden; }
.wb-split { padding-top: 60px; padding-bottom: 60px; }
.wb-split__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px; align-items: center;
}
.wb-split__grid--right .wb-split__figure { order: 2; }
.wb-split__figure { position: relative; margin: 0; min-height: 240px; }
.wb-split__figure img {
  display: block; width: 100%; height: 100%; max-height: 460px;
  object-fit: cover; border-radius: 20px;
}
.wb-split__video {
  position: absolute; left: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(20, 33, 61, .86); color: #fff;
  padding: 9px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.wb-split__video:hover { background: #14213d; }
.wb-split__copy h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 4px 0 12px; line-height: 1.2; }


/* -- Cards ------------------------------------------------------------------ */
.wb-card { display: flex; flex-direction: column; }
.wb-card__image {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: 12px; margin-bottom: 14px;
}
.wb-card__sub {
  color: var(--gold-deep, #b18d4f); font-weight: 700;
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 8px;
}
.wb-card__link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; color: var(--gold-deep, #b18d4f);
  font-weight: 700; font-size: 14px; text-decoration: none;
}
.wb-card__link:hover { text-decoration: underline; }

/* -- Stats ------------------------------------------------------------------ */
.wb-stats { padding: 54px 0; }
.wb-stats__head h2 { color: #fff; }
.wb-stats__head p { color: rgba(255, 255, 255, .82); }
.wb-stats__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px; text-align: center;
}
.wb-stat {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px; padding: 22px 16px;
  background: rgba(255, 255, 255, .04);
}
.wb-stat__value {
  display: block; font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800; color: var(--gold, #C8A96E); line-height: 1.1;
}
.wb-stat__label {
  display: block; margin-top: 6px; font-size: 13px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 255, 255, .86);
}
.wb-stat__note { display: block; margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .65); }

/* -- Gallery ---------------------------------------------------------------- */
.wb-gallery__grid { display: grid; gap: 16px; }
.wb-gallery__grid--1 { grid-template-columns: 1fr; }
.wb-gallery__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wb-gallery__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wb-gallery__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wb-gallery__item { margin: 0; overflow: hidden; border-radius: 16px; background: #fff; }
.wb-gallery__item a { display: block; }
.wb-gallery__item img {
  display: block; width: 100%; height: 220px; object-fit: cover;
  transition: transform .35s ease;
}
.wb-gallery__item:hover img { transform: scale(1.04); }
.wb-gallery__item figcaption { padding: 12px 14px 14px; }
.wb-gallery__item figcaption strong { display: block; font-size: 14px; color: var(--ink, #2a2118); }
.wb-gallery__item figcaption span { display: block; font-size: 13px; color: var(--ink-soft, #5c5346); margin-top: 3px; }

/* -- FAQ -------------------------------------------------------------------- */
.wb-faq__list { max-width: 820px; margin: 0 auto; }
.wb-faq__item {
  background: #fff; border: 1px solid var(--line, #e9e0d2);
  border-radius: 12px; margin-bottom: 10px; overflow: hidden;
}
.wb-faq__item summary {
  cursor: pointer; list-style: none; padding: 16px 18px;
  font-weight: 700; font-size: 15px; color: var(--ink, #2a2118);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.wb-faq__item summary::-webkit-details-marker { display: none; }
.wb-faq__item summary::after { content: "+"; font-size: 20px; color: var(--gold-deep, #b18d4f); line-height: 1; }
.wb-faq__item[open] summary::after { content: "\2212"; }
.wb-faq__answer { padding: 0 18px 16px; color: var(--ink-soft, #5c5346); font-size: 14.5px; line-height: 1.65; }
.wb-faq__answer p { margin: 0 0 8px; }

/* -- CTA -------------------------------------------------------------------- */
.wb-cta { padding: 48px 0; }
.wb-cta__inner {
  display: flex; gap: 26px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.wb-cta__copy { max-width: 620px; }
.wb-cta__copy h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 8px; line-height: 1.2; }
.wb-cta__copy p { color: rgba(255, 255, 255, .85); margin: 0; font-size: 15.5px; line-height: 1.6; }
.wb-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }


/* -- Popups / modal -------------------------------------------------------- */
.wb-modal-open, body.wb-modal-open { overflow: hidden; }
.wb-modal {
  --wb-modal-gap: clamp(10px, 3vw, 30px);
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: var(--wb-modal-gap);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.wb-modal[hidden] { display: none; }
.wb-modal__backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 18, 32, .68);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.wb-modal__dialog {
  position: relative; z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - var(--wb-modal-gap) - var(--wb-modal-gap));
  max-height: calc(100dvh - var(--wb-modal-gap) - var(--wb-modal-gap));
  overflow: hidden;
  background: #fff; border-radius: clamp(16px, 2.4vw, 22px);
  box-shadow: 0 30px 80px -24px rgba(10, 18, 32, .60);
  display: grid; grid-template-columns: minmax(0, 1fr);
  animation: wbModalIn .28s ease both;
}
.wb-modal__dialog[data-has-media="1"] {
  width: min(900px, 100%);
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}
.wb-modal__media {
  order: -1; min-width: 0; min-height: 0;
  background: #0b1220;
}
.wb-modal__media img,
.wb-modal__media video,
.wb-modal__media iframe {
  display: block; width: 100%; height: 100%; min-height: 260px;
  border: 0; background: #0b1220;
}
.wb-modal__media img { object-fit: cover; }
.wb-modal__media video,
.wb-modal__media iframe { object-fit: contain; }
.wb-modal__body {
  min-width: 0; min-height: 0;
  max-height: calc(100vh - var(--wb-modal-gap) - var(--wb-modal-gap));
  max-height: calc(100dvh - var(--wb-modal-gap) - var(--wb-modal-gap));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 56px clamp(20px, 4vw, 34px) clamp(22px, 3vw, 30px);
}
.wb-modal__kicker {
  display: inline-block; color: var(--gold-deep, #b18d4f);
  font-size: 12px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 8px;
}
.wb-modal__title { margin: 0 0 10px; font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.2; color: var(--ink, #2a2118); }
.wb-modal__body .gold-rule { width: 56px; height: 3px; border-radius: 3px; margin: 0 0 14px; }
.wb-modal__text { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft, #5c5346); }
.wb-modal__text p { margin: 0 0 10px; }
.wb-modal__list { margin: 12px 0 0; padding: 0; list-style: none; }
.wb-modal__list li { position: relative; padding-left: 22px; margin-bottom: 7px; font-size: 14px; color: var(--ink-soft, #5c5346); }
.wb-modal__list li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold, #C8A96E);
}
.wb-modal__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.wb-modal__ghost {
  border-color: var(--line, #d9cfbd) !important; color: var(--ink, #2a2118) !important;
}
.wb-modal__ghost:hover { background: var(--sand2, #F9F5EE) !important; }
.wb-modal__dismiss {
  border: 0; background: none; padding: 6px 2px; cursor: pointer;
  color: #8a8172; font-size: 13px; text-decoration: underline;
}
.wb-modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px 0 10px;
  border-radius: 999px; border: 1px solid rgba(20, 33, 61, .14);
  background: rgba(255, 255, 255, .96); color: var(--ink, #14213d);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(10, 18, 32, .22);
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1;
  cursor: pointer;
}
.wb-modal__close-icon { font-size: 21px; line-height: 1; margin-top: -1px; }
.wb-modal__close:hover { background: #fff; transform: translateY(-1px); }
.wb-modal__close:focus-visible {
  outline: 3px solid rgba(200, 169, 110, .75); outline-offset: 2px;
}

/* Media-only popups: the artwork is the message, so no empty copy column. */
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] {
  width: min(600px, calc(100vh - var(--wb-modal-gap) - var(--wb-modal-gap) - 48px), 100%);
  width: min(600px, calc(100dvh - var(--wb-modal-gap) - var(--wb-modal-gap) - 48px), 100%);
  max-width: 100%;
  max-height: calc(100vh - var(--wb-modal-gap) - var(--wb-modal-gap));
  max-height: calc(100dvh - var(--wb-modal-gap) - var(--wb-modal-gap));
  display: flex; flex-direction: column;
  align-self: center;
  background: #0b1220;
}
.wb-modal__dialog[data-has-media="1"][data-layout="poster"][data-has-dismiss="1"] {
  width: min(600px, calc(100vh - var(--wb-modal-gap) - var(--wb-modal-gap) - 100px), 100%);
  width: min(600px, calc(100dvh - var(--wb-modal-gap) - var(--wb-modal-gap) - 100px), 100%);
}
.wb-modal__poster-bar {
  flex: 0 0 auto; height: 48px; padding: 0 8px;
  display: flex; align-items: center; justify-content: flex-end;
  background: #0b1220;
}
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] .wb-modal__media {
  order: 0; flex: 0 0 auto; width: 100%; height: auto; max-height: none;
  display: flex; align-items: center; justify-content: center;
  background: #0b1220;
}
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] .wb-modal__media img,
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] .wb-modal__media video,
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] .wb-modal__media iframe {
  width: auto; height: auto; min-height: 0; margin: 0 auto;
  max-width: 100%;
  max-height: calc(100vh - var(--wb-modal-gap) - var(--wb-modal-gap) - 48px);
  max-height: calc(100dvh - var(--wb-modal-gap) - var(--wb-modal-gap) - 48px);
  object-fit: contain; background: #0b1220;
}
.wb-modal__dialog[data-has-media="1"][data-layout="poster"][data-has-dismiss="1"] .wb-modal__media img,
.wb-modal__dialog[data-has-media="1"][data-layout="poster"][data-has-dismiss="1"] .wb-modal__media video,
.wb-modal__dialog[data-has-media="1"][data-layout="poster"][data-has-dismiss="1"] .wb-modal__media iframe {
  max-height: calc(100vh - var(--wb-modal-gap) - var(--wb-modal-gap) - 100px);
  max-height: calc(100dvh - var(--wb-modal-gap) - var(--wb-modal-gap) - 100px);
}
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] .wb-modal__media iframe {
  width: 100%; aspect-ratio: 16 / 9;
}
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] .wb-modal__close {
  position: static; top: auto; right: auto;
  width: 40px; min-height: 40px; padding: 0;
}
.wb-modal__dialog[data-has-media="1"][data-layout="poster"] .wb-modal__close-label {
  display: none;
}
.wb-modal__poster-footer {
  flex: 0 0 auto; padding: 9px 14px 10px;
  background: #fff; text-align: center;
}
.wb-modal__poster-footer .wb-modal__dismiss {
  padding: 2px 4px; text-decoration: none; font-weight: 700;
}
.wb-modal__poster-footer .wb-modal__dismiss:hover { color: var(--ink, #2a2118); }
@keyframes wbModalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* -- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .wb-story__grid--media, .wb-split__grid { grid-template-columns: 1fr; }
  .wb-split__grid--right .wb-split__figure { order: 0; }
  .wb-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-gallery__grid--4, .wb-gallery__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-modal__dialog[data-has-media="1"] {
    display: flex; flex-direction: column;
    width: min(680px, 100%);
  }
  .wb-modal__media {
    order: -1; flex: 0 0 auto;
    height: min(30vh, 230px); max-height: 230px;
  }
  .wb-modal__media img,
  .wb-modal__media video,
  .wb-modal__media iframe { min-height: 0; height: 100%; }
  .wb-modal__body { flex: 1 1 auto; overflow-y: auto; }
}
@media (max-width: 600px) {
  .wb-stats__grid, .wb-gallery__grid--2, .wb-gallery__grid--3, .wb-gallery__grid--4 { grid-template-columns: 1fr; }
  .wb-gallery__item img { height: 200px; }
  .wb-modal { padding: 8px; align-items: flex-end; }
  .wb-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px 18px 12px 12px;
  }
  .wb-modal__body {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 54px 18px 22px;
  }
  .wb-modal__media { height: min(28vh, 200px); max-height: 200px; }
  .wb-modal__close {
    top: 8px; right: 8px; width: 40px; min-height: 40px; padding: 0;
  }
  .wb-modal__close-icon { font-size: 19px; }
  .wb-modal__close-label { display: none; }
  .wb-modal__actions .btn-gold,
  .wb-modal__actions .btn-ghost { flex: 1 1 auto; text-align: center; }
}
@media (max-height: 560px) and (min-width: 901px) {
  .wb-modal__media img,
  .wb-modal__media video,
  .wb-modal__media iframe { min-height: 220px; }
  .wb-modal__body { padding-top: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .wb-modal__dialog { animation: none; }
  .wb-gallery__item img { transition: none; }
}

/* -- Custom HTML ------------------------------------------------------------ */
.wb-custom { padding: 10px 0; }
.wb-custom > .ch-wrap { padding-top: 34px; }
