:root {
  color-scheme: light dark;
  --background: #ffffff;
  --text: #1d1d1f;
  --secondary: #63636a;
  --rule: #e3e3e6;
  --link: #bf4f12; /* The app's accent colour, darkened for legible text */
  --image-border: rgb(0 0 0 / 0.1);
  --image-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1b1b1d;
    --text: #f5f5f7;
    --secondary: #a6a6ad;
    --rule: #38383c;
    --link: #f5803a;
    --image-border: rgb(255 255 255 / 0.12);
    --image-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Page header */

.hero {
  padding: 72px 24px 40px;
  text-align: center;
}

.hero img {
  width: 148px;
  margin: 0 auto 8px;
}

.hero h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero p {
  margin: 6px 0 0;
  color: var(--secondary);
  font-size: 22px;
  line-height: 1.3;
}

.hero #appstore {
  margin: 12px auto 0;
  width: 200px;
  vertical-align: middle;
  object-fit: contain;
}

/* Features */

.features {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

.feature {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 64px;
}

.feature + .feature {
  margin-top: 56px;
}

/* Images alternate sides, so neighbouring ones can overlap vertically, tucking
   each past the text beside the next. These offsets are set per row, as rows differ
   in height, to leave about 56px between any text and image. Recheck them if a
   feature's image or text changes much. Below this width, the text wraps too much. */
@media (min-width: 900px) {
  .feature:nth-child(2) {
    margin-top: -70px;
  }

  .feature:nth-child(3) {
    margin-top: 13px;
  }

  .feature:nth-child(4) {
    margin-top: 29px;
  }

  .feature:nth-child(5) {
    margin-top: -130px;
  }
}

.feature:nth-child(even) .feature-image {
  order: -1;
}

.feature h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.feature p {
  margin: 0;
}

.feature-image img {
  margin: 0 auto;
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  font: inherit;
  font-size: 0.9em;
}

.screenshot {
  border-radius: 12px;
  outline: 1px solid var(--image-border);
  outline-offset: -1px;
  box-shadow: var(--image-shadow);
}

/* A window screenshot brings its own shadow and rounded corners. Its transparent
   margin takes up 18% of its width, so it's scaled to fill the column regardless. */
.window {
  transform: scale(1.22);
}

/* Footer, shared by all pages */

.site-footer {
  margin-top: 56px;
  padding: 24px;
  border-top: 1px solid var(--rule);
  color: var(--secondary);
  font-size: 14px;
  text-align: center;
}

.site-footer a {
  color: inherit;
}

.site-footer span + span::before {
  content: "·";
  margin: 0 0.6em;
}

/* Text pages: privacy policy and support */

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.back img {
  width: 36px;
}

.page h1 {
  margin: 32px 0 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page .updated {
  margin: 0 0 28px;
  color: var(--secondary);
  font-size: 15px;
}

.page h2 {
  margin: 32px 0 6px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
}

.page h3 {
  margin: 20px 0 4px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.page h2 + h3 {
  margin-top: 12px;
}

.page .lede {
  margin: 8px 0 8px;
  color: var(--secondary);
}

.page p,
.page ul {
  margin: 0 0 12px;
}

.page li {
  margin-bottom: 6px;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 48px;
  }

  .feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .feature + .feature {
    margin-top: 64px;
  }

  .feature:nth-child(even) .feature-image {
    order: 0;
  }

  .feature-image img {
    max-width: min(100%, 400px);
  }

  .window {
    transform: none;
  }

  .site-footer span {
    display: block;
  }

  .site-footer span + span::before {
    content: none;
  }
}
