* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  min-width: 100%;
}

body {
  padding: 6rem 2rem 2rem;
  margin: 0;
  background: linear-gradient(hsl(200, 30%, 3%), hsl(200, 30%, 20%));
  color: #fff;
  font: 1.1em/1.3 sans-serif;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
}

main {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 50rem;
}

a,
a:link,
a:visited {
  color: #fff;
}

h1,
h2 {
  font-family: monospace;
  text-transform: uppercase;
}

.showcase {
  width: 15rem;
  height: 15rem;
  margin: 0;
  display: block;
  border-radius: 3px;
  aspect-ratio: 1 / 1;
  background-color: hsl(200, 100%, 20%);
  color: hsl(0, 66%, 95%);
  transition: all 0.3s;
  transform: perspective(20rem) translateZ(-2.5rem);
  text-decoration: none;
  overflow: hidden;
  position: relative;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem 0.25rem hsl(0, 0%, 0%, 0.3);
}

a.showcase {
  background-color: hsl(20, 100%, 60%);
  animation: 20s infinite undulate;
  animation-delay: 6s;
}

a.showcase > * {
  transition: opacity 0.3s;
}

a.showcase > img {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: 100%;
  opacity: 0.9;
  display: block;
  filter: brightness(0.9) contrast(1.3);
}

a.showcase > *:not(img) {
  opacity: 0;
  padding: 0 1rem;
}

a.showcase:hover,
a.showcase:target {
  transform: matrix3d(
    0.91,
    -0.09,
    0.42,
    0.0005,
    0.09,
    1,
    0,
    0.0001,
    -0.42,
    0,
    0.91,
    0,
    0,
    0,
    0,
    1
  );

  & > img {
    opacity: 0;
  }
  & > *:not(img) {
    opacity: 1;
  }
}

h1.showcase {
  background-color: transparent;
  display: flex;
  flex-flow: column wrap;
  justify-content: flex-end;
  align-items: flex-start;
  transform: rotate(270deg) scale(90%);
  font-size: 5rem;
  line-height: 0.9;
}

h1.showcase > span:nth-child(2) {
  color: hsl(20, 100%, 60%);
}

@keyframes undulate {
  0% {
    background-color: hsl(20, 100%, 60%);
  }
  25% {
    background-color: hsl(20, 100%, 20%);
  }
  50% {
    background-color: hsl(200, 100%, 60%);
  }
  75% {
    background-color: hsl(200, 100%, 20%);
  }
  100% {
    background-color: hsl(20, 100%, 60%);
  }
}
