/* Homepage token overrides */
:root {
  --arc-font-size-heading-level-1-jumbo-at-xs: 32px;
  --arc-font-size-heading-level-1-jumbo-at-sm: 36px;
  --arc-font-size-heading-level-1-jumbo-at-md: 48px;
  --arc-font-size-heading-level-1-jumbo-at-lg: 64px;
  --arc-font-size-heading-level-1-jumbo-at-xl: 64px;
  --arc-font-size-heading-level-1-jumbo-at-xxl: 65px;

  --arc-color-infiniteblue-secondary: var(--binarygenes-navy-mid, #124d6b);
}

html {
  scroll-behavior: smooth;
}

/* Keep the development-process section close to the statistics above it. */
arc-universal-group.hp-icon-group {
  --arc-row-padding-xlarge-at-xs: var(--arc-space-size-200);
  --arc-row-padding-xlarge-at-sm: var(--arc-space-size-200);
  --arc-row-padding-xlarge-at-md: var(--arc-space-size-250);
  --arc-row-padding-xlarge-at-lg: var(--arc-space-size-400);
  --arc-row-padding-xlarge-at-xl: var(--arc-space-size-400);
  --arc-row-padding-xlarge-at-xxl: var(--arc-space-size-400);
}

/* Eventeo product branding. */
arc-feature.eventeo-feature arc-heading[slot="heading"] {
  --arc-color-text-primary-on-dark: #7028ae;
  --arc-color-text-secondary-on-dark: #7028ae;
}

arc-feature.eventeo-feature arc-button[slot="button-primary"] {
  --arc-button-solid-background-color-default-on-dark: #7028ae;
  --arc-button-solid-border-color-default-on-dark: #7028ae;
  --arc-button-solid-font-color-default-on-dark: #ffffff;
  --arc-button-solid-background-color-hover-on-dark: #5e2094;
  --arc-button-solid-border-color-hover-on-dark: #5e2094;
  --arc-button-solid-font-color-hover-on-dark: #ffffff;
  --arc-button-solid-background-color-active-on-dark: #4c1978;
  --arc-button-solid-border-color-active-on-dark: #4c1978;
  --arc-button-solid-font-color-active-on-dark: #ffffff;
}

/* To address the FOUC issue with web components */
hp-marketecture:not(:defined) *,
three-pillars:not(:defined),
pre-show:not(:defined),
infinity-loop:not(:defined),
hp-content-switcher:not(:defined) {
  visibility: hidden;
  display: none;
}

hp-marketecture:not(:defined) {
  color: transparent;
  display: block;
  height: 800px;
}

hp-marquee:not(:defined),
hp-marquee:not(:defined) > *,
arc-marquee-rotating:not(:defined),
arc-marquee-rotating:not(:defined) > * {
  color: transparent !important;
}

hp-marquee:not(:defined),
arc-marquee-rotating:not(:defined) {
  display: block;
  height: 630px;
}

arc-announcement-bar arc-countdown {
  display: none;
}

@media only screen and (min-width: 768px) {
  arc-announcement-bar arc-countdown {
    display: initial;
  }
}

@media only screen and (min-width: 1024px) {
  hp-marquee:not(:defined),
  arc-marquee-rotating:not(:defined) {
    height: 920px;
  }
}

@media only screen and (min-width: 1024px) {
  hp-marquee:not(:defined) {
    height: 920px;
  }
}

@media only screen and (min-width: 1366px) {
  hp-marquee:not(:defined),
  arc-marquee-rotating:not(:defined) {
    height: 890px;
  }
}

@media only screen and (min-width: 1680px) {
  hp-marquee:not(:defined),
  arc-marquee-rotating:not(:defined) {
    height: 1080px;
  }
}

/* Define the fade-in and fade-out animation */
@keyframes marquee-heading-fade-first {
  0% {
    opacity: 1;
  }

  25% {
    opacity: 0.75;
    top: -2px;
  }

  50% {
    opacity: 0.5;
    top: -3px;
  }

  75% {
    opacity: 0.25;
    top: -4px;
  }

  100% {
    opacity: 0;
    top: -5px;
    display: none;
  }
}

@keyframes marquee-heading-fade {
  0% {
    opacity: 0;
    top: 2px;
  }

  10% {
    opacity: 0.25;
    top: 1px;
  }

  20% {
    opacity: 0.75;
    top: 0;
  }

  50% {
    opacity: 1;
    top: 0;
  }

  70% {
    opacity: 1;
    top: 0;
  }

  80% {
    opacity: 1;
    top: -2px;
  }

  90% {
    opacity: 0.50;
    top: -3px;
  }

  95% {
    opacity: 0.25;
    top: -4px;
  }

  100% {
    opacity: 0;
    top: -5px;
    display: none;
  }
}

@keyframes marquee-heading-fade-last {
  0% {
    opacity: 0;
    top: 2px;
  }

  10% {
    opacity: 0.25;
    top: 1px;
  }

  20% {
    opacity: 0.75;
    top: 0;
  }

  50% {
    opacity: 1;
    top: 0;
  }

  70% {
    opacity: 1;
    top: 0;
  }

  80% {
    opacity: 1;
    top: 0;
  }

  90% {
    opacity: 1;
    top: 0;
  }

  95% {
    opacity: 1;
    top: 0;
  }

  100% {
    opacity: 1;
    top: 0;
  }
}

/* Element to animate */
hp-heading-block .d-block {
  display: block;
}

#marquee marquee-rotating-slide:first-of-type .hero-heading-accent,
#marquee marquee-rotating-slide:first-of-type .hero-heading-main {
  display: block;
  font-family: var(--arc-font-family-bold, ServiceNowSansBold, sans-serif);
}

/*
 * At the desktop split breakpoints the heading moves into a narrower column.
 * Keep the full first phrase together instead of leaving "Your" on its own line.
 */
#marquee marquee-rotating-slide:first-of-type
  arc-heading[heading-size-override="h1-jumbo"] {
  --arc-font-size-heading-level-1-jumbo-at-lg: clamp(38px, 3.8vw, 52px);
  --arc-font-size-heading-level-1-jumbo-at-xl: 52px;
}

#marquee marquee-rotating-slide:first-of-type .hero-heading-accent {
  color: #00b8f0;
}

#marquee marquee-rotating-slide:first-of-type .hero-heading-break {
  display: none;
}

@media only screen and (min-width: 768px) {
  #marquee marquee-rotating-slide:first-of-type .hero-heading-break {
    display: inline;
  }

  arc-next-steps .next-steps-heading {
    --arc-font-size-heading-level-1-at-md: 44px;
    --arc-font-size-heading-level-1-at-lg: 48px;
    --arc-font-size-heading-level-1-at-xl: 48px;
    --arc-font-size-heading-level-1-at-xxl: 48px;
  }

  arc-next-steps .next-steps-heading-line {
    white-space: nowrap;
  }
}

.rolling-heading {
  position: relative;
}

.rolling-heading span {
  position: absolute;
  top: 0;
  opacity: 0;
  left: 0;
  line-height: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
}

.rolling-heading span:nth-child(1) {
  opacity: 1;
  animation-name: marquee-heading-fade-first;
  animation-delay: 2s;
  animation-fill-mode: forwards;
  animation-duration: 0.5s;
  animation-timing-function: ease-out;
}

.rolling-heading span:nth-child(2),
.rolling-heading span:nth-child(3),
.rolling-heading span:nth-child(4) {
  animation-name: marquee-heading-fade;
  animation-fill-mode: forwards;
  animation-duration: 1s;
  animation-timing-function: ease-out;
}

/* delay = previous delay + previous duration */
.rolling-heading span:nth-child(2) {
  animation-delay: 2.5s;
}

.rolling-heading span:nth-child(3) {
  animation-delay: 3.5s;
}

.rolling-heading span:nth-child(4) {
  animation-delay: 4.5s;
}

.rolling-heading span:nth-child(5) {
  animation-name: marquee-heading-fade-last;
  animation-delay: 5.5s;
  animation-fill-mode: forwards;
  animation-duration: 1s;
}

/* footer wrapper background color override for northern lights */
/* .cmp-footer__wrapper {
  background-color: var(--arc-color-white);
} */
