@import url("https://fonts.googleapis.com/css2?family=Aboreto&display=swap");
* {
  box-sizing: border-box;
}

html {
  font-size: 6.25vmax;
}
@media (max-width: 992px) {
  html {
    font-size: 60px;
  }
}

body {
  color: #222;
  background-color: #ececec;
  font-family: "Aboreto", system-ui;
  font-size: 0.24rem;
}

section {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 100vh;
  padding: 24px 48px;
  view-timeline: --section;
  position: relative;
  --img-width: 35vmax;
  --img-height: calc(var(--img-width) * 3 / 4);
}
section:nth-child(1) {
  background-color: #d4e3d2;
  z-index: 4;
}
section:nth-child(2) {
  background-color: #efcbc5;
  z-index: 3;
}
section:nth-child(3) {
  background-color: #ebe1c6;
  z-index: 2;
}
section:nth-child(4) {
  background-color: #cbd0e2;
  z-index: 1;
}
section .img-box {
  position: fixed;
  top: 0;
  bottom: 0;
  margin: auto;
  right: 48px;
  width: var(--img-width);
  height: var(--img-height);
}
section img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: wipe linear both;
  animation-timeline: --section;
  --gap: calc((100% - var(--img-height)) / 2);
  animation-range: exit var(--gap) exit calc(100% - var(--gap));
}

.content {
  padding-left: 10%;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.content .title {
  font-size: 1.8em;
  font-weight: bold;
}
.content .desc {
  line-height: 1.7;
  text-wrap: balance;
}

@keyframes wipe {
  0% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 0 100% 0);
  }
}