:root {
  color-scheme: dark;
  --black: #000;
  --white: #fff;
  --muted: #919191;
  --grid-size: 1440px;
  --entrance-distance: 40px;
  --entrance-duration: 2000ms;
  --entrance-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

html {
  min-height: 100%;
  background: var(--black);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--black);
  color: var(--white);
}

body.home-page,
body.not-found-page {
  height: 100svh;
  overflow: hidden;
}

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

img,
svg {
  -webkit-user-drag: none;
  pointer-events: none;
}

.screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  background: var(--black);
}

.grid-bg {
  position: fixed;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: var(--grid-size);
  height: var(--grid-size);
  pointer-events: none;
  background: url("assets/grid.svg") center / 100% 100% no-repeat;
  opacity: 0;
  animation: gridEntrance 2000ms ease-out 120ms forwards;
  transform: translate(-50%, -50%);
}

.app-icon,
.hero h1,
.download-button,
.not-found-copy,
.legal-heading h1,
.legal-heading p,
.legal-copy {
  opacity: 0;
  animation: contentEntrance var(--entrance-duration) var(--entrance-ease) forwards;
  translate: 0 var(--entrance-distance);
}

.footer-links {
  opacity: 0;
  animation: fadeEntrance var(--entrance-duration) var(--entrance-ease) forwards;
}

.home-screen .app-icon {
  animation-delay: 200ms;
}

.home-screen .hero h1 {
  animation-delay: 400ms;
}

.home-screen .download-button {
  animation-delay: 600ms;
}

.home-screen .footer-links {
  animation-delay: 800ms;
}

.legal-screen .legal-heading h1 {
  animation-delay: 200ms;
}

.legal-screen .legal-heading p {
  animation-delay: 400ms;
}

.legal-screen .legal-copy {
  animation-delay: 600ms;
}

.not-found-screen .not-found-copy {
  animation-delay: 200ms;
}

.not-found-screen .home-button {
  animation-delay: 400ms;
}

@keyframes gridEntrance {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes contentEntrance {
  from {
    opacity: 0;
    translate: 0 var(--entrance-distance);
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes fadeEntrance {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.brand {
  position: relative;
  flex: 0 0 auto;
  width: 268.421px;
  height: 60px;
}

.brand a,
.brand img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand img {
  object-fit: contain;
}

.home-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100svh;
  min-height: 0;
  padding: 40px 60px;
}

.not-found-screen {
  display: flex;
  height: 100svh;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  padding: 40px 60px;
}

.not-found-content {
  display: flex;
  width: min(1320px, 100%);
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 50px;
  text-align: center;
}

.not-found-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.not-found-code {
  margin: 0;
  color: var(--white);
  font-size: 240px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0;
}

.not-found-content h1 {
  width: 100%;
  margin: 0;
  font-size: 40px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero {
  display: flex;
  width: min(1320px, 100%);
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.app-icon {
  display: block;
  width: 160px;
  height: 160px;
  border: 1.68px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  object-fit: cover;
}

.hero h1 {
  width: 100%;
  max-width: 920px;
  margin: 0;
  font-size: 40px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
}

.download-button {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  min-width: 436px;
  height: 100px;
  padding: 0 50px;
  border-radius: 100px;
  background: var(--white);
  color: var(--black);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  transition: transform 180ms ease;
  white-space: nowrap;
}

.download-button::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.2);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.download-button:hover {
  transform: scale(1.05);
}

.download-button:active::after {
  opacity: 1;
}

.footer-links {
  display: flex;
  width: min(600px, 100%);
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.footer-links a {
  flex: 1 1 0;
}

.footer-links a:hover,
.legal-copy a:hover {
  color: var(--white);
}

.legal-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  min-height: 100svh;
  padding: 40px 60px;
}

.legal-content {
  display: flex;
  width: min(1320px, 100%);
  flex: 1 1 auto;
  flex-direction: column;
  gap: 60px;
}

.legal-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-heading h1,
.legal-heading p,
.legal-copy h2,
.legal-copy p {
  margin: 0;
  letter-spacing: 0;
}

.legal-heading h1 {
  font-size: 40px;
  font-weight: 650;
  line-height: 1.2;
}

.legal-heading p {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.legal-copy {
  display: flex;
  flex-direction: column;
  gap: 30px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.legal-copy h2 {
  color: var(--muted);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.legal-copy a {
  color: var(--white);
}

@media (max-width: 1023px) {
  .home-screen {
    min-height: 0;
    padding: 40px;
  }

  .not-found-screen {
    min-height: 0;
    padding: 40px;
  }

  .legal-screen {
    padding: 40px;
  }

  .hero h1 {
    max-width: 714px;
  }

  .legal-content {
    gap: 40px;
  }
}

@media (max-width: 600px) {
  :root {
    --grid-size: 900px;
  }

  .brand {
    width: 178.947px;
    height: 40px;
  }

  .home-screen {
    min-height: 0;
    padding: 40px 20px;
  }

  .not-found-screen {
    min-height: 0;
    padding: 40px 20px;
  }

  .hero {
    gap: 40px;
  }

  .app-icon {
    width: 120px;
    height: 120px;
    border-radius: 20px;
  }

  .hero h1 {
    max-width: 342px;
    font-size: 25px;
  }

  .not-found-content h1 {
    font-size: 25px;
  }

  .not-found-code {
    font-size: 150px;
  }

  .download-button {
    min-width: min(100%, 268px);
    height: 70px;
    padding: 0 30px;
    font-size: 25px;
  }

  .footer-links {
    width: 100%;
    font-size: 15px;
    line-height: 1.2;
  }

  .legal-screen {
    gap: 60px;
    padding: 40px 20px;
  }

  .legal-content {
    gap: 30px;
  }

  .legal-heading h1 {
    font-size: 40px;
  }

  .legal-heading p {
    font-size: 20px;
  }

  .legal-copy {
    font-size: 15px;
  }
}
