.about-page {
  --profile-inset: 100px;
  --portrait-top: 150px;
  --team-top: 150px;
  --footer-space: calc(100% / 12);
}

.about-page main { overflow-x: clip; }
.about-hero { position: relative; }

.about-grid {
  position: absolute;
  top: calc(50% - 256px);
  left: var(--grid-left);
  width: var(--grid-width, 120%);
  height: 512px;
  overflow: hidden;
  transform: perspective(1200px) rotateY(var(--grid-tilt));
  animation: grid-enter 1s var(--float) both;
  mask-image: linear-gradient(90deg, transparent, #000 12.5%, #000 87.5%, transparent);
}
.about-grid::before, .about-grid::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset-block: 0;
  width: 20%;
  pointer-events: none;
  background: linear-gradient(90deg, #000, transparent);
}
.about-grid::after {
  right: 0;
  width: 40%;
  background: linear-gradient(270deg, #000, transparent);
}
.about-grid-tiles { --ticker-gap: 40px; height: 100%; }
.about-grid img { width: 512px; height: 512px; max-width: none; opacity: .2; }

.archive-art {
  /* Keep the nearest and farthest bars above the viewport under perspective. */
  --archive-entry-y: min(-800px, calc(-62vh - 330px));
  position: absolute;
  top: 50%;
  left: 36%;
  width: min(38%, 700px);
  aspect-ratio: 9 / 8;
  transform: translate(-50%, -50%) perspective(500px) rotateY(17deg);
}
.archive-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11%;
}
.archive-bar {
  --bar-delay: 0s;
  --top-duration: 2.6s;
  --bottom-duration: 1.8s;
  --color: var(--red);
  position: relative;
  width: 11%;
  aspect-ratio: 1 / 8;
  animation: archive-fall 1s var(--float) var(--bar-delay) both;
}
.archive-bar:nth-child(2) { --color: var(--blue); --bar-delay: .1s; --top-duration: 2.4s; --bottom-duration: 2s; }
.archive-bar:nth-child(3) { --color: var(--pink); --bar-delay: .2s; --top-duration: 2.2s; --bottom-duration: 2.2s; }
.archive-bar:nth-child(4) { --color: var(--green); --bar-delay: .3s; --top-duration: 2s; --bottom-duration: 2.4s; }
.archive-bar:nth-child(5) { --color: var(--orange); --bar-delay: .4s; --top-duration: 1.8s; --bottom-duration: 2.6s; }
.archive-bar span {
  position: absolute;
  width: 100%;
  aspect-ratio: 50 / 220;
  border-radius: 100px;
  background: var(--color);
  animation: archive-bar-drift var(--duration) var(--float) infinite alternate;
}
.archive-bar span:first-child { top: 0; --travel: 70px; --duration: var(--top-duration); }
.archive-bar span:last-child { bottom: 0; --travel: -70px; --duration: var(--bottom-duration); }
@keyframes archive-fall { from { translate: 0 var(--archive-entry-y); } }
@keyframes archive-bar-drift { to { transform: translateY(var(--travel)); } }

.archive-ticker {
  --ticker-gap: 10px;
  position: absolute;
  top: 50%;
  width: 100%;
  aspect-ratio: 450 / 152;
  padding-block: 10px;
  overflow: hidden;
  transform: translateY(-50%);
  animation: archive-fall 1s var(--float) both;
  /* The five slots match the alpha mask on the Framer artwork. */
  mask-image: linear-gradient(to right,
    #000 11.556%, transparent 11.556% 21.778%,
    #000 21.778% 33.778%, transparent 33.778% 44%,
    #000 44% 56%, transparent 56% 66.222%,
    #000 66.222% 78.222%, transparent 78.222% 88.444%,
    #000 88.444%);
}
.about-ticker-strip, .about-ticker-group {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
}
.about-ticker-strip { animation: about-ticker-loop var(--ticker-period) linear infinite; }
.about-ticker-group {
  flex: none;
  gap: var(--ticker-gap);
  padding-right: var(--ticker-gap);
}
.archive-ticker img {
  width: auto;
  height: 100%;
  max-width: none;
  animation: archive-star-spin 10s linear infinite;
}
@keyframes about-ticker-loop { to { transform: translateX(var(--ticker-shift)); } }
@keyframes archive-star-spin { to { transform: rotate(-1turn); } }

.about-motto {
  position: absolute;
  top: 50%;
  right: 100px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: 26%;
  margin: 0;
  transform: translateY(-50%);
  container-type: inline-size;
}
.about-motto span {
  line-height: var(--motto-leading, .79);
  white-space: nowrap;
  animation: about-motto-enter 1s var(--float) var(--motto-delay, 0s) both;
}
.about-motto span:nth-child(1) { font-size: 7.456cqw; }
.about-motto span:nth-child(2) { font-size: 7.371cqw; --motto-delay: .1s; }
.about-motto span:nth-child(3) { font-size: 7.213cqw; --motto-delay: .2s; }
.about-motto span:nth-child(4) { font-size: 6.977cqw; --motto-leading: .814; --motto-delay: .3s; }
@keyframes about-motto-enter { from { opacity: 0; transform: translateX(150px); } }
.about-hero .hero-archive img { animation: about-archive-hand 2s var(--float) infinite alternate; }
@keyframes about-archive-hand { to { transform: translateY(25px); } }
.about-hero.is-offscreen :is(.archive-bar span, .archive-ticker img, .about-ticker-strip, .hero-archive img) {
  animation-play-state: paused;
}

.about-details {
  --label-x: 42.5cqw;
  --label-width: 4.25cqw;
  width: min(100%, var(--stage-width));
  margin-inline: auto;
  margin-bottom: var(--footer-space);
  container-type: inline-size;
}
.about-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-inline: var(--profile-inset);
}
.about-profiles { width: 62%; }
.about-profile {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  min-height: min-content;
  aspect-ratio: .943598;
}
.profile-label {
  position: absolute;
  top: 50%;
  left: calc(var(--label-x) - var(--profile-inset));
  width: var(--label-width);
  aspect-ratio: 52 / 656;
  margin: 0;
  transform: translateY(-50%);
}
.profile-label img { width: 100%; height: 100%; object-fit: contain; }
.profile-copy {
  position: relative;
  width: min(53%, 400px);
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  opacity: var(--copy-opacity, 1);
}
.profile-copy span { display: block; }
.profile-picture {
  position: sticky;
  z-index: 1;
  top: var(--portrait-top);
  width: 33%;
  aspect-ratio: 615 / 630;
  transform: translateX(calc(var(--portrait-progress, 0) * var(--portrait-travel, -50px)))
    scale(calc(1 - var(--portrait-progress, 0) * .5));
}
.profile-picture img { width: 100%; height: 100%; object-fit: contain; }

.about-sticky {
  position: sticky;
  z-index: 1;
  top: var(--team-top);
  order: 1;
  display: flex;
  align-items: flex-start;
  width: min(30%, 350px);
  margin: 0;
}
.my-label, .team-letters { width: 50%; }
.my-label { height: auto; }
.team-letters {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.team-letters img { height: auto; }
.team-letters img:nth-child(1) { width: 73%; --entry-delay: 0s; }
.team-letters img:nth-child(2) { width: 62%; --entry-delay: .1s; }
.team-letters img:nth-child(3) { width: 72%; --entry-delay: .2s; }
.team-letters img:nth-child(4) { width: 100%; --entry-delay: .3s; }

.about-motion [data-enter] {
  transition: opacity 1s var(--float), translate 1s var(--float), scale 1s var(--float);
  transition-delay: var(--entry-delay, 0s);
}
.about-motion [data-enter]:not(.has-entered) {
  opacity: 0;
  translate: var(--entry-x, 0px) var(--entry-y, 0px);
  scale: var(--entry-scale, 1);
}
[data-enter="rise"] { --entry-y: 100px; }
[data-enter="scale"] { --entry-scale: .5; }
[data-enter="from-left"] { --entry-x: -150px; }

@media (900px <= width < 1200px) {
  .about-page { --footer-space: calc(100% / 9); }
  .about-details { --label-x: 43cqw; --label-width: 4cqw; }
}
@media (600px <= width < 900px) {
  .about-page {
    --profile-inset: 50px;
    --portrait-top: 100px;
    --team-top: 125px;
    --footer-space: calc(100% / 6);
  }
  .about-details { --label-x: 42cqw; --label-width: 4.5cqw; }
  .archive-art { left: 100px; width: min(46%, 338px); transform: translateY(-50%) perspective(500px) rotateY(17deg); }
  .about-motto { right: 50px; }
  .profile-copy { font-size: 16px; }
}
@media (width < 600px) {
  .about-page {
    --profile-inset: 20px;
    --portrait-top: 50px;
    --team-top: 125px;
    --footer-space: 100px;
  }
  .about-hero { opacity: .9; }
  .archive-art { left: 55%; width: min(80%, 360px); transform: translate(-50%, -50%) perspective(500px) rotateY(27deg); }
  .about-motto {
    top: 14%;
    left: 44%;
    right: auto;
    width: 60%;
    gap: 5px;
    align-items: flex-start;
    transform: translate(-50%, -50%);
  }
  .about-details { --label-width: 7.25cqw; }
  .about-content { justify-content: flex-end; gap: 20px; padding-top: 50px; }
  .about-profile {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    align-items: flex-start;
    aspect-ratio: .433915;
    --portrait-travel: 0px;
  }
  .about-profile.creator, .about-profile.jovial { aspect-ratio: .4325; }
  .profile-label {
    top: calc(50% + var(--label-offset, -45px));
    left: calc(20px - (100cqw - 40px) * .23);
  }
  .creator { --label-offset: -35px; }
  .entrepreneur { --label-offset: -25px; }
  .jovial { --label-offset: -15px; }
  .philosopher { --label-offset: -5px; }
  .profile-picture { width: 68%; }
  .entrepreneur .profile-picture, .philosopher .profile-picture { width: 67%; }
  .profile-copy {
    order: 1;
    width: 100%;
    font-size: 14px;
  }
  .profile-copy span {
    --entry-x: 0px;
    --entry-y: 100px;
  }
  .about-sticky { flex-direction: column; align-items: flex-end; gap: 20px; width: 15%; }
  .my-label, .team-letters { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .about-grid, .about-ticker-strip, .archive-bar, .archive-bar span, .archive-ticker, .archive-ticker img,
  .about-motto span, .about-hero .hero-archive img { animation: none; }
  .profile-picture { position: relative; top: auto; transform: none; }
  .profile-copy { opacity: 1; }
}
