/* Colors from the app's Palette (Shared/Palette.swift) */
:root {
  --night: #08111f;
  --hill: #22303f;
  --skull: #f4fbff;
  --faded: rgba(244, 251, 255, 0.6);
  --beam-light: #a6c8d8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
  color: var(--skull);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--beam-light);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 24px 0;
}

header a {
  text-decoration: none;
}

header .home {
  color: var(--skull);
  font-weight: 600;
}

header nav a {
  color: var(--faded);
  font-size: 15px;
  margin-left: 20px;
}

header nav a:hover,
header .home:hover {
  color: var(--skull);
}

main {
  padding: 48px 0 80px;
}

/* Text stays in a narrow column; header, footer and screenshots use the full width. */
.narrow,
.intro {
  max-width: 640px;
  margin: 0 auto;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 24px;
}

h2 {
  font-size: 19px;
  margin: 48px 0 16px;
}

h3 {
  font-size: 17px;
  margin: 28px 0 4px;
}

p {
  margin: 0 0 16px;
}

h3 + p {
  color: var(--faded);
}

.muted {
  color: var(--faded);
}

footer {
  border-top: 1px solid var(--hill);
  padding: 24px 0 40px;
  color: var(--faded);
  font-size: 14px;
}

/* Landing page */

.intro {
  text-align: center;
}

.app-icon {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 22%;
  margin: 0 auto 32px;
}

.intro h1 {
  margin-bottom: 8px;
}

.tagline {
  color: var(--faded);
  font-size: 19px;
  margin: 0;
}

.section {
  margin-top: 112px;
}

.section h2 {
  margin-top: 0;
}

/* Gallery: a horizontal row of phone screenshots, wider than the text column. Used for the app screenshots and the widgets. Add a <figure> to add an image. */
.gallery {
  --gallery-width: min(1100px, 100vw - 40px);
  width: var(--gallery-width);
  margin-left: calc(50% - var(--gallery-width) / 2);
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--hill) transparent;
}

.gallery::-webkit-scrollbar {
  height: 6px;
}

.gallery::-webkit-scrollbar-thumb {
  background: var(--hill);
  border-radius: 3px;
}

.gallery:focus-visible {
  outline: 1px solid var(--beam-light);
  outline-offset: 6px;
}

.gallery figure {
  /* About two in view on desktop, but never taller than the window. */
  flex: 0 0 min((100% - 48px) / 2.2, 42vh);
  margin: 0;
  scroll-snap-align: start;
  container-type: inline-size;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  border-radius: 7cqi;
}

.gallery figcaption {
  margin-top: 12px;
  color: var(--faded);
  font-size: 14px;
}

.closing {
  text-align: center;
}

.closing p:first-child {
  font-size: 21px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.closing .muted {
  font-size: 14px;
}

@media (min-width: 720px) {
  main {
    padding-top: 72px;
  }

  .intro h1 {
    font-size: 44px;
  }

  .tagline {
    font-size: 21px;
  }
}

@media (max-width: 560px) {
  main {
    padding-top: 24px;
  }

  .section {
    margin-top: 80px;
  }

  /* One image nearly full width, with the next one peeking in. */
  .gallery figure {
    flex-basis: 82%;
  }
}
