/* Slot types on the homepage (-47). Markup: templates/_slot_types.html.

   Four picture tiles and a row of shortcuts, between the explore tiles and
   Latest Slots and as wide as both from 1024px. The surface and the border
   are Latest Slots' own (latest-slots.css), the block directly below.

   Each tile picks its shape from its own width rather than the window's (a
   container query, as the explore tiles do):

   * wide: the words on one side, the three pictures on the other;
   * narrow (phones, small laptops): the words across the top and the pictures
     in the bottom corner, with only the arrow left of "See More".

   Only `transform`, `translate` and `rotate` move, which the browser runs
   without repainting, and a visitor who asks for less motion gets none. The
   pictures are square because slot artwork is, so no title is cropped. */

.st-section-47 {
  --st-gap-47: clamp(0.5rem, 0.3rem + 0.6vw, 0.875rem);
  --st-radius-47: 0.875rem;
  --st-ink-47: #f5f3ff;
  --st-muted-47: #a3a1ae;
  --st-line-47: #242129;
  --st-accent-a-47: #a948f8;
  --st-accent-b-47: #22e2b6;
  --st-surface-47:
    radial-gradient(110% 55% at 0% 0%, rgba(169, 72, 248, 0.1), transparent 60%),
    radial-gradient(80% 45% at 100% 100%, rgba(34, 226, 182, 0.06), transparent 60%),
    linear-gradient(180deg, #17151b 0%, #121016 100%);
  --st-ease-47: cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 72rem;
  margin-inline: auto;
  color: var(--st-ink-47);
  font-family: 'Roboto', sans-serif;
}

.st-section-47 *,
.st-section-47 *::before,
.st-section-47 *::after {
  box-sizing: border-box;
}

/* From 1024px the block lines up with the tiles above it and Latest Slots
   below it, which step out of the page column to the same width. */
@media (min-width: 1024px) {
  .st-section-47 {
    --st-width-47: min(calc(100vw - 3rem), 84rem);
    width: var(--st-width-47);
    max-width: none;
    margin-inline: calc((100% - var(--st-width-47)) / 2);
  }
}

.st-cards-47,
.st-chips-47 {
  margin: 0;
  padding: 0;
  list-style: none;
}

.st-cards-47 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--st-gap-47);
}

@media (min-width: 1024px) {
  .st-cards-47 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.st-item-47 {
  min-width: 0;
  container-type: inline-size;
  container-name: st-card-47;
}

.st-item-47:nth-child(2) { --st-delay-47: -1.3s; }
.st-item-47:nth-child(3) { --st-delay-47: -2.6s; }
.st-item-47:nth-child(4) { --st-delay-47: -3.9s; }

/* ---- The tile ---------------------------------------------------------- */

.st-card-47 {
  --st-glow-x-47: 80%;
  --st-glow-y-47: 84%;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template:
    "copy copy" 1fr
    "more fan" auto / minmax(0, 1fr) auto;
  gap: 0.25rem;
  height: 100%;
  min-height: 8.25rem;
  padding: 0.75rem 0.75rem 0.5rem;
  overflow: hidden;
  border: 1px solid var(--st-line-47);
  border-radius: var(--st-radius-47);
  background: var(--st-surface-47);
  box-shadow: 0 14px 28px -24px rgba(0, 0, 0, 0.95);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.3s var(--st-ease-47),
    border-color 0.25s ease;
}

[dir="rtl"] .st-card-47 {
  --st-glow-x-47: 20%;
}

/* The light behind the pictures. A layer of its own, so that brightening it
   on hover changes opacity rather than repainting a gradient. */
.st-card-47::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(62% 74% at var(--st-glow-x-47) var(--st-glow-y-47), rgba(169, 72, 248, 0.16), rgba(169, 72, 248, 0.05) 55%, transparent 80%);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.st-copy-47 {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-width: 0;
}

.st-title-47 {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
  color: var(--st-ink-47);
}

.st-desc-47 {
  font-size: 0.75rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  color: var(--st-muted-47);
}

.st-more-47 {
  grid-area: more;
  align-self: end;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding-block-end: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--st-accent-b-47);
  transition: color 0.2s ease;
}

.st-more-text-47 {
  display: none;
}

.st-arrow-47 {
  display: inline-block;
  transition: transform 0.25s var(--st-ease-47);
}

[dir="rtl"] .st-arrow-47 {
  transform: scaleX(-1);
}

/* ---- The three pictures ------------------------------------------------ */

.st-fan-47 {
  --st-fan-w-47: 5.5rem;
  --st-fan-h-47: 4rem;
  --st-front-47: 3.25rem;
  --st-back-47: 2.625rem;
  --st-spread-47: 1.375rem;
  --st-tilt-47: 9deg;
  --st-open-47: 1;
  --st-lift-47: 0rem;
  --st-grow-47: 1;
  grid-area: fan;
  align-self: end;
  justify-self: end;
  position: relative;
  display: block;
  width: var(--st-fan-w-47);
  height: var(--st-fan-h-47);
  pointer-events: none;
}

/* The two at the back come first in the markup, so the front one paints on
   top without a stacking rule for each. */
.st-pic-47 {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: var(--st-back-47);
  height: var(--st-back-47);
  max-width: none;
  margin: calc(var(--st-back-47) / -2) 0 0 calc(var(--st-back-47) / -2);
  border-radius: 0.5rem;
  object-fit: cover;
  background: #1c1a21;
  box-shadow:
    0 6px 14px -4px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.45s var(--st-ease-47);
  animation: 5.2s ease-in-out infinite alternate;
  animation-delay: var(--st-delay-47, 0s);
}

.st-pic-47:nth-child(1) {
  transform: translate(calc(var(--st-spread-47) * var(--st-open-47) * -1), 3px) rotate(calc(var(--st-tilt-47) * var(--st-open-47) * -1));
  animation-name: st-sway-back-47;
}

.st-pic-47:nth-child(2) {
  transform: translate(calc(var(--st-spread-47) * var(--st-open-47)), 3px) rotate(calc(var(--st-tilt-47) * var(--st-open-47)));
  animation-name: st-sway-forward-47;
}

.st-pic-47:nth-child(3) {
  width: var(--st-front-47);
  height: var(--st-front-47);
  margin: calc(var(--st-front-47) / -2) 0 0 calc(var(--st-front-47) / -2);
  border-radius: 0.625rem;
  box-shadow:
    0 10px 20px -6px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translateY(var(--st-lift-47)) scale(var(--st-grow-47));
  animation-name: st-float-47;
  animation-duration: 4.2s;
}

/* The individual `translate` and `rotate` properties, so the resting motion
   adds to the fan's `transform` instead of replacing it. */
@keyframes st-float-47 {
  to { translate: 0 -0.3125rem; }
}

@keyframes st-sway-back-47 {
  to { rotate: -1.75deg; }
}

@keyframes st-sway-forward-47 {
  to { rotate: 1.75deg; }
}

/* ---- Roomier narrow tile ------------------------------------------------ */

/* Four across on a small laptop: still words over pictures, with room for
   larger pictures and the whole of "See More". */
@container st-card-47 (min-width: 13rem) {
  .st-more-text-47 {
    display: inline;
  }

  .st-fan-47 {
    --st-fan-w-47: 7rem;
    --st-fan-h-47: 5rem;
    --st-front-47: 4rem;
    --st-back-47: 3.25rem;
    --st-spread-47: 1.75rem;
  }
}

/* ---- Wide tile ---------------------------------------------------------- */

/* "See More" sits on the bottom row, so the four line up whatever length of
   text is above them. */
@container st-card-47 (min-width: 15.5rem) {
  .st-card-47 {
    --st-glow-y-47: 50%;
    grid-template:
      "copy fan" 1fr
      "more fan" auto / minmax(0, 1fr) auto;
    gap: 0.5rem;
    min-height: 9.5rem;
    padding: 1.125rem 1rem;
    padding-inline-start: 1.25rem;
  }

  .st-title-47 {
    font-size: 1.0625rem;
  }

  .st-desc-47 {
    font-size: 0.8125rem;
  }

  .st-more-47 {
    padding-block-end: 0;
  }

  .st-fan-47 {
    --st-fan-w-47: 8.75rem;
    --st-fan-h-47: 6.5rem;
    --st-front-47: 5.25rem;
    --st-back-47: 4rem;
    --st-spread-47: 2.375rem;
    align-self: center;
  }

  .st-pic-47 {
    border-radius: 0.625rem;
  }

  .st-pic-47:nth-child(3) {
    border-radius: 0.75rem;
  }
}

/* ---- The shortcuts ------------------------------------------------------ */

/* One line that slides sideways on a phone, so the block stays short; the
   cut-off chip at the edge is what says there is more. */
.st-chips-47 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block-start: var(--st-gap-47);
  padding: 0.125rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.st-chips-47::-webkit-scrollbar {
  display: none;
}

.st-chips-47 > li {
  flex: none;
}

@media (min-width: 1024px) {
  .st-chips-47 {
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* A little tighter on a small laptop, so English still fits on one line. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .st-chips-47 {
    gap: 0.375rem;
  }
}

.st-chip-47 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.625rem;
  padding-block: 0.25rem;
  padding-inline: 0.3125rem 0.875rem;
  border: 1px solid var(--st-line-47);
  border-radius: 999px;
  background: #17151b;
  color: var(--st-ink-47);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.25s var(--st-ease-47),
    border-color 0.2s ease;
}

.st-dot-47 {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(169, 72, 248, 0.16);
  color: #cda6ff;
  transition: color 0.2s ease;
}

.st-dot-47 svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

.st-all-47 {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.625rem;
  padding-inline: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--st-accent-b-47);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* ---- Hover, focus, press ------------------------------------------------ */

.st-card-47:focus-visible,
.st-chip-47:focus-visible,
.st-all-47:focus-visible {
  outline: 2px solid var(--st-accent-b-47);
  outline-offset: 2px;
}

.st-card-47:focus-visible .st-fan-47 {
  --st-open-47: 1.25;
  --st-lift-47: -0.1875rem;
  --st-grow-47: 1.06;
}

@media (hover: hover) {
  .st-card-47:hover {
    transform: translateY(-2px);
    border-color: rgba(169, 72, 248, 0.45);
  }

  .st-card-47:hover::before {
    opacity: 1;
  }

  .st-card-47:hover .st-fan-47 {
    --st-open-47: 1.25;
    --st-lift-47: -0.1875rem;
    --st-grow-47: 1.06;
  }

  .st-card-47:hover .st-more-47,
  .st-all-47:hover {
    color: #c88bff;
  }

  .st-card-47:hover .st-arrow-47,
  .st-all-47:hover .st-arrow-47 {
    transform: translateX(3px);
  }

  [dir="rtl"] .st-card-47:hover .st-arrow-47,
  [dir="rtl"] .st-all-47:hover .st-arrow-47 {
    transform: scaleX(-1) translateX(3px);
  }

  .st-chip-47:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 226, 182, 0.4);
  }

  .st-chip-47:hover .st-dot-47 {
    color: var(--st-accent-b-47);
  }
}

.st-card-47:active {
  transform: scale(0.985);
}

.st-chip-47:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .st-fan-47 .st-pic-47:nth-child(n) {
    animation: none;
    transition: none;
  }

  .st-card-47,
  .st-chip-47,
  .st-arrow-47 {
    transition: none;
  }
}
