* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  min-height: 100dvh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  background: #0a0a0a;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img,
svg,
a {
  -webkit-user-drag: none;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.12) 40%, rgba(0, 0, 0, 0.35) 100%),
    url("/assets/hero-stadium.jpg") center / cover no-repeat;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 18, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 1.35rem 0.7rem 0.65rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #fff;
  margin-right: auto;
  margin-left: 0;
}

.mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.name {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle span:nth-child(1),
.site-header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2),
.site-header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle span:nth-child(3),
.site-header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  padding-right: 0.15rem;
}
.nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav a.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.downloads {
  min-height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem 1rem 3rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.store-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: min(21rem, 92vw);
  min-height: 4.25rem;
  padding: 0.7rem 1.1rem;
  box-sizing: border-box;
  text-decoration: none;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
    #0a0a0a;
  border: 1.5px solid rgba(220, 220, 220, 0.92);
  border-radius: 0.85rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  border-color: #fff;
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 14px 32px rgba(0, 0, 0, 0.42);
}
.store-badge:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.store-badge__icon {
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.store-badge__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.store-badge__text {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  max-width: calc(100% - 3.4rem);
  box-sizing: border-box;
  text-align: left;
  line-height: 1.1;
}
.store-badge__text small {
  display: block;
  max-width: 100%;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-badge__text strong {
  display: block;
  max-width: 100%;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 899px) {
  .nav-toggle {
    display: inline-block;
  }

  .top {
    position: relative;
    flex-wrap: nowrap;
    padding: 0.55rem 0.85rem 0.55rem 0.45rem;
    min-height: 56px;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    margin: 0;
    padding: 0.55rem 0.85rem 0.85rem;
    background: rgba(10, 12, 18, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    z-index: 60;
  }
  .site-header.is-open .nav,
  .nav-open .nav {
    display: flex;
  }
  .nav a {
    width: 100%;
    padding: 0.85rem 0.9rem;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .downloads {
    min-height: calc(100dvh - 56px);
    padding-top: 1rem;
    gap: 1rem;
  }
}

/* PC: 3 badges in a row */
@media (min-width: 900px) {
  .top {
    padding: 0.75rem 1.75rem 0.75rem 0.85rem;
  }

  .downloads {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: stretch;
    min-height: calc(100dvh - 72px);
    gap: 0.75rem;
    width: min(900px, calc(100% - 2.5rem));
    margin-inline: auto;
    padding: 2rem 1.25rem;
  }
  .store-badge {
    width: 100%;
    min-height: 3.5rem;
    height: 3.5rem;
    padding: 0.45rem 0.65rem;
    gap: 0.5rem;
  }
  .store-badge__icon {
    flex-basis: 1.95rem;
    width: 1.95rem;
    height: 1.95rem;
  }
  .store-badge__text {
    max-width: calc(100% - 2.55rem);
    gap: 0.1rem;
  }
  .store-badge__text strong {
    font-size: 1.02rem;
  }
  .store-badge__text small {
    font-size: 0.58rem;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .downloads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    align-items: center;
    justify-items: stretch;
    min-height: calc(100dvh - 56px);
    gap: 1rem;
    width: min(720px, calc(100% - 2rem));
    margin-inline: auto;
    padding: 1.5rem 1rem;
  }

  .store-badge {
    width: 100%;
    min-height: 4.4rem;
  }
}

@media (orientation: landscape) and (max-height: 480px) {
  .downloads {
    min-height: auto;
    padding-top: 0.75rem;
    padding-bottom: 1.25rem;
    gap: 0.75rem;
  }

  .store-badge {
    min-height: 3.5rem;
    padding-block: 0.5rem;
  }
}

@media (max-width: 380px) {
  .store-badge {
    min-height: 4rem;
    padding: 0.6rem 0.9rem;
    gap: 0.55rem;
  }
  .store-badge__icon {
    flex-basis: 2.2rem;
    width: 2.2rem;
    height: 2.2rem;
  }
  .store-badge__text strong {
    font-size: 1.1rem;
  }
  .store-badge__text small {
    font-size: 0.68rem;
  }
}
