/* The app's own colours: `PageBackground`, `CardSurface` and `AccentColor` in
   Assets.xcassets. Keep them in step — the screenshots sit on this page, and a page
   a shade off its own screenshots looks like a mistake rather than a choice. */

:root {
  --bg: #f6f2ea;
  --card: #fffdf8;
  --ink: #1c1a17;
  --muted: #6b655c;
  --accent: #2266a4;
  --line: rgba(28, 26, 23, 0.10);
  --shadow: 0 18px 50px rgba(28, 26, 23, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --card: #211e1a;
    --ink: #f0ece5;
    --muted: #a39c91;
    --accent: #65a5e0;
    --line: rgba(240, 236, 229, 0.13);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); }

a:hover { text-decoration: none; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-decoration: none;
}

/* The drawing carries no background, so it reads as ink on the paper at both
   appearances — the same reason the app uses it this way. Which of the two files
   that is comes from CSS rather than from a `<picture>`, so that the artwork and
   the palette switch in the same `@media` block. Split across the two mechanisms,
   they can disagree, and dark ink on dark paper is an invisible logo. */
.mark-art {
  display: block;
  width: 58px;
  aspect-ratio: 480 / 290;
  background: url("loop-mark.png") center / contain no-repeat;
}

@media (prefers-color-scheme: dark) {
  .mark-art { background-image: url("loop-mark-dark.png"); }
}

/* Home: hero */

header {
  padding: 72px 0 56px;
  text-align: center;
}

/* Stacked in the hero, so the drawing reads as the logo rather than as an
   oversized bullet beside the name. */
header .mark {
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
  color: var(--ink);
  font-size: 1.0625rem;
}

header .mark-art { width: 128px; }

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 15ch;
}

.lede {
  font-size: clamp(1.0625rem, 2.4vw, 1.3125rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 36px;
}

.badge img {
  display: block;
  margin: 0 auto;
  height: 54px;
  width: auto;
}

/* Home: screens */

.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 24px 0 72px;
}

figure { margin: 0; }

figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
}

figcaption {
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
  margin-top: 16px;
}

/* Home: points */

.points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding-bottom: 40px;
}

.point {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
}

.point h2 {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.point p {
  margin: 0;
  color: var(--muted);
}

.asides {
  padding-bottom: 80px;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 62ch;
}

.asides p { margin: 0 0 12px; }

.asides strong { color: var(--ink); font-weight: 600; }

/* Legal pages */

.doc {
  padding: 48px 0 24px;
}

.doc .mark { margin-bottom: 44px; }

.prose {
  max-width: 68ch;
  padding-bottom: 72px;
}

.prose h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 8px;
  max-width: none;
  text-align: left;
}

.prose .updated {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0 0 40px;
}

.prose h2 {
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 40px 0 10px;
}

.prose p, .prose li { color: var(--muted); }

.prose p { margin: 0 0 14px; }

.prose ul { margin: 0 0 14px; padding-left: 22px; }

.prose li { margin-bottom: 6px; }

.prose strong { color: var(--ink); font-weight: 600; }

/* Footer */

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 56px;
  color: var(--muted);
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

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

@media (max-width: 820px) {
  .screens { grid-template-columns: 1fr; gap: 48px; max-width: 380px; margin: 0 auto; }
  .points { grid-template-columns: 1fr; }
  header { padding: 56px 0 44px; }
  footer { justify-content: flex-start; }
}
