/* Homepage space/gallery section — stable image-first responsive layout. */

.fg-home-redesign > .fg-home-gallery {
  display: grid !important;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr) !important;
  align-items: center !important;
  gap: clamp(3rem, 8vw, 9rem) !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
  padding: clamp(5rem, 10vw, 9rem) max(1.25rem, calc((100vw - 1240px) / 2)) !important;
  background: #e7eee5 !important;
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro {
  width: 100% !important;
  max-width: 34rem !important;
  margin: 0 !important;
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro h2 {
  max-width: 12ch !important;
  margin: 0;
  color: #26372d !important;
  font-size: clamp(2.7rem, 5vw, 5.5rem) !important;
  line-height: .94 !important;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro > p:last-child {
  max-width: 34rem !important;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0 !important;
  color: #526057 !important;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.7 !important;
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(.75rem, 1.5vw, 1.25rem) !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images figure {
  position: relative;
  min-width: 0;
  height: clamp(12rem, 18vw, 18rem) !important;
  margin: 0 !important;
  overflow: hidden;
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images .fg-home-gallery__image--large {
  grid-row: 1 / span 2;
  height: clamp(26rem, 38vw, 39rem) !important;
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  filter: saturate(.82) contrast(1.03);
}

.fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  color: #fff;
  font: 600 .58rem/1.3 var(--mono);
  letter-spacing: .1em;
  text-shadow: 0 1px 12px rgb(0 0 0 / .45);
}

@media (max-width: 1050px) {
  .fg-home-redesign > .fg-home-gallery {
    grid-template-columns: 1fr !important;
    gap: 3.5rem !important;
    max-width: 900px !important;
    padding-inline: clamp(1.5rem, 7vw, 5rem) !important;
  }

  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro {
    max-width: 46rem !important;
    margin-inline: auto !important;
    text-align: center;
  }

  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro h2,
  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro > p:last-child {
    margin-inline: auto !important;
  }

  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images {
    max-width: 760px !important;
    margin-inline: auto !important;
  }
}

@media (max-width: 600px) {
  .fg-home-redesign > .fg-home-gallery {
    gap: 2.5rem !important;
    padding: 4.5rem 1.25rem 5rem !important;
  }

  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro {
    text-align: left;
  }

  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro h2,
  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__intro > p:last-child {
    margin-inline: 0 !important;
  }

  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
  }

  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images figure,
  .fg-home-redesign > .fg-home-gallery > .fg-home-gallery__images .fg-home-gallery__image--large {
    grid-row: auto;
    height: clamp(14rem, 72vw, 22rem) !important;
  }
}
