:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #1d1c1a;
  --muted: #6b675f;
  --rule: #e4dfd5;
  --accent: #b1602a;
  --accent-soft: #f3e6dc;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151412;
    --card: #1e1c1a;
    --ink: #f1ede6;
    --muted: #a39d92;
    --rule: #33302b;
    --accent: #e08a4f;
    --accent-soft: #2e2219;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  padding: 1.5rem 0;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.wordmark .mm {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: var(--accent);
}

/* Hero, with a 20 mm ruler under the headline */

.hero {
  padding: 3.5rem 0 3rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.hero p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.ruler {
  display: block;
  width: 12rem;
  max-width: 60%;
  height: auto;
  margin: 0 0 1.75rem;
  color: var(--accent);
}

/* Sections */

section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}

section h2 {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* A product: its description, then links, beside a screenshot in a phone
   frame. On narrow screens they stack in page order: description,
   screenshot, links. */

.product {
  display: grid;
  grid-template-columns: 1fr 12.5rem;
  gap: 0.9rem 2rem;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

/* Wide: the phone takes the right column for both rows; the description
   sits at the bottom of the top row and the links at the top of the one
   below, so together they're centered beside the phone. */
.product .phone {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.product-info {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.product .links {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin-top: 0;
}

.product-name {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.product-name img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  border: 1px solid var(--rule);
}

.product h3 {
  margin: 0;
  font-size: 1.4rem;
}

.product p {
  margin: 0 0 0.9rem;
}

/* The screenshot is a full phone screen (the proportions of a real phone), in
   a phone body: black on the light theme, white on the dark one, so it
   stands out from the background either way. */
.phone {
  margin: 0;
  padding: 7px;
  background: #1d1c1a;
  border-radius: 32px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.14);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 25px;
}

@media (prefers-color-scheme: dark) {
  .phone {
    background: #f4f1ea;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }

  /* The screen's top is white too: a faint edge keeps it apart from the body. */
  .phone img {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  }
}

@media (max-width: 40rem) {
  .product {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* One column, in page order: description, phone, links. */
  .product .phone,
  .product-info,
  .product .links {
    grid-column: 1;
    grid-row: auto;
  }

  .product .phone {
    width: min(13rem, 70%);
    margin: 0 auto;
  }

  .product .links {
    justify-content: center;
  }
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

/* Long-form pages (privacy policy) */

.doc {
  padding: 2rem 0 3rem;
}

.doc h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc .meta {
  margin: 0 0 2rem;
  color: var(--muted);
}

.doc h2 {
  margin: 2.25rem 0 0.6rem;
  font-size: 1.2rem;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li {
  margin: 0.35rem 0;
}

.summary {
  padding: 1.1rem 1.25rem;
  background: var(--accent-soft);
  border-radius: 12px;
}

.summary p {
  margin: 0;
}

/* Footer */

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
