/* FROM — Contact, section 1: the photo beside the heading (Hanna Pad, Pexels 7552726), with a reply from the FROM
   team landing on it. */

.reach__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px clamp(48px, 7vw, 112px);
}

.reach__shot {
  position: relative;
  margin: 0;
}

.reach__frame {
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--orange-tint);
  clip-path: inset(0 round var(--radius-lg));
}

.reach__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
}

.reply {
  position: absolute;
  left: clamp(-56px, -3.5vw, -20px);
  bottom: -32px;
  display: grid;
  gap: 4px;
  width: min(300px, 78%);
  padding: 16px 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(7, 13, 23, 0.16), 0 0 0 1px rgba(7, 13, 23, 0.04);
  font-size: 14px;
  line-height: 1.4;
}

.reply__from {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.reply__from small {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}

.reply__dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.reply__subject {
  margin-top: 6px;
  font-weight: 650;
}

.reply__text {
  color: var(--ink-3);
}

/* Plays in: the photo opens out, then the reply lands on it. */
.reach__shot[data-reveal] .reach__frame {
  clip-path: inset(5% 6% round var(--radius-lg));
  transition: clip-path 1.2s var(--ease-out);
}

.reach__shot[data-reveal] .reach__frame img {
  transform: scale(1.12);
  transition: transform 1.6s var(--ease-out);
}

.reach__shot[data-reveal] .reply {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s 0.7s, transform 0.8s 0.7s var(--ease-out);
}

.reach__shot.is-in .reach__frame {
  clip-path: inset(0 round var(--radius-lg));
}

.reach__shot.is-in .reach__frame img {
  transform: none;
}

.reach__shot.is-in .reply {
  opacity: 1;
  transform: none;
}

@media (max-width: 1000px) {
  .reach__top {
    grid-template-columns: 1fr;
  }

  .reach__shot {
    max-width: 560px;
  }

  .reply {
    left: 16px;
  }
}

/* On a phone the reply hangs off the bottom of the photo, so it doesn't cover her. */
@media (max-width: 560px) {
  .reach__frame {
    aspect-ratio: 1 / 1;
  }

  .reach__frame img {
    object-position: 58% 40%;
  }

  .reply {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    margin: -56px 14px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reach__shot[data-reveal] .reach__frame,
  .reach__shot[data-reveal] .reach__frame img,
  .reach__shot[data-reveal] .reply {
    clip-path: none;
    transform: none;
    opacity: 1;
  }
}
