/*
 * Desktop layout containment.
 *
 * Keep section backgrounds full-bleed while constraining their actual content
 * to the 1024px reference composition. This prevents wide screens from
 * stretching cards, values, stories and footer content independently.
 */

@media screen and (min-width: 1024px) {
  .header {
    padding-left: max(28px, calc((100vw - 1024px) / 2 + 28px)) !important;
    padding-right: max(28px, calc((100vw - 1024px) / 2 + 28px)) !important;
  }

  .header .logo-space {
    display: block !important;
    width: 220px !important;
    min-width: 220px !important;
    flex: 0 0 220px !important;
  }

  .header .nav {
    margin-left: auto !important;
    gap: 24px !important;
  }

  .values {
    padding-left: max(39px, calc((100vw - 1024px) / 2 + 39px)) !important;
    padding-right: max(39px, calc((100vw - 1024px) / 2 + 39px)) !important;
  }

  .events {
    padding-left: max(38px, calc((100vw - 1024px) / 2 + 38px)) !important;
    padding-right: max(38px, calc((100vw - 1024px) / 2 + 38px)) !important;
  }

  .way {
    padding-left: max(42px, calc((100vw - 1024px) / 2 + 42px)) !important;
    padding-right: max(42px, calc((100vw - 1024px) / 2 + 42px)) !important;
  }

  .stories {
    padding-left: max(41px, calc((100vw - 1024px) / 2 + 41px)) !important;
    padding-right: max(41px, calc((100vw - 1024px) / 2 + 41px)) !important;
  }

  .footer {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    padding-left: max(32px, calc((100vw - 1024px) / 2 + 32px)) !important;
    padding-right: max(32px, calc((100vw - 1024px) / 2 + 32px)) !important;
    column-gap: 48px !important;
  }

  .footer-grind {
    width: min(300px, 32vw) !important;
    max-width: 300px !important;
    justify-self: center !important;
  }

  .footer-desc {
    justify-self: center !important;
    margin-top: 14px !important;
    white-space: nowrap !important;
    font-size: 13px !important;
  }

  .footer-legal {
    display: block !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1120px) {
  .header .logo-space {
    width: 180px !important;
    min-width: 180px !important;
    flex-basis: 180px !important;
  }

  .header .nav {
    gap: 20px !important;
  }
}

/*
 * Hero overlay correction.
 * The source PNGs are exactly 2x their CSS size. Do not scale/crop them beyond
 * these dimensions: doing so enlarges the Grindline and makes the raster edge
 * soft. The PNG supplies Sand + boundary + Grindline; photos stay independent.
 */
@media screen and (min-width: 761px) {
  .hero-brand-overlay-desktop {
    display: block !important;
    left: 0 !important;
    top: 0 !important;
    width: 540px !important;
    height: 430px !important;
    object-fit: fill !important;
    image-rendering: auto !important;
  }

  .hero-brand-overlay-mobile {
    display: none !important;
  }
}

@media screen and (max-width: 760px) {
  .hero-brand-overlay-desktop {
    display: none !important;
  }

  .hero-brand-overlay-mobile {
    display: block !important;
    left: 0 !important;
    top: 322rem !important;
    width: 709rem !important;
    height: 88rem !important;
    object-fit: fill !important;
    image-rendering: auto !important;
  }
}
