*,
*::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';
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #fff8 black;
}

body {
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  place-content: start;
  background-color: #000;
}

.item {
  flex-grow: 1;
  flex-basis: 10%;
  height: 10vh;
  aspect-ratio: 16 / 9;
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
  transition: box-shadow 0s ease;
  box-shadow: inset 0 0 50px 0 transparent;

  @media (hover: hover) {
    &:hover {
      box-shadow: inset 0 0 222px 0 #fff4;
    }
  }
  @media not (hover: hover) {
    &.active {
      box-shadow: inset 0 0 222px 0 #fff4;
    }
  }

  &:focus {
    outline: none;
    box-shadow: inset 0 0 222px 0 #fff4;
  }
}

.change-page {
  width: 10vmax;
  height: 5vh;
  box-shadow: inset 0 0 500px 0 #000;
  position: fixed;
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  place-content: center;
  border: none;
  outline: none;
  transition: filter 0.5s ease;
  cursor: pointer;
  bottom: 0;

  &.next-page {
    right: 0;
  }

  &.prev-page {
    left: 0;

    .arrow {
      transform: rotate(45deg) scale(-0.35);
    }
  }

  &:hover {
    filter: invert(1);
  }

  .arrow {
    width: 3vmax;
    height: 3vmax;
    position: relative;
    transform: rotate(45deg) scale(0.35);
    aspect-ratio: 1;
    border: 0.5vmax solid #fff;
    border-left-color: transparent;
    border-bottom-color: transparent;
  }
}

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

body {
  view-transition-name: circle;
}

@view-transition {
  navigation: auto;
}

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

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

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