:root {
  --bg: #f8f8f8;
  --box-bg: #fff;
  --border: #e1e1e1;
  --text: #222;
  --muted: #616161;
  --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;
  border-color: transparent;
  background: none;
}

.box--legal {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.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;
}

/* 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 {
  margin: 0;
  line-height: 1.2;
}

/* Copyright on one line on desktop, two lines on mobile */
@media (min-width: 601px) {
  .footer__break {
    display: none;
  }
}

/* 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;
  }

  .footer__menu {
    flex-wrap: wrap;
    justify-content: center;
  }

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