/* The game collection and project artwork. */

.game-collection {
  padding: 0 var(--gutter);
}

#lostinreefs3 {
  --project-accent: #91c8e1;
}

#lostinreefs2 {
  --project-accent: #83d1c6;
}

#lostinnight {
  --project-accent: #be9de4;
}

#woodville {
  --project-accent: #a8c981;
}

#wizardland {
  --project-accent: #c5a3dd;
}

#lostinreefs {
  --project-accent: #86cbd1;
}

#ageofemerald {
  --project-accent: #97cb95;
}

#jumba {
  --project-accent: #d6b589;
}

.collection-intro {
  padding: 185px var(--gutter) 65px;
}

.collection-intro > .eyebrow {
  margin-bottom: 28px;
}

.collection-intro h1 {
  font-size: clamp(44px, 5.5vw, 84px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.collection-intro > p:not(.eyebrow) {
  max-width: 630px;
  margin-top: 30px;
  font-size: 18px;
  color: var(--copy-soft);
  line-height: 1.8;
}

/* The studio's top game: a card above the index, its worlds floating in a soft violet light. */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 24px;
  max-width: 900px;
  margin-top: 44px;
  padding: 34px 40px;
  overflow: hidden;
  border: 1px solid #c8b28c45;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 82% 45%, #8260cc38, transparent 62%),
    linear-gradient(135deg, #261c36, #17121f);
  color: var(--paper);
  transition: border-color 0.25s;
}

.featured:hover,
.featured:focus-visible {
  border-color: var(--gold);
}

.featured-copy {
  position: relative;
  z-index: 1;
}

.featured-title {
  display: block;
  margin: 10px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
}

.featured-text {
  display: block;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--copy-soft);
}

.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 18px;
  font-weight: 700;
  color: var(--gold);
}

/* The worlds are sized by their box, so they keep their sizes and their gaps in any width. */
.featured-worlds {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.25;
}

.featured-worlds img {
  position: absolute;
  width: 48%;
  filter: drop-shadow(0 12px 14px #0006);
}

.featured-worlds img:nth-child(1) {
  left: 0;
  top: 22%;
}

.featured-worlds img:nth-child(2) {
  right: 0;
  top: 0;
}

.featured-worlds img:nth-child(3) {
  left: 26%;
  bottom: -14%;
}

@media (prefers-reduced-motion: no-preference) {
  .featured-worlds img {
    animation: featured-float 7s ease-in-out infinite;
  }

  .featured-worlds img:nth-child(2) {
    animation-delay: -2.3s;
  }

  .featured-worlds img:nth-child(3) {
    animation-delay: -4.6s;
  }
}

@keyframes featured-float {
  50% {
    transform: translateY(-8px);
  }
}

.collection-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.collection-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  font-size: 14px;
  line-height: 1.4;
}

.collection-index a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.collection-index:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 8px;
  border-radius: 8px;
}

.game-project {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 70px;
  padding: 80px 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
  overflow: clip;
}

.game-project .eyebrow {
  color: var(--project-accent);
  margin-bottom: 22px;
}

.game-project h2 {
  font-size: clamp(36px, 3.4vw, 56px);
  line-height: 1.18;
}

.game-description {
  font-size: 17px;
  color: #bdb4cb;
  line-height: 1.8;
  margin-top: 25px;
}

.game-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.game-features li {
  font-size: 14px;
  color: var(--project-accent);
  border: 1px solid #c8b28c26;
  border-radius: 20px;
  padding: 5px 12px;
}

.project-art-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 350px;
  margin-top: 25px;
}

.project-art {
  width: calc(50% - 5px);
  min-width: 0;
}

.project-sprite {
  width: 100%;
  aspect-ratio: 1;
  background-size: 400% 200%;
  background-repeat: no-repeat;
}

.sheet-a {
  background-image: url("../images/projects/elements-a.png");
  background-image: image-set(
    url("../images/optimized/projects/elements-a.c4eb49bf045f.webp") type("image/webp"),
    url("../images/projects/elements-a.png") type("image/png")
  );
}

.sheet-b {
  background-image: url("../images/projects/elements-b.png");
  background-image: image-set(
    url("../images/optimized/projects/elements-b.d13f0ea54999.webp") type("image/webp"),
    url("../images/projects/elements-b.png") type("image/png")
  );
}

.cell-0 {
  background-position: 0 0;
}

.cell-1 {
  background-position: 33.333333% 0;
}

.cell-2 {
  background-position: 66.666667% 0;
}

.cell-3 {
  background-position: 100% 0;
}

.cell-4 {
  background-position: 0 100%;
}

.cell-5 {
  background-position: 33.333333% 100%;
}

.cell-6 {
  background-position: 66.666667% 100%;
}

.cell-7 {
  background-position: 100% 100%;
}

.project-screen {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border: 1px solid #c8b28c30;
  border-radius: 16px;
  background: #ffffff04;
  text-align: left;
  box-shadow: 0 25px 70px #05030c44;
}

.project-screen:hover {
  border-color: var(--project-accent);
}

.project-screen img {
  width: 100%;
  border-radius: 8px;
}

.project-screen > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 4px 6px;
  font-size: 14px;
  color: #a398b1;
}

.project-screen strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--project-accent);
  font-weight: 700;
}

.collection-end {
  text-align: center;
  padding: 90px var(--gutter) 110px;
}

.collection-end .eyebrow {
  margin-bottom: 25px;
}

.collection-end .button {
  margin-top: 35px;
}

.back-top {
  display: block;
  width: fit-content;
  margin: 25px auto 0;
  padding: 12px;
  font-size: 16px;
  color: #b8a6cb;
}

@media (max-width: 1050px) {
  .game-project {
    gap: 35px;
  }
}

@media (max-width: 650px) {
  .collection-intro {
    padding-top: 145px;
    padding-bottom: 45px;
  }

  .collection-intro h1 {
    font-size: 44px;
  }

  .collection-intro > p:not(.eyebrow) {
    font-size: 17px;
  }

  .featured {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 32px;
    padding: 26px 24px 20px;
  }

  .featured-worlds {
    aspect-ratio: 2;
    margin-bottom: 14px;
  }

  .featured-worlds img {
    width: 38%;
  }

  .featured-worlds img:nth-child(1) {
    left: 6%;
    top: 14%;
  }

  .featured-worlds img:nth-child(2) {
    right: 6%;
  }

  .featured-worlds img:nth-child(3) {
    left: 31%;
    bottom: -12%;
  }

  .collection-index {
    gap: 8px;
    margin-top: 30px;
  }

  .collection-index a {
    padding-inline: 12px;
  }

  .game-project {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 50px 0;
  }

  .game-project h2 {
    font-size: 38px;
  }

  .game-project .eyebrow {
    letter-spacing: 1px;
  }

  .game-description {
    margin-top: 22px;
  }

  .project-art-pair {
    width: 100%;
    max-width: 300px;
    margin: 25px auto 0;
  }

  .project-screen {
    padding: 8px;
    border-radius: 12px;
  }

  .project-screen > span {
    padding: 15px 6px 7px;
  }

  .collection-end {
    padding-top: 70px;
    padding-bottom: 85px;
  }
}
