:root {
  --canvas: #f4efe7;
  --surface-card: #ffffff;
  --surface-soft: #ede6dd;
  --ink: #202020;
  --body: #4e4e4e;
  --primary: #00aff1;
  --primary-pressed: #0090d4;
  --primary-light: #75dbff;
  --black-cta: #202020;
  --on-black-cta: #ffffff;
  --heart-red: #ff5e5b;
  --yellow: #ffb520;
  --shadow-soft: 0 18px 44px rgba(32, 32, 32, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", "Nunito", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  margin: 0;
}

body::before {
  animation: dot-drift 18s linear infinite;
  background-image: radial-gradient(rgba(32, 32, 32, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100svh;
  padding: 24px;
}

.app-card {
  align-content: center;
  animation: card-arrive 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
  background: var(--surface-card);
  border: 2px solid var(--ink);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: clamp(24px, 4vw, 42px);
  max-width: 1120px;
  min-height: calc(100svh - 48px);
  overflow: hidden;
  padding: clamp(24px, 4vw, 44px);
  width: 100%;
}

.top-bar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 1.08rem;
  font-weight: 900;
  gap: 10px;
  letter-spacing: 0;
}

.brand img {
  animation: logo-hello 900ms 240ms cubic-bezier(0.2, 1.4, 0.35, 1) both;
  background: var(--surface-card);
  border: 2px solid var(--ink);
  border-radius: 18px;
  height: 52px;
  object-fit: contain;
  padding: 3px;
  width: 52px;
}

.top-pill,
.games-heading span,
.games-heading strong,
.game-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 9px 13px;
}

.top-pill,
.games-heading span {
  background: var(--surface-soft);
  color: var(--body);
}

.hero-layout {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 58px);
  grid-template-columns: minmax(320px, 0.86fr) minmax(440px, 1.14fr);
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  align-items: center;
  color: var(--body);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 900;
  gap: 9px;
  letter-spacing: 0;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.eyebrow span {
  animation: dot-pop 2.8s ease-in-out infinite;
  background: var(--heart-red);
  border: 2px solid var(--ink);
  border-radius: 999px;
  display: inline-block;
  height: 14px;
  width: 14px;
}

h1 {
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.94;
  margin: 0;
}

.lede {
  color: var(--body);
  font-size: clamp(1.06rem, 2vw, 1.24rem);
  font-weight: 700;
  line-height: 1.45;
  margin: 24px 0 0;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.download-button {
  align-items: center;
  animation: button-arrive 520ms 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.12rem;
  font-weight: 900;
  gap: 12px;
  min-height: 58px;
  padding: 8px 22px 8px 10px;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.download-button:hover,
.download-button:focus-visible {
  box-shadow: 0 12px 24px rgba(32, 32, 32, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.download-button small {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.78;
}

.download-button:nth-child(2) {
  animation-delay: 340ms;
}

.android {
  background: var(--primary);
  color: var(--ink);
}

.android:hover,
.android:focus-visible {
  background: var(--primary-pressed);
}

.ios {
  background: var(--black-cta);
  color: var(--on-black-cta);
}

.platform-icon {
  align-items: center;
  animation: icon-pulse 3.4s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.games-panel {
  animation: card-pop 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  display: grid;
  gap: 16px;
}

.games-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.games-heading strong {
  background: var(--primary-light);
  color: var(--ink);
}

.game-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-card {
  animation: card-pop 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  background: var(--surface-card);
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 14px 26px rgba(32, 32, 32, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 218px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.game-card:nth-child(2) {
  animation-delay: 110ms;
  background: #f5fbff;
}

.game-card:nth-child(3) {
  animation-delay: 190ms;
  background: #fff7f3;
}

.game-card-large {
  align-items: center;
  background: #eaf8ff;
  flex-direction: row;
  grid-column: 1 / -1;
  min-height: 246px;
}

.game-card-large::after {
  animation: sparkle-dance 3.6s ease-in-out infinite;
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--ink), 26px 24px 0 -3px var(--heart-red),
    -18px 42px 0 -4px var(--primary);
  content: "";
  height: 10px;
  pointer-events: none;
  position: absolute;
  right: 46%;
  top: 24%;
  width: 10px;
}

.game-card h2 {
  font-size: clamp(1.28rem, 2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin: 10px 0 0;
  max-width: 9ch;
}

.game-chip {
  background: var(--black-cta);
  color: var(--on-black-cta);
  padding: 8px 12px;
}

.game-chip.blue {
  background: var(--primary-light);
  color: var(--ink);
}

.game-chip.red {
  background: var(--heart-red);
  color: var(--ink);
}

.game-mascot {
  align-self: center;
  animation: side-bob 4.8s ease-in-out infinite;
  height: 138px;
  margin-top: 8px;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.game-card-large .game-mascot {
  animation: mascot-float 3.2s ease-in-out infinite;
  height: 222px;
  margin-top: 0;
  transform-origin: 50% 92%;
}

@keyframes card-arrive {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-pop {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes button-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  45% {
    transform: translateY(-12px) rotate(2deg);
  }

  70% {
    transform: translateY(-5px) rotate(-2deg);
  }
}

@keyframes side-bob {
  0%,
  100% {
    transform: translateY(0) rotate(1deg);
  }

  50% {
    transform: translateY(-8px) rotate(-1deg);
  }
}

@keyframes sparkle-dance {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0) scale(0.9);
  }

  50% {
    opacity: 1;
    transform: translateY(-9px) scale(1.12);
  }
}

@keyframes logo-hello {
  0% {
    transform: rotate(-8deg) scale(0.86);
  }

  60% {
    transform: rotate(4deg) scale(1.05);
  }

  100% {
    transform: rotate(0) scale(1);
  }
}

@keyframes dot-pop {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.22);
  }
}

@keyframes icon-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes dot-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 28px 28px;
  }
}

@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .games-panel {
    max-width: 760px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    align-items: center;
    padding: 16px;
  }

  .app-card {
    border-radius: 24px;
    gap: 26px;
    min-height: calc(100svh - 32px);
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand img {
    height: 46px;
    width: 46px;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 3.4rem);
  }

  .download-button {
    justify-content: center;
    width: 100%;
  }

  .games-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-card,
  .game-card-large {
    min-height: 210px;
  }

  .game-card-large {
    align-items: flex-start;
    flex-direction: column;
    grid-column: auto;
  }

  .game-card-large::after {
    right: 18%;
    top: 22%;
  }

  .game-mascot {
    height: 132px;
  }

  .game-card-large .game-mascot {
    height: 178px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
