/* Shared by every page: tokens, type, the desktop bar, prose pages and the footer. */

@font-face {
  /* Condensed fallback for platforms without SF Pro. Archivo, SIL OFL 1.1 (fonts/OFL.txt). */
  font-family: "Workout Display";
  src: url("../fonts/archivo-condensed.woff2") format("woff2");
  font-weight: 700 900;
  font-stretch: 62% 100%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #04050b;
  --navy: #0c1736;
  --plum: #2b1034;
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.66);
  --text-3: rgba(235, 235, 245, 0.42);
  --hairline: rgba(255, 255, 255, 0.1);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --blue: #0a84ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --purple: #bf5af2;
  --pink: #ff375f;
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* No BlinkMacSystemFont here: Chrome can't condense SF, so it gets the Archivo fallback. */
  --font-display: -apple-system, "Workout Display", "Arial Narrow", sans-serif-condensed, sans-serif;
  --content: 1120px;
  --gutter: max(24px, calc((100vw - var(--content)) / 2));
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, svg { display: block; max-width: 100%; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* SF Pro Condensed Black (wdth 60, wght 1000), as in the App Store captions. */
.display {
  font-family: var(--font-display);
  font-weight: 1000;
  font-stretch: 60%;
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.lead {
  margin: 0;
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.35;
  color: var(--text-2);
  text-wrap: pretty;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* MARK: Get the app */

.badge img { width: auto; height: 52px; }

.get {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* MARK: Desktop bar */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 var(--gutter);
  background: rgba(4, 5, 11, 0.72);
  border-bottom: 1px solid var(--hairline);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}

.bar.is-visible, .bar.is-static { transform: none; }

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .bar { display: flex; }
}

.bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.bar-brand:hover { text-decoration: none; }
.bar-brand img { width: 28px; height: 28px; border-radius: 7px; }

.bar-get {
  padding: 5px 14px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.bar-get:hover { text-decoration: none; background: #3395ff; }

/* MARK: Prose pages */

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 24px;
}

.prose h1 {
  margin: 0 0 16px;
  font-size: clamp(48px, 8vw, 80px);
}

.prose h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 19px;
  font-weight: 600;
}

.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose .updated { margin-top: 0; font-size: 15px; color: var(--text-3); }

@media (max-width: 899px) {
  .prose { padding-top: 56px; }
}

/* MARK: Footer */

.footer {
  max-width: var(--content);
  margin: 0 auto;
  padding: 28px 24px 56px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text-3);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer a { color: var(--text-2); }
.footer p { margin: 14px 0 0; }
