.tm-hero {
  --tm-hero-gradient-start: #fafcff;
  --tm-hero-gradient-end: #edf6ff;
  --tm-hero-image-x-desktop: 66%;
  --tm-hero-image-y-desktop: 54%;
  --tm-hero-image-scale-desktop: 1;
  --tm-hero-image-x-tablet: 68%;
  --tm-hero-image-y-tablet: 58%;
  --tm-hero-image-scale-tablet: 0.88;
  --tm-hero-image-x-phone: 63%;
  --tm-hero-image-y-phone: 70%;
  --tm-hero-image-scale-phone: 0.72;
  position: relative;
  width: 100%;
  min-height: clamp(360px, 37vw, 500px);
  overflow: hidden;
  isolation: isolate;
  color: #235fa5;
  background: var(
    --tm-hero-module-background,
    linear-gradient(180deg, var(--tm-hero-gradient-start), var(--tm-hero-gradient-end))
  );
  font-family: inherit;
}

.tm-hero *,
.tm-hero *::before,
.tm-hero *::after {
  box-sizing: border-box;
}

.tm-hero__background {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(
    --tm-hero-slide-background,
    linear-gradient(180deg, var(--tm-hero-gradient-start), var(--tm-hero-gradient-end))
  );
  filter: blur(0);
  transform: scale(1.025);
  opacity: 0;
}

.tm-hero--animate .tm-hero__background {
  animation: tm-hero-background-reveal 1400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tm-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  width: min(100%, 1440px);
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(30px, 4vw, 58px) clamp(28px, 4vw, 64px);
}

.tm-hero__copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.tm-hero__title,
.tm-hero__description,
.tm-hero__buttons {
  opacity: 1;
  filter: blur(0);
}

.tm-hero--animate .tm-hero__title,
.tm-hero--animate .tm-hero__description,
.tm-hero--animate .tm-hero__buttons {
  animation: tm-hero-copy-reveal 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tm-hero--animate .tm-hero__description {
  animation-delay: 120ms;
}

.tm-hero--animate .tm-hero__buttons {
  animation-delay: 230ms;
}

.tm-hero__title {
  margin: 0;
  color: #3d91f2;
  font-size: clamp(2.35rem, 4.1vw, 4.9rem);
  font-weight: 300;
  line-height: 0.91;
  letter-spacing: -0.045em;
}

.tm-hero__title span {
  display: block;
}

.tm-hero__description {
  max-width: 370px;
  margin: 12px 0 0;
  color: #235fa5;
  font-size: clamp(0.9rem, 1.15vw, 1.15rem);
  font-weight: 500;
  line-height: 1.42;
}

.tm-hero__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 28px;
}

.tm-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    opacity 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.tm-hero__button--primary {
  background: #4296e8;
  border-color: #4296e8;
  color: #fff;
}

.tm-hero__button--secondary {
  background: transparent;
  border-color: #4296e8;
  color: #368be0;
}

.tm-hero__button[href]:hover {
  opacity: 0.82;
}

.tm-hero__visual {
  position: relative;
  min-height: clamp(290px, 32vw, 440px);
  overflow: visible;
}

.tm-hero__image,
.tm-hero__image-placeholder {
  position: absolute;
  left: var(--tm-hero-image-x-desktop);
  top: var(--tm-hero-image-y-desktop);
  width: min(72vw, 760px);
  max-width: none;
  height: auto;
  max-height: calc(clamp(360px, 37vw, 500px) - 20px);
  object-fit: contain;
  object-position: center;
  transform: translate(-50%, -50%) scale(var(--tm-hero-image-scale-desktop));
  transform-origin: center;
  will-change: opacity, filter, transform;
}

.tm-hero__image {
  display: block;
}

.tm-hero__image-placeholder {
  display: grid;
  place-items: center;
  width: min(46vw, 500px);
  height: min(28vw, 300px);
  border: 1px dashed rgba(61, 145, 242, 0.38);
  color: rgba(35, 95, 165, 0.58);
  font-size: 0.95rem;
}

.tm-hero--animate .tm-hero__image,
.tm-hero--animate .tm-hero__image-placeholder {
  animation: tm-hero-image-reveal 1500ms cubic-bezier(0.98, -0.01, 0.03, 0.98) 70ms both;
}

.tm-hero__decor-image {
  position: absolute;
  z-index: -1;
  top: 16%;
  right: 18%;
  width: min(11vw, 150px);
  opacity: 0;
  filter: blur(4px);
  animation:
    tm-hero-decor-reveal 1000ms ease 260ms both,
    tm-hero-decor-float 7s ease-in-out 1.3s infinite alternate;
  pointer-events: none;
}

.tm-hero img {
  max-width: none;
  box-shadow: none;
}

.tm-hero a {
  text-decoration: none;
}

.tm-hero button {
  font: inherit;
}

@keyframes tm-hero-background-reveal {
  from {
    opacity: 0;
    filter: blur(15px);
    transform: scale(1.025);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes tm-hero-copy-reveal {
  from {
    opacity: 0;
    filter: blur(11px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes tm-hero-image-reveal {
  from {
    opacity: 0;
    filter: blur(13px);
    transform: translate(-50%, -50%) scale(calc(var(--tm-hero-image-scale-desktop) * 0.94));
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(var(--tm-hero-image-scale-desktop));
  }
}

@keyframes tm-hero-decor-reveal {
  from {
    opacity: 0;
    filter: blur(11px);
  }

  to {
    opacity: 0.35;
    filter: blur(0);
  }
}

@keyframes tm-hero-decor-float {
  from {
    transform: translate3d(-8px, -10px, 0) rotate(-4deg);
  }

  to {
    transform: translate3d(10px, 12px, 0) rotate(5deg);
  }
}

@media (max-width: 980px) {
  .tm-hero {
    min-height: clamp(420px, 60vw, 560px);
  }

  .tm-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: inherit;
    padding-inline: clamp(24px, 5vw, 48px);
  }

  .tm-hero__visual {
    min-height: clamp(350px, 54vw, 480px);
  }

  .tm-hero__image,
  .tm-hero__image-placeholder {
    left: var(--tm-hero-image-x-tablet);
    top: var(--tm-hero-image-y-tablet);
    transform: translate(-50%, -50%) scale(var(--tm-hero-image-scale-tablet));
  }

  .tm-hero--animate .tm-hero__image,
  .tm-hero--animate .tm-hero__image-placeholder {
    animation-name: tm-hero-image-reveal-tablet;
  }

  .tm-hero__decor-image {
    right: 9%;
    width: min(16vw, 130px);
  }
}

@keyframes tm-hero-image-reveal-tablet {
  from {
    opacity: 0;
    filter: blur(13px);
    transform: translate(-50%, -50%) scale(calc(var(--tm-hero-image-scale-tablet) * 0.94));
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(var(--tm-hero-image-scale-tablet));
  }
}

@media (max-width: 767px) {
  .tm-hero {
    min-height: 590px;
  }

  .tm-hero__inner {
    display: block;
    min-height: 590px;
    padding: 46px 26px;
  }

  .tm-hero__copy {
    max-width: 80%;
    padding-top: 0;
  }

  .tm-hero__title {
    font-size: clamp(2.35rem, 11vw, 3.45rem);
  }

  .tm-hero__description {
    font-size: 0.9rem;
  }

  .tm-hero__buttons {
    gap: 9px;
    margin-top: 20px;
  }

  .tm-hero__button {
    min-height: 35px;
    padding: 9px 16px;
    font-size: 0.76rem;
  }

  .tm-hero__visual {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .tm-hero__image,
  .tm-hero__image-placeholder {
    left: var(--tm-hero-image-x-phone);
    top: var(--tm-hero-image-y-phone);
    width: min(100vw, 580px);
    max-height: 340px;
    transform: translate(-50%, -50%) scale(var(--tm-hero-image-scale-phone));
  }

  .tm-hero--animate .tm-hero__image,
  .tm-hero--animate .tm-hero__image-placeholder {
    animation-name: tm-hero-image-reveal-phone;
  }

  .tm-hero__image-placeholder {
    width: 245px;
    height: 170px;
  }

  .tm-hero__decor-image {
    top: auto;
    right: 7%;
    bottom: 12%;
    width: 90px;
  }
}

@keyframes tm-hero-image-reveal-phone {
  from {
    opacity: 0;
    filter: blur(13px);
    transform: translate(-50%, -50%) scale(calc(var(--tm-hero-image-scale-phone) * 0.94));
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(var(--tm-hero-image-scale-phone));
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-hero *,
  .tm-hero *::before,
  .tm-hero *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
.tm-hero__slides {
  position: relative;
  z-index: 1;
  min-height: inherit;
}
.tm-hero__slide {
  position: absolute;
  inset: 0;
  min-height: inherit;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: var(
    --tm-hero-slide-background,
    linear-gradient(180deg, var(--tm-hero-gradient-start), var(--tm-hero-gradient-end))
  );
  transition:
    opacity 650ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 650ms;
}
.tm-hero__slide.is-active {
  position: relative;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}
.tm-hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 52px;
  height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #318fe8;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}
.tm-hero__arrow:hover {
  opacity: 0.72;
  transform: translateY(-50%) scale(1.08);
}
.tm-hero__arrow--prev {
  left: 3px;
}
.tm-hero__arrow--next {
  right: 3px;
}
.tm-hero__arrow span {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}
.tm-hero__arrow img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  box-shadow: none;
}
.tm-hero__slide:not(.is-active) .tm-hero__title,
.tm-hero__slide:not(.is-active) .tm-hero__description,
.tm-hero__slide:not(.is-active) .tm-hero__buttons,
.tm-hero__slide:not(.is-active) .tm-hero__image {
  animation: none !important;
}
.tm-hero__slide.is-active .tm-hero__title,
.tm-hero__slide.is-active .tm-hero__description,
.tm-hero__slide.is-active .tm-hero__buttons {
  animation: tm-hero-copy-reveal 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tm-hero__slide.is-active .tm-hero__description {
  animation-delay: 120ms;
}
.tm-hero__slide.is-active .tm-hero__buttons {
  animation-delay: 230ms;
}
.tm-hero__slide.is-active .tm-hero__image {
  animation: tm-hero-image-reveal 1500ms cubic-bezier(0.98, -0.01, 0.03, 0.98) 70ms both;
}
@media (max-width: 980px) {
  .tm-hero__slide.is-active .tm-hero__image {
    animation-name: tm-hero-image-reveal-tablet;
  }
}
@media (max-width: 767px) {
  .tm-hero__slide.is-active .tm-hero__image {
    animation-name: tm-hero-image-reveal-phone;
  }
}
