/* Paperbark, per DESIGN.md: paper canvas, heartwood ink, one leaf accent, no shadows.
   Light values are the Paperbark appearance, dark values are Heartwood. */
:root {
  --sheet: #f5f2f0;
  --sheet-deep: #ece6e1;
  --paper: #ffffff;
  --bark: #d9cfc7;
  --bark-deep: #8f8178;
  --ink: #2a211c;
  --ink-muted: #6b5f58;
  --leaf: #566e52;
  --leaf-pressed: #3f5340;
  --on-leaf: #ffffff;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --measure: 64ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sheet: #1c1917;
    --sheet-deep: #161311;
    --paper: #262220;
    --bark: #423b36;
    --bark-deep: #7a6f66;
    --ink: #e2dad3;
    --ink-muted: #b3a79e;
    --leaf: #a9c1a0;
    --leaf-pressed: #c9dbc1;
    --on-leaf: #1c1917;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  font-synthesis-weight: none;
}

a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--leaf-pressed); }
img { max-width: 100%; height: auto; display: block; }

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

/* Header: one line, mark plus three links. */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  border-bottom: 1px solid var(--bark);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand span { font: 600 19px/1 var(--display); font-variation-settings: "opsz" 24; letter-spacing: -0.3px; }
.masthead nav { display: flex; gap: 22px; font-size: 15px; }
.masthead nav a { color: var(--ink-muted); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--ink); }

/* Hero: copy left, a real screen right. Collapses to one column under 860px. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 72px;
  align-items: center;
  padding: 56px 0 80px;
}
h1 {
  font: 600 clamp(36px, 4.6vw, 54px)/1.06 var(--display);
  font-variation-settings: "opsz" 48;
  letter-spacing: -1.1px;
  margin: 0 0 20px;
  max-width: 15ch;
}
.lede { font-size: 18px; color: var(--ink-muted); margin: 0 0 32px; max-width: 44ch; }

figure { margin: 0; }

/* A phone, drawn around the real screenshot: titanium rail, 19.5:9 screen, dynamic island.
   The screen radius is the iPhone's 2.5:1 continuous curve approximated with a single radius. */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 620 / 1348;
  padding: 10px;
  border-radius: 52px;
  background: linear-gradient(150deg, #cfcac4 0%, #8d867f 22%, #f1eeea 46%, #7d7670 72%, #c6c0b9 100%);
  isolation: isolate;
}
.phone::before {
  /* the black gap between the rail and the glass */
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 46px;
  background: #0d0b0a;
}
.phone img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 42px;
  display: block;
}
.phone .island {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: 26px;
  border-radius: 999px;
  background: #0d0b0a;
  z-index: 2;
}
/* Side buttons, on the rail itself. */
.phone .btn-side, .phone .btn-vol {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #b4ada6, #6f6862);
}
.phone .btn-side { right: -2px; top: 26%; height: 11%; }
.phone .btn-vol { left: -2px; top: 20%; height: 6.5%; box-shadow: 0 46px 0 #8d867f, 0 92px 0 #8d867f; }

.btn {
  display: inline-block;
  background: var(--leaf);
  color: var(--on-leaf);
  font: 600 16px/1 var(--body);
  padding: 15px 26px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 160ms ease;
}
.btn:hover { background: var(--leaf-pressed); color: var(--on-leaf); }

/* What it does: one screen beside a divided list. No cards, no stretched cells. */
.feature {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  padding: 8px 0 16px;
}
.feature-list > div { padding: 26px 0; border-top: 1px solid var(--bark); }
.feature-list > div:first-child { border-top: 0; padding-top: 0; }
.feature-list h2 { font: 600 21px/1.25 var(--body); margin: 0 0 8px; }
.feature-list p { margin: 0; color: var(--ink-muted); font-size: 16px; max-width: 52ch; }

/* The data promise: a tinted band, type only. */
.band { background: var(--sheet-deep); border-top: 1px solid var(--bark); border-bottom: 1px solid var(--bark); margin-top: 96px; padding: 80px 0; }
.band h2 { font: 600 clamp(28px, 3.4vw, 38px)/1.15 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -0.7px; margin: 0 0 24px; max-width: 20ch; }
.band-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; max-width: 900px; }
.band-cols p { margin: 0; color: var(--ink-muted); }

.close { padding: 88px 0 96px; }
.close h2 { font: 600 clamp(26px, 3vw, 34px)/1.15 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -0.6px; margin: 0 0 12px; }
.close p { color: var(--ink-muted); max-width: var(--measure); margin: 0 0 28px; }

/* Legal and support pages: contents rail plus a measured column. */
.doc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 64px; padding: 72px 0 112px; align-items: start; }
.toc { position: sticky; top: 32px; font-size: 15px; }
.toc p { margin: 0 0 12px; color: var(--ink); font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--bark); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-muted); text-decoration: none; }
.toc li a:hover { color: var(--ink); border-left-color: var(--leaf); }

.doc article { max-width: var(--measure); }
.doc h1 { font-size: clamp(34px, 4.4vw, 46px); max-width: 18ch; margin-bottom: 10px; }
.stamp { color: var(--ink-muted); font-size: 15px; margin: 0 0 36px; }
.doc h2 { font: 600 22px/1.3 var(--body); margin: 44px 0 10px; scroll-margin-top: 32px; }
.doc h2:first-of-type { margin-top: 32px; }
.doc p, .doc li { color: var(--ink-muted); }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .first { font-size: 19px; color: var(--ink); }

.foot { border-top: 1px solid var(--bark); padding: 32px 0 48px; font-size: 15px; color: var(--ink-muted); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--ink-muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 56px; }
  .hero figure, .feature figure { max-width: 262px; }
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .band-cols { grid-template-columns: 1fr; gap: 24px; }
  .band { margin-top: 64px; padding: 56px 0; }
  .doc { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 80px; }
  .toc { position: static; }
  .close { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
