*,
*::after,
*::before {
  box-sizing: border-box;
}

:root {
  font-size: 16px;
  --color-text: #fff;
  --color-bg: #000;
  --color-link: #fff;
  --color-link-hover: #ef5d36;
  --color-title: #fff;
  --perspective: 0px;
  --grid-width: 100%;
  --grid-max-width: 800px;  /* optimal 300px */
  --grid-item-ratio: 1.5; /* 1.2: default, 1.5: 3 to 2 */
  --grid-item-radius: 4px;
  --grid-gap: 1.5rem;
  --grid-columns: 2;
  --grid-columns-full: 7;
  --grid-rows-full: 5;
  --grid-item-translate: 0px;
  --grid-item-height: auto;
}

body {
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: "brisbane", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100vw;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

.font-alt {
  font-family: "Arial", sans-serif;
  font-weight: 400;
}

.credits {
  font-size: clamp(1rem,3vw,2rem);
  text-transform: uppercase;
  text-align: center;
  margin: 50vh auto 0;
  padding-bottom: 15vh;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
  content: '';
  position: fixed;
  z-index: 10000;
}

.js .loading::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
}

.js .loading::after {
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  opacity: 0.4;
  background: var(--color-link);
  animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
  to {
    opacity: 1;
    transform: scale3d(0.5,0.5,1);
  }
}

a {
  text-decoration: none;
  color: var(--color-link);
  outline: none;
  cursor: pointer;
}

a:hover {
  color: var(--color-link-hover);
  outline: none;
}

a:not(.card__image):focus {
  outline: none;
  background: lightgrey;
}

a:not(.card__image):focus:not(:focus-visible) {
  background: transparent;
}

a:not(.card__image):focus-visible {
  outline: 2px solid red;
  background: transparent;
}

main {
  position: relative;
  overflow: hidden;
  width: 100vw;
}

.unbutton {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.unbutton:focus {
  outline: none;
}

.frame {
  text-transform: uppercase;
  font-size: 13px;
  position: relative;
  padding: 1.5rem;
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas: 'back archive github' 'sponsor sponsor sponsor' ;
  grid-gap: 1.5rem;
  z-index: 6000;
}

.frame__title {
  grid-area: title;
  font-size: inherit;
  margin: 0;
  font-weight: inherit;
}

.frame__back {
  grid-area: back;
}

.frame__archive {
  grid-area: archive;
}

.frame__github {
  grid-area: github;
}

.intro {
  height: calc(100vh - 4rem);
  text-align: center;
  justify-items: center;
  display: grid;
  align-content: start;
  margin-bottom: 30vh;
  grid-auto-rows: 1fr;
  gap: 1.5rem;
  background: linear-gradient(to bottom, var(--color-bg), rgba(0,0,0,0.2), var(--color-bg)), url(https://www.theasset.com/storage/eventphoto/7553_18.jpg) no-repeat 50% -10%;
  background-size: cover;
  
}

.intro__title {
  margin-inline: 1em;
  line-height: 1;
  align-self: end;
  margin: 0;
  font-weight: 700;
  /* text-transform: uppercase; */
  font-size: clamp(2rem,6vw,4rem);
  color: var(--color-title);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  text-transform: uppercase;
  font-size: 13px;
  align-self: start;
}

.intro__info {
  max-width: 12ch;
  margin-bottom: 4rem;
  padding-bottom: 1rem;
  line-height: 1.2;
  opacity: 0.6;
  position: relative;
  align-self: end;
  text-transform: uppercase;
  font-size: 13px;
  align-self: end;
}

.intro__info::after {
  content: "";
  width: 1px;
  height: 4rem;
  background: linear-gradient(to bottom, #fff, black);
  position: absolute;
  top: 100%;
  left: 50%;
}

.swipe-view {
  display: none;
  max-width: 12ch;
  margin: 0 auto;
  padding-bottom: 1rem;
  line-height: 1.2;
  opacity: 0.6;
  position: relative;
  align-self: end;
  text-transform: uppercase;
  font-size: 13px;
  align-self: end;
}

.mark {
  position: fixed;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 100vw;
  left: 0;
  z-index: 50;
  overflow: hidden;
}

.mark__inner {
  display: flex;
  gap: 3rem;
  width: max-content;
  position: relative;
  transform: translateX(100vw);
  will-change: transform;
}

.mark__inner span {
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 3rem;
  line-height: 1;
}

section {
  display: grid;
  place-items: center;
  width: 100%;
  position: relative;
}

.shadow::after {
  content: '';
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 5000;
  pointer-events: none;
  background: linear-gradient(to right, var(--color-bg), transparent, var(--color-bg));
  background-repeat: no-repeat;
  background-size: 100%;
  opacity: 0.1;
}

.grid {
  padding: 20vh 0;
  width: var(--grid-width);
  max-width: 450px;
  grid-template-columns: repeat(var(--grid-columns),1fr);
  position: relative;
  display: grid;
  gap: var(--grid-gap);
  margin-top: 20vh;
  margin-bottom: 10vh;
}

.grid--full {
  width: 100%;
  margin: 10vh 0;
  height: auto;
  aspect-ratio: 1.5;
  max-width: none;
  --grid-gap: 1rem;
  --grid-item-height: 100%;
  --grid-item-ratio: auto;
  padding: var(--grid-gap);
  grid-template-columns: repeat(var(--grid-columns-full),1fr);
  grid-template-rows: repeat(var(--grid-rows-full),1fr);
}

.grid__item {
  margin: 0;
  position: relative;
  z-index: 1;
  perspective: 800px;
  will-change: transform, opacity;
}

.grid__item > .grid__item-img,
.grid__item-imgwrap {
  width: 100%;
  aspect-ratio: var(--grid-item-ratio);
  height: var(--grid-item-height);
  border-radius: var(--grid-item-radius);
  transform-style: preserve-3d;
}

.grid__item-imgwrap {
  position: relative;
  overflow: hidden;
  will-change: filter;
}

.grid__item-img {
  background-size: cover;
  background-position: 50% 20%;
  backface-visibility: hidden;
  will-change: transform;
}

.grid__item-imgwrap > .grid__item-img {
  position: absolute;
  object-fit: contain;
  top: calc(-1 * var(--grid-item-translate));
  left: calc(-1 * var(--grid-item-translate));
  height: calc(100% + var(--grid-item-translate) * 2);
  width: calc(100% + var(--grid-item-translate) * 2);
}

.text {
  /* text-transform: uppercase; */
  display: flex;
  align-content: center;
  /* font-size: clamp(3rem,9vw,10rem); */
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 0.7;
}
.text2 {
  /* text-transform: uppercase; */
  display: flex;
  align-content: center;
  /* font-size: clamp(3rem,9vw,10rem); */
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 0.7;
  font-weight: 700;
}

.frame #cdawrap {
  opacity: 1;
  transition: opacity 0.3s 1s linear;
}

.loading .frame #cdawrap {
  opacity: 0;
}

/* Modal styles */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0);
      z-index: 1000;
      justify-content: center;
      align-items: center;
      transition: background-color 0.3s ease;
    }

    .modal.open {
      display: flex;
      background-color: rgba(0, 0, 0, 0.8);
    }

    .modal-content {
      background-color: rgba(0, 0, 0, 0);;
      position: relative;
      max-width: 90%;
      max-height: 80%;
      text-align: center;
      transform: scale(0.7);
      opacity: 0;
      transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .modal.open .modal-content {
      transform: scale(1);
      opacity: 1;
    }

    .modal-content img {
      max-width: 100%;
      max-height: 75vh;
      object-fit: contain;
      border-radius: 5px;
    }

    .modal-description {
      color: white;
      font-size: 1.2em;
      margin: 10px 0;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .modal.open .modal-description {
      opacity: 1;
      transform: translateY(0);
    }

    .close-button {
      position: absolute;
      top: -50px;
      right: 0px;
      color: white;
      font-size: 30px;
      font-weight: bold;
      cursor: pointer;
      background: none;
      border: none;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
      transition: transform 0.2s ease, color 0.2s ease;
    }

    .close-button:hover {
      color: #ccc;
      transform: rotate(90deg);
    }

    .nav-button {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0, 0, 0, 0.5);
      border: none;
      color: white;
      font-size: 24px;
      padding: 20px;
      cursor: pointer;
      display: none;
    }

    .prev-button {
      left: -40px;
      display: none;
    }

    .next-button {
      right: -40px;
      display: none;
    }

    .nav-button:hover {
      background: rgba(0, 0, 0, 0.8);
    }


@media screen and (min-width: 53em) {
  .grid {
    max-width: var(--grid-max-width);
  }
  .frame {
    grid-template-columns: auto auto auto 1fr;
    grid-template-areas: 'back archive github sponsor';
  }
  .frame #cdawrap {
    max-width: 300px;
    text-align: right;
  }

}
@media screen and (max-width: 639px) {
  /* .nav-button {
    display: none !important;
  } */
  .swipe-view {
    display: block;
  }
}