/* Indus Games download page — plain CSS, no build step, no JavaScript.
   Colours and type follow the app's "Playful Arcade" tokens (docs/design.md). */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("/fonts/rubik.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/quicksand.woff2") format("woff2");
}

:root {
  --coral-hi: #ff7d55;
  --coral: #f45a34;
  --coral-lo: #e5421c;
  --primary: #ae3115; /* the app's button-shadow red */
  --ink: #251912;
  --gold: #ffe08a;
  --cream: #fff8f6;
  --rubik: "Rubik", "Trebuchet MS", system-ui, sans-serif;
  --quicksand: "Quicksand", "Trebuchet MS", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: only light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--quicksand);
  color: #fff;
  background:
    radial-gradient(circle at 10% 6%, rgba(255, 255, 255, 0.22) 0 110px, transparent 111px),
    radial-gradient(circle at 94% 34%, rgba(255, 224, 138, 0.2) 0 150px, transparent 151px),
    radial-gradient(circle at 78% 98%, rgba(255, 255, 255, 0.14) 0 190px, transparent 191px),
    linear-gradient(160deg, var(--coral-hi) 0%, var(--coral) 55%, var(--coral-lo) 100%);
  background-attachment: fixed;
}

/* The dot pattern from the store graphics, fading out toward the bottom. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 2px, transparent 2.5px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

a {
  color: inherit;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.hero {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 6px 0 rgba(122, 30, 12, 0.35));
  animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.wordmark {
  margin: 14px 0 0;
  font-family: var(--rubik);
  font-weight: 900;
  font-size: clamp(44px, 13vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 0 rgba(122, 30, 12, 0.3);
}
.wordmark span {
  color: var(--gold);
}

.lead {
  margin: 14px 0 0;
  max-width: 24em;
  font-weight: 700;
  font-size: clamp(17px, 4.6vw, 20px);
  line-height: 1.35;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgba(122, 30, 12, 0.25);
}

/* ---- the two big buttons ------------------------------------------------ */

.stores {
  width: 100%;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.store {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 88px;
  padding: 14px 20px;
  border-radius: 24px;
  text-decoration: none;
  text-align: left;
  overflow: hidden;
}

/* The glossy top third every button in the app has. */
.store::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 34%;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}
.store--soon::after {
  background: rgba(255, 255, 255, 0.08);
}

.store__icon {
  flex: none;
  width: 40px;
  height: 40px;
}

.store__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.store__small {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.store__big {
  margin-top: 3px;
  font-family: var(--rubik);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.01em;
}

.store--play {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 7px 0 var(--primary), 0 16px 28px -8px rgba(90, 16, 0, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.store--play .store__small {
  color: var(--primary);
}
.store--play:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--primary), 0 20px 30px -8px rgba(90, 16, 0, 0.45);
}
.store--play:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 var(--primary), 0 6px 14px -6px rgba(90, 16, 0, 0.45);
}
.store--play:focus-visible,
.web a:focus-visible,
.foot a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.store--soon {
  background: rgba(122, 30, 12, 0.28);
  color: rgba(255, 255, 255, 0.92);
  border: 2px dashed rgba(255, 255, 255, 0.55);
  box-shadow: 0 7px 0 rgba(122, 30, 12, 0.35);
  cursor: default;
  user-select: none;
}
.store--soon .store__icon,
.store--soon .store__text {
  opacity: 0.85;
}
/* "Coming soon" sits where the small label would be, so it can never collide with the store name. */
.store__small--pill {
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--gold);
  color: #271900;
  font-family: var(--rubik);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.web {
  margin: 26px 0 0;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}
.web a {
  font-weight: 700;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* ---- the fan of game tiles --------------------------------------------- */

.fan {
  --s: clamp(64px, 19vw, 92px);
  position: relative;
  width: calc(var(--s) * 4.1);
  height: calc(var(--s) * 1.45);
  margin-top: 4px;
}
.tile {
  position: absolute;
  left: calc(var(--i) * var(--s) * 0.78);
  top: calc(var(--d) * var(--s) * 0.06 + var(--s) * 0.18);
  width: var(--s);
  height: var(--s);
  border-radius: calc(var(--s) * 0.2);
  background: #fff;
  box-shadow: 0 0 0 3px #fff, 0 8px 0 3px rgba(122, 30, 12, 0.35);
  transform: rotate(calc((var(--i) - 2) * 7deg));
  animation: bob 4.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.9s);
}

/* Position of each tile in the fan: --i = place from the left, --d = how far it sits from the middle tile. */
.tile:nth-child(1) { --i: 0; --d: 2; }
.tile:nth-child(2) { --i: 1; --d: 1; }
.tile:nth-child(3) { --i: 2; --d: 0; }
.tile:nth-child(4) { --i: 3; --d: 1; }
.tile:nth-child(5) { --i: 4; --d: 2; }

/* ---- footer ------------------------------------------------------------- */

.foot {
  padding: 20px 20px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}
.foot p {
  margin: 0;
}
.foot__links {
  margin-top: 6px !important;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.foot a {
  text-underline-offset: 3px;
}
.foot__tm {
  margin: 10px auto 0 !important;
  max-width: 42em;
  font-size: 11px;
  opacity: 0.8;
}

/* ---- wide screens: copy and buttons left, games right ------------------ */

@media (min-width: 960px) {
  .page {
    flex-direction: row;
    justify-content: space-between;
    gap: 40px;
    padding-inline: 48px;
  }
  .hero {
    align-items: flex-start;
    text-align: left;
    max-width: 500px;
  }
  .logo {
    width: 168px;
    height: 168px;
  }
  .wordmark {
    font-size: 68px;
    white-space: nowrap;
  }
  .lead {
    font-size: 22px;
  }
  .fan {
    --s: 150px;
    margin-top: 0;
    flex: none;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo,
  .tile {
    animation: none;
  }
  .store--play {
    transition: none;
  }
}
