/* ============================================
   GAME SPOTLIGHT — a released game, shown in its own look
   Peek-a-Geek's palette, fonts and screenshots, so it reads as the real
   thing next to the "coming soon" booth cards.
   Used by index.html and games/index.html.
   Fonts: Dela Gothic One and Rethink Sans (OFL, see /fonts/).
   ============================================ */
@font-face {
  font-family: 'Dela Gothic One';
  src: url('/fonts/dela-gothic-one-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Rethink Sans';
  src: url('/fonts/rethink-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

.spotlight {
  --pg-purple: #6A3FC8;
  --pg-ink: #1A1033;
  --pg-yellow: #FFD93D;
  --pg-cyan: #2FB8C9;
  --pg-card: #FFFDF7;
  --pg-dim: #E2D7FF;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 4rem;
  color: #fff;
  font-family: 'Rethink Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  text-align: left;
  background-color: var(--pg-purple);
  /* The game's sparkles and dot grid */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cpath d='M40 41C41.6 48.4 41.6 48.4 49 50C41.6 51.6 41.6 51.6 40 59C38.4 51.6 38.4 51.6 31 50C38.4 48.4 38.4 48.4 40 41Z' fill='rgba(255,255,255,.55)'/%3E%3Cpath d='M170 113C171.3 118.7 171.3 118.7 177 120C171.3 121.3 171.3 121.3 170 127C168.7 121.3 168.7 121.3 163 120C168.7 118.7 168.7 118.7 170 113Z' fill='rgba(255,217,61,.75)'/%3E%3Cpath d='M110 194C111.1 198.9 111.1 198.9 116 200C111.1 201.1 111.1 201.1 110 206C108.9 201.1 108.9 201.1 104 200C108.9 198.9 108.9 198.9 110 194Z' fill='rgba(255,255,255,.4)'/%3E%3Cpath d='M215 25C215.9 29.1 215.9 29.1 220 30C215.9 30.9 215.9 30.9 215 35C214.1 30.9 214.1 30.9 210 30C214.1 29.1 214.1 29.1 215 25Z' fill='rgba(255,217,61,.55)'/%3E%3C/svg%3E"),
    radial-gradient(circle, rgba(255,255,255,0.10) 1.1px, transparent 1.6px);
  background-size: 240px 240px, 9px 9px;
  border: 3px solid var(--pg-ink);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--pg-ink), 0 0 40px rgba(106, 63, 200, 0.45);
}

.spotlight-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.spotlight-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.spotlight-badge {
  font-family: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--pg-ink);
  background: var(--pg-yellow);
  border: 3px solid var(--pg-ink);
  border-radius: 999px;
  padding: 0.25rem 0.8rem 0.2rem;
  box-shadow: 3px 3px 0 var(--pg-ink);
}

.spotlight-icon {
  width: 44px;
  height: 44px;
  border: 3px solid var(--pg-ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--pg-ink);
}

.spotlight-title {
  margin: 0;
  line-height: 0;
}

.spotlight-title img {
  display: block;
  width: min(100%, 360px);
  height: auto;
}

.spotlight-lead {
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 34rem;
}

.spotlight-features {
  list-style: none;
  margin: 0;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.4rem;
  color: var(--pg-ink);
  background: var(--pg-card);
  border: 3px solid var(--pg-ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--pg-ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.spotlight-features li {
  padding-left: 1.4rem;
  position: relative;
}

.spotlight-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 0.8em;
  height: 0.8em;
  background: var(--pg-yellow);
  border: 2px solid var(--pg-ink);
  border-radius: 50%;
}

.spotlight-features b {
  font-family: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  font-weight: 400;
}

.spotlight-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.spotlight-play {
  font-family: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  font-size: 1.2rem;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--pg-ink);
  background: var(--pg-cyan);
  border: 3px solid var(--pg-ink);
  border-radius: 999px;
  padding: 0.85rem 1.6rem 0.75rem;
  box-shadow: 5px 5px 0 var(--pg-ink);
  transform: rotate(-2deg);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.spotlight-play:hover,
.spotlight-play:focus-visible {
  text-decoration: none;
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 7px 7px 0 var(--pg-ink);
}

.spotlight-play:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--pg-ink);
}

.spotlight-play:focus-visible {
  outline: 3px solid var(--pg-yellow);
  outline-offset: 3px;
}

.spotlight-store {
  font-size: 0.85rem;
  color: var(--pg-dim);
}

/* Screenshots: three phones, the middle one in front */
.spotlight-shots {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.spotlight-phone {
  flex: none;
  width: clamp(130px, 13vw, 190px);
  aspect-ratio: 1206 / 2622;
  background: var(--pg-ink);
  border: 6px solid var(--pg-ink);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 5px 5px 0 rgba(26, 16, 51, 0.6);
}

.spotlight-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.spotlight-phone:nth-child(1) { transform: rotate(-7deg) translateY(12px); margin-right: -28px; }
.spotlight-phone:nth-child(2) { position: relative; z-index: 1; width: clamp(150px, 15vw, 220px); }
.spotlight-phone:nth-child(3) { transform: rotate(7deg) translateY(12px); margin-left: -28px; }

/* Arrived via ?from=peek-a-geek on /games/ */
.spotlight.highlighted::after {
  content: 'YOU ARE HERE';
  position: absolute;
  top: -0.7rem;
  right: 1.5rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  letter-spacing: 1px;
  color: var(--pg-ink);
  background: var(--pg-yellow);
  border: 2px solid var(--pg-ink);
  border-radius: 3px;
  padding: 0.3rem 0.5rem;
}

@media (max-width: 860px) {
  .spotlight {
    grid-template-columns: 1fr;
  }

  /* Swipeable row of screenshots instead of the fan */
  .spotlight-shots {
    justify-content: flex-start;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * clamp(1.5rem, 4vw, 3rem));
    padding: 0.5rem clamp(1.5rem, 4vw, 3rem) 1rem;
    scrollbar-width: none;
  }

  .spotlight-shots::-webkit-scrollbar { display: none; }

  .spotlight-phone,
  .spotlight-phone:nth-child(n) {
    width: 170px;
    transform: none;
    margin: 0;
    scroll-snap-align: center;
  }

  /* Gameplay first */
  .spotlight-phone:nth-child(2) { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .spotlight-play,
  .spotlight-play:hover,
  .spotlight-play:focus-visible {
    transition: none;
    transform: none;
  }
}
