:root {
  --ease-1: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

.container {
  timeline-scope: --event-detail,  --travel, --carousel;
}

.header,
.event-block {
  --header-h: 72px;
}

@container (min-width: 1024px) and (orientation: landscape) {

  .header,
  .event-block {
    --header-h: 80px;
  }

  .tool-hide {    
    .header,
    .event-blockr {
      --header-h: 64px;
    }
  }

}

/* Header --------------------------------------------- */

.header {
  animation: headerSticky 300s forwards;
  animation-timeline: scroll();
  animation-range: 0vh 140px;

  &::after {
    content: '';
    position: absolute;
    height: 100%;
    inset: 0;
    width: 100%;
    z-index: -1;

    background-color: rgb(from var(--color-1) r g b / 5%);
    mask-image: linear-gradient(0deg, 
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,.5) 10%,
            rgba(255,255,255,1) 20%,
            rgba(255,255,255,1) 100%
              );
    backdrop-filter: blur(8px);
  }

  height: var(--header-h);
}

/* .event-block {
  animation: topPadding 300s forwards;
  animation-timeline: scroll();
  animation-range: 0vh 140px;
} */

.logo-image svg,
.logo-image img {
  animation: logoScaleDown 300ms forwards;
  animation-timeline: scroll();
  animation-range: 0vh 140px;
}

/* event details --------------------------------------------- */

.event-block {
  view-timeline: --event-detail;
}

.event-details .location-wrapper,
.event-details .event-date,
.event-details .event-description {
  animation: slideInByEntry var(--ease-1) both;
  animation-timeline: view();
  animation-duration: 1600ms;
  animation-delay: 300ms;
}

.animation-1 {

  .logo,
  .logo-image,
  .media,
  .event-title-wrapper,
  .rsvp-button,
  .event-details .host-name,
  .event-details .location-wrapper,
  .event-details .event-date,
  .event-details .event-description {
    animation: introSlideIn var(--ease-1) both;
    animation-duration: 800ms;
    animation-delay: calc(var(--animation-order) * 160ms);
  }

  .media {
    animation-duration: 1200ms;
    animation-delay: 0;
  }

  .event-details .divider {
    animation: dividerOnloadAnimation var(--ease-1) both;
    animation-duration: 300ms;
    animation-delay: calc(var(--animation-order) * 160ms);
    transform-origin: center;
  }    


  .logo,
  .logo-image,
  .rsvp-button {
    --animation-order: 2;
  }

  .event-details {

    .event-title-wrapper {
      --animation-order: 3;
    }

    .host-name {
      --animation-order: 4;
    }

    .divider1,
    .event-date,
    .location-wrapper {
      --animation-order: 5;
    }

    .divider2,
    .event-description {
      --animation-order: 6;
    }

  }

}

@container (min-width: 1024px) and (orientation: landscape) {

  .animation-1 {

    .logo,
    .logo-image,
    .media,
    .event-title-wrapper,
    .rsvp-button,
    .event-details .host-name,
    .event-details .location-wrapper,
    .event-details .event-date,
    .event-details .event-description {
      animation: introSlideIn var(--ease-1) both;
      animation-timeline: auto;
      animation-duration: 800ms;
      animation-delay: calc(var(--animation-order) * 160ms);
    }

    .media {
      animation-duration: 1200ms;
      animation-delay: 0;
    }

    .event-details .divider {
      animation-duration: 600ms;
    }  

    .logo,
    .logo-image,
    .rsvp-button {
      --animation-order: 2;
    }  

    .event-details {

      .event-title-wrapper {
        --animation-order: 3;
      }

      .host-name {
        --animation-order: 4;
      }
      
      .divider1,
      .event-date,
      .location-wrapper {
        --animation-order: 5;
      }
  
      .divider2,
      .event-description {
        --animation-order: 6;
      }
  

    }

  }

}

.event-block .block-content {
  animation: outroFadeOut 1200ms both;
  animation-timeline: --event-detail;
}

/* blocks ---------------------------------------------*/

.block-title,
.block-description,
.item-title,
.item,
.item-wrapper .name,
.item-wrapper .link,
.item-wrapper .link-button,
.item-wrapper .date-time,
.item .location-wrapper,
.item .label,
.item .paragraph {
  animation: slideInByEntry var(--ease-1) both;
  animation-timeline: view();
}

.block-title,
.block-description,
.item-title {
  animation-duration: 1600ms;
  animation-delay: 300ms;
}

.item {
  animation-duration: 1600ms;
  animation-delay: calc(var(--animation-order) * 160ms);
}

.item-wrapper .link-button,
.item-wrapper .location-wrapper,
.item-wrapper .date-time,
.item-wrapper .label,
.item-wrapper .name,
.item-wrapper .link,
.item-wrapper .paragraph {
  animation-duration: 1600ms;
  animation-delay: 300ms;
}

.block-image {
  animation: fadeInByEntry var(--ease-1) both;
  animation-timeline: view();
  animation-duration: 1600ms;
}

/* sponsor ---------------------------------------------*/

.block.sponsor .item-group {
  animation: slideInByEntry var(--ease-1) both;
  animation-timeline: view();

  animation-duration: 800ms;
  animation-delay: 500ms;
}

.block.sponsor .item {
  animation: none;
}


/* carousel ---------------------------------------------*/

.block.carousel {
  view-timeline: --carousel;
}

.block.carousel .item,
.block.carousel .item-wrapper {
  animation: fadeInByEntry var(--ease-1) both;
  animation-timeline: --carousel;
}

.block.carousel .item {
  animation-duration: 300ms;
}

.block.carousel .item > * {
  animation: none;
}

.block.carousel .item-wrapper {
  animation-duration: 1600ms;
  animation-delay: 300ms;
}

/* divider ---------------------------------------------*/

.block > .divider,
.item-group > .divider {
  animation: dividerAnimation var(--ease-1) both;
  animation-timeline: view();

  animation-duration: 3000ms;
  animation-delay: 800ms;
  transform-origin: center;
}

/* keyframe animations ---------------------------------------------*/

@keyframes headerSticky {
  from {
    height: var(--header-h);
    font-size: 24px;
  }
  to {
    height: calc(var(--header-h) - 24px);
    font-size: 16px;
  }
}

@keyframes topPadding {
  from {
    padding-block-start: 0;
  }
  to {
    padding-block-start: 80;
  }
}

@keyframes logoScaleDown {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(.72);
  }
}

@keyframes introSlideIn {
  0% { 
    transform: translateY(8cqh);
    opacity: 0;
  }
  100% { 
    opacity: 1;
    transform: translateY(0px);
  }
}

@keyframes outroFadeOut {
  exit 30% {
    transform: scale(1) translateY(0px); 
    opacity: 1;
  }
  exit 100% { 
    transform: scale(.98) translateY(-12cqh); 
    opacity: 0;
  }
}

@keyframes slideInByEntry {
  entry 0% {
    transform: scale(0.96) translateY(8cqh); 
    opacity: 0;
  }
  60% { 
    transform: scale(1) translateY(0); 
    opacity: 1;
  }
}

@keyframes fadeInByEntry {
  entry 0% {
    transform: scale(0.96); 
    opacity: 0;
  }
  50% { 
    transform: scale(1); 
    opacity: 1;
  }
}

@keyframes dividerAnimation {
  entry 0% {
    transform: scale(0, 3);
    opacity: 0;
  }
  100% { 
    transform: scale(1, 1); 
    opacity: 1;
  }
}

@keyframes dividerOnloadAnimation {
  0% {
    transform: scale(0, 3);
    opacity: 0;
  }
  100% { 
    transform: scale(1, 1); 
    opacity: 1;
  }
}
