/* Running with It — shared styles.
 *
 * Committed to one visual world rather than following the viewer's theme: the
 * app is an OLED watch app that lives on black, every screenshot is black, and
 * a light page would turn them into floating rectangles needing frames. So the
 * page is black too and the screenshots sit in it without decoration.
 *
 * Every colour below is lifted from the app itself, where they were measured
 * rather than picked — each one normalised to roughly the same perceived
 * luminance so it reads at a glance on a 162 pt screen in sunlight. Using them
 * here means the site and the thing it describes agree.
 */

/* Fonts are served from our own site, never from Google, so a visit sends
   nothing to a third party. All three are under the SIL Open Font License;
   the license texts sit beside the files in fonts/. Archivo and Source Sans 3
   are variable fonts: one file covers every weight used here. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --black: #000000;
  --surface: #0E0F12;
  --surface-lift: #16181D;
  --line: #24272E;

  --text: #F2F3F5;
  --text-dim: #A2A7B0;
  --text-faint: #6E737D;

  /* Straight from the app. */
  --quick-start: #7060E0;   /* the primary action */
  --distance: #3BB2EC;
  --time: #44B987;
  --work: #E69138;          /* a work interval, and a slower split */
  --rest: #D582FF;
  --stop: #DB3A34;          /* spent only on End */

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--distance); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--quick-start); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

/* ---------- masthead ---------- */

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 11px;
}
/* The Peaklio company mark. Plain text, not a link: peaklio.com is out of scope. */
.wordmark img { width: 36px; height: 36px; flex: none; }
.mast nav { display: flex; gap: 22px; font-size: 15px; }
.mast nav a { color: var(--text-dim); text-decoration: none; }
.mast nav a:hover { color: var(--text); }

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

/* Two columns on desktop: words left, the watch right. On phones the watch
   stacks under the words, so the headline is the first thing read. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
  padding: 72px 0 80px;
}
/* The app's name, set apart from the headline by a white block. */
.brand { margin: 0 0 30px; }
.brand span {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1;
  color: #000;
  background: var(--text);
  padding: 10px 16px 12px;
  border-radius: 8px;
}
@media (max-width: 560px) {
  .brand { margin-bottom: 24px; }
}
.hero h1 {
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.02;
  max-width: 15ch;
}
.hero-sub {
  margin: 24px 0 0;
  font-size: clamp(18px, 2vw, 20px);
  color: var(--text-dim);
  max-width: 40ch;
}

/* The one action. Before approval it's a label, not a link; on launch day it
   becomes Apple's official badge (see Later.md). Reused at the end of the page. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 0;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.store::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--time);
  box-shadow: 0 0 0 4px rgb(68 185 135 / 0.18);
  flex: none;
}

/* Apple's frame on top, the real screenshot underneath. Percentages come from
   the frame art: opening at (99, 213), 422×514, in a 620×940 image. */
.watch {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 620 / 940;
  isolation: isolate;
}
/* A soft glow in the app's own Quick Start purple, so the black watch
   doesn't sink into the black page. */
.hero .watch::before {
  content: "";
  position: absolute;
  inset: 12% -18%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(112 96 224 / 0.32), rgb(112 96 224 / 0) 100%);
  filter: blur(8px);
}
.watch img { position: absolute; display: block; }
.watch-screen {
  left: 15.968%;  /*  99 / 620 */
  top: 22.660%;   /* 213 / 940 */
  width: 68.065%; /* 422 / 620 */
  height: 54.681%;/* 514 / 940 */
}
.watch-frame { inset: 0; width: 100%; height: 100%; }

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 0 56px;
  }
  .watch { max-width: 260px; }
}

/* ---------- three framed screenshots ---------- */

/* Three across on desktop; stacked on phones (no sideways scroller). */
.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 64px 0 72px;
}
.trio figure { margin: 0; text-align: center; }
.trio .watch { max-width: 260px; }
.trio figcaption {
  margin: 18px auto 0;
  max-width: 24ch;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
@media (max-width: 680px) {
  .trio { grid-template-columns: 1fr; gap: 48px; padding: 48px 0 56px; }
  .trio .watch { max-width: 230px; }
}

/* ---------- sections ---------- */

section { padding: 56px 0; border-top: 1px solid var(--line); }
section > h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  margin-bottom: 8px;
}
section > .lede { color: var(--text-dim); max-width: 58ch; margin: 0 0 32px; }


/* ---------- the negative list ---------- */

/* "Your runs stay yours." as the title, then the four claims in a 2×2 grid,
   each a bold line with the dry proof under it. One column on phones. */
.nots > h2 {
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 36px;
}
.nots ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
.nots li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
}
.nots b {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
}
.nots span { font-size: 17px; color: var(--text-dim); max-width: 36ch; }
@media (max-width: 680px) {
  .nots ul { grid-template-columns: 1fr; }
  .nots li { padding: 20px 0 22px; }
}

/* ---------- support ---------- */

.contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 13px 20px;
  background: var(--surface-lift);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
}
.contact:hover { border-color: var(--quick-start); color: var(--text); }

/* ---------- closing ---------- */

/* The page ends the way it began: the name, and the one action. */
.closing {
  text-align: center;
  padding: 80px 0 88px;
}
.closing .brand { margin: 0; }
.closing .store { margin-top: 28px; }
@media (max-width: 560px) {
  .closing { padding: 56px 0 64px; }
}

/* ---------- policy ---------- */

.policy { padding: 56px 0 24px; max-width: 68ch; }
.policy h1 { font-size: clamp(30px, 4.4vw, 42px); }
.policy .updated {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 10px;
}
.policy h2 {
  font-size: 21px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.policy p, .policy li { color: var(--text-dim); }
.policy strong { color: var(--text); font-weight: 600; }
.policy ul { padding-left: 20px; }
.policy li { margin: 7px 0; }
.policy li::marker { color: var(--quick-start); }

/* Support page questions: the question in white, the answer under it. */
.faq h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 30px 0 6px;
}
.faq h3:first-child { margin-top: 18px; }
.faq p { margin: 0; }
.policy .contact { margin: 4px 0 6px; }

.lead-answer {
  margin: 26px 0 0;
  padding: 20px 22px;
  background: var(--surface);
  border-left: 3px solid var(--time);
  border-radius: 0 10px 10px 0;
  font-size: 18px;
  color: var(--text);
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 56px;
  color: var(--text-faint);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
}
footer > div { display: flex; flex-direction: column; gap: 4px; }
footer .foot-links { align-items: flex-end; text-align: right; }
@media (max-width: 560px) {
  footer { flex-direction: column; gap: 18px; }
  footer .foot-links { align-items: flex-start; text-align: left; }
}
footer a { color: var(--text-dim); text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  section { padding: 44px 0; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
