:root {
  --color-text: #333;
  --color-muted: #4d4d4d;
  --color-line: #f0f0f0;
  --color-green: #a7cb00;
  --color-blue: #1c8bb5;
  --color-blue-light: #1f9bc9;
  --content-width: 1140px;
  --section-padding: clamp(4.5rem, 8vw, 7rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--color-text);
  background: #fff;
  font-size: 18px;
  font-family:
    "Nunito",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #fff;
  font-size: clamp(2.9rem, 7vw, 4.1rem);
  font-weight: 300;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 300;
  line-height: 1.25;
}

p,
li {
  color: var(--color-muted);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.65;
}

p + p {
  margin-top: 1.6rem;
}

ul {
  margin: 1.4rem 0 0;
  padding-left: 1.25rem;
}

li {
  margin-top: 0.55rem;
  overflow-wrap: anywhere;
}

.container {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.container--text {
  width: min(100% - 2rem, 960px);
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #fff;
  transition:
    opacity 320ms ease,
    visibility 320ms ease;
}

.preloader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.spinner {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.spinner span {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--color-green);
  animation: bounce 1.15s infinite ease-in-out both;
}

.spinner span:nth-child(2) {
  animation-delay: 140ms;
}

.spinner span:nth-child(3) {
  animation-delay: 280ms;
}

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
    url("../images/bg.jpg") center / cover no-repeat,
    var(--color-blue-light);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 1140px);
  margin-inline: auto;
  padding-top: clamp(4rem, 8vw, 5.3rem);
  text-align: center;
}

.hero__logo {
  display: inline-block;
  width: 6.4rem;
}

.hero__logo img {
  width: 100%;
}

.hero h1 {
  margin-top: 3.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  width: 9.375rem;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.button:hover,
.button:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
}

.button--android {
  background: var(--color-green);
}

.button--windows {
  background: var(--color-blue);
}

.button span {
  margin-left: 0.2rem;
  font-size: 0.7rem;
  font-style: italic;
  font-weight: 300;
}

.hero__device {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(50vw, 50rem);
  max-width: none;
  margin: 0;
  transform: translateX(-50%);
}

.js .hero__device.reveal--up {
  transform: translateX(-50%) translateY(1.5rem);
}

.js .hero__device.reveal.is-visible {
  transform: translateX(-50%) translateY(0);
}

.section {
  position: relative;
  padding-block: var(--section-padding);
  background: #fff;
}

.section--center {
  text-align: center;
}

.section--about {
  text-align: left;
}

.section--center h2 {
  margin-bottom: 2.2rem;
}

.section--about h2 {
  margin-bottom: 2.2rem;
}

.section-nav {
  height: 1.5rem;
  border-bottom: 1px solid var(--color-line);
  background: #fff;
}

.feature {
  padding-block: 3.25rem;
}

.feature__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.feature__grid--reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.feature__copy h2 {
  margin-bottom: 1rem;
}

.device-stack {
  position: relative;
  min-height: min(52vw, 32.5rem);
}

.device-stack img {
  width: min(100%, 36.6rem);
}

.device-stack__back {
  position: relative;
  z-index: 1;
}

.device-stack__front {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 2;
}

.device-stack--single {
  min-height: 0;
}

.device-stack--single img {
  margin-left: auto;
}

.footer {
  padding-block: 2.7rem 3.25rem;
  color: #fff;
  background: var(--color-blue-light);
  text-align: center;
}

.footer p,
.footer a {
  color: #fff;
}

.footer p + p {
  margin-top: 0.3rem;
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 3.6rem;
}

.footer__social a {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  color: rgba(255, 255, 255, 0.5);
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.footer__social a:hover,
.footer__social a:focus-visible {
  color: var(--color-green);
  transform: translateY(-1px);
}

.footer__social svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.js .reveal {
  opacity: 0;
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.js .reveal--down {
  transform: translateY(-1.5rem);
}

.js .reveal--up {
  transform: translateY(1.5rem);
}

.js .reveal--left {
  transform: translateX(-1.5rem);
}

.js .reveal--right {
  transform: translateX(1.5rem);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

@media (max-width: 767px) {
  :root {
    --section-padding: 4rem;
  }

  p,
  li {
    font-size: 1.125rem;
    line-height: 1.6;
  }

  .container,
  .container--text {
    width: min(100% - 3rem, var(--content-width));
  }

  .hero {
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero__content {
    position: static;
    width: min(100% - 2rem, 34rem);
    padding-top: 3rem;
  }

  .hero__logo {
    position: relative;
    z-index: 1;
    width: min(25vw, 8.75rem);
  }

  .hero h1 {
    position: relative;
    z-index: 1;
    margin-top: 2.2rem;
    font-size: 2.65rem;
  }

  .hero__actions {
    position: relative;
    z-index: 1;
    width: min(calc(100vw - 2rem), 20rem);
    gap: 0.8rem;
    margin: 1.35rem auto 0;
  }

  .button {
    flex: 1 1 0;
    width: auto;
    max-width: 8.6rem;
    min-width: 0;
    min-height: 3.1rem;
    font-size: 0.95rem;
  }

  .hero__device {
    z-index: 0;
    right: auto;
    width: min(100vw, 30rem);
  }

  .section--center {
    text-align: center;
  }

  .section--center h2 {
    margin-bottom: 2.4rem;
  }

  .feature__grid,
  .feature__grid--reverse {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .feature__copy {
    text-align: left;
  }

  .feature__copy h2 {
    text-align: center;
  }

  .feature__grid--reverse .feature__copy {
    order: 2;
  }

  .feature__grid--reverse .device-stack {
    order: 1;
  }

  .device-stack {
    min-height: 0;
  }

  .device-stack img {
    width: min(100%, 37rem);
    margin-inline: auto;
  }

  .device-stack--single {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 2rem;
  }

  .button {
    max-width: 8.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
