/* ----------------------------------------
   EXPEDITION COLLECTION
   Fixed panels: resize rather than swap.
   ---------------------------------------- */

#expeditions.expeditionCollection {
  height: calc(100vh - 88px);
  height: calc(100svh - 88px);
  min-height: 0;
  max-height: none;

  display: flex;
  flex-direction: column;
  gap: 18px;

  padding: 30px 4% 22px;
  overflow: hidden;

  background: #D8D0C0;
  color: #202522;
}

#expeditions .collectionHeading {
  flex: 0 0 auto;
  display: block;
  padding: 0 3%;
}

#expeditions .collectionHeading > .eyebrow {
  margin: 0 0 9px;

  color: #59604E;
  font-size: 9px;
  letter-spacing: .17em;
  text-transform: uppercase;
}

#expeditions .collectionHeading h2 {
  margin: 0;

  font-family:
    "Barlow Condensed",
    Impact,
    sans-serif;

  font-size: clamp(45px, 5.2vw, 74px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.015em;
  text-transform: uppercase;
}

/* The panel positions never change. */

#expeditions .expeditionReel {
  display: flex;
  gap: 16px;

  flex: 1;
  min-height: 0;
  width: 100%;
}

#expeditions .expeditionPanel {
  position: relative;
  isolation: isolate;

  flex: 1 1 0;
  min-width: 0;

  overflow: hidden;
  color: #F2F0E9;
  background: #202522;

  transition:
    flex-grow .8s cubic-bezier(.22, .65, .25, 1);
}

#expeditions .expeditionPanel.is-selected {
  flex-grow: 2.1;
}

#expeditions .expeditionPanel > img {
  position: absolute;
  inset: 0;
  z-index: -2;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
  transform: scale(1.025);

  transition: transform 1s ease;
}

#expeditions .expeditionPanel.is-selected > img {
  transform: scale(1);
}

#expeditions .expeditionPanel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    0deg,
    rgba(12, 17, 14, .86),
    rgba(12, 17, 14, .13) 82%
  );

  pointer-events: none;
}

/* Click a photograph to expand that panel. */

#expeditions .expeditionSelect {
  position: absolute;
  inset: 0;
  z-index: 2;

  width: 100%;
  height: 100%;
  padding: 0;

  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

#expeditions .expeditionSelect:focus-visible {
  outline: 2px solid #6EA8E0;
  outline-offset: -5px;
}

#expeditions .expeditionCorner {
  position: absolute;
  top: 25px;
  right: 25px;

  display: grid;
  place-items: center;

  width: 35px;
  height: 35px;

  font-size: 27px;
  font-weight: 400;
  line-height: 1;

  opacity: .9;
}

#expeditions .is-selected .expeditionCorner {
  opacity: 0;
}

/* Copy changes scale within its own panel. */

#expeditions .expeditionPanelCopy {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 1;

  pointer-events: none;
}

#expeditions .expeditionMood {
  max-width: 520px;
  margin: 0 0 15px;

  color: #F2F0E9;
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: .13em;
  text-transform: uppercase;

  transition: opacity .3s;
}

#expeditions
.expeditionPanel:not(.is-selected)
.expeditionMood {
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

#expeditions .expeditionPanel h3 {
  margin: 0 0 17px;

  font-family:
    "Barlow Condensed",
    Impact,
    sans-serif;

  font-weight: 500;
  font-size: clamp(27px, 2.6vw, 40px);
  line-height: .96;
  letter-spacing: 0;
  text-transform: uppercase;

  transition:
    font-size .7s cubic-bezier(.22, .65, .25, 1);
}

#expeditions .expeditionPanel.is-selected h3 {
  font-size: clamp(44px, 5.6vw, 86px);
}

#expeditions .expeditionMeta {
  margin: 0;

  color: #F2F0E9;
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: .045em;
}

#expeditions .expeditionMeta > span {
  padding: 0 7px;
  color: #D8D0C0;
}

/* Reveal the description and link in the expanded panel. */

#expeditions .expeditionDetails {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;

  transition:
    grid-template-rows .7s cubic-bezier(.22, .65, .25, 1),
    opacity .35s;
}

#expeditions .is-selected .expeditionDetails {
  grid-template-rows: 1fr;
  opacity: 1;

  transition:
    grid-template-rows .7s cubic-bezier(.22, .65, .25, 1),
    opacity .5s .16s;
}

#expeditions .expeditionDetailsInner {
  min-height: 0;
  overflow: hidden;
}

#expeditions .expeditionDetailsInner > p {
  max-width: 500px;

  border-top: 1px solid #f2f0e950;
  padding-top: 16px;
  margin: 17px 0 18px;

  color: #f2f0e9ed;
  font-size: 13px;
  line-height: 1.85;
}

#expeditions .expeditionDetails a {
  position: relative;
  z-index: 3;

  display: inline-flex;
  align-items: center;
  gap: 18px;

  padding-bottom: 6px;
  border-bottom: 1px solid #f2f0e970;

  color: #F2F0E9;
  font-size: 11px;
  line-height: 1.6;

  pointer-events: auto;
}

/* Navigation */

#expeditions .collectionNavigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;

  flex: 0 0 36px;
}

#expeditions .collectionChoices {
  display: flex;
  align-items: center;
  gap: 25px;
}

#expeditions .collectionChoices button {
  padding: 7px 0;

  border: 0;
  border-bottom: 1px solid transparent;
  background: none;

  color: #59604E;
  font-size: 11px;
  line-height: 1.5;
}

#expeditions
.collectionChoices
button[aria-pressed="true"] {
  color: #202522;
  border-bottom-color: #202522;
}

#expeditions .collectionArrow {
  width: 36px;
  height: 36px;
  padding: 0;

  border: 1px solid #20252240;
  background: none;

  color: #202522;
  font-size: 18px;
}

#expeditions .reelScreenReader {
  position: absolute;

  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Replace the riding section's blue box with a text action. */

#riding .rideActions a.solid,
#riding .rideActions a.solid:hover {
  min-height: 0;
  padding: 8px 0;

  border: 0;
  border-bottom: 1px solid #f2f0e980;
  border-radius: 0;

  background: transparent;
  color: #F2F0E9;

  font-size: 11px;
  gap: 24px;
  transform: none;
}

/* Compact desktop windows */

@media (min-width: 901px) and (max-height: 740px) {
  #expeditions.expeditionCollection {
    gap: 13px;
    padding-top: 22px;
    padding-bottom: 16px;
  }

  #expeditions .collectionHeading h2 {
    font-size: 49px;
  }

  #expeditions .expeditionPanelCopy {
    left: 24px;
    right: 24px;
    bottom: 23px;
  }

  #expeditions .expeditionPanel.is-selected h3 {
    font-size: clamp(40px, 4.8vw, 65px);
  }

  #expeditions .expeditionMood {
    margin-bottom: 10px;
    font-size: 8px;
  }

  #expeditions .expeditionDetailsInner > p {
    padding-top: 12px;
    margin: 12px 0;

    font-size: 12px;
    line-height: 1.7;
  }

  #expeditions .expeditionPanel h3 {
    margin-bottom: 12px;
  }
}

/* Mobile: retain the same order and expand vertically. */

@media (max-width: 900px) {
  #expeditions.expeditionCollection {
    height: auto;
    min-height: 0;
    overflow: visible;

    padding: 60px 6% 40px;
    gap: 25px;
  }

  #expeditions .collectionHeading {
    padding: 0;
  }

  #expeditions .collectionHeading h2 {
    font-size: 60px;
  }

  #expeditions .expeditionReel {
    flex-direction: column;
    flex: none;
    gap: 14px;
  }

  #expeditions .expeditionPanel {
    flex: none;
    min-height: 170px;

    transition:
      min-height .65s cubic-bezier(.22, .65, .25, 1);
  }

  #expeditions .expeditionPanel.is-selected {
    flex: none;
    min-height: 420px;
  }

  #expeditions .expeditionPanelCopy {
    left: 25px;
    right: 25px;
    bottom: 26px;
  }

  #expeditions .expeditionPanel h3 {
    font-size: 34px;
  }

  #expeditions .expeditionPanel.is-selected h3 {
    font-size: clamp(45px, 9vw, 70px);
  }

  #expeditions .collectionNavigation {
    gap: 14px;
  }

  #expeditions .collectionChoices {
    gap: 18px;
  }

  #expeditions .collectionChoices button {
    font-size: 10px;
  }

  #expeditions .collectionArrow {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #expeditions .expeditionPanel,
  #expeditions .expeditionPanel > img,
  #expeditions .expeditionPanel h3,
  #expeditions .expeditionDetails {
    transition: none;
  }
}
