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

:root {
  font-size: 16px;
  --color-text: #d8e4f0;
  --color-bg: #05050f;
  --color-bg-alt: hsl(240deg 50% 7%);
  --color-link: rgba(0, 240, 255, 0.55);
  --color-link-hover: #00f0ff;
  --color-title: #00f0ff;
  --color-accent: #ff2d78;
  --glow-cyan: 0 0 8px #00f0ff, 0 0 20px rgba(0, 240, 255, 0.4);
  --glow-magenta: 0 0 8px #ff2d78, 0 0 20px rgba(255, 45, 120, 0.4);
}

body {
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: "tenon", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin-bottom: 50vh;
  overflow-x: hidden;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 240, 255, 0.018) 2px,
    rgba(0, 240, 255, 0.018) 4px
  );
}

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

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

.js .loading::after {
  top: 50%;
  left: 50%;
  width: 300px;
  height: 2px;
  margin: -1px 0 0 -150px;
  background: var(--color-link);
  box-shadow:
    0 0 10px var(--color-link),
    0 0 20px var(--color-title);
  animation: cyberLoaderAnim 1.5s cubic-bezier(0.86, 0, 0.07, 1) infinite;
}

@keyframes cyberLoaderAnim {
  0% {
    transform: scaleX(0);
    transform-origin: left;
  }
  49.9% {
    transform: scaleX(1);
    transform-origin: left;
  }
  50% {
    transform: scaleX(1);
    transform-origin: right;
  }
  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

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

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

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
  /* Provide a fallback style for browsers
	 that don't support :focus-visible */
  outline: none;
  background: lightgrey;
}

a:focus:not(:focus-visible) {
  /* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
  background: transparent;
}

a:focus-visible {
  /* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
  outline: 2px solid var(--color-title);
  box-shadow: var(--glow-cyan);
  background: transparent;
}

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

.unbutton:focus {
  outline: none;
}

.frame {
  position: relative;
  width: 100%;
  padding: 1rem;
  display: grid;
  grid-template-columns: 100%;
  grid-template-areas: "back" "prev" "sponsor";
  grid-gap: 0.5rem;
  justify-items: start;
  align-self: start;
  justify-self: start;
  pointer-events: none;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  background: rgba(5, 5, 20, 0.85);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(6px);
}

body #cdawrap {
  justify-self: start;
}

.frame a {
  pointer-events: auto;
}

.frame a:not(.frame__title-back) {
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.frame a:not(.frame__title-back)::before {
  content: "";
  height: 1px;
  width: 100%;
  background: var(--color-title);
  box-shadow: var(--glow-cyan);
  position: absolute;
  top: 90%;
  transition: transform 0.3s;
  transform-origin: 0% 50%;
}

.frame a:not(.frame__title-back):hover::before {
  transform: scaleX(0);
  transform-origin: 100% 50%;
}

.frame__title {
  grid-area: title;
  display: flex;
}

.frame__title-main {
  font-size: inherit;
  margin: 0;
  font-weight: inherit;
}

.frame__title-back {
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0.15rem;
}

.frame__title-back span {
  display: none;
}

.frame__title-back svg {
  fill: currentColor;
}

.frame__prev {
  grid-area: prev;
}

.frame__credits {
  grid-area: credits;
}

.intro {
  height: calc(100vh - 3rem);
  text-align: center;
  place-items: center;
  display: grid;
  margin-bottom: 30vh;
  position: relative;
  overflow: hidden;
}

.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  filter: saturate(0.7) brightness(0.55) contrast(1.1);
}

.intro__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(10, 3, 2, 0.55) 60%,
    var(--color-bg) 100%
  );
}

.intro__title {
  place-items: center;
  margin: 0;
  line-height: 0.9;
  display: grid;
  margin-top: 15vh;
  font-weight: 400;
  position: relative;
  z-index: 2;
}

.intro__title-pre {
  font-family: "stinger-variable", sans-serif;
  font-variation-settings:
    "wdth" 140,
    "wght" 300;
  font-weight: 300;
  font-size: clamp(2rem, 10vw, 5rem);
  color: var(--color-title);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.intro__title-sub {
  font-size: clamp(0.9rem, 2.5vw, 1.4rem);
  margin: 1rem 0;
  color: rgba(216, 228, 240, 0.75);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
}

.intro__info {
  max-width: 15ch;
  opacity: 0.7;
  margin-bottom: 4rem;
  padding-bottom: 1rem;
  line-height: 1.4;
  position: relative;
  align-self: end;
  z-index: 2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--color-title);
}

.intro__info::after {
  content: "";
  width: 1px;
  height: 2rem;
  background: var(--color-title);
  box-shadow: var(--glow-cyan);
  position: absolute;
  top: 100%;
  left: 50%;
}

.content__title {
  margin-top: 40vh;
}

.credits {
  font-size: 0.85rem;
  text-align: center;
  margin: 50vh auto 0;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(0, 240, 255, 0.45);
}

.credits a {
  color: var(--color-title);
  text-shadow: var(--glow-cyan);
}

.card-wrap {
  margin-top: 5vh;
  display: grid;
  grid-gap: 2rem;
  grid-auto-flow: row;
  grid-template-columns: min(90vw, 340px);
}

.card__image {
  display: block;
  border-radius: 2px;
  background-size: cover;
  background-position: 50% 50%;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(0, 240, 255, 0.2);
  overflow: hidden;
  filter: brightness(0.75) saturate(0.8);
  transition:
    filter 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
}

.card__image:hover {
  filter: brightness(0.95) saturate(1.1);
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.content-wrap {
  display: grid;
  place-items: center;
  grid-template-areas: "main";
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.content {
  grid-area: main;
  display: grid;
  place-items: center;
  line-height: 1.2;
  grid-template-areas: "content";
}

.content-wrap .content:first-child {
  height: 100vh;
}

.content--layout {
  grid-template-areas:
    "title-up title-down"
    "img img"
    "text text";
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: min(100%, calc(100vw - 3rem));
  padding: 0 1.5rem;
}

.content__img {
  grid-area: img;
  max-width: 92%;
  width: 92%;
  height: auto;
}

.content__img--1 {
  aspect-ratio: 896/1344;
}

.content__img--2 {
  aspect-ratio: 1000/450;
}

.content__img--3 {
  aspect-ratio: 1000/560;
}

.content__img--4 {
  aspect-ratio: 1400/560;
}

.content__img--5 {
  aspect-ratio: 680/920;
}

.content__img--6 {
  aspect-ratio: 1;
}

.content__img--7 {
  aspect-ratio: 1400/560;
}

.title-wrap {
  display: flex;
  gap: 1em;
  align-items: center;
  justify-content: center;
}

.title {
  padding-top: 0.3em;
  line-height: 0.525;
  font-size: 2rem;
  font-family: "stinger-variable", sans-serif;
  font-variation-settings:
    "wdth" 140,
    "wght" 150;
  font-weight: 300;
  position: relative;
  z-index: 100;
  text-indent: -0.1em;
  color: var(--color-title);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.title--down {
  grid-area: title-down;
  font-variation-settings:
    "wdth" 140,
    "wght" 350;
  color: var(--color-accent);
  text-shadow: var(--glow-magenta);
}

.title--up {
  grid-area: title-up;
  font-style: italic;
}

.content__text {
  grid-area: text;
  text-transform: uppercase;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: clamp(0.95rem, 4vw, 1rem);
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  letter-spacing: 0.08em;
  color: rgba(160, 210, 230, 0.65);
  font-weight: 300;
}

@media screen and (min-width: 53em) {
  .frame {
    grid-template-columns: auto auto 1fr;
    grid-template-areas: "back prev sponsor";
    justify-items: start;
    grid-gap: 2rem;
  }

  .frame__prev {
    justify-self: end;
  }

  .title {
    font-size: clamp(2rem, 15vw, 9rem);
  }

  .content-wrap:not(:last-child) {
    margin-bottom: 30vmax;
  }

  .content__img {
    max-width: none;
  }

  .content__img--1 {
    height: auto;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
  }

  .content__img--2 {
    width: 60vw;
  }

  .content__img--3 {
    width: 30vw;
    align-self: center;
  }

  .content__img--4 {
    width: 100%;
    align-self: center;
  }

  .content__img--5 {
    height: auto;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
  }

  .content__img--6 {
    max-width: 100%;
  }

  .content__img--7 {
    width: 100%;
    align-self: center;
  }

  .content--layout-1 {
    grid-template-areas:
      "title-up img ..."
      "text img title-down";
    grid-template-columns: 30% auto 30%;
    grid-template-rows: 1fr 1fr;
    column-gap: 2vw;
  }

  .content--layout-2 {
    grid-template-areas:
      "title-up ..."
      "img img"
      "text title-down";
    grid-template-columns: auto auto;
    justify-content: center;
    row-gap: 3vh;
  }

  .content--layout-3 {
    grid-template-areas:
      "title-up img title-down"
      "text text text";
    grid-template-columns: 20vw auto 20vw;
    grid-template-rows: auto auto;
    row-gap: 10vh;
    column-gap: 2vw;
    justify-content: center;
    align-content: center;
  }

  .content--layout-4 {
    width: 100%;
    grid-template-areas:
      "title-up"
      "img"
      "title-down"
      "text";
    grid-template-columns: 1fr;
    justify-content: center;
    row-gap: 4vh;
  }

  .content--layout-5 {
    grid-template-areas:
      "title-up img ..."
      "text img title-down";
    grid-template-columns: 30% auto 30%;
    grid-template-rows: 1fr 1fr;
    column-gap: 3vw;
  }

  .content--layout-6 {
    grid-template-areas:
      "title-up img"
      "title-down img"
      "text img";
    grid-template-columns: 1fr 50%;
    grid-template-rows: auto auto 1fr;
    column-gap: 3vw;
    row-gap: 0;
  }

  .content--layout-7 {
    width: 100%;
    grid-template-areas:
      "img img img img"
      "... text title-up ..."
      "... text title-down ...";
    grid-template-columns: 10vw 1fr 1fr 10vw;
    justify-content: center;
    row-gap: 4vh;
  }

  .title--up {
    justify-self: end;
    align-self: start;
  }

  .content--layout-2 .title--up {
    justify-self: start;
  }

  .content--layout-3 .title--up {
    justify-self: end;
    align-self: center;
  }

  .content--layout-4 .title--up {
    justify-self: center;
  }

  .content--layout-6 .title--up {
    justify-self: end;
    align-self: start;
  }

  .content--layout-7 .title--up {
    justify-self: start;
  }

  .title--down {
    justify-self: start;
    align-self: end;
  }

  .content--layout-2 .title--down {
    justify-self: end;
    align-self: start;
    margin-top: -0.1em;
  }

  .content--layout-3 .title--down {
    align-self: center;
  }

  .content--layout-4 .title--down {
    justify-self: center;
  }

  .content--layout-6 .title--down {
    justify-self: end;
    align-self: start;
  }

  .content--layout-2 .content__text {
    align-self: start;
    justify-self: start;
    max-width: 400px;
  }

  .content--layout-1 .content__text {
    max-width: 250px;
    text-align: right;
    justify-self: end;
    align-self: end;
  }

  .content--layout-3 .content__text {
    column-count: 2;
    column-gap: 4vw;
    max-width: 590px;
    text-align: justify;
  }

  .content--layout-4 .content__text {
    text-align: center;
    max-width: 400px;
    margin-top: 3rem;
  }

  .content--layout-5 .content__text {
    max-width: 250px;
    text-align: right;
    justify-self: end;
    align-self: end;
  }

  .content--layout-6 .content__text {
    max-width: 250px;
    justify-self: end;
    align-self: end;
    text-align: right;
  }

  .content--layout-7 .content__text {
    max-width: 250px;
    justify-self: start;
    align-self: start;
    text-align: right;
  }

  .card-wrap {
    grid-template-columns: repeat(3, 340px);
  }

  body #cdawrap {
    justify-self: end;
  }
}
