/* === 15 / NO MOSS & FRIENDS === */

.chapter--friends {
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
}

.friends-copy {
  position: relative;
  z-index: 3;
  width: min(25vw, 26rem);
  padding-top: clamp(.4rem, 2vh, 1.4rem);
}

.chapter--friends .eyebrow { color: var(--climb-blue); }

.chapter--friends h2 {
  max-width: none;
  margin-top: clamp(1rem, 2vh, 1.6rem);
  font-size: clamp(2.5rem, 3.4vw, 4.2rem);
  line-height: 1.08;
}

.chapter--friends .chapter__lead {
  max-width: 23rem;
  margin-top: clamp(1.2rem, 2.4vh, 2rem);
  padding-top: clamp(.8rem, 1.4vh, 1.2rem);
  border-top: clamp(.18rem, .28vw, .28rem) solid var(--moss);
  font-size: clamp(.9rem, 1.15vw, 1.2rem);
  line-height: 1.75;
}

.friends-track {
  position: absolute;
  z-index: 0;
  left: 32%;
  right: 2.5%;
  top: 12%;
  bottom: 7%;
  pointer-events: none;
}

.friends-track i {
  position: absolute;
  left: 2%;
  width: 96%;
  height: 48%;
  border: 1px dashed rgb(21 84 165 / 28%);
  border-radius: 50%;
}

.friends-track i:first-child { top: 5%; transform: rotate(-5deg); }
.friends-track i:last-child { bottom: 4%; transform: rotate(6deg); border-color: rgb(131 210 10 / 45%); }

.friends-list {
  position: absolute;
  z-index: 2;
  left: 33%;
  right: 4%;
  top: 12%;
  bottom: 9%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(.65rem, 1.2vw, 1.2rem);
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.friend-logo {
  min-width: 0;
  transform: translateY(var(--path-y, 0));
}

.friend-logo:nth-child(11) { grid-column: 2; }
.friend-logo:nth-child(12) { grid-column: 3; }
.friend-logo:nth-child(13) { grid-column: 4; }

.friend-logo__card {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: clamp(.45rem, .8vw, .8rem);
  background: #fff;
  border: 1px solid rgb(10 13 14 / 16%);
}

.friend-logo__card img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 900px) {
  .chapter--friends { min-height: auto; }
  .friends-copy { width: min(100%, 37rem); padding-top: 0; }
  .chapter--friends h2 { max-width: none; font-size: clamp(2.8rem, 8vw, 4.6rem); }
  .friends-track { left: 4%; right: 4%; top: 28%; bottom: 4%; opacity: .55; }
  .friends-list {
    position: relative;
    inset: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    gap: clamp(.65rem, 2vw, 1rem);
    margin-top: clamp(2.2rem, 5vh, 3.4rem);
  }
  .friend-logo { grid-column: auto; transform: none; }
  .friend-logo:nth-child(11), .friend-logo:nth-child(12) { grid-column: auto; }
  .friend-logo:nth-child(13) { grid-column: 2; }
}

@media (max-width: 560px) {
  .chapter--friends h2 { font-size: clamp(2.6rem, 12vw, 4rem); line-height: 1.1; }
  .chapter--friends .chapter__lead { max-width: 30rem; font-size: clamp(.9rem, 4vw, 1.08rem); }
  .friends-track { top: 31%; opacity: .42; }
  .friends-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .friend-logo:nth-child(13) {
    grid-column: 1 / -1;
    width: calc((100% - clamp(.65rem, 2vw, 1rem)) / 2);
    justify-self: center;
  }
}

@media (max-height: 700px) and (min-width: 901px) {
  .friends-copy { padding-top: 0; }
  .chapter--friends h2 { margin-top: .7rem; font-size: clamp(2.2rem, 3.5vw, 3.8rem); }
  .chapter--friends .chapter__lead { margin-top: .8rem; padding-top: .6rem; line-height: 1.55; }
  .friends-list { top: 11%; bottom: 7%; }
}

@media (max-height: 600px) and (min-width: 901px) {
  .chapter--friends h2 { font-size: clamp(2rem, 3.2vw, 3.3rem); }
  .chapter--friends .chapter__lead { font-size: clamp(.76rem, 1vw, .95rem); }
  .friends-list { gap: clamp(.45rem, .8vw, .75rem); }
}

@media (max-height: 500px) and (min-width: 901px) {
  .chapter--friends .chapter__lead { line-height: 1.35; }
  .friends-track { display: none; }
}
