/* A square portrait should read as a photo, not as a device screen. */
.portrait-device {
  width: min(360px, 62vw);
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  isolation: isolate;
}

.portrait-device::before {
  inset: 7% -7% -7% 8%;
  z-index: -1;
  border: 0;
  border-radius: 38px 38px 98px 38px;
  background: linear-gradient(145deg, rgba(255, 249, 244, 0.92), rgba(226, 194, 183, 0.5));
  box-shadow: 0 22px 48px rgba(81, 55, 47, 0.16);
  transform: rotate(4deg);
}

.portrait-device img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 34px 34px 98px 34px;
  background: transparent;
  box-shadow: 0 16px 34px rgba(81, 55, 47, 0.14);
  filter: saturate(0.88) contrast(0.99);
}

.portrait-caption {
  top: auto;
  right: 4px;
  bottom: -56px;
  width: min(320px, 100%);
  padding: 0;
}

@media (max-width: 1080px) {
  .portrait-device {
    right: 2%;
    width: min(340px, 56vw);
    height: auto;
  }
}

@media (max-width: 680px) {
  .hero-stage {
    min-height: 590px;
  }

  .portrait-device {
    top: 15%;
    right: 10px;
    left: auto;
    width: min(244px, 62vw);
    height: auto;
    margin: 0;
  }

  .portrait-device::before {
    inset: 6% -5% -6% 7%;
    border-radius: 28px 28px 72px 28px;
    transform: rotate(3deg);
  }

  .portrait-device img {
    border-radius: 25px 25px 72px 25px;
  }

  .portrait-caption {
    display: none;
  }

  .floating-card {
    width: min(164px, 42vw);
  }

  .card-one {
    top: 1%;
    left: 0;
  }

  .card-three {
    top: 47%;
    left: 0;
  }

  .card-two {
    top: 76%;
    left: 5%;
  }
}
