/* ===== Splash screen =====
   Timeline (from page load):
   0.0s   the logo fades in; the O's land lines fade in as soon as the map has loaded, and it starts turning
   0.6s   buttons fade in
   Tap anywhere jumps to the end. Reduced-motion users get a still logo (the globe doesn't turn). */

:root {
  --splash-bg: #34005f;
  --splash-orange: #ff7c00;
  --splash-o-line: 1.1px;
  /* the land lines in the spinning O (the logo's O uses 1.56) */
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--splash-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 400ms ease;
}

.splash.hide {
  opacity: 0;
  pointer-events: none;
}

.splash-inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-logo {
  width: min(80vw, 440px);
  height: auto;
  overflow: visible;
  animation: splashFadeIn 500ms ease-out both;
}

/* Lettering */
.splash-type path {
  fill: #fff;
}

/* The O: an orange disc with the land lines in the background colour, so they look cut out like the logo */
.splash-o-disc {
  fill: var(--splash-orange);
}

.splash-o-lines path {
  fill: none;
  stroke: var(--splash-bg);
  stroke-width: var(--splash-o-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buttons */
.splash-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: min(100%, 260px);
  margin-top: 80px;
  animation: splashRise 400ms ease-out 600ms both;
}

/* A fixed height and line height, so the buttons don't change size when the Poppins font arrives
   (the text is drawn in a fallback font until then). Overrides the general button styles in styles.css. */
.splash button {
  box-sizing: border-box;
  height: 48px;
  margin: 0;
  padding: 0 20px;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  border-radius: 15px;
  cursor: pointer;
  opacity: 1;
  transform: none;
}

.splash-play {
  background: var(--splash-orange);
  color: #fff;
  border: none;
}

.splash-play.is-waiting {
  cursor: wait;
}

.splash-how {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.splash-play:hover:not(:disabled),
.splash-how:hover {
  filter: brightness(1.08);
}

/* How to play card */
.splash-rules {
  background: #fff;
  color: #222;
  border-radius: 16px;
  padding: 22px 24px;
  margin-top: 24px;
  max-width: 380px;
  text-align: left;
}

.splash-rules h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.splash-rules p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}

.splash-rules button {
  width: 100%;
  margin-top: 6px;
}

.splash.rules-open .splash-actions {
  display: none;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes splashRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .splash *,
  .splash *::before {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }
}