:root {
  --text: #000;
  --bg: #f5f5f7;
  --surface: #fff;
  --line: rgba(0, 0, 0, 0.18);
  --hover: #e8e8ed;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  width: 100%;
  max-width: 62.5rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  min-height: 70svh;
  padding: 4rem 0 3rem;
  text-align: center;
}

h1 {
  margin: 0 0 2rem;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* Links and buttons */
a {
  color: var(--text);
}

.button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--text);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--hover);
}

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Screenshot */
.preview {
  padding: 1rem 0 4rem;
  scroll-margin-top: 1.5rem;
}

figure {
  margin: 0;
}

figure a {
  display: block;
  border-radius: 0.75rem;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}

/* Download */
.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 0 6rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.download p {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Larger screens */
@media (min-width: 48rem) {
  main {
    padding: 0 2.5rem;
  }

  .preview {
    padding-bottom: 5rem;
  }
}

/* Small phones */
@media (max-width: 30rem) {
  main {
    padding: 0 1rem;
  }

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

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

  .button {
    transition: none;
  }
}
