/* Layout-only corrections. The existing site copy and content remain unchanged. */
.figma-bypass-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2147483647;
  transform: translateY(-150%);
  border-radius: 6px;
  background: #111827;
  color: #fff;
  padding: 8px 12px;
  font: 600 14px/1.2 system-ui, sans-serif;
  text-decoration: none;
}

.figma-bypass-link:focus {
  transform: translateY(0);
}

/* Keep all supplied artwork centered and fully visible at desktop widths. */
@media (min-width: 901px) {
  .approved-about > img,
  .approved-jal-art img,
  .who-hero > img,
  .inside-hero > img,
  .initiatives-overview img,
  .action-image img,
  .contact-art img {
    object-fit: contain;
    object-position: center;
  }

  .approved-about > img {
    max-width: 44rem;
    margin-inline: auto;
  }

  .approved-vision-artwork {
    width: min(100%, 22rem);
  }

  .legacy-initiative-grid img {
    display: block;
    margin-inline: auto;
  }

  .action-image,
  .contact-art {
    align-self: center;
    justify-self: center;
  }

  .partner-copy,
  .partner-copy p {
    text-align: center;
  }

  /* Match the full-width What We Do artwork frame without cropping. */
  .who-page .who-hero {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    aspect-ratio: 1376 / 768;
  }

  /* Keep all four initiatives in one evenly aligned laptop row. */
  .approved-initiatives .legacy-initiative-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(1rem, 1.5vw, 1.5rem);
  }

  /* Match the existing mobile reference order on laptop without changing mobile. */
  .initiatives-page .initiatives-layout {
    display: flex;
    flex-direction: column;
  }

  .initiatives-page .initiatives-overview {
    order: 1;
    width: 100%;
    padding: 0;
  }

  .initiatives-page .initiatives-overview img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    aspect-ratio: 1408 / 768;
    object-fit: contain;
    object-position: center;
  }

  .initiatives-page .utility-page-title {
    order: 2;
  }

  .initiatives-page .initiative-detail-grid {
    order: 3;
  }

  /* Match the existing mobile image-first flow on the three desktop pages. */
  .action-layout,
  .contact-page {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
  }

  .action-image,
  .contact-art {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  .action-image img,
  .contact-art img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .contact-page {
    padding: 0;
  }

  .contact-content {
    padding: clamp(2rem, 5.5vw, 6rem);
  }
}

/* Equal-height cards on laptop and tablet; mobile remains unchanged. */
@media (min-width: 561px) {
  .approved-initiatives .initiative-card-link {
    height: 100%;
  }

  .approved-initiatives .legacy-initiative-grid article {
    display: flex;
    height: 100%;
    flex-direction: column;
  }

  .approved-initiatives .legacy-initiative-grid img {
    width: 100%;
    height: auto;
    aspect-ratio: 1408 / 768;
    object-fit: contain;
    object-position: center top;
    flex: none;
  }

  .approved-initiatives .legacy-initiative-grid article > div {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .approved-initiatives .legacy-initiative-grid h3 {
    margin-top: 0;
  }

  .approved-initiatives .initiative-card-cta {
    margin-top: auto;
  }
}

/* Preserve the existing responsive two-column tablet arrangement. */
@media (min-width: 561px) and (max-width: 900px) {
  .approved-initiatives .legacy-initiative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.25rem;
  }
}

/* Prevent the mobile hero from stretching or cropping unpredictably. */
@media (max-width: 560px) {
  .legacy-hero {
    min-height: calc(100svh - 4.6rem);
  }

  .legacy-hero > img,
  .legacy-hero > video {
    object-position: center;
  }

  .inquiry-section label,
  .inquiry-section label small,
  .inquiry-section .consent-field {
    font-size: 0.875rem;
    line-height: 1.5;
  }
}

/* The background video is decorative: it must remain silent and stop for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .legacy-hero > video {
    display: none;
  }
}
