:root {
  --bg: #f8f8f8;
  --box-bg: #fff;
  --border: #e1e1e1;
  --text: #222;
  --muted: #616161;
  --accent: #56b6f9;
  --accent-hover: #0095f6;
  --font: "Klavika", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: var(--text);
}

p {
  margin: 0 0 10px;
}

/* Layout */

.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 5vh 16px 40px;
  overflow-x: clip;
}

/* Desktop: center phone and boxes vertically in the space above the
   footer. On short screens the page simply grows and scrolls. */
@media (min-width: 992px) {
  .main {
    align-items: center;
    padding: 40px 16px;
  }
}

/* Phone with floating emojis. Positions are in % of a 533×619 stage so
   everything scales together. */

.hero {
  position: relative;
  flex: none;
  width: 454px;
  aspect-ratio: 533 / 619;
}

.hero__phone {
  position: absolute;
  left: 18%;
  top: -4%;
  width: 64%;
  height: auto;
}

.emoji {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.22));
  animation: float 4s ease-in-out infinite;
}

.emoji--heart {
  left: 66.55%;
  top: 66%;
  width: 27.2%;
  --tilt: 6deg;
  animation-duration: 3.6s;
}

.emoji--controller {
  left: 7.65%;
  top: 27.9%;
  width: 29.5%;
  --tilt: -5deg;
  animation-duration: 4.4s;
  animation-delay: -1.5s;
}

.emoji--smiley {
  left: 58.35%;
  top: 2.7%;
  width: 27%;
  --tilt: 8deg;
  animation-duration: 4s;
  animation-delay: -0.8s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8%) rotate(var(--tilt));
  }
}

@media (prefers-reduced-motion: reduce) {
  .emoji {
    animation: none;
  }
}

.boxes {
  width: 420px;
  max-width: 100%;
}

.box {
  background: var(--box-bg);
  border: 1px solid var(--border);
  padding: 15px 40px;
  margin-top: 15px;
  text-align: center;
}

.box.box--intro {
  padding-bottom: 8px;
}

.box--region {
  padding-bottom: 25px;
}

.box--legal p {
  margin: 10px 0;
}

/* Intro */

.logo {
  margin: 0;
  padding-top: 15px;
  line-height: 0;
}

.logo img {
  width: 200px;
  height: auto;
}

h2 {
  margin: 15px 0 10px;
  font-size: 20px;
  font-weight: 300;
}

.stores {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 20px;
}

.stores img {
  display: block;
  height: 40px;
  width: auto;
}

.small {
  font-size: 12px;
}

/* Blinking arrow that scrolls to the region picker */

.scroll-hint {
  display: block;
  margin: 2px auto -10px;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  animation: blink 1.4s ease-in-out infinite;
}

.scroll-hint svg {
  display: block;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint {
    animation: none;
  }
}

/* On desktop the region picker is already in view */
@media (min-width: 992px) {
  .scroll-hint {
    display: none;
  }
}

/* Region dropdown */

.dropdown {
  position: relative;
  margin: 10px 0 20px;
}

.dropdown__toggle {
  width: 100%;
  padding: 8px 15px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.5s ease;
}

.dropdown__toggle:hover,
.dropdown__toggle:focus-visible {
  background: var(--accent-hover);
}

.caret {
  display: inline-block;
  margin-left: 5px;
  vertical-align: middle;
  border-top: 4px solid;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin: 2px 0 0;
  padding: 5px 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

.dropdown__menu li {
  padding: 4px 20px;
  cursor: pointer;
}

.dropdown__menu li:hover,
.dropdown__menu li:focus {
  background: #f5f5f5;
  outline: none;
}

/* App shown for the chosen region */

.region-app {
  overflow: hidden;
  transition: height 0.6s ease;
}

.region-app__icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
}

.region-app__name {
  display: block;
  margin: 5px 0 0;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
}

.region-app .stores {
  margin-bottom: 10px;
}

/* Footer */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 120px;
  padding: 20px 16px 30px;
  font-size: 12px;
  font-weight: 400;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: #515151;
}

.footer__menu {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__menu li {
  padding: 5px 20px;
}

.footer__copyright {
  line-height: 1.2;
}

/* Small screens */

@media (max-width: 991px) {
  .main {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .hero {
    width: 100%;
    max-width: 454px;
    /* The phone image has empty shadow space at the bottom. A % margin
       is relative to .main, not .hero, so cap it at 12% of 454px. */
    margin-bottom: max(-12%, -54px);
  }
}

@media (max-width: 600px) {
  .box {
    padding: 15px 20px;
  }

  .footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
