:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  background: #087f9c;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }

.landing {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  background: url("assets/rapids-background.jpg") center / cover no-repeat;
}

.landing::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgb(5 24 38 / 30%), rgb(5 24 38 / 44%) 65%, rgb(5 24 38 / 70%));
  pointer-events: none;
}

.landing-content {
  align-self: center;
  padding: 48px 20px 30px;
  text-align: center;
}

.game-icon {
  display: block;
  width: min(56vw, 300px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 5px solid rgb(255 255 255 / 94%);
  border-radius: 24%;
  box-shadow: 0 0 0 2px rgb(18 24 38 / 20%), 0 22px 50px rgb(0 0 0 / 38%), 0 8px 18px rgb(0 0 0 / 20%);
  animation: drift 6s ease-in-out infinite;
}

h1 {
  margin: 24px 0 10px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: .015em;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgb(0 0 0 / 25%), 0 7px 18px rgb(0 0 0 / 48%);
}

.tagline {
  margin: 0 0 27px;
  font-size: clamp(1.05rem, 2.8vw, 1.3rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
  text-shadow: 0 2px 5px rgb(0 0 0 / 60%);
}

.store-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.app-store-link {
  display: block;
  border-radius: 10px;
  transition: transform .2s ease;
  filter: drop-shadow(0 8px 18px rgb(0 0 0 / 25%));
}

.app-store-link img { display: block; width: 180px; height: 60px; }
.app-store-link:hover { transform: translateY(-2px); }

.landing-footer {
  padding: 14px 18px max(16px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 10px;
}

.landing-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  text-underline-offset: 4px;
  text-shadow: 0 2px 4px rgb(0 0 0 / 70%);
}

.landing-footer a:hover { text-decoration: underline; }
.landing-footer span { opacity: .7; }
a:focus-visible { outline: 3px solid #d8ff71; outline-offset: 5px; border-radius: 3px; }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 600px) {
  .landing { background-position: 58% center; }
  .landing-content { padding: 36px 18px 30px; }
  .game-icon { width: min(64vw, 230px); border-width: 4px; }
  h1 { margin-top: 22px; }
  .tagline { margin-bottom: 24px; }
}

@media (max-height: 540px) and (min-width: 601px) {
  .landing-content { padding-top: 24px; padding-bottom: 12px; }
  .game-icon { width: 160px; border-width: 3px; }
  h1 { margin-top: 18px; font-size: 2.25rem; }
  .tagline { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .game-icon { animation: none; }
  .app-store-link { transition: none; }
}
