@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 700;
  src: url("assets/fonts/oswald-bold.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #d344bc;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #fff;
  font-family: Oswald, Impact, "Arial Narrow", sans-serif;
  overflow-x: hidden;
  background: #d344bc;
}

body::before {
  position: fixed;
  inset: -36px;
  z-index: 0;
  content: "";
  background: url("assets/background.webp") center top / 100vw auto no-repeat;
}

a {
  color: inherit;
}

.background-motion {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.95),
    0 0 26px rgba(255, 244, 159, 0.9);
  opacity: 0;
  transform: scale(0.25) rotate(45deg);
}

.sparkle::before,
.sparkle::after {
  position: absolute;
  inset: 50% auto auto 50%;
  content: "";
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%);
}

.sparkle::before {
  width: 24px;
  height: 3px;
  border-radius: 999px;
}

.sparkle::after {
  width: 3px;
  height: 24px;
  border-radius: 999px;
}

.sparkle--one {
  top: 9%;
  left: 24%;
  animation-delay: 1.2s;
}

.sparkle--two {
  top: 19%;
  right: 18%;
  width: 5px;
  height: 5px;
  animation-delay: 5.6s;
}

.sparkle--three {
  top: 43%;
  left: 14%;
  animation-delay: 8.8s;
}

.sparkle--four {
  top: 54%;
  right: 21%;
  width: 6px;
  height: 6px;
  animation-delay: 3.4s;
}

.sparkle--five {
  top: 72%;
  left: 29%;
  width: 5px;
  height: 5px;
  animation-delay: 11.6s;
}

.sparkle--six {
  top: 81%;
  right: 12%;
  animation-delay: 7.2s;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cowclub {
  position: relative;
  z-index: 2;
  width: min(409px, calc(100vw - 32px));
  min-height: 1500px;
  margin: 0 auto;
  padding: 68px 0 145px;
}

.cowclub__logo {
  display: block;
  width: min(326px, 79.8%);
  height: auto;
  margin: 0 auto;
}

.games {
  margin-top: 50px;
}

.section-title {
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 7.34vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 1.27px 0 rgba(0, 0, 0, 0.55),
    0 3px 0 rgba(0, 0, 0, 0.45);
  -webkit-text-stroke: 1.7px #0b0d1a;
  paint-order: stroke fill;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 190px));
  gap: 20px;
  justify-content: center;
  width: min(400px, 100%);
  margin: 24px auto 0;
  padding: 0;
  list-style: none;
}

.game-link {
  display: block;
  border-radius: 14px;
  outline-offset: 4px;
  transition: filter 120ms ease, transform 120ms ease;
}

.game-link:is(:hover, :focus-visible, :active) {
  filter: saturate(1.08) brightness(1.04);
  transform: translateY(-2px);
}

.game-link:focus-visible {
  outline: 3px solid #fff;
}

.game-card {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 190 / 123;
  object-fit: contain;
}

.club-card {
  width: min(409px, 100%);
  height: auto;
  aspect-ratio: 409 / 493;
  margin: 42px auto 0;
  padding-top: 27px;
  background: url("assets/links-bg.webp") center / 100% 100% no-repeat;
}

.club-card__title {
  line-height: 1.18;
}

.club-links {
  display: grid;
  gap: 10px;
  width: min(364px, calc(100% - 46px));
  margin: 30px auto 0;
}

.link-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 364 / 87;
  border-radius: 18px;
  outline-offset: 4px;
  transform-origin: center;
  transition: transform 120ms ease, filter 120ms ease;
}

.link-button__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 120ms ease;
}

.link-button__image--pressed {
  opacity: 0;
}

.link-button:is(:hover, :focus-visible, :active) {
  filter: saturate(1.04);
  transform: translateY(2px) scale(0.992);
}

.link-button:is(:hover, :focus-visible, :active) .link-button__image--default {
  opacity: 0;
}

.link-button:is(:hover, :focus-visible, :active) .link-button__image--pressed {
  opacity: 1;
}

.link-button:focus-visible {
  outline: 3px solid #fff;
}

@media (max-width: 520px) {
  body {
    background-size: auto 1180px;
  }

  body::before {
    background-size: auto 1180px;
    animation: background-drift 24s ease-in-out infinite alternate;
    will-change: transform;
  }

  .sparkle {
    animation: sparkle-twinkle 5.8s ease-in-out infinite;
  }

  .cowclub {
    width: min(409px, calc(100vw - 18px));
    min-height: 1220px;
    padding-top: 38px;
    padding-bottom: 80px;
  }

  .games {
    margin-top: 34px;
  }

  .game-grid {
    gap: 12px;
    margin-top: 15px;
  }

  .club-card {
    margin-top: 34px;
    padding-top: 6.6%;
  }

  .club-links {
    gap: 8px;
    width: calc(100% - 40px);
    margin-top: 7.2%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .sparkle {
    animation: none;
  }

  .sparkle {
    opacity: 0;
  }
}

@keyframes background-drift {
  from {
    transform: translate3d(-22px, -16px, 0) scale(1.025);
  }

  to {
    transform: translate3d(24px, 22px, 0) scale(1.045);
  }
}

@keyframes sparkle-twinkle {
  0%,
  58%,
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.25) rotate(45deg);
  }

  66% {
    opacity: 1;
    transform: translate3d(2px, -5px, 0) scale(1.15) rotate(45deg);
  }

  78% {
    opacity: 0.35;
    transform: translate3d(4px, -9px, 0) scale(0.65) rotate(45deg);
  }
}
