.stack-wrap {
  position: relative;
  z-index: 6;
  background: #f4f1ea;
  padding: 10rem 6.4rem;
}

.stack-stage {
  position: relative;
  overflow: hidden;
  height: calc(100svh - 6rem);
}

.stack-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 4.8rem;
  transform-origin: 50% 42%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.stack-panel.is-gold {
  z-index: 1;
  background: transparent;
}

.stack-panel.is-gold .stack-panel-inner {
  background: #c4a15a;
}

.stack-panel.is-navy {
  z-index: 2;
  background: #0b1a2b;
}

.stack-panel.is-teal {
  z-index: 3;
  background: #3f6166;
}

.stack-panel-inner {
  position: relative;
  height: 100%;
  padding: 6.4rem 7.2rem 5.6rem;
}

.stack-copy {
  position: relative;
  z-index: 4;
  max-width: 64rem;
  margin-right: auto;
  text-align: left;
}

.stack-panel.is-gold .stack-heading,
.stack-panel.is-gold .stack-cta,
.stack-panel.is-gold .stack-body,
.stack-panel.is-gold .stack-photo {
  opacity: 0;
}

.stack-heading {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-family: "Playfair Display", "Marcellus", serif;
  font-size: clamp(3.6rem, 4.4vw, 6.4rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-align: left;
}

.stack-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.8rem;
  margin-top: 2.4rem;
  padding: 0 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(10px);
  cursor: pointer;
  appearance: none;
  font: inherit;
}

.stack-body {
  position: absolute;
  right: 7.2rem;
  bottom: 5.6rem;
  z-index: 4;
  max-width: 38rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Montserrat", sans-serif;
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
}

.stack-photos {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stack-photo {
  position: absolute;
  overflow: hidden;
  border-radius: 2.2rem;
  isolation: isolate;
  box-shadow: 0 2.4rem 5.6rem rgba(20, 30, 40, 0.28);
}

.stack-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.stack-photo.is-a {
  left: 4%;
  bottom: 0;
  z-index: 1;
  width: 26%;
  height: 54%;
}

.stack-photo.is-b {
  left: 22%;
  top: 40%;
  z-index: 2;
  width: 31%;
  height: 30%;
}

.stack-photo.is-c {
  left: 44%;
  right: auto;
  top: 18%;
  z-index: 3;
  width: 28%;
  height: 27%;
}

.stack-panel.is-navy .stack-photo {
  box-shadow:
    0 0 0 0.2rem rgba(140, 205, 230, 0.85),
    0 2.4rem 5.6rem rgba(0, 10, 24, 0.35);
}

/* Centred, not 38%. That offset was framing the group shot that used to sit
   here; the Bermuda bridge aerial that replaced it reads best from the middle. */
.stack-panel.is-navy .stack-photo.is-c img {
  object-position: center;
}

.stack-panel.is-gold .stack-photo {
  box-shadow:
    0 0 0 0.12rem rgba(255, 248, 230, 0.4),
    0 2.4rem 5.6rem rgba(60, 40, 10, 0.22);
}

.stack-panel.is-teal .stack-photo {
  box-shadow:
    0 0 0 0.14rem rgba(210, 230, 232, 0.45),
    0 2.4rem 5.6rem rgba(0, 20, 24, 0.32);
}

.stack-panel.is-teal .stack-photo.is-a img {
  object-position: 62% center;
}

.stack-panel.is-teal .stack-photo.is-b img {
  object-position: center 42%;
}

.stack-panel.is-teal .stack-photo.is-c img {
  object-position: center 38%;
}

@media screen and (max-width: 1100px) {
  .stack-wrap {
    padding: 8rem 4.8rem;
  }

  .stack-stage {
    height: calc(100svh - 5rem);
  }

  .stack-panel {
    border-radius: 3.6rem;
  }

  .stack-panel-inner {
    padding: 4.8rem 4rem 4.4rem;
  }

  .stack-body {
    right: 4rem;
    bottom: 4.4rem;
    max-width: 32rem;
  }

  .stack-photo.is-a {
    width: 30%;
    height: 52%;
  }

  .stack-photo.is-b {
    width: 35%;
    height: 27%;
  }

  .stack-photo.is-c {
    width: 31%;
    height: 25%;
  }
}

@media screen and (max-width: 991px) {
  .stack-wrap {
    padding: 5.6rem 3.2rem;
  }

  .stack-stage {
    height: calc(100svh - 12rem);
    height: calc(100dvh - 12rem);
    transform: translateZ(0);
  }

  .stack-panel {
    border-radius: 3.2rem;
    transform: translateZ(0);
  }

  .stack-panel-inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 3.2rem 2.4rem 2.2rem;
  }

  .stack-copy {
    max-width: none;
    flex-shrink: 0;
  }

  .stack-heading {
    font-size: 3rem;
  }

  .stack-heading br {
    display: none;
  }

  .stack-photos {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 46%;
    margin: 1.8rem 0 1.6rem;
  }

  .stack-photo.is-a {
    left: 0;
    bottom: 0;
    width: 40%;
    height: 70%;
  }

  .stack-photo.is-b {
    left: 24%;
    top: 26%;
    width: 46%;
    height: 38%;
  }

  .stack-photo.is-c {
    left: auto;
    right: 0;
    top: 2%;
    width: 42%;
    height: 34%;
  }

  .stack-body {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: none;
    text-align: left;
    font-size: 1.3rem;
    flex-shrink: 0;
  }
}

@media screen and (max-width: 767px) {
  .stack-wrap {
    height: 380vh;
    padding: 3.2rem 1.8rem 4.8rem;
    overflow-anchor: none;
    box-sizing: border-box;
  }

  .stack-wrap:after {
    content: none;
    display: none;
  }

  .stack-stage {
    position: sticky;
    top: 5.2rem;
    height: calc(100svh - 10.4rem);
    height: calc(100dvh - 10.4rem);
    transform: none;
    will-change: auto;
  }

  .stack-panel {
    border-radius: 2.4rem;
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .stack-panel-inner {
    padding: 2.4rem 1.8rem 1.6rem;
  }

  .stack-heading {
    font-size: 2.5rem;
  }

  .stack-cta {
    min-height: 3.2rem;
    margin-top: 1.2rem;
    font-size: 1.1rem;
  }

  .stack-photos {
    min-height: 0;
    margin: 1.4rem 0 1.2rem;
  }

  .stack-body {
    font-size: 1.2rem;
    line-height: 1.45;
  }
}

@media screen and (max-width: 767px) and (max-height: 720px) {
  .stack-stage {
    height: calc(100dvh - 8rem);
  }

  .stack-heading {
    font-size: 2.2rem;
  }

  .stack-cta {
    min-height: 3rem;
    margin-top: 1rem;
  }

  .stack-photos {
    margin: 1rem 0 1rem;
  }

  .stack-body {
    font-size: 1.5rem;
  }
}
