:root {
  --hero-text-color-dark: #140e24;
  --hero-text-color-light: #140e24d3;
  --hero-stroke-color: #AA6BE4;
  --banner-bg-scale-factor: 450vmin;
}

header nav .breadcrumbs .case-study-logo {
  margin-bottom: -8px;
  height: 30px;
}

.banner {
  background-color: var(--hero-text-color-dark);
  color: var(--paper);
}

.banner h1 {
  text-shadow: -0.5px 0.5px 0 var(--hero-stroke-color), 0.5px 0.5px 0 var(--hero-stroke-color), 0.5px -0.5px 0 var(--hero-stroke-color), -0.5px -0.5px 0 var(--hero-stroke-color);
  font-size: 23vw;
  margin-top: 2rem;
}

.banner h1 span {
  display: block;
  line-height: 0.65;
  z-index: 0;
  position: relative;
}

.banner h1 span:nth-child(1) {
  z-index: 3;
}

.banner h1 span:nth-child(2) {
  margin-left: 0.85em;
  z-index: 2;
}

.banner h1 span::after {
  content: attr(data-text);
  color: var(--hero-text-color-light);
  position: absolute;
  top: 0;
  left: 0;
}

.banner h1 span:nth-child(2)::after {
  color: var(--hero-text-color-dark);  
}

.banner h1 span:nth-child(3) {
  margin-left: 0.35em;
  margin-top: 0.15em;
  z-index: -1;
}

.banner h1 span:nth-child(3)::before {
  content: "";
  background-image: url("../images/banner-bg-jointly.svg");
  background-size: cover;
  width: var(--banner-bg-scale-factor);
  height: calc(var(--banner-bg-scale-factor) * 0.7);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-49%, -50%);
  transform-origin: center;
  z-index: -1;
}

.banner .scrollBadge {
  content: "";
  background-color: var(--paper);
  -webkit-mask-image: url("../images/icon-arrow-badge.svg");
  mask-image: url("../images/icon-arrow-badge.svg");
  display: inline-block;
  mask-repeat: no-repeat;
  mask-size: auto;
  width: 70px;
  height: 94px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-0.3em, 130%);
  cursor: pointer;
}

.intro .skills-badge {
  background-color: #8e6bc5;
}

.intro .skills-badge.ux-design {
  -webkit-mask-image: url("../images/skills-badge-user-experience-design.svg");
  mask-image: url("../images/skills-badge-user-experience-design.svg");
  top: -176px;
  left: 42px;
}

.intro .skills-badge.user-flow {
  -webkit-mask-image: url("../images/skills-badge-user-flow.svg");
  mask-image: url("../images/skills-badge-user-flow.svg");
  top: -32px;
  left: -16px;
  transition-delay: 0.4s
}

.intro .skills-badge.design-systems {
  -webkit-mask-image: url("../images/skills-badge-design-systems.svg");
  mask-image: url("../images/skills-badge-design-systems.svg");
  top: -72px;
  left: 176px;
  transition-delay: 0.3s
}

.comparison {
  padding-bottom: 55vw;
}

.comparison figure {
  position: relative;
  max-width: 480px;
  -webkit-transform: translateZ(1px);
}

.comparison figure img {
  transform: rotateX(60deg) rotateY(0deg) rotateZ(-45deg) scale(130%);
  box-shadow: -6px 6px var(--ink-100);
}

.comparison figure.top {
  z-index: 1;
}

.comparison figure.bottom {
  margin-top: -14%;
  z-index: 0;
}

.comparison figure.top figcaption {
  position: absolute;
  top: 0;
  left: 0;
}

.comparison figure.bottom figcaption {
  position: absolute;
  bottom: 0;
  right: 0;
  text-align: right;
}

.flow .illustration {
  transition: 0.2s ease-out;
}

.flow .illustration img {
  transform: scale(200%);
  transform-origin: center left;
  max-width: 400px;
}

.layers {
  padding-top: 0px;
  height: 320vw;
  justify-content: space-between;
  z-index: -1;
  padding-bottom: 15vh;
}

.layers .architecture img {
  margin-top: 200px;
}

.layers .furniture img,
.layers .furniture figcaption {
  margin-top: 100px;
}

.layers .activity img,
.layers .activity figcaption {
  margin-top: 0px;
}

.layers .info {
  padding-top: 15vh;
}

.layers .illustration img {
  transform: scale(105%); 
}

.layers .illustration figcaption {
  position: absolute;
  transition: 0.3s;
}

.layers .architecture figcaption {
  bottom: 8vw;
  right: 0;
  width: 90px;
  text-align: right;
}

.layers .furniture figcaption {
  bottom: 28vw;
  width: 80px;
}

.layers .activity figcaption {
  top: 0;
  right: 0;
  width: 50px;
  text-align: right;
}

.iteration {
  height: 180vw;
}

.iteration .info {
  padding-top: 72vw;
}

@media (min-width: 640px) {
  
  :root {
    --banner-bg-scale-factor: 350vmin;
  }
  
  .banner {
    min-height: 960px;
  }
  
  .banner h1 {
    font-size: 23vmin;
  }
  
  .banner h1 span {
    width: max-content;
  }
  
  .banner .scrollBadge {
    right: 0;
    left: revert;
    transform: translate(calc(100% - 0.03em), 60%);
  }
  
  .intro .skills-badge.ux-design {
    top: -176px;
    left: 42px;
  }
  
  .intro .skills-badge.user-flow {
    top: -38px;
    left: -86px;
  }
  
  .intro .skills-badge.design-systems {
    top: -82px;
    left: 226px;
  }
  
  .comparison {
    padding-bottom: 15vw;
  }
  
  .comparison figure {
    max-width: none;
  }
  
  .flow .illustration img {
    max-width: none;
    transform: scale(95%);
    transform-origin: center;
  }
  
  .layers {
    height: 250vw;
    padding-top: 10vw;
  }
  
  .layers .illustration img {
    transform: scale(115%); 
  }
  
  .layers .illustration figcaption {
    top: unset;
    right: 10px;
    left: unset;
    bottom: 14vw;
    width: auto;
    text-align: left;
    transform: translateX(100%);
  }
  
  .iteration {
    padding-top: 20vw;
    padding-bottom: 0;
    height: 110vw;
  }
  
  .iteration .illustration img {
    transform: scale(120%);
  }
  
}

@media (min-width: 800px) {
  
  .comparison figure.top figcaption {
    margin-top: 40px;
  }
  
  .comparison figure.bottom figcaption {
    margin-bottom: 40px;
  }
  
  .flow .illustration img {
    transform: scale(120%) translateX(0);
  }
  
  .layers {
    height: 220vw;
    padding-bottom: 20vw;
  }
  
  .layers .architecture img {
    margin-top: 240px;
  }
  
  .layers .furniture img {
    margin-top: 120px;
  }
  
  .layers .illustration figcaption {
    right: unset;
    left: -12vw;
    bottom: 20vw;
    text-align: left;
    transform: translateX(0);
  }
  
  .iteration {
    padding-top: 20vw;
  }
  
}

@media (min-width: 900px) {

  :root {
    --banner-bg-scale-factor: 385vmin;
  }
  
  .intro .skills-badge.ux-design {
    top: -176px;
    left: -32px;
  }
  
  .intro .skills-badge.user-flow {
    top: 38px;
    left: -206px;
  }
  
  .intro .skills-badge.design-systems {
    top: -62px;
    left: 156px;
  }
  
  .comparison.paper {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -5vw;
    margin-bottom: -5vw;
  }
  
  .comparison figure.top figcaption,
  .comparison figure.bottom figcaption {
    margin: 0;
    top: 42%;
    left: -27%;
    text-align: left;
  }
  
  .flow .info {
    padding-top: 20vw;
  }
  
  .flow .illustration img {
    transform: scale(100%) translateX(0);
  }
  
  .layers {
    padding-top: 0;
    padding-bottom: 0;
    height: 180vw;
  }
  
  .layers .illustration img {
    transform: scale(110%) translateY(-100px);
  }
  
  .layers .illustration figcaption {
    left: -20vw;
    bottom: 24vw;
  }
  
  .iteration {
    padding-bottom: 0;
    z-index: 10;
    height: 95vw;
  }
  
  .iteration .info {
    padding-top: 20vw;
  }
  
}

@media (min-width: 1194px) {
  
  .banner h1 {
    font-size: 17.5vw;
  }
  
  .banner h1 span {
    line-height: 0.57;    
  }
  
  .banner h1 span:nth-child(3) {
    margin-left: 1.48em;
    margin-top: 0.09em;
  }
  
  .banner h1 span:nth-child(3)::before {
    transform: translate(calc(-50% + 0.5em), calc(-50% - 0.05em)) rotate(5deg);
  }
  
  .banner .scrollBadge {
    right: 0;
    left: revert;
    transform: translate(calc(100% - 0.01em), 50%);
  }

  .intro .skills-badge.user-flow {
    top: 18px;
    left: -186px;
  }
  
  .comparison.paper {
    margin-top: -7vw;
    margin-bottom: -5vw;
    background-color: transparent;
    z-index: 100;
  }
  
  .comparison figure img {
    transform: rotateX(60deg) rotateY(0deg) rotateZ(-45deg) scale(110%);
    box-shadow: -6px 6px var(--ink-100);
  }
  
  .comparison figure.bottom {
    margin-top: -24%;
  }
  
  .comparison figure.top figcaption,
  .comparison figure.bottom figcaption {
    margin: 0;
    top: 40%;
    left: -10%;
    text-align: left;
  }
  
  .flow {
    height: 90vw;
  }
  
  .flow .illustration img {
    transform: scale(100%);
  }
  
  .layers {
    height: 180vw;
  }
  
  .layers .architecture img,
  .layers .architecture figcaption {
    margin-top: 300px;
  }
  
  .layers .furniture img,
  .layers .furniture figcaption {
    margin-top: 150px;
  }
  
  .layers .activity img,
  .layers .activity figcaption {
    margin-top: 0px;
  }
  
  .layers .illustration figcaption {
    bottom: 29vw;
    left: -6vw;
  }
  
  .layers .illustration img {
    transform: scale(100%) translateY(-11vw);
    transform-origin: bottom;
  }
  
  .iteration {
    padding-top: 0;
  }
  
  .iteration .info {
    padding-top: 100px;
  }
  
  .iteration .illustration img {
    transform: scale(110%) translateY(-6vw);
  }
  
  .gallery .image-container {
    padding-top: 7rem;
    padding-bottom: 6rem;
  }
  
  
}

@media (min-width: 1920px) {
  
  .banner h1 {
    font-size: 17vw;
  }
  
  .banner .scrollBadge {
    right: 0;
    left: revert;
    transform: translate(calc(100% - 0.05em), 0.09em);
  }
  
  .intro .skills-badge.ux-design {
    top: -266px;
    left: 42px;
  }
  
  .intro .skills-badge.user-flow {
    top: -42px;
    left: -86px;
  }
  
  .intro .skills-badge.design-systems {
    top: -250px;
    left: -286px;
  }
  
  .comparison figure img {
    transform: rotateX(60deg) rotateY(0deg) rotateZ(-45deg) scale(100%);
    box-shadow: -6px 6px var(--ink-100);
  }
  
  .comparison figure.top figcaption,
  .comparison figure.bottom figcaption {
    margin: 0;
    top: 40%;
    right: -20%;
    text-align: right;
  }
  
  .layers {
    height: 170vw;
  }
  
  .layers .architecture {
    order: 2;
  }
  .layers .furniture {
    order: 3;
  }
  .layers .activity {
    order: 4;
  }
  
  .layers .info {
    order: 1;
    height: auto;
    position: sticky;
    padding: 0;
    top: 50%;
    transform: translateY(-70%);
  }
  
  .layers .illustration img {
    transform: scale(110%) translateY(-4vw);
  }
  
  .layers .architecture img,
  .layers .architecture figcaption {
    margin-top: 400px;
  }
  
  .layers .furniture img,
  .layers .furniture figcaption {
    margin-top: 200px;
  }
  
  .layers .activity img,
  .layers .activity figcaption {
    margin-top: 0px;
  }
  
  .layers .illustration figcaption {
    bottom: 18vw;
    left: -7vw;
  }
  
  .iteration {
    padding-top: 6vw;
    padding-bottom: 0;
    height: 60vw;
  }
   
  .iteration .info {
    padding-top: 300px;
  }
  
  .iteration .illustration {
    top: revert;
    bottom: -100px;
  }
  
  .iteration .illustration img {
    transform: scale(100%);
  }
  
}

@media (min-width: 2250px) {
  
  .layers .info {
    top: 50%;
    padding-top: 200px;
    padding-bottom: 200px;
    transform: translateY(0);
  }
  
}