.section { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; --progress: 0; .section__media { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; transform: scale(var(--progress)); .section__media__front, .section__media__back { position: absolute; left: 0; top: 0; width: 100%; height: 100%; } .section__media__front { filter: blur(2px); img { mask-image: url(./mask.png); mask-position: 50% 50%; mask-size: cover; } } .front-1 { transform: scale(1); } .front-2 { transform: scale(0.85); } .front-3 { transform: scale(0.6); } .front-4 { transform: scale(0.45); } .front-5 { transform: scale(0.3); } .front-6 { transform: scale(0.15); } img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; } } h1 { font-size: 3vw; font-weight: normal; transform: translateY(-15%); font-weight: 600; display: flex; span { display: inline-block; } .left { transform: translate3d(calc(var(--progress) * (-66vw + 100%) - 0.5vw), 0, 0); } .right { transform: translate3d(calc(var(--progress) * (66vw - 100%)), 0, 0); } @media (max-width: 768px) { font-size: 9vw; .left { transform: translate3d(calc(var(--progress) * (-100vw + 100%) - 0.5vw), 0, 0); } .right { transform: translate3d(calc(var(--progress) * (100vw - 100%)), 0, 0); } } } } .section__images { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; perspective: 100vh; img { position: absolute; width: 10vw; @media (max-width: 768px) { width: 20vw; } &:nth-of-type(1) { top: 15vw; left: -3vw; } &:nth-of-type(2) { top: 5vw; left: 20vw; } &:nth-of-type(3) { top: 8vw; left: 26.5vw; @media (max-width: 768px) { top: 30vw; left: 30vw; } } &:nth-of-type(4) { top: 18vw; right: 18vw; @media (max-width: 768px) { right: 15vw; top: 30vw; } } &:nth-of-type(5) { top: 5vw; right: 10vw; @media (max-width: 768px) { top: 10vw; right: 5vw; } } &:nth-of-type(6) { bottom: 5vw; left: 10vw; @media (max-width: 768px) { left: 5vw; } } &:nth-of-type(7) { bottom: 8vw; left: 22.5vw; @media (max-width: 768px) { left: 10vw; bottom: 27.5vw; } } &:nth-of-type(8) { bottom: 3vw; left: 45vw; @media (max-width: 768px) { bottom: 10vw; left: 35vw; } } &:nth-of-type(9) { bottom: 5vw; right: 15vw; @media (max-width: 768px) { bottom: 5vw; } } &:nth-of-type(10) { bottom: 9vw; right: 7vw; @media (max-width: 768px) { right: 3vw; bottom: 22vw; } } } }