/* Page entrances, court decoration, and the desktop pointer. */
[data-nova-entry] {
  position: relative;
  overflow: hidden;
}

[data-nova-entry] > .wrap {
  position: relative;
  z-index: 2;
}

.nova-court-lines {
  position: absolute;
  inset: 0 0 0 auto;
  width: 25%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.nova-court-lines span {
  position: absolute;
  left: calc(100% - var(--nova-court-far) * 1.4142135624);
  bottom: -8px;
  width: 380px;
  height: var(--nova-court-stroke);
  transform: rotate(-45deg);
  transform-origin: left center;
  background: var(--serena-white);
}

.nova-court-lines span + span {
  left: calc(100% - var(--nova-court-near) * 1.4142135624);
}

.business-hero[data-nova-entry]::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 25%;
  background: var(--serena-clay);
  pointer-events: none;
}

@media (max-width: 1099px) {
  .business-hero[data-nova-entry] { padding-bottom: 142px; }
  .business-hero[data-nova-entry]::after { inset: auto 0 0; width: 100%; height: 104px; }
  .business-hero .nova-court-lines {
    inset: auto 0 0;
    width: 100%;
    height: 104px;
    --nova-court-stroke: 3px;
    --nova-court-near: 32px;
  }
}

/* Native same-origin fades leave page links and history intact. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 240ms;
    animation-timing-function: ease-in-out;
  }

  /* A short arrival fade also covers browsers that skip the native crossfade. */
  .nova-internal-transition:not(.nova-native-transition) body {
    animation: nova-page-arrive 240ms ease-out;
  }

  @keyframes nova-page-arrive {
    from { opacity: .58; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

.nova-loading { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .nova-loading {
    position: fixed;
    inset: 0;
    z-index: 10001;
    /* The page hides the loader until this stylesheet is present. */
    display: grid !important;
    place-items: center;
    background: var(--serena-chalk);
    pointer-events: none;
    animation: nova-loading-exit 960ms ease-out both;
  }

  .nova-internal-transition .nova-loading,
  body:focus-within > .nova-loading { display: none !important; }

  .nova-loading-content {
    display: grid;
    justify-items: center;
    gap: 22px;
  }

  .nova-loading-content img {
    display: block;
    width: clamp(168px, 26vw, 235px);
    height: auto;
  }

  .nova-loading-dots {
    display: flex;
    gap: 7px;
  }

  .nova-loading-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #05482f;
    animation: nova-loading-dot 620ms ease-in-out both;
  }

  .nova-loading-dots i:nth-child(2) {
    background: var(--serena-dry);
    animation-delay: 60ms;
  }

  .nova-loading-dots i:nth-child(3) {
    background: var(--serena-bandana);
    animation-delay: 120ms;
  }

  [data-nova-entry] .nova-court-lines span {
    animation: nova-court-draw 480ms cubic-bezier(.2,.64,.35,1) 715ms both;
  }

  [data-nova-entry] .nova-court-lines span + span { animation-delay: 760ms; }

  @keyframes nova-loading-exit {
    0%, 60% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
  }

  @keyframes nova-loading-dot {
    0%, 100% { opacity: .7; transform: translateY(0); }
    45% { opacity: 1; transform: translateY(-9px); }
  }

  @keyframes nova-court-draw {
    from { transform: rotate(-45deg) scaleX(0); }
    to { transform: rotate(-45deg) scaleX(1); }
  }
}

.nova-pointer { display: none; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .nova-pointer.is-visible {
    display: block;
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 70;
    pointer-events: none;
  }

  .nova-pointer span {
    position: absolute;
    inset: 0 auto auto 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #05482f;
    box-shadow: 0 0 0 1px var(--serena-white);
  }

  .nova-pointer span:nth-child(2) { background: var(--serena-dry); }
  .nova-pointer span:nth-child(3) { background: var(--serena-bandana); }
}
