/* Bounded buyer-page layout fixes. Load after the other page styles.
   The existing .wrap width, brand palette and typography remain unchanged. */

/* A real 16:9 frame prevents HTML image height attributes from stretching
   film posters. The inline player occupies this same reserved footprint. */
.work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.work-image-button {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.work-image-button > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.work-image-button > img.letterbox-crop { transform: none; }
.work-image-button:hover > img.letterbox-crop { transform: scale(1.035); }
.work-info { align-items: flex-start; flex-wrap: wrap; gap: 4px 12px; }
.work-info h3 { max-width: 100%; }
.work-info > span:not(.recent-event-label) { white-space: nowrap; }

/* Keep each approved photograph in its full 3:2 frame. */
.gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-photo,
.gallery-photo.is-landscape {
  display: flex;
  flex-direction: column;
  grid-column: auto;
  align-self: start;
}

.gallery-photo img,
.gallery-photo.is-landscape img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}

.gallery-photo-caption { width: 100%; }
.gallery-photo-caption strong {
  display: block;
  color: var(--text);
  font-family: Space Grotesk, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.gallery-photo-use {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.gallery-photo-event {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.gallery-buying-note { margin-top: 24px; max-width: 880px; font-size: 14px; }
.gallery-buying-note a { color: var(--text); text-underline-offset: 5px; }

/* The panoramic team photograph stays complete at the existing column width. */
.vision-bts-photo img {
  height: auto;
  aspect-ratio: auto;
  max-height: none;
  object-fit: contain;
}

/* Price labels wrap safely while parallel package content stays aligned. */
.package-grid { align-items: stretch; }
.price,
.compare-table td { font-variant-numeric: lining-nums tabular-nums; }
.package-card .price small {
  min-height: 38px;
  line-height: 1.45;
  white-space: normal;
}

.package-card .package-summary { min-height: 92px; }
.package-card .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  line-height: 1.4;
}

.package-help-link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  text-underline-offset: 5px;
}

.package-help-link a,
a.package-help-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}

.work-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.work-heading-actions .button { min-height: 44px; }

@media (min-width: 1400px) {
  .package-card .package-summary { min-height: 70px; }
}

@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-card .price small { min-height: 20px; }
  .package-card .package-summary { min-height: 70px; }
}

@media (max-width: 767px) {
  .work-grid { grid-template-columns: 1fr; }
  #packages.section { padding-top: 48px; padding-bottom: 56px; }
  #work.section { padding-block: 56px; }
  .package-card .price small,
  .package-card .package-summary { min-height: 0; }
  .package-help-link { margin-top: 16px; }
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .work-image-button:hover > img.letterbox-crop { transform: none; }
}

@media print {
  .work-grid,
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-card .package-summary { min-height: 0; }
  .package-help-link,
  .work-heading-actions { display: none; }
}

/* Short lines are easier to scan in a narrow phone card. */
@media (max-width: 480px) {
  .package-highlights { grid-template-columns: 1fr; gap: 10px; }
}
.gallery-dialog { overscroll-behavior: contain; }

/* Keep the film badge in the caption flow, below the video frame. */
.work-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 12px;
  margin-top: 18px;
}
.work-info > .recent-event-label {
  position: static;
  grid-column: 1 / -1;
  margin: 0 0 2px;
  white-space: normal;
  font-size: 11px;
  line-height: 1.4;
}
.work-info h3 { min-width: 0; }

/* The slideshow retains the feathered hero background in both layouts. */
.hero-slideshow {
  position: absolute;
  inset: 0 0 0 auto;
  width: 74%;
  height: 100%;
  z-index: -3;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--slide-position, 50% 50%);
  opacity: 0;
  transition: opacity 900ms ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; }
.hero::before,
.hero::after { pointer-events: none; }
.hero-controls {
  position: absolute;
  left: 5%;
  bottom: 22px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.hero-controls[hidden] { display: none; }
.hero-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1;
}
.hero-controls button:hover { background: var(--panel); }
.hero-controls [data-hero-count] {
  min-width: 46px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.service-intro { scroll-margin-top: 85px; }
.service-lead { padding-top: 64px; padding-bottom: 30px; }
.service-lead h2 { max-width: 750px; font-size: clamp(30px, 3vw, 42px); }
.service-lead p { margin-top: 18px; max-width: 650px; font-size: 18px; }
.service-lead { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.service-crew-photo { margin: 0; }
.service-crew-photo img,
.inquiry-bts-photo img { height: auto; aspect-ratio: 3 / 2; max-height: none; object-fit: contain; }
.service-intro .intro-strip { border-top: 0; }
.service-intro .intro-strip .wrap { padding-bottom: 34px; }
@media (max-width: 767px) {
  .hero { min-height: 0; display: block; padding-bottom: 0; }
  .hero-copy { padding: 38px 0 calc(66.6667vw + 24px); max-width: none; }
  .hero-copy .eyebrow { margin-bottom: 16px; }
  .hero-copy > p:not(.eyebrow) { margin-top: 18px; max-width: 34ch; }
  .hero-copy .actions { margin-top: 24px; gap: 10px; }
  .hero-slideshow { inset: auto 0 0; width: 100%; height: 66.6667vw; }
  .hero-slide { object-position: var(--slide-mobile-position, 50% 50%); }
  .hero::before {
    display: block;
    inset: auto 0 0;
    height: 66.6667vw;
    background: linear-gradient(180deg, var(--bg) 0%, transparent 25%);
  }
  .hero::after {
    display: block;
    inset: auto 0 0;
    height: 70px;
    background: linear-gradient(0deg, var(--bg) 5%, transparent 100%);
  }
  .hero-controls { left: 6%; bottom: 14px; justify-content: center; }
  .service-lead { padding-top: 44px; padding-bottom: 12px; grid-template-columns: 1fr; gap: 24px; }
  .service-lead p { font-size: 16px; }
  .service-intro .intro-strip .wrap { padding-bottom: 28px; }
  .work-info { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
@media print {
  .hero-controls { display: none; }
  .hero-slide { transition: none; }
}
@media (max-width: 480px) {
  .work-info { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}
