/* ApexScience: minimal, monospace, black and white. Light or dark follows the visitor's
   system setting. */

:root {
  --bg: #f7f7f7;
  --ink: #0a0a0a;
  --dim: rgba(10, 10, 10, 0.5);
  --line: rgba(10, 10, 10, 0.14);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --ink: #f7f7f7;
    --dim: rgba(247, 247, 247, 0.5);
    --line: rgba(247, 247, 247, 0.16);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 var(--mono);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, header, footer {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* Header: the small wordmark, linking home. */
header { padding-top: 28px; }
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
}
.caret { width: 14px; height: 9px; flex: none; }
.caret path { fill: none; stroke: currentColor; stroke-width: 3; }

main { flex: 1; padding-top: 72px; padding-bottom: 72px; }

/* Home: the big wordmark. */
.hero { padding-top: 12vh; }
.wordmark { font-size: clamp(44px, 12vw, 84px); font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
.wordmark .caret { width: 0.5em; height: 0.32em; display: block; margin-bottom: 0.45em; }
.wordmark .caret path { stroke-width: 3; }
.wordmark span { display: block; }
.wordmark .second { color: var(--dim); }

h1 { font-size: 26px; line-height: 1.3; font-weight: 600; margin: 0 0 8px; }
h2 { font-size: 15px; font-weight: 600; margin: 40px 0 8px; text-transform: uppercase; letter-spacing: 0.08em; }
p, ul { margin: 0 0 16px; }
ul { padding-left: 1.2em; }
li { margin-bottom: 6px; }

.dim { color: var(--dim); }
.lede { font-size: 17px; margin-top: 28px; max-width: 34em; }

/* Lists of links, set as rows with rules. */
.rows { list-style: none; padding: 0; margin: 32px 0; border-top: 1px solid var(--line); }
.rows li { margin: 0; border-bottom: 1px solid var(--line); }
.rows a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; text-decoration: none; }
.rows a:hover .arrow { transform: translateX(3px); }
.arrow { transition: transform 0.15s ease; }

/* Screenshots: a row that scrolls sideways on narrow screens. */
.shots {
  display: flex;
  gap: 16px;
  margin: 32px -20px;
  padding: 0 20px 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Snap to the gutter, not the edge, so the first screenshot keeps its space on the left. */
  scroll-padding-inline: 20px;
  scrollbar-width: thin;
}
.shots figure { margin: 0; flex: none; width: 200px; scroll-snap-align: start; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
}
.shots .watch { align-self: flex-start; }
.shots .watch img { border-radius: 36px; }
.shots figcaption { font-size: 13px; color: var(--dim); margin-top: 10px; }

.app-icon { width: 88px; height: 88px; border-radius: 20px; display: block; margin-bottom: 24px; }

footer { padding-bottom: 28px; font-size: 13px; color: var(--dim); display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: inherit; }

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