/*
 * Scroll choreography for the homepage Event Management showcase.
 * Desktop and mobile/tablet breakpoints are kept separate so the working
 * desktop presentation is not affected by the responsive stage overrides.
 */

@media (min-width: 1024px) {
  body.studio-home-shell main.studio-home .event-invitation-showcase {
    --event-header-offset: var(--nav, 68px);
    position: relative;
    overflow: visible;
    padding: 0 0 clamp(72px, 9vw, 124px);
  }

  body.studio-home-shell main.studio-home .event-invitation-showcase > .container {
    width: min(calc(100% - 32px), 1200px);
    max-width: 1200px;
    padding-right: 0;
    padding-left: 0;
  }

  body.studio-home-shell main.studio-home .event-invitation__reference {
    width: 100%;
    max-width: 1200px;
  }

  body.studio-home-shell main.studio-home .event-invitation__scroll-track {
    position: relative;
    height: clamp(180vh, 200vh, 220vh);
  }

  body.studio-home-shell main.studio-home .event-invitation__sticky-stage {
    position: sticky;
    top: var(--event-header-offset);
    height: max(620px, calc(100vh - var(--event-header-offset)));
    overflow: hidden;
    isolation: isolate;
  }

  body.studio-home-shell main.studio-home .event-invitation__backdrop-title {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 12px;
    font-size: clamp(4rem, 9.4vw, 9.15rem);
    line-height: 0.86;
    white-space: nowrap;
    opacity: 1;
    transition: none;
  }

  body.studio-home-shell main.studio-home .event-invitation__stage {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    min-height: 0;
    padding: 0;
    isolation: isolate;
    pointer-events: none;
  }

  body.studio-home-shell main.studio-home .event-invitation__stage::before {
    top: 50%;
    width: min(600px, 64vw);
    height: min(600px, 64vw);
    transform: translate(-50%, -50%);
  }

  body.studio-home-shell main.studio-home .event-invitation__stage::after {
    right: 7%;
    bottom: 10%;
  }

  body.studio-home-shell main.studio-home .event-invitation__phone.arowet-iphone-shell {
    position: absolute !important;
    top: 50%;
    left: 50%;
    z-index: 4;
    margin: 0;
    opacity: 0;
    pointer-events: auto;
    transform: translate3d(-50%, calc(-50% + 360px), 0) scale(0.94);
    transform-origin: 50% 50%;
    will-change: transform, opacity;
  }

  body.studio-home-shell main.studio-home .event-stat-card {
    position: absolute !important;
    z-index: 3;
    width: clamp(200px, 18.67vw, 224px);
    min-height: 126px;
    pointer-events: auto;
    opacity: 0;
    transition: none;
    will-change: transform, opacity;
  }

  body.studio-home-shell main.studio-home .event-stat-card--guests {
    top: clamp(150px, 27vh, 250px);
    right: auto;
    left: clamp(0px, 1vw, 14px);
    transform: translate3d(0, 430px, 0);
  }

  body.studio-home-shell main.studio-home .event-stat-card--rsvp {
    top: clamp(198px, 33vh, 300px);
    right: clamp(0px, 1vw, 14px);
    left: auto;
    transform: translate3d(0, 430px, 0);
  }

  body.studio-home-shell main.studio-home .event-stat-card--sales {
    top: auto;
    right: auto;
    bottom: clamp(50px, 11vh, 110px);
    left: clamp(12px, 4vw, 64px);
    transform: translate3d(0, 430px, 0);
  }

  body.studio-home-shell main.studio-home .event-stat-card--views {
    top: auto;
    right: clamp(12px, 4vw, 64px);
    bottom: clamp(84px, 14vh, 145px);
    left: auto;
    transform: translate3d(0, 430px, 0);
  }

  body.studio-home-shell main.studio-home .event-invitation__summary {
    margin-top: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    body.studio-home-shell main.studio-home .event-invitation__scroll-track {
      height: auto;
      min-height: max(620px, calc(100vh - var(--event-header-offset)));
    }

    body.studio-home-shell main.studio-home .event-invitation__sticky-stage {
      position: relative;
      top: auto;
    }

    body.studio-home-shell main.studio-home .event-invitation__backdrop-title {
      opacity: 0.82 !important;
    }

    body.studio-home-shell main.studio-home .event-invitation__phone.arowet-iphone-shell {
      opacity: 1 !important;
      transform: translate3d(-50%, -50%, 0) scale(1) !important;
    }

    body.studio-home-shell main.studio-home .event-stat-card {
      opacity: 1 !important;
      transform: translate3d(0, 0, 0) !important;
    }
  }
}

/* Mobile and tablet choreography. Desktop remains in the block above. */
@media (min-width: 320px) and (max-width: 1023.98px) {
  body.studio-home-shell main.studio-home .event-invitation-showcase {
    --event-header-offset: var(--nav, 60px);
    position: relative;
    overflow: visible;
    padding: 0 0 clamp(42px, 8vw, 72px);
  }

  body.studio-home-shell main.studio-home .event-invitation-showcase > .container {
    width: calc(100% - 24px);
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  body.studio-home-shell main.studio-home .event-invitation__reference {
    width: 100%;
    max-width: none;
  }

  body.studio-home-shell main.studio-home .event-invitation__scroll-track {
    position: relative;
    height: clamp(300dvh, 330dvh, 340dvh);
  }

  body.studio-home-shell main.studio-home .event-invitation__sticky-stage {
    position: sticky;
    top: var(--event-header-offset);
    height: calc(100vh - var(--event-header-offset));
    height: calc(100svh - var(--event-header-offset));
    height: calc(100dvh - var(--event-header-offset));
    overflow: hidden;
    isolation: isolate;
  }

  body.studio-home-shell main.studio-home .event-invitation__backdrop-title {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 0;
    color: #0c0c0e;
    font-size: clamp(48px, 16vw, 74px);
    line-height: 0.88;
    letter-spacing: -0.04em;
    white-space: nowrap;
    opacity: 1;
    overflow: hidden;
  }

  body.studio-home-shell main.studio-home .event-invitation__stage {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block !important;
    min-height: 0;
    padding: 0;
    isolation: isolate;
    pointer-events: none;
  }

  body.studio-home-shell main.studio-home .event-invitation__stage::before {
    top: 50%;
    width: min(600px, 84vw);
    height: min(600px, 84vw);
    transform: translate(-50%, -50%);
  }

  body.studio-home-shell main.studio-home .event-invitation__stage::after {
    right: -18%;
    bottom: 8%;
    width: 170px;
    height: 170px;
  }

  body.studio-home-shell main.studio-home .event-invitation__phone.arowet-iphone-shell {
    position: absolute !important;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: var(--event-phone-width, min(calc(100vw - 32px), 315px)) !important;
    max-width: var(--event-phone-width, min(calc(100vw - 32px), 315px)) !important;
    min-width: 0 !important;
    height: var(--event-phone-height, 474px) !important;
    min-height: var(--event-phone-height, 474px) !important;
    margin: 0;
    opacity: 0;
    pointer-events: auto;
    transform: translate3d(-50%, calc(-50% + 360px), 0) scale(0.9);
    transform-origin: 50% 50%;
    will-change: transform, opacity;
  }

  body.studio-home-shell main.studio-home .event-invitation__phone .event-phone__screen--apps {
    width: var(--event-phone-content-size, 100%) !important;
    height: var(--event-phone-content-size, 100%) !important;
    margin: 0 !important;
    transform: scale(var(--event-phone-content-scale, 1));
    transform-origin: 50% 0;
  }

  body.studio-home-shell main.studio-home .event-stat-card {
    position: absolute !important;
    z-index: 3;
    width: clamp(132px, 34vw, 158px);
    min-height: 0;
    padding: 10px 10px 9px;
    border-radius: 11px;
    pointer-events: none;
    opacity: 0;
    transition: none;
    will-change: transform, opacity;
  }

  body.studio-home-shell main.studio-home .event-stat-card--guests {
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    transform: translate3d(0, 360px, 0);
  }

  body.studio-home-shell main.studio-home .event-stat-card--rsvp {
    top: 0;
    right: 0;
    bottom: auto;
    left: auto;
    transform: translate3d(0, 360px, 0);
  }

  body.studio-home-shell main.studio-home .event-stat-card--sales {
    top: auto;
    right: auto;
    bottom: 0;
    left: 0;
    transform: translate3d(0, 360px, 0);
  }

  body.studio-home-shell main.studio-home .event-stat-card--views {
    top: auto;
    right: 0;
    bottom: 0;
    left: auto;
    transform: translate3d(0, 360px, 0);
  }

  body.studio-home-shell main.studio-home .event-stat-card__icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.56rem;
  }

  body.studio-home-shell main.studio-home .event-stat-card__period,
  body.studio-home-shell main.studio-home .event-stat-card__trend {
    font-size: 8px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__label {
    margin-top: 6px;
    font-size: 11px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__value {
    margin-top: 2px;
    font-size: clamp(13px, 4vw, 16px);
    line-height: 1.02;
  }

  body.studio-home-shell main.studio-home .event-stat-card__avatars {
    margin-top: 7px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__avatars span {
    width: 18px;
    height: 18px;
    font-size: 7px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__avatars span:last-child {
    padding: 0 4px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__mini-calendar {
    gap: 2px;
    margin-top: 7px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__mini-calendar span,
  body.studio-home-shell main.studio-home .event-stat-card__mini-calendar b {
    font-size: 7px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__mini-calendar b {
    min-height: 14px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__feature-line {
    gap: 4px;
    margin-top: 7px;
    font-size: 8px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__feature-line i {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    font-size: 0.42rem;
  }

  body.studio-home-shell main.studio-home .event-stat-card__bars {
    height: 22px;
    gap: 3px;
    margin-top: 8px;
  }

  body.studio-home-shell main.studio-home .event-stat-card__footnote {
    margin-top: 5px;
    font-size: 8px;
  }

  body.studio-home-shell.is-event-invitation-showcase-visible #tawk-bubble-container,
  body.studio-home-shell.is-event-invitation-showcase-visible #tawk-min-container,
  body.studio-home-shell.is-event-invitation-showcase-visible .tawk-min-container,
  body.studio-home-shell.is-event-invitation-showcase-visible #tawkchat-container,
  body.studio-home-shell.is-event-invitation-showcase-visible [id^="tawkchat"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(0, 12px, 0) scale(0.72) !important;
    transform-origin: bottom right;
  }

  @media (min-width: 768px) and (max-width: 1023.98px) {
    body.studio-home-shell main.studio-home .event-invitation__scroll-track {
      height: clamp(190dvh, 220dvh, 250dvh);
    }

    body.studio-home-shell main.studio-home .event-invitation__backdrop-title {
      font-size: clamp(64px, 11vw, 112px);
    }

    body.studio-home-shell main.studio-home .event-invitation__phone.arowet-iphone-shell {
      width: var(--event-phone-width, 390px) !important;
      max-width: var(--event-phone-width, 390px) !important;
      height: var(--event-phone-height, 825px) !important;
      min-height: var(--event-phone-height, 825px) !important;
    }

    body.studio-home-shell main.studio-home .event-stat-card {
      width: clamp(168px, 23vw, 194px);
      padding: 13px 13px 11px;
      border-radius: 13px;
    }

    body.studio-home-shell main.studio-home .event-stat-card--guests {
      top: clamp(120px, 21vh, 220px);
      left: 12px;
    }

    body.studio-home-shell main.studio-home .event-stat-card--rsvp {
      top: clamp(160px, 26vh, 270px);
      right: 12px;
    }

    body.studio-home-shell main.studio-home .event-stat-card--sales {
      bottom: clamp(54px, 11vh, 112px);
      left: 12px;
    }

    body.studio-home-shell main.studio-home .event-stat-card--views {
      right: 12px;
      bottom: clamp(80px, 15vh, 148px);
    }

    body.studio-home-shell main.studio-home .event-stat-card__value {
      font-size: clamp(1.05rem, 2.5vw, 1.32rem);
    }

    body.studio-home-shell main.studio-home .event-stat-card__label {
      font-size: 0.52rem;
    }
  }

  @media (max-width: 350px) {
    body.studio-home-shell main.studio-home .event-stat-card--guests,
    body.studio-home-shell main.studio-home .event-stat-card--rsvp {
      top: 0;
    }

    body.studio-home-shell main.studio-home .event-stat-card--sales,
    body.studio-home-shell main.studio-home .event-stat-card--views {
      bottom: 0;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    body.studio-home-shell main.studio-home .event-invitation__scroll-track {
      height: auto;
      min-height: calc(100dvh - var(--event-header-offset));
    }

    body.studio-home-shell main.studio-home .event-invitation__sticky-stage {
      position: relative;
      top: auto;
    }

    body.studio-home-shell main.studio-home .event-invitation__backdrop-title {
      opacity: 0.82 !important;
    }

    body.studio-home-shell main.studio-home .event-invitation__phone.arowet-iphone-shell {
      opacity: 1 !important;
      transform: translate3d(-50%, -50%, 0) scale(1) !important;
    }

    body.studio-home-shell main.studio-home .event-stat-card {
      opacity: 1 !important;
      transform: translate3d(0, 0, 0) !important;
    }
  }
}
