/* Permanent animated treatment for the game section. */
.game-promo {
  position: relative;
  isolation: isolate;
  contain: paint;
  --promo-frame-inset: clamp(10px, 1.7vw, 26px);
  --game-background-image: url('/api/content/game-image?variant=desktop');
}

@media (max-width: 1024px) and (orientation: portrait) {
  .game-promo { --game-background-image: url('/api/content/game-image?variant=mobile'); }
}

.game-promo::before {
  position: absolute;
  z-index: 3;
  inset: var(--promo-frame-inset);
  pointer-events: none;
  content: '';
  border: 2px solid rgba(218, 174, 103, .24);
  border-radius: 3px;
}

.game-promo > * {
  position: relative;
  z-index: 1;
}

.game-promo .game-visual {
  background-image: linear-gradient(90deg, #171916, transparent 30%), var(--game-background-image, url('assets/generated/divnolesie.webp'));
}

.game-promo .game-copy h2 {
  color: #f0e5d6;
  text-shadow: 0 0 0 rgba(236, 194, 123, 0);
  animation: eos-title-lustre 4s ease-in-out infinite;
}

.game-promo .game-copy h2.has-title-image {
  width: 100%;
  margin-block: 12px 20px;
  line-height: 0;
  animation: none;
}

.game-promo .game-title-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 8px 20px rgba(6, 8, 7, .22));
}

.game-play-cta {
  position: relative;
  width: 100%;
}

.game-play-cta .button {
  width: 100%;
}

.game-play-particles,
.game-world-link,
.game-title-divider {
  display: none;
}

.game-promo .section-mark {
  color: #d9b37c;
}

.game-promo .game-copy .button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #765238;
  color: #fff6e7;
  border-color: #d0a56c;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 188, .12), 0 8px 24px rgba(11, 9, 6, .22);
}

.game-promo .game-copy .button::after {
  position: absolute;
  z-index: -1;
  top: -70%;
  bottom: -70%;
  left: -55%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 239, 202, .42), transparent);
  content: '';
  opacity: 0;
  transform: skewX(-18deg);
}

.game-promo .game-copy .button:hover,
.game-promo .game-copy .button:focus-visible {
  background: #865f41;
  border-color: #eccb8d;
  box-shadow: inset 0 0 0 1px rgba(255, 235, 194, .2), 0 10px 30px rgba(13, 9, 5, .3), 0 0 18px rgba(218, 170, 94, .18);
}

.game-promo .game-copy .button:hover::after,
.game-promo .game-copy .button:focus-visible::after {
  opacity: 1;
  animation: eos-button-sheen .85s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes eos-title-lustre {
  0%, 100% {
    color: #f0e5d6;
    text-shadow: 0 0 2px rgba(236, 194, 123, .08);
  }
  46%, 54% {
    color: #fff2dc;
    text-shadow: 0 0 10px rgba(255, 222, 157, .62), 0 0 28px rgba(224, 171, 91, .38);
  }
}

@keyframes eos-button-sheen {
  from { opacity: 0; transform: translateX(0) skewX(-18deg); }
  18% { opacity: 1; }
  to { opacity: 0; transform: translateX(520%) skewX(-18deg); }
}


@media (min-width: 768px) and (min-aspect-ratio: 1/1) {
  body .game-promo {
    width: 100%;
    height: calc(100svh - 72px) !important;
    min-height: calc(100svh - 72px) !important;
    max-height: calc(100svh - 72px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
  }

  body .game-promo .game-visual {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    align-self: stretch;
  }

  body .game-promo .game-copy {
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    padding: clamp(36px, 7.5vh, 76px) 7vw;
    overflow: hidden;
  }

  body .game-promo .game-copy h2 {
    font-size: clamp(46px, 6vw, 82px);
  }

  body .game-promo .game-copy p:not(.section-mark) {
    margin-bottom: clamp(20px, 4vh, 34px);
  }
}

@media (min-width: 1025px), (min-width: 768px) and (min-aspect-ratio: 1/1) and (hover: hover) and (pointer: fine), (max-width: 1024px) and (orientation: portrait) {
  body .game-promo {
    display: grid;
    grid-template-columns: 1fr;
    isolation: isolate;
  }

  body .game-promo .game-visual {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    background-image: var(--game-background-image, url('assets/generated/divnolesie.webp'));
    background-position: center;
    background-size: cover;
  }

  body .game-promo .game-copy {
    position: relative;
    z-index: 2;
    grid-column: 1;
    width: 50%;
    height: 100%;
    margin-right: auto;
    margin-left: 0;
    padding-inline: 7vw;
    background: transparent;
  }

  body .game-promo .game-copy h2.has-title-image {
    margin-bottom: 14px;
  }

  body .game-promo .game-title-divider {
    display: block;
    width: 156px;
    height: 16px;
    margin: 0 0 12px;
    background: linear-gradient(90deg, transparent, rgba(194, 154, 90, .65) 18% 82%, transparent) center / 100% 1px no-repeat,
      url('/assets/ui/game-title-divider.svg') center / 44px 16px no-repeat;
    filter: drop-shadow(0 1px 3px rgba(14, 9, 5, .65));
    opacity: .82;
  }

  body .game-promo .game-copy > p {
    max-width: 52ch;
    color: #fff7eb;
    line-height: 1.55;
    text-shadow: 0 2px 12px rgba(20, 14, 9, .72), 0 1px 2px rgba(20, 14, 9, .9);
  }

  body .game-promo .section-mark {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    letter-spacing: .22em;
  }

  body .game-promo .section-mark::before,
  body .game-promo .section-mark::after {
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d9b37c);
    content: '';
    opacity: .75;
  }

  body .game-promo .section-mark::after {
    background: linear-gradient(90deg, #d9b37c, transparent);
  }

  body .game-promo .game-play-cta {
    isolation: isolate;
    width: min(292px, 100%);
    height: 60px;
    margin-top: 4px;
    transition: transform 180ms ease, filter 180ms ease;
  }

  body .game-promo .game-play-cta:hover {
    filter: drop-shadow(0 0 11px rgba(232, 165, 54, .2));
    transform: translateY(-1px);
  }

  body .game-promo .game-play-cta::before,
  body .game-promo .game-play-cta::after {
    position: absolute;
    z-index: 3;
    inset: 0;
    content: '';
    pointer-events: none;
    -webkit-mask: url('/assets/ui/game-button-frame.svg') center / 100% 100% no-repeat;
    mask: url('/assets/ui/game-button-frame.svg') center / 100% 100% no-repeat;
  }

  body .game-promo .game-play-cta::before {
    background: linear-gradient(180deg, #fff0a4 0%, #e6a83d 32%, #9b5b20 66%, #ffd676 100%);
    filter: drop-shadow(0 0 4px rgba(235, 166, 48, .72));
    opacity: .92;
  }

  body .game-promo .game-play-cta::after {
    background: linear-gradient(105deg, transparent 8%, rgba(255, 219, 122, .18) 30%, #fff8c9 49%, #ffc955 58%, transparent 88%);
    background-position: -70% 0;
    background-repeat: no-repeat;
    background-size: 38% 100%;
    filter: drop-shadow(0 0 5px rgba(255, 207, 91, .75));
    animation: gameButtonFrameShimmer 3.4s linear infinite;
  }

  body .game-promo .game-play-cta .button {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 60px;
    min-height: 0;
    padding: 0 24px;
    background: linear-gradient(180deg, rgba(137, 81, 52, .36), rgba(73, 37, 24, .32)), url('/assets/ui/game-button-texture.webp') center / cover;
    border: 0;
    border-radius: 0;
    box-shadow: inset 0 1px rgba(255, 221, 156, .14), inset 0 -8px 18px rgba(38, 17, 10, .2);
    color: #f4dfbd;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: .015em;
    text-shadow: 0 1px 3px rgba(33, 15, 8, .8);
    transform: none;
    -webkit-mask: url('/assets/ui/game-button-shape.svg') center / 100% 100% no-repeat;
    mask: url('/assets/ui/game-button-shape.svg') center / 100% 100% no-repeat;
  }

  body .game-promo .game-play-cta .button:hover {
    background: linear-gradient(180deg, rgba(157, 93, 58, .42), rgba(78, 39, 24, .25)), url('/assets/ui/game-button-texture.webp') center / cover;
    color: #fff0d3;
    transform: none;
  }

  body .game-promo .game-play-particles {
    position: absolute;
    z-index: 0;
    top: -6px;
    bottom: -6px;
    display: block;
    width: 58px;
    overflow: visible;
    pointer-events: none;
  }

  body .game-promo .game-play-particles-left { right: calc(100% - 2px); }
  body .game-promo .game-play-particles-right { left: calc(100% - 2px); }

  body .game-promo .game-play-particles i {
    position: absolute;
    top: var(--particle-y);
    display: block;
    width: var(--particle-size);
    height: var(--particle-size);
    background: #efc571;
    border-radius: 1px 50% 50%;
    box-shadow: 0 0 7px rgba(240, 176, 72, .8);
    opacity: 0;
    transform: rotate(45deg);
  }

  body .game-promo .game-play-particles-left i {
    right: 0;
    animation: gameParticleLeft var(--particle-duration) cubic-bezier(.22, .7, .3, 1) var(--particle-delay) infinite;
  }

  body .game-promo .game-play-particles-right i {
    left: 0;
    animation: gameParticleRight var(--particle-duration) cubic-bezier(.22, .7, .3, 1) var(--particle-delay) infinite;
  }

  body .game-promo .game-play-particles i:nth-child(3n) {
    border-radius: 50%;
    filter: blur(.2px);
  }

  body .game-promo .game-world-link {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: #d9b37c;
    border-bottom: 1px solid rgba(217, 179, 124, .6);
    font-size: 12px;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(10, 7, 5, .8);
  }

}

@media (max-width: 1024px) and (orientation: portrait) {
  body .game-promo {
    display: grid;
    width: 100%;
    height: 100svh !important;
    min-height: 100svh !important;
    max-height: 100svh;
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
    overflow: hidden;
  }

  body .game-promo .game-visual {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    grid-column: 1;
    grid-row: 1;
    background-image: var(--game-background-image);
    background-position: center;
    background-size: cover;
  }

  body .game-promo .game-copy {
    position: relative;
    z-index: 2;
    width: min(520px, 100%);
    height: 100% !important;
    min-height: 0 !important;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    padding: max(88px, 12svh) clamp(20px, 7vw, 54px) max(24px, 4svh);
    justify-content: flex-end;
    overflow: hidden;
    background: transparent;
  }

  body .game-promo .game-copy h2.has-title-image {
    width: 100%;
    margin: 8px 0 14px;
  }

  body .game-promo .game-title-divider,
  body .game-promo .game-world-link {
    display: none;
  }

  body .game-promo .game-copy > p:not(.section-mark) {
    margin: 0 0 clamp(14px, 2.5svh, 20px);
    color: #fff7eb;
    font-size: clamp(13px, 3.75vw, 15px);
    line-height: 1.48;
    text-shadow: 0 2px 12px rgba(12, 9, 7, .82), 0 1px 2px rgba(12, 9, 7, .95);
  }

  body .game-promo .section-mark {
    margin-bottom: 4px;
    font-size: 9px;
  }

  body .game-promo .game-play-cta {
    width: min(292px, 100%);
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 350px) and (orientation: portrait) {
  body .game-promo .game-copy {
    padding-right: 20px;
    padding-left: 20px;
  }

  body .game-promo .game-play-particles {
    display: none !important;
  }
}

@keyframes gameButtonFrameShimmer {
  0% { background-position: -70% 0; }
  76% { background-position: 170% 0; }
  100% { background-position: 170% 0; }
}

@keyframes gameParticleLeft {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(45deg) scale(.7); }
  15% { opacity: .85; }
  72% { opacity: .28; }
  100% { opacity: 0; transform: translate3d(calc(0px - var(--particle-distance)), var(--particle-drift), 0) rotate(145deg) scale(.2); }
}

@keyframes gameParticleRight {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(45deg) scale(.7); }
  15% { opacity: .85; }
  72% { opacity: .28; }
  100% { opacity: 0; transform: translate3d(var(--particle-distance), var(--particle-drift), 0) rotate(145deg) scale(.2); }
}

@media (min-width: 768px) and (min-aspect-ratio: 1/1) and (max-height: 620px) {
  body .game-promo .game-copy {
    padding-block: 28px;
  }

  body .game-promo .game-copy h2 {
    margin-block: 8px 14px;
    font-size: clamp(40px, 7.5vh, 58px);
  }

  body .game-promo .game-copy p:not(.section-mark) {
    margin: 0 0 16px;
    font-size: 15px;
  }

  body .game-promo .game-copy .button {
    padding-block: 10px;
  }
}

@media (max-width: 767px) {
  .game-promo .game-copy h2.has-title-image {
    width: 100%;
    margin-block: 8px 16px;
  }


  .game-promo {
    --promo-frame-inset: 8px;
  }

  .game-promo::before {
    inset: var(--promo-frame-inset);
  }

}

@media (prefers-reduced-motion: reduce) {
  .game-promo .game-copy h2,
  .game-promo .game-copy .button::after,
  .game-promo .game-play-cta::after {
    animation: none;
  }

  .game-promo .game-play-particles {
    display: none !important;
  }
}
