.site-main--hero {
  width: 100%;
  max-width: none;
  padding-block: var(--space-0);
}

.site-main--hero > .arcticon-page {
  width: var(--page-container-fluid);
  margin-inline: auto;
  padding-block: var(--space-40) var(--space-64);
}

.hero {
  --hero-background-desktop: url('../img/bg.webp');
  --hero-background-mobile: var(--hero-background-desktop);
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--hero-text-light);
  background-color: var(--background-inverse);
  background-image: var(--hero-background-desktop);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  content: '';
  background: transparent;
}

.hero__background-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: cover;
  object-position: center;
}

.hero__video-playlist {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-color: var(--background-inverse, #21262b);
}

/* A video hero starts from a neutral background, not from the image fallback. */
.hero--video-playlist {
  background-color: var(--background-inverse, #21262b);
  background-image: none;
}

.hero__playlist-video {
  background-color: var(--background-inverse, #21262b);
  opacity: 0;
  transition: opacity 360ms ease-out;
}

/* Show the first playable frame immediately; only playlist changes crossfade. */
.hero__playlist-video.is-initial-load {
  transition: none;
}

.hero__playlist-video.is-active.is-ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero__playlist-video {
    transition: none;
  }
}

.hero__background-media--mobile {
  display: none;
}

.hero--overlay::before {
  background: var(--overlay-scrim);
}

.hero--position-left {
  background-position: left center;
}

.hero--position-left .hero__background-media {
  object-position: left center;
}

.hero--position-center {
  background-position: center;
}

.hero--position-center .hero__background-media {
  object-position: center;
}

.hero--position-right {
  background-position: right center;
}

.hero--position-right .hero__background-media {
  object-position: right center;
}

.hero__container {
  position: relative;
  z-index: 2;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--frame-desktop);
  min-height: 100vh;
  min-height: 100svh;
  align-items: flex-end;
  margin-inline: auto;
  padding-inline: var(--page-gutter-fluid);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  max-width: 830px;
}

.hero__title {
  width: 100%;
  max-width: 100%;
  margin: var(--space-0);
  font-family: var(--font-heading);
  font-size: clamp(20px, calc(15.77px + 1.13vw), 32px);
  font-weight: 700;
  line-height: clamp(25px, calc(19.01px + 1.6vw), 42px);
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  letter-spacing: 0;
  text-align: left;
}

.hero__title-main,
.hero__title-accent,
.hero__title-suffix {
  display: block;
}

.hero__text--light {
  color: var(--hero-text-light);
}

.hero__text--dark {
  color: var(--hero-text-dark);
}

.hero__text--accent {
  color: var(--hero-text-accent);
}

.hero__benefits {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 19px;
  margin: var(--space-30) var(--space-0) var(--space-0);
  padding: var(--space-0);
  color: var(--hero-text-light);
  font: var(--desktop-small-regular);
  list-style: none;
}

.hero__benefit {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 13px;
}

.hero__benefit span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hero__benefit-dot {
  display: block;
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  color: currentColor;
}

.hero__cta--desktop {
  margin-top: var(--space-40);
}

.hero__cta--mobile,
.hero__discount--mobile {
  display: none;
}

.hero__discount--desktop {
  flex: 0 0 auto;
  align-self: flex-end;
  max-width: 100%;
  margin: 0 0 var(--space-10) auto;
  animation: discount-badge-float 3.6s ease-in-out infinite;
}

@media (min-width: 768px) {
  .hero--front-page .hero__container,
  .hero--template-page .hero__container {
    display: grid;
    grid-template-columns: minmax(0, 830px) 218px;
    justify-content: space-between;
    padding-bottom: 100px;
    column-gap: clamp(var(--space-20), 3vw, var(--space-40));
  }

  .hero--front-page .hero__title-main,
  .hero--front-page .hero__title-accent,
  .hero--front-page .hero__title-suffix,
  .hero--template-page .hero__title-main,
  .hero--template-page .hero__title-accent,
  .hero--template-page .hero__title-suffix {
    display: inline;
  }

  .hero--front-page .hero__title-main,
  .hero--front-page .hero__title-accent,
  .hero--front-page .hero__title-suffix,
  .hero--template-page .hero__title-main,
  .hero--template-page .hero__title-suffix {
    color: var(--color-neutral-50);
  }

  .hero--template-page .hero__title-accent {
    color: var(--hero-text-accent);
  }

  .hero--front-page .hero__cta--desktop,
  .hero--template-page .hero__cta--desktop {
    width: 100%;
    max-width: 380px;
  }

  .hero--front-page .hero__cta--desktop .ui-button,
  .hero--template-page .hero__cta--desktop .ui-button {
    width: 100%;
    max-width: none;
    min-height: 40px;
    height: 40px;
    padding-block: var(--space-12);
    border-radius: var(--radius-8);
  }

  .hero--front-page .hero__discount--desktop {
    align-self: end;
    justify-self: end;
    margin-bottom: var(--space-10);
    margin-left: 0;
  }

  .hero--template-page .hero__discount--desktop {
    align-self: center;
    justify-self: end;
    margin: 0;
  }
}

@media (min-width: 768px) and (min-height: 801px) {
  .hero__content {
    align-self: center;
    transform: translateY(calc((var(--header-top-desktop) + var(--header-height-desktop)) / 2));
  }

  .hero--front-page .hero__content,
  .hero--template-page .hero__content {
    transform: translateY(calc((var(--header-top-desktop) + var(--header-height-desktop) + 100px) / 2));
  }
}

@media (min-width: 1440px) and (min-height: 801px) {
  .hero--front-page .hero__container,
  .hero--template-page .hero__container {
    grid-template-columns: minmax(0, 1fr) 218px;
  }

  .hero__content {
    max-width: calc(100% - 250px);
  }

  .hero--front-page .hero__content,
  .hero--template-page .hero__content {
    max-width: none;
  }

  .hero__title {
    font-size: clamp(34px, 2.25vw, 40px);
    line-height: 1.2;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
}

.discount-badge {
  position: relative;
  display: flex;
  box-sizing: border-box;
  overflow: visible;
  color: var(--hero-text-dark);
  border: var(--stroke-1) solid var(--hero-card-border);
  border-radius: var(--hero-card-radius);
  background: var(--hero-card-background);
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.discount-badge[data-cta-request-open] {
  font: inherit;
  cursor: pointer;
  transition: transform 240ms ease, box-shadow 240ms ease;
  will-change: transform;
}

.discount-badge[data-cta-request-open]:hover {
  z-index: 1;
  transform: scale(1.045);
  box-shadow: 0 12px 32px rgb(0 0 0 / 16%);
}

.discount-badge[data-cta-request-open]:active {
  transform: scale(1.02);
}

.discount-badge:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: var(--space-4);
}

.discount-badge--desktop {
  width: 218px;
  height: 136px;
  padding: calc(var(--space-16) - var(--stroke-1)) calc(var(--space-28) + var(--stroke-1));
}

.discount-badge__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.discount-badge__label,
.discount-badge__deadline {
  font: var(--desktop-small-regular);
}

.discount-badge__value {
  font-family: var(--font-interface);
  font-size: 56px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: 0;
}

.discount-badge__snowflake {
  position: absolute;
  top: -33px;
  right: 0;
  display: block;
  width: 49px;
  height: 66px;
  color: var(--color-accent-400);
  object-fit: contain;
  pointer-events: none;
  animation: hero-snowflake-float 2.8s ease-in-out infinite;
}

@keyframes discount-badge-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes hero-snowflake-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(3deg);
  }
}

@keyframes discount-badge-float-mobile {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes hero-snowflake-float-mobile {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-2px) rotate(3deg);
  }
}

@media (max-width: 767px) {
  .hero__background-media--desktop {
    display: none;
  }

  .hero__background-media--mobile {
    display: block;
  }

  .site-main--hero {
    padding-block: var(--space-0);
  }

  .site-main--hero > .arcticon-page {
    width: var(--page-container-fluid);
    padding-block: var(--space-32) var(--space-48);
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
    background-image: var(--hero-background-mobile);
  }

  .hero.hero--video-playlist {
    background-image: none;
  }

  .hero__container {
    width: var(--page-container-fluid);
    min-height: 100vh;
    min-height: 100svh;
    margin-inline: auto;
    padding-inline: 0;
    padding-bottom: 90px;
  }

  .hero__content {
    width: 100%;
    max-width: none;
  }

  .hero__title {
    font: var(--mobile-h1);
    letter-spacing: -0.01em;
  }

  .hero--front-page .hero__title {
    font-size: clamp(18px, 5.7vw, 26px);
  }

  .hero__title-main,
  .hero__title-accent,
  .hero__title-suffix {
    display: inline;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
  }

  .hero__discount--desktop,
  .hero__cta--desktop {
    display: none;
  }

  .hero__discount--mobile {
    display: block;
    width: fit-content;
    margin-top: 27px;
    animation: discount-badge-float-mobile 3.6s ease-in-out infinite;
  }

  .discount-badge--mobile {
    width: auto;
    min-width: 150px;
    min-height: 90px;
    padding: var(--space-12) var(--space-20);
  }

  .discount-badge--mobile .discount-badge__label,
  .discount-badge--mobile .discount-badge__deadline {
    font: 400 12px/100% var(--font-interface);
  }

  .discount-badge--mobile .discount-badge__value {
    font-size: 36px;
    line-height: 36px;
  }

  .discount-badge--mobile .discount-badge__snowflake {
    top: -15px;
    right: -11.5px;
    width: 23px;
    height: 30px;
    animation: hero-snowflake-float-mobile 2.8s ease-in-out infinite;
  }

  .hero__benefits {
    gap: 13px;
    margin-top: var(--space-20);
    font: var(--desktop-small-regular);
  }

  .hero__cta--mobile {
    display: block;
    margin-top: var(--space-20);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__discount,
  .discount-badge__snowflake {
    animation: none;
  }

  .discount-badge[data-cta-request-open] {
    transition: none;
  }
}
