.projects-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 6rem var(--page-pad) 3.5rem;
  view-timeline-name: --hero;
  view-timeline-axis: block;
  color: var(--color-on-dark);
  text-align: center;
  background:
    linear-gradient(rgba(6, 12, 22, 0.34), rgba(6, 12, 22, 0.22)),
    url("../images/projects/cities.jpg") center 46% / cover no-repeat;
}

.projects-hero__title {
  font-size: clamp(2.15rem, 10vw, 2.7rem);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
}

.projects-hero__title span {
  display: block;
}

.showcase__copy {
  padding: var(--space-3xl) var(--page-pad) var(--space-xl);
  text-align: center;
}

.showcase__body {
  width: min(100%, 34rem);
  margin-inline: auto;
  text-align: center;
}

.showcase__title {
  margin-bottom: var(--space-md);
  font-size: clamp(1.35rem, 5.8vw, 2rem);
  white-space: nowrap;
}

.showcase__text {
  max-width: 28rem;
  margin-inline: auto;
  color: var(--color-text-soft);
}

.showcase__actions {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.showcase__actions .button {
  min-width: 11.5rem;
}

.showcase__qr,
.showcase__qr-toggle {
  display: none;
}

.showcase__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--page-pad) var(--space-2xl);
  background-color: #101820;
  background-position: center;
  background-size: cover;
}

.showcase--tasks .showcase__stage {
  background-image:
    linear-gradient(rgba(8, 18, 14, 0.12), rgba(8, 18, 14, 0.18)),
    url("../images/bg-02.jpg");
}

.showcase--neon .showcase__stage {
  background-image:
    linear-gradient(rgba(6, 10, 18, 0.18), rgba(6, 10, 18, 0.28)),
    url("../images/bg-03.jpg");
}

.showcase__shots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
}

.showcase__shots img {
  height: auto;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.32));
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.showcase--tasks .showcase__shots img {
  width: calc(50% - var(--space-xs));
}

.showcase--tasks .showcase__shots img:last-child {
  display: none;
}

.showcase--neon .showcase__shots {
  flex-direction: column;
}

.showcase--neon .showcase__shots img {
  width: min(100%, 36rem);
}

.showcase {
  animation: block-in linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 18rem;
}

.qr__layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: var(--page-pad);
  background: rgba(10, 16, 26, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    visibility 0s linear 0.35s;
}

body:has(#qr-heroic:checked) #qr-heroic-layer,
body:has(#qr-neon:checked) #qr-neon-layer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.35s ease,
    visibility 0s linear 0s;
}

body:has(.showcase__qr-toggle:checked) {
  overflow: hidden;
}

.qr__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.qr__card {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  background: var(--color-bg);
  text-align: center;
}

.qr__card h2 {
  margin-bottom: var(--space-lg);
  font-size: var(--title-md);
}

.qr__code {
  width: 12.5rem;
  aspect-ratio: 1;
  margin: 0 auto var(--space-lg);
  background: var(--color-field);
}

.qr__code img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr__note {
  margin-bottom: var(--space-lg);
  color: var(--color-text-soft);
}

@media (min-width: 48rem) {
  .projects-hero__title {
    font-size: clamp(2.8rem, 4.6vw, 4.15rem);
  }

  .showcase__store {
    display: none;
  }

  .showcase__qr {
    display: inline-flex;
  }

  .showcase__qr-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    display: block;
  }

  .showcase__qr-toggle:focus-visible + .showcase__qr {
    background: transparent;
    color: var(--button-color);
  }
}

@media (min-width: 64rem) {
  .showcase__title {
    font-size: clamp(1.85rem, 2.4vw, 2.45rem);
  }

  .showcase__text span {
    display: block;
  }

  .showcase {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: stretch;
  }

  .showcase__copy {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4xl) clamp(2rem, 4vw, 4.5rem);
  }

  .showcase__actions {
    flex-direction: row;
    justify-content: center;
  }

  .showcase__stage {
    justify-content: flex-start;
    overflow: hidden;
    padding: var(--space-3xl) 0 var(--space-3xl) clamp(1.25rem, 2.5vw, 2.5rem);
  }

  .showcase__shots {
    width: max-content;
    max-width: none;
    justify-content: flex-start;
  }

  .showcase--tasks .showcase__shots img,
  .showcase--tasks .showcase__shots img:last-child {
    display: block;
    width: auto;
    height: clamp(24rem, 62vh, 36rem);
  }

  .showcase--neon .showcase__shots {
    flex-direction: row;
  }

  .showcase--neon .showcase__shots img {
    width: clamp(20rem, 30vw, 28rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase {
    animation: none;
  }

  .qr__layer {
    transition: none;
  }
}
