/* =========================================================
   Shared components: buttons, placeholders, stubs.
   Page-specific styles go in later sections of this file
   or in assets/css/pages/*.css when a page needs them.
   ========================================================= */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;                 /* touch target */
  padding: 0.625rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn--primary { background: var(--c-green); color: var(--c-white); }
.btn--primary:hover { background: var(--c-green-700); color: var(--c-white); }
.btn--outline { border-color: var(--c-navy); color: var(--c-navy); background: transparent; }
.btn--outline:hover { background: var(--c-navy); color: var(--c-white); }
.btn--outline-light { border-color: var(--c-white); color: var(--c-white); background: transparent; }
.btn--outline-light:hover { background: var(--c-white); color: var(--c-navy); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ---------- Image placeholder (until real assets arrive) ---------- */
.ph {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-1);
  width: 100%;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(14,30,125,.04) 12px 24px),
    var(--c-placeholder-bg);
  color: var(--c-text-muted);
  text-align: center;
  font-size: var(--fs-xs);
  padding: var(--sp-3);
  border-radius: inherit;
}
.ph__label { font-weight: 600; color: var(--c-navy); font-size: var(--fs-sm); }
.ph__tag {
  position: absolute; top: var(--sp-2); left: var(--sp-2);
  background: var(--c-navy); color: var(--c-white);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px;
}

/* ---------- "Sample" content marker ---------- */
.sample-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-navy); background: var(--c-navy-050);
  border: 1px solid var(--c-border-strong);
  padding: 1px 6px; border-radius: 4px; vertical-align: middle;
}

/* ---------- Temporary page stub (removed as each page is built) ---------- */
.page-stub { padding-block: var(--sp-9); text-align: center; }
.page-stub p { color: var(--c-text-muted); max-width: 560px; margin-inline: auto; }
.page-stub__anchors { display: grid; gap: var(--sp-4); max-width: 720px; margin: var(--sp-7) auto 0; text-align: left; }
.page-stub__anchors section {
  min-height: 60vh; padding: var(--sp-5);
  border: 2px dashed var(--c-border-strong); border-radius: var(--radius);
}

/* =========================================================
   Pop-ups (Audience, Receipt, Legal; lightbox reuses .modal)
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: var(--gutter);
}
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 18, 79, .62);
  animation: fade-in var(--dur) var(--ease);
}
.modal__dialog {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 2 * var(--gutter));
  max-height: calc(100dvh - 2 * var(--gutter));
  overflow-y: auto;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-7) var(--sp-5) var(--sp-5);
  animation: pop-in var(--dur) var(--ease);
}
@media (min-width: 640px) { .modal__dialog { padding: var(--sp-7) var(--sp-6) var(--sp-6); } }
.modal__dialog h2 { padding-right: var(--sp-6); }
.modal__close {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-pill);
  background: var(--c-navy-050); color: var(--c-navy);
}
.modal__close:hover { background: var(--c-border); }
.modal__close svg { width: 20px; height: 20px; }
.modal__intro { color: var(--c-text-muted); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Audience choices */
.audience-choices { list-style: none; margin: var(--sp-5) 0 0; padding: 0; display: grid; gap: var(--sp-3); }
.audience-choice {
  display: grid; gap: 2px;
  padding: var(--sp-4) var(--sp-5);
  border: 2px solid var(--c-border); border-radius: var(--radius);
  text-decoration: none; color: var(--c-text);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.audience-choice:hover { border-color: var(--c-green); background: var(--c-green-050); color: var(--c-text); }
.audience-choice__who { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-muted); font-weight: 600; }
.audience-choice__label { font-family: var(--font-heading); font-size: var(--fs-md); font-weight: 600; color: var(--c-navy); }
.audience-choice__label::after { content: " →"; color: var(--c-green); }
.audience-choice__desc { font-size: var(--fs-sm); color: var(--c-text-muted); }

/* Receipt */
.modal__dialog--receipt { text-align: center; }
.modal__dialog--receipt h2 { padding-inline: var(--sp-6); }
.receipt__icon {
  width: 56px; height: 56px; margin: 0 auto var(--sp-4);
  display: grid; place-items: center;
  border-radius: 50%; background: var(--c-green-050); color: var(--c-green);
}
.receipt__icon svg { width: 28px; height: 28px; }
.receipt__ref-label { margin: 0; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-muted); }
.receipt__ref {
  font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600;
  color: var(--c-green-700); letter-spacing: .02em; margin-bottom: var(--sp-4);
  overflow-wrap: anywhere;
}
.receipt__summary {
  text-align: left; margin: 0 0 var(--sp-4);
  background: var(--c-navy-050); border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm);
}
.receipt__summary div { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: var(--sp-3); padding-block: 4px; }
.receipt__summary dt { color: var(--c-text-muted); }
.receipt__summary dd { margin: 0; color: var(--c-text); overflow-wrap: anywhere; }
.receipt__next {
  text-align: left; font-size: var(--fs-sm);
  border-left: 4px solid var(--c-green); padding: var(--sp-2) var(--sp-3);
  background: var(--c-green-050); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.receipt__proto { font-size: var(--fs-xs); color: var(--c-text-muted); }

/* Legal */
.modal__dialog--text { max-width: 680px; }
.legal__status {
  display: inline-block; margin-bottom: var(--sp-3);
  font-size: var(--fs-xs); font-weight: 500;
  color: var(--c-text-muted);
}
.legal__body { font-size: var(--fs-sm); margin-bottom: var(--sp-5); line-height: 1.65; }
.legal__body p { margin: 0 0 var(--sp-3); }
.legal__section { margin-top: var(--sp-5); }
.legal__section h3 { font-size: var(--fs-base); color: var(--c-navy); margin: 0 0 var(--sp-2); }
.legal__body ul { margin: 0 0 var(--sp-3); padding-left: 1.25rem; }
.legal__body li { margin-bottom: var(--sp-2); }
.legal__body li::marker { color: var(--c-green, #5C8608); }

/* =========================================================
   Forms (messages + states from the Form states sheet)
   ========================================================= */
.form { display: grid; gap: var(--sp-4); }
.form-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: var(--fs-sm); color: var(--c-text-muted); margin: 0; }
.form-summary {
  margin: 0; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  background: var(--c-error-bg); color: var(--c-error);
  font-size: var(--fs-sm); font-weight: 500;
}
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }   /* a long error in the next column never stretches this field's input */
.field.is-invalid .field__hint { display: none; }                        /* the error replaces the hint, no double text */
.field > label, .field > legend, .field__label {
  font-size: var(--fs-sm); font-weight: 500; color: var(--c-navy); padding: 0;
}
.req { color: var(--c-navy); }
.input, .select, .textarea {
  width: 100%; min-height: 48px;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-sm);
  background: var(--c-white); color: var(--c-text);
  font-size: var(--fs-base);         /* 16px stops iOS zoom */
  transition: border-color var(--dur) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #8A8FA3; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-navy); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  border-color: var(--c-navy); box-shadow: 0 0 0 3px rgba(14, 30, 125, .18); border-radius: var(--radius-sm);
}
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--c-error); }
.field.is-valid .input { border-color: var(--c-green); }
.field__error { margin: 0; font-size: var(--fs-sm); color: var(--c-error); }
.field__valid { margin: 0; font-size: var(--fs-sm); color: var(--c-green); }
.field__hint { margin: 0; font-size: var(--fs-xs); color: var(--c-text-muted); }

fieldset.field { border: 0; margin: 0; padding: 0; }
.check { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }
.check input {
  width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0;
  accent-color: var(--c-green);
}
.field.is-invalid .check input { outline: 2px solid var(--c-error); outline-offset: 1px; }
.check-list { display: grid; gap: var(--sp-2); }
@media (min-width: 640px) { .check-list--2 { grid-template-columns: 1fr 1fr; } }

/* Spam protection: honeypot is off-screen (not display:none, which some bots skip) */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* =========================================================
   Cards, stats, testimonials, gallery cards, final CTA
   ========================================================= */
.card {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card__media { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card__media img, .card__media .ph { width: 100%; }
.card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.card__title { margin: 0; font-size: var(--fs-md); }
.card__text { margin: 0; color: var(--c-text-muted); font-size: var(--fs-sm); flex: 1; }

.link-arrow {
  align-self: flex-start;
  font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-sm);
  color: var(--c-green); text-decoration: none;
  padding-block: var(--sp-1);
}
.link-arrow::after { content: " →"; transition: margin var(--dur) var(--ease); }
.link-arrow:hover { color: var(--c-green-700); text-decoration: underline; }

.card-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--sp-4); margin: 0; }
.stat { display: flex; flex-direction: column-reverse; text-align: center; }
.stat__value { margin: 0; font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); color: var(--c-navy); line-height: 1.1; }
.stat__label { font-size: var(--fs-sm); color: var(--c-text-muted); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(var(--stat-cols, 4), 1fr); } }

/* Testimonials */
.testimonial-card { padding: var(--sp-5); gap: var(--sp-3); margin: 0; }
.stars { margin: 0; color: var(--c-border-strong); letter-spacing: 2px; font-size: var(--fs-md); }
.stars .on { color: #E5A400; }
.testimonial-card__text { margin: 0; flex: 1; }
.testimonial-card__text p { margin: 0; color: var(--c-text); }
.testimonial-card__who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--sp-2); font-size: var(--fs-sm); color: var(--c-text-muted); }
.testimonial-card__who strong { color: var(--c-navy); width: 100%; }
.empty-state {
  text-align: center; color: var(--c-text-muted);
  padding: var(--sp-6) var(--sp-4);
  border: 2px dashed var(--c-border); border-radius: var(--radius);
}

/* Gallery cards: masonry on a CSS grid (BEI.masonry in components.js sets each
   card's row span from its height). Photos are placed left-to-right in data
   order; a landscape photo (class picture, event) spans 2 columns.
   Without JS it still shows as an even grid. */
.masonry {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto; grid-auto-flow: row; column-gap: var(--sp-4); align-items: start;
}
/* 2 or 4 columns only (never 3): a landscape tile spans 2 columns, so with 3
   it would leave a hole beside every landscape photo (tablets, iPads and
   phones in "Desktop site" mode are 768-1079 px wide) */
@media (min-width: 768px) { .masonry { column-gap: var(--sp-5); } }
@media (min-width: 900px) { .masonry { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery-card { margin: 0 0 var(--sp-4); min-width: 0; }
@media (min-width: 768px) { .gallery-card { margin-bottom: var(--sp-5); } }
.gallery-card.is-wide { grid-column: span 2; }
/* Gallery "All": each category starts on a new row so categories never mix */
.gallery-card.is-cat-start { grid-column-start: 1; }
.gallery-card.is-cat-start.is-wide { grid-column: 1 / span 2; }
/* Feature tile (e.g. yearbook-1): spans the whole grid width, so it is as big
   as the four normal landscape tiles below it (2 x 2); keeps its own 16:9 shape. */
.gallery-card.is-feature, .gallery-card.is-feature.is-cat-start { grid-column: 1 / -1; }
/* Fixed tile shape for a whole category (e.g. Graduation 4:5): every photo
   lines up evenly; a slightly different upload is trimmed from the edges,
   keeping the face (upper part) in view */
.gallery-card.has-ratio img, .gallery-card.has-ratio .ph, .gallery-card.has-ratio .gallery-video video {
  aspect-ratio: var(--tile-r) !important; width: 100%; height: auto; object-fit: cover; object-position: 50% 30%;
}

.gallery-card img, .gallery-card .ph { border-radius: var(--radius-sm); width: 100%; }
.gallery-card__btn { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: var(--radius-sm); }
.gallery-card__btn img, .gallery-card__btn .ph { transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease); }
.gallery-card__btn:hover img, .gallery-card__btn:hover .ph { filter: brightness(1.05); }
.gallery-card { position: relative; }
/* Category label: appears over the photo on hover / keyboard focus (pointer devices only) */
.gallery-card__caption {
  position: absolute; inset: auto 0 0 0; pointer-events: none;
  display: flex; align-items: flex-end; padding: var(--sp-5) var(--sp-4) var(--sp-4);
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(to top, rgba(8, 18, 79, .72), rgba(8, 18, 79, 0));
  opacity: 0; transition: opacity .3s var(--ease);
}
.gallery-card__meta {
  color: #fff; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transform: translateY(6px); transition: transform .3s var(--ease);
}
.gallery-card__caption:not(:has(.gallery-card__meta)) { display: none; }
@media (hover: hover) {
  .gallery-card:hover .gallery-card__caption,
  .gallery-card:focus-within .gallery-card__caption { opacity: 1; }
  .gallery-card:hover .gallery-card__meta,
  .gallery-card:focus-within .gallery-card__meta { transform: none; }
}
@media (hover: none) { .gallery-card__caption { display: none; } }
@media (prefers-reduced-motion: reduce) { .gallery-card__caption, .gallery-card__meta { transition: none; } }
.section--navy .ph { background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,.04) 12px 24px), #24338C; color: rgba(255,255,255,.7); }
.section--navy .ph__label { color: var(--c-white); }
.section--navy .ph__tag { background: var(--c-white); color: var(--c-navy); }

/* Final CTA band */
.final-cta { background: var(--c-navy); color: var(--c-white); padding-block: var(--section-y); text-align: center; }
.final-cta h2 { color: var(--c-white); }
.final-cta p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto var(--sp-5); }

.section__actions { display: flex; justify-content: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-6); }

/* =========================================================
   Page hero with looping video (Gallery, Services)
   Header pill floats over it, like Home (body[data-hero="overlay"]).
   ========================================================= */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--c-navy-900); color: var(--c-white);
  margin-top: calc(-1 * (var(--header-h) + var(--header-top-gap)));
  padding: calc(var(--header-h) + var(--header-top-gap) + var(--sp-8)) 0 var(--sp-8);
  /* Full screen like the Home hero: content starts after one scroll.
     --ann-h = announcement bar height if this page shows it (header.js). */
  min-height: calc(100vh - var(--ann-h, 0px));
  min-height: calc(100svh - var(--ann-h, 0px));
  min-height: min(calc(100svh - var(--ann-h, 0px)), var(--hero-max, 100svh));
  display: flex; align-items: center;
}
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media video, .page-hero__media img, .page-hero__media .ph {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto !important; border-radius: 0;
}
/* Poster and video stacked in the same spot; the video fades in over its own
   first frame once it is playing, so the change is invisible */
.page-hero__media > img, .page-hero__media > video { position: absolute; inset: 0; }
.page-hero__video { opacity: 0; transition: opacity .6s ease; }
.page-hero__video.is-playing { opacity: 1; }
.page-hero__media .ph { background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.03) 14px 28px), #1E2C80; color: rgba(255,255,255,.6); justify-content: flex-end; padding-bottom: var(--sp-4); align-items: flex-end; }
.page-hero__media .ph__label { color: rgba(255,255,255,.75); }
.page-hero__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,18,79,.35) 0%, rgba(8,18,79,.85) 100%); }
.page-hero h1 { color: var(--c-white); margin-bottom: var(--sp-3); }
.page-hero__subtitle { font-size: var(--fs-md); color: rgba(255,255,255,.9); max-width: 52ch; margin: 0; }

/* ---------- Simple page title band (no video) ---------- */
.page-head { padding-block: var(--sp-7) var(--sp-5); }
.page-head p { color: var(--c-text-muted); max-width: 60ch; }

/* ---------- Filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  min-height: 40px; padding: var(--sp-2) var(--sp-4);
  border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-pill);
  background: var(--c-white); color: var(--c-navy);
  font-family: var(--font-heading); font-weight: 500; font-size: var(--fs-sm);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover { border-color: var(--c-navy); }
.chip[aria-pressed="true"] { background: var(--c-navy); border-color: var(--c-navy); color: var(--c-white); }
/* Phones: chips scroll sideways instead of wrapping into many rows */
@media (max-width: 639px) {
  .chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--sp-2); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: thin; }
  .chips--scroll .chip { flex-shrink: 0; }
}

/* ---------- Accordion (Accordion states sheet: + / −) ---------- */
.acc-list { display: grid; gap: var(--sp-3); }
.acc { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius); }
.acc[open] { border-color: var(--c-border-strong); box-shadow: var(--shadow-sm); }
.acc__q {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); min-height: 56px;
  font-family: var(--font-heading); font-weight: 600; color: var(--c-navy);
  border-radius: var(--radius);
}
.acc__q::-webkit-details-marker { display: none; }
.acc__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; background: var(--c-green); border-radius: 2px; transition: transform var(--dur) var(--ease); }
.acc__icon::after { transform: rotate(90deg); }
.acc[open] .acc__icon::after { transform: rotate(0deg); }
.acc__a { padding: 0 var(--sp-5) var(--sp-5); color: var(--c-text-muted); }
.acc__a p { margin-bottom: var(--sp-2); }

/* ---------- Sample video cards ---------- */
.video-grid { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 768px) {
  .video-grid { grid-template-columns: 1fr 1fr; }
  /* Portrait + landscape pair: narrow column for the 9:16 video */
  .video-grid:has(.video-card--portrait) { grid-template-columns: 1fr 2fr; }
}
.video-card { margin: 0; display: grid; gap: var(--sp-2); }
.video-card__frame { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--c-navy-900); }
.video-card--portrait .video-card__frame { aspect-ratio: 9 / 16; max-width: 360px; }
.video-card--landscape .video-card__frame { aspect-ratio: 16 / 9; }
.video-card__frame > img, .video-card__frame > .ph, .video-card__frame video, .video-card__frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto !important; border: 0; border-radius: 0;
}
.video-card__play {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--c-navy); box-shadow: var(--shadow-lg);
}
.video-card__play svg { width: 30px; height: 30px; margin-left: 4px; }
.video-card__play:hover { background: var(--c-white); transform: scale(1.04); }
.video-card__soon {
  position: absolute; left: 50%; bottom: var(--sp-4); transform: translateX(-50%);
  background: rgba(8,18,79,.8); color: var(--c-white); font-size: var(--fs-xs);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); white-space: nowrap;
}
.video-card figcaption { font-size: var(--fs-sm); }

/* ---------- Gallery lightbox: image zoom only (reuses .modal) ---------- */
.modal--lightbox .modal__backdrop { background: rgba(4, 8, 30, .9); cursor: zoom-out; }
.lightbox {
  position: relative; display: grid; justify-items: center; gap: var(--sp-3);
  max-width: 100%; outline: none;
  animation: zoom-in var(--dur) var(--ease);
}
.lightbox__stage { cursor: zoom-out; display: grid; place-items: center; touch-action: pan-y; }
.lightbox__stage img, .lightbox__stage .ph {
  max-height: 84vh; max-height: 84dvh; max-width: 92vw; width: auto; height: auto;
  object-fit: contain; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.lightbox__stage .ph { width: min(92vw, calc(84vh * var(--ph-r, .8))); }
.lightbox__caption { margin: 0; font-size: var(--fs-sm); color: rgba(255,255,255,.85); text-align: center; }
@keyframes zoom-in { from { opacity: 0; transform: scale(.94); } }

/* Simple receipt (reviews): thank-you only */
.modal__dialog--receipt.is-simple .receipt__ref-label,
.modal__dialog--receipt.is-simple .receipt__ref,
.modal__dialog--receipt.is-simple .receipt__summary,
.modal__dialog--receipt.is-simple .receipt__proto { display: none; }
.modal__dialog--receipt.is-simple .receipt__next { text-align: center; background: none; border: 0; padding: 0; font-size: var(--fs-base); color: var(--c-text-muted); margin-bottom: var(--sp-5); }

/* ---------- Gallery videos (e.g. yearbook flip-throughs) ---------- */
.gallery-video { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--c-navy-900); }
.gallery-video video { display: block; width: 100%; height: auto; }
.gallery-video__badge {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(8, 18, 79, .65); color: var(--c-white);
}
.gallery-video__badge svg { width: 14px; height: 14px; margin-left: 2px; }
.lightbox__stage video {
  max-height: 84vh; max-height: 84dvh; max-width: 92vw; width: auto; height: auto;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: #000; cursor: auto;
}

/* ---------- Fitted media: whole photo, never cropped ----------
   The photo is contained in its frame; a blurred, softened copy of the same
   photo fills the leftover space, so every shape looks intentional. */
[data-fit] { position: relative; overflow: hidden; isolation: isolate; background: var(--c-navy-900); }
[data-fit]::before {
  content: ""; position: absolute; inset: -24px; z-index: -1;
  background: var(--fill) center / cover no-repeat;
  filter: blur(22px) saturate(1.15) brightness(.85); transform: scale(1.08);
}
[data-fit]:not(.fit-narrow) > img { object-fit: contain !important; object-position: center !important; }
/* Page banners (photo or video): full-bleed on wide screens; on portrait or
   narrow screens show the WHOLE picture above the title instead of a slice */
.fit-narrow[data-fit] { position: absolute; }
.fit-narrow[data-fit] > video { background: transparent; }
@media (max-aspect-ratio: 5/4) {
  .fit-narrow[data-fit] > img, .fit-narrow[data-fit] > video { object-fit: contain !important; object-position: 50% 32% !important; }
  .page-hero:has(.fit-narrow) { align-items: flex-end; }
  .page-hero:has(.fit-narrow) .page-hero__overlay {
    background: linear-gradient(180deg, rgba(8,18,79,.15) 0%, rgba(8,18,79,.15) 45%, rgba(8,18,79,.9) 78%);
  }
}

/* Wide AND very tall screens (a phone in "Desktop site" / "Request Desktop
   Website" mode lays the page out ~980 px wide and ~2000 px tall; also tall
   portrait tablets): a full-screen banner would be absurdly tall with the
   title far down, so cap it relative to the width. Normal desktops/phones
   are unaffected. */
@media (min-width: 900px) and (max-aspect-ratio: 4/5) {
  :root { --hero-max: max(620px, 92vw); }
}

/* Banner video shown WHOLE on every screen (videos.json > fit: "whole"):
   nothing trimmed; spare space is filled with a blurred copy of the poster */
.page-hero__media.is-whole > video, .page-hero__media.is-whole > img {
  object-fit: contain !important; object-position: center !important; background: transparent;
}

/* Justified gallery rows (set by BEI.masonry in components.js) */
.masonry.is-justified { display: flex; flex-wrap: wrap; column-gap: var(--sp-4); align-items: flex-start; }
@media (min-width: 768px) { .masonry.is-justified { column-gap: var(--sp-5); } }
.masonry.is-justified > .gallery-card { flex: 0 0 auto; grid-column: auto !important; }
.masonry.is-justified .gallery-card__btn,
.masonry.is-justified .gallery-card > a { display: block; height: var(--row-h); }
.masonry.is-justified .gallery-card img,
.masonry.is-justified .gallery-card .ph,
.masonry.is-justified .gallery-card .gallery-video,
.masonry.is-justified .gallery-card .gallery-video video {
  display: block; width: 100%; height: var(--row-h) !important; aspect-ratio: auto !important;
  object-fit: cover; object-position: center;
}
.masonry.is-justified .gallery-card.has-ratio img { object-position: 50% 30%; }
