/* The download page's own layer, on top of legal.css.
 *
 * It is a separate file rather than more of legal.css for the reason the guide has one: legal.css
 * is loaded by five pages that are walls of text, and a marketing page is the one page on this site
 * whose job is pictures. Everything it adds is scoped to .download-page. */

.download-page main { width: min(1040px, calc(100% - 32px)); }

/* ---------- the hero ---------- */

.dl-hero {
  display: grid;
  gap: 18px;
  padding: 34px 0 8px;
  text-align: center;
  justify-items: center;
}

.dl-mark {
  width: 96px;
  height: 96px;
  /* The artwork is transparent and already reads as a mark, so no plate and no border: a frame
     round it would make it look like an app icon, which is a different promise. */
  object-fit: contain;
}

.dl-hero h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.dl-hero h1 em {
  display: block;
  color: var(--brand-secondary);
  font-style: normal;
}

.dl-tagline {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 2.6vw, 19px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dl-lede {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* ---------- the store badges ---------- */

/* Real links, drawn here rather than fetched: Apple's and Google's badge images are hosted on
   their own CDNs, which this site does not load from, and a local copy of each is two more binaries
   to keep current. These are the same two destinations in the site's own type. */
.dl-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}

.dl-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}

.dl-store:hover { border-color: var(--accent); transform: translateY(-1px); }
.dl-store svg { width: 26px; height: 26px; flex: 0 0 auto; fill: currentColor; }
.dl-store span { display: grid; text-align: left; line-height: 1.2; }
.dl-store small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.dl-store strong { font-size: 16px; font-weight: 700; }

.dl-store.is-web { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* ---------- the screenshots ---------- */

/* Scrolls sideways on a phone rather than shrinking to five unreadable thumbnails. The shots ARE
   the page — a marketing page whose screenshots are 90px wide is a page with no screenshots. */
.dl-shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 260px);
  gap: 18px;
  margin: 34px 0 8px;
  padding-bottom: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.dl-shot { scroll-snap-align: center; display: grid; gap: 10px; }

.dl-shot img {
  width: 100%;
  height: auto;
  /* A device-shaped frame, because a bare rectangle of dark UI on a dark page reads as a hole
     rather than as a phone. */
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #000;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

.dl-shot figcaption {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- the feature rows ---------- */

.dl-features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 34px 0;
}

.dl-feature {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.dl-feature h3 { margin: 0 0 8px; font-size: 17px; }
.dl-feature p { margin: 0; color: var(--muted); font-size: 15px; }

.dl-note {
  margin: 26px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .dl-store { transition: none; }
}

/* legal.css has no footer or visually-hidden rule of its own — the pages that load it end in a
   paragraph. Both are here rather than added there, so nothing about the five text pages moves. */
.download-page footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
