*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue';
  user-select: none;
}

a {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: white transparent;
}

body {
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

section {
  width: 100%;
  height: 100vh;
  background-color: #000;
  overflow: hidden;

  &::before {
    position: absolute;
    width: 100%;
    height: 100%;
    content: '';
    top: 0;
    left: 0;
    background-image: linear-gradient(
      to right,
      #f00,
      #0f0,
      #0ff,
      #f0f,
      #ff0,
      #00f
    );
    pointer-events: none;
    mix-blend-mode: color;
    z-index: 100;
  }

  h1 {
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: #fff;
    font-size: 5vw;
    letter-spacing: 0.2em;

    span {
      display: inline-block;
      opacity: 0;
      animation: textReveal 1s linear forwards;
      animation-delay: calc(var(--d) * 1s);
    }
  }
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: rotateY(90deg);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: rotateY(0deg);
    filter: blur(0px);
  }
}

/***************************VIEW TRANSITIONS***************************/

body {
  view-transition-name: circle;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(circle) {
  animation: circleAtCenter .5s ease reverse forwards;
}

::view-transition-new(circle) {
  animation: circleAtCenter .5s ease forwards;
}

@keyframes circleAtCenter {
  0% {
    clip-path: circle(0% at 50% 50%);
  }
  100% {
    clip-path: circle(100% at 50% 50%);
  }
}