/* FitStreaks website. Tokens come from the app (src/ui/palette.ts, src/ui/accents.ts); see DESIGN.md.
   System fonts only, no scripts, no external requests. */
:root {
  --bg: #ffffff;
  --card: #fafafa;
  --raised: #f4f4f5;
  --inset: #f0f0f1;
  --text: #0a0a0a;
  --muted: #5b5b63;
  --line: #e4e4e7;
  --success: #147a3a;
  --g1: #6d28d9;
  --g2: #c2410c;
  --accent: #983573;
  --on-accent: #ffffff;
  --frame: #1c1c1c;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --gutter: 20px;
  --measure: 68ch;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --card: #111111;
    --raised: #171717;
    --inset: #1c1c1c;
    --text: #fafafa;
    --muted: #a3a3a3;
    --line: #262626;
    --success: #34d399;
    --g1: #a98bff;
    --g2: #ff8a4c;
    --accent: #d48ba6;
    --on-accent: #0a0a0a;
  }
}
@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

/* ---------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.05;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
p,
ul,
ol,
dl {
  margin: 0 0 1em;
}
p {
  max-width: var(--measure);
  text-wrap: pretty;
}
a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  max-width: calc(1120px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.lead {
  font-size: clamp(1.2rem, 2.2vw, 1.375rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 34em;
}
.small {
  font-size: 0.9375rem;
  color: var(--muted);
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 2;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-md);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- header and footer */
.site-head {
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img {
  border-radius: 7px;
  border: 1px solid var(--line);
}
.nav-wide {
  display: none;
  gap: 28px;
}
.nav-wide a,
.nav-menu nav a,
.site-foot nav a {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-wide a:hover,
.site-foot nav a:hover {
  color: var(--accent);
}
.nav-wide a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}
.nav-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}
.nav-menu[open] summary {
  background: var(--inset);
}
.nav-menu nav {
  position: absolute;
  z-index: 1;
  right: var(--gutter);
  top: 58px;
  min-width: 200px;
  display: grid;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.nav-menu nav a {
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 1.0625rem;
}
.nav-menu nav a:hover,
.nav-menu nav a[aria-current="page"] {
  background: var(--inset);
}
@media (min-width: 640px) {
  .nav-wide {
    display: flex;
  }
  .nav-menu {
    display: none;
  }
}
.site-foot {
  margin-top: 112px;
  border-top: 1px solid var(--line);
  padding: 48px 0 64px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.foot-grid {
  display: grid;
  gap: 32px;
}
.site-foot nav {
  display: grid;
  gap: 10px;
  align-content: start;
}
.site-foot p {
  margin: 16px 0 0;
}
@media (min-width: 720px) {
  .foot-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* ---------------------------------------------------------------- pieces */
/* The official App Store badge, unchanged. Apple asks for clear space of a quarter of its height. */
.badge {
  display: inline-block;
  margin: 12px 12px 12px 0;
  border-radius: 9px;
  transition: transform 0.15s ease;
}
.badge img {
  height: 48px;
  width: auto;
}
.badge:hover {
  transform: translateY(-1px);
}
.btn {
  display: inline-block;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: var(--on-accent);
  font: 700 1.0625rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.grad {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* A real screenshot in a plain phone frame. The screenshots are dark, so the frame is dark in both themes. */
.phone {
  width: min(100%, 300px);
  aspect-ratio: 1179 / 2556;
  border: 8px solid var(--frame);
  border-radius: 44px;
  outline: 1px solid var(--line);
  background: #0a0a0a;
  overflow: hidden;
}
.phone img {
  width: 100%;
}
.shot {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #0a0a0a;
  overflow: hidden;
}
.shot img {
  width: 100%;
}

/* ---------------------------------------------------------------- home: hero */
.hero {
  padding: 40px 0 72px;
}
.hero-grid {
  display: grid;
  gap: 40px;
}
.hero h1 {
  font-size: clamp(2.75rem, 8.6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 9.5em;
}
.hero .lead {
  margin: 20px 0 16px;
  max-width: 27em;
}
.hero-art {
  position: relative;
  justify-self: end;
  width: min(74vw, 300px);
  margin-right: 4vw;
}
.hero-pet {
  position: absolute;
  left: -44%;
  bottom: 6%;
  width: 62%;
}
@media (min-width: 860px) {
  .hero {
    padding: 72px 0 112px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
  }
  .hero-art {
    width: 320px;
    margin-right: 24px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-art {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-art {
    animation-delay: 0.12s;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------------------------------------------------------------- sections that pair words with a screenshot */
.section {
  padding: 56px 0;
}
.band {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
  margin: 56px 0;
}
.pair {
  display: grid;
  gap: 32px;
  align-items: center;
}
.pair h2 {
  margin-bottom: 16px;
  max-width: 14em;
}
.pair p {
  max-width: 31em;
}
.pair .art {
  display: grid;
  gap: 16px;
  justify-items: start;
}
.pair .art.two {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
@media (min-width: 720px) {
  .pair {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 64px;
  }
  .pair.wide-art {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .pair .art {
    justify-items: end;
  }
  .pair.flip .art {
    order: -1;
    justify-items: start;
  }
  .pair .art .shot {
    width: 100%;
  }
}
.kicker {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
}
/* A number from a real screenshot, set large. */
.figure {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 4px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.figure img {
  width: clamp(3rem, 9vw, 4.5rem);
  align-self: center;
}
.figure b {
  font-size: clamp(4.5rem, 14vw, 7.5rem);
}
.figure span {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: -0.02em;
  color: var(--muted);
}
.pet-side {
  position: relative;
}
.pet-side .pet {
  position: absolute;
  right: -18%;
  bottom: -4%;
  width: 52%;
}
.stack {
  display: grid;
  gap: 24px;
}
.stack .shot {
  width: 100%;
}
.stack-text {
  display: grid;
  gap: 8px 64px;
}
@media (min-width: 720px) {
  .stack-text {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
  }
}

/* ---------------------------------------------------------------- home: privacy, free and Pro, the close */
.plain {
  max-width: 46rem;
}
.plain h2 {
  margin-bottom: 24px;
}
.says {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}
.says li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.says li span {
  display: block;
  margin-top: 4px;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--muted);
}
.tiers {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}
.tier {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.tier.free {
  background: none;
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.tier h3 {
  margin-bottom: 4px;
}
.tier ul {
  padding-left: 1.1em;
  margin: 16px 0 0;
}
.tier li {
  margin-bottom: 6px;
}
.price {
  margin: 8px 0 0;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.price span {
  display: block;
  margin-top: 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}
@media (min-width: 720px) {
  .tiers {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
  }
}
.close {
  display: grid;
  gap: 24px;
  align-items: end;
  padding-top: 72px;
}
.close h2 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.close img.pet {
  width: min(48vw, 220px);
  justify-self: end;
}
@media (min-width: 720px) {
  .close {
    grid-template-columns: 1fr auto;
  }
}

/* ---------------------------------------------------------------- inner pages */
.page-head {
  padding: 56px 0 24px;
}
.page-head h1 {
  max-width: 13em;
}
.page-head .lead {
  margin: 20px 0 0;
}
@media (min-width: 720px) {
  .page-head {
    padding: 88px 0 40px;
  }
}
.contents {
  list-style: none;
  padding: 24px 0 0;
  margin: 32px 0 0;
  border-top: 1px solid var(--line);
  columns: 2;
  column-gap: 32px;
  counter-reset: c;
  max-width: 46rem;
}
.contents li {
  counter-increment: c;
  break-inside: avoid;
  padding: 5px 0;
}
.contents li::before {
  content: counter(c, decimal-leading-zero);
  display: inline-block;
  width: 2.2em;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
}
.contents a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.contents a:hover {
  color: var(--accent);
}
@media (max-width: 479px) {
  .contents {
    columns: 1;
  }
}
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: middle;
}
.feature {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.feature:first-of-type {
  border-top: 0;
}
.feature.text-only {
  max-width: 46rem;
}
.feature.text-only h2 {
  margin-bottom: 16px;
}

/* a section with no picture, laid out on purpose: the words beside a card that lists what it does (widgets, Apple Watch) */
.spec {
  display: grid;
  gap: 32px;
}
.spec h2 {
  margin-bottom: 16px;
}
.spec p {
  max-width: 31em;
}
.says.boxed {
  margin: 0;
  padding: 6px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.says.boxed li {
  font-size: 1.1875rem;
}
.says.boxed li span {
  font-size: 1rem;
}
.says.boxed li:last-child {
  border-bottom: 0;
}
@media (min-width: 720px) {
  .spec {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 64px;
    align-items: start;
  }
  .spec.flip {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
  .spec.flip .says {
    order: -1;
  }
}

/* steps (Affiliates) */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  counter-reset: s;
  border-top: 1px solid var(--line);
}
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 4px 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(s);
  grid-row: span 2;
  justify-self: start;
  font-size: 3rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.steps p {
  margin: 0;
  color: var(--muted);
}
.split {
  display: grid;
  gap: 40px;
}
@media (min-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 72px;
    align-items: start;
  }
}
.split h2 {
  margin-bottom: 16px;
}
.split h2.gap {
  margin-top: 56px;
}
.feature > h2 {
  margin-bottom: 12px;
}

/* the form */
.form {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.form h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}
/* on a wide screen the form stays in view while the longer column beside it scrolls; only when the window is tall enough to show
   the whole form, so the Send button is never out of reach */
@media (min-width: 1000px) and (min-height: 1100px) {
  .form {
    position: sticky;
    top: 24px;
  }
}
.field {
  margin: 20px 0 0;
  max-width: none;
}
.field label,
.field .label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
}
.req {
  font-weight: 400;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--muted);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.4 var(--font);
}
.field textarea {
  min-height: 9rem;
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-md);
}
.check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  margin: 24px 0;
  max-width: none;
  font-size: 0.9375rem;
}
.check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.hidden {
  display: none;
}

/* a list of facts (Affiliates) */
.facts {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  gap: 2px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}
.facts dd {
  margin: 0;
}
@media (min-width: 560px) {
  .facts div {
    grid-template-columns: 9rem 1fr;
  }
}
.facts.stacked div {
  grid-template-columns: 1fr;
}
.facts.stacked dt {
  color: var(--text);
  font-weight: 700;
}

/* questions (Support) */
.qa {
  border-top: 1px solid var(--line);
}
.qa section {
  display: grid;
  gap: 8px 48px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.qa h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.qa p:last-child,
.qa ol:last-child {
  margin-bottom: 0;
}
.qa ol {
  padding-left: 1.3em;
}
@media (min-width: 860px) {
  .qa section {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }
}

/* a short page: thank you, not found */
.short {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 72px;
}
.short img {
  width: min(60vw, 260px);
}
.short .lead {
  margin: 20px 0 28px;
}
@media (min-width: 720px) {
  .short {
    grid-template-columns: 1fr auto;
    padding-top: 112px;
  }
}

/* ---------------------------------------------------------------- legal documents */
.legal .legal-text {
  max-width: 68ch;
  padding: 56px 0 0;
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  padding-bottom: 28px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--g1), var(--g2)) left bottom / 72px 3px no-repeat;
}
/* the first paragraph of every document is its effective date */
.legal h1 + p {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
}
.legal h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 48px 0 12px;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 8px;
}
.legal blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
}
.legal blockquote p {
  margin: 0;
}
.toc {
  margin: 28px 0 40px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.toc summary {
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 700;
}
.toc[open] summary {
  margin-bottom: 10px;
}
.toc-wide {
  display: none;
}
@media (min-width: 700px) {
  .toc-narrow {
    display: none;
  }
  .toc-wide {
    display: block;
  }
}
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc li {
  margin: 0;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
}
.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}
@media (min-width: 700px) {
  .toc ul {
    columns: 2;
    column-gap: 32px;
  }
  .toc li {
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .badge:hover,
  .btn:hover {
    transform: none;
  }
}
.after {
  margin-top: 24px;
}
