/* Start custom CSS *//* =========================
   HERO LAYOUT
========================= */

#HERO {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: row !important;
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

/* Left 50% */
#ott-copy {
  position: relative;
  z-index: 20;
  flex: 0 0 50%;
  width: 50%;
  min-height: 100vh;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 6rem 3rem 6rem 5vw;
}

/* Right 50% */
#ott-visuals {
  position: relative;
  z-index: 10;
  flex: 0 0 50%;
  width: 50%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

/* =========================
   DEVICE GROUP
========================= */

#ott-device-group {
  position: absolute;
  top: 50%;
  left: 50%;

  /*
    Expanded width prevents the monitor from
    being clipped on the right side.
  */
  width: 1020px;
  height: 900px;

  transform:
    translate(-50%, -50%)
    scale(var(--device-scale, 1));

  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

/* Shared device styling */
#ott-device-group > img {
  position: absolute;
  display: block;
  height: auto;
  max-width: none;

  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  will-change: transform, filter;

  animation-timing-function: cubic-bezier(0.45, 0.05, 0.25, 0.95);
  animation-iteration-count: infinite;
  animation-direction: alternate;

  filter:
    drop-shadow(0 1.5rem 2rem rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 1.25rem rgba(34, 143, 255, 0.12));
}

/* =========================
   DEVICE POSITIONS
========================= */

#ott-monitor {
  z-index: 1;
  width: 900px;
  top: 30px;
  left: 90px;

  animation:
    ottMonitorCinematic
    8s
    cubic-bezier(0.45, 0.05, 0.25, 0.95)
    infinite
    alternate;
}

#ott-tablet {
  z-index: 3;
  width: 470px;
  top: 515px;
  left: 125px;

  animation:
    ottTabletCinematic
    6.5s
    0.4s
    cubic-bezier(0.45, 0.05, 0.25, 0.95)
    infinite
    alternate;
}

#ott-phone {
  z-index: 4;
  width: 205px;
  top: 555px;
  left: 565px;

  animation:
    ottPhoneCinematic
    5s
    0.8s
    cubic-bezier(0.45, 0.05, 0.25, 0.95)
    infinite
    alternate;
}

/* =========================
   DEVICE ANIMATIONS
========================= */

@keyframes ottMonitorCinematic {
  0% {
    transform: translate3d(-10px, 8px, 0)
      rotate(-1deg)
      scale(0.985);
  }

  35% {
    transform: translate3d(12px, -18px, 0)
      rotate(0.8deg)
      scale(1.015);
  }

  70% {
    transform: translate3d(-4px, -30px, 0)
      rotate(-0.35deg)
      scale(1.025);
  }

  100% {
    transform: translate3d(16px, -12px, 0)
      rotate(1deg)
      scale(1);
  }
}

@keyframes ottTabletCinematic {
  0% {
    transform: translate3d(-12px, 12px, 0)
      rotate(-2deg)
      scale(0.97);
  }

  30% {
    transform: translate3d(20px, -20px, 0)
      rotate(1.6deg)
      scale(1.02);
  }

  65% {
    transform: translate3d(5px, -42px, 0)
      rotate(-0.8deg)
      scale(1.035);
  }

  100% {
    transform: translate3d(28px, -18px, 0)
      rotate(2.2deg)
      scale(0.99);
  }
}

@keyframes ottPhoneCinematic {
  0% {
    transform: translate3d(12px, 18px, 0)
      rotate(-3deg)
      scale(0.96);
  }

  30% {
    transform: translate3d(-18px, -20px, 0)
      rotate(2.5deg)
      scale(1.03);
  }

  65% {
    transform: translate3d(-5px, -52px, 0)
      rotate(-1.5deg)
      scale(1.06);
  }

  100% {
    transform: translate3d(-26px, -28px, 0)
      rotate(3.5deg)
      scale(1);
  }
}

/* =========================
   RESPONSIVE SCALING
========================= */

@media (max-width: 1199px) {
  #ott-copy {
    padding-left: 3vw;
    padding-right: 2rem;
  }
}

@media (max-width: 767px) {
  #HERO {
    flex-direction: row !important;
  }

  #ott-copy {
    flex: 0 0 50%;
    width: 50%;
    min-height: 100vh;
    padding: 5rem 1.25rem 3rem;
  }

  #ott-visuals {
    flex: 0 0 50%;
    width: 50%;
    height: 100vh;
    min-height: 100vh;
  }

  #ott-device-group {
    width: 860px;
    height: 760px;
  }

  #ott-monitor {
    width: 760px;
    top: 25px;
    left: 70px;
  }

  #ott-tablet {
    width: 400px;
    top: 435px;
    left: 100px;
  }

  #ott-phone {
    width: 175px;
    top: 470px;
    left: 475px;
  }
}

@media (max-width: 480px) {
  #ott-copy {
    padding: 4rem 0.9rem 2rem;
  }

  #ott-device-group {
    width: 770px;
    height: 680px;
  }

  #ott-monitor {
    width: 680px;
    top: 22px;
    left: 60px;
  }

  #ott-tablet {
    width: 355px;
    top: 390px;
    left: 88px;
  }

  #ott-phone {
    width: 155px;
    top: 420px;
    left: 425px;
  }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  #ott-device-group > img {
    animation: none !important;
    filter: none !important;
  }
}/* End custom CSS */