/* Pink Granite Data: one stylesheet for the three pages.
   Type: the serif the site has always used for display, the system sans for
   text, on a 1.25 scale from 17px (17, 21, 27, 34, 42, 53). Space: an 8px
   grid. Colour: paper, ink, and one granite accent; a dark scheme with the
   same roles. tools/make-images.py reads the same palette values. */

:root {
  color-scheme: light dark;
  --paper: #fbfaf8;
  --panel: #f3f0ec;
  --ink: #1c1f23;
  --body: #4a5058;
  --muted: #5f6670;         /* 5.6:1 on paper */
  --line: #ddd8d2;
  --granite: #b4707a;       /* the mark; not used for text on paper (3.6:1) */
  --granite-deep: #8d525c;  /* links and the button: 5.8:1 on paper */
  --on-accent: #fbfaf8;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", Charter, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17191c;
    --panel: #1f2226;
    --ink: #f3f0ec;
    --body: #c9c5bf;        /* 10.3:1 */
    --muted: #a39e97;       /* 6.6:1 */
    --line: #33373c;
    --granite: #b4707a;
    --granite-deep: #d9a2aa; /* 8.1:1 on the dark paper */
    --on-accent: #17191c;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--granite-deep); text-underline-offset: 2px; }

:focus-visible {
  outline: 2px solid var(--granite-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font: 0.92em var(--mono);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  z-index: 10;
  text-decoration: none;
}
.skip:focus { left: 8px; top: 8px; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Inline links in running text keep their place in the line but get a
   44px-tall hit box: padding on an inline box is clickable without moving
   the lines around it. */
main p a, main dd a { padding: 12px 0; }

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

.masthead { border-bottom: 1px solid var(--line); }

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font: 600 17px/44px var(--sans);
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.brand i {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--granite);
  margin-right: 10px;
}

.masthead nav {
  font-size: 15px;
  display: flex;
  gap: 0 24px;
  flex-wrap: wrap;
}

.masthead nav a {
  color: var(--muted);
  text-decoration: none;
  line-height: 44px;
  display: inline-block;
  padding: 0 8px;     /* a 44px-wide hit box for a short word like "Work" */
  margin: 0 -8px;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] { color: var(--ink); }

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

header.hero { padding: 80px 0 72px; }

h1 {
  font: 400 clamp(34px, 4.8vw, 53px)/1.14 var(--serif);
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 0 0 24px;
  max-width: 22ch;
  text-wrap: balance;
}

.hero .lede {
  font-size: 21px;
  line-height: 1.5;
  max-width: 56ch;
  margin: 0 0 32px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 0;
}

.cta {
  display: inline-block;
  padding: 12px 20px;
  background: var(--granite-deep);
  color: var(--on-accent);
  border-radius: 3px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
}
.cta:hover { background: var(--ink); color: var(--paper); }

.quiet {
  display: inline-block;
  line-height: 44px;
  font-weight: 500;
}

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

section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

h2 {
  font: 600 13px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 40px;
}

h3 {
  font: 600 21px/1.3 var(--sans);
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

p { margin: 0 0 16px; max-width: 66ch; }
p:last-child { margin-bottom: 0; }

/* ---------- services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px 48px;
}

.services .item {
  padding-top: 16px;
  border-top: 2px solid var(--granite);
}

/* ---------- capabilities ---------- */

.caps {
  display: grid;
  grid-template-columns: 200px 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
}

.caps dt {
  font: 600 15px/1.6 var(--sans);
  color: var(--ink);
  padding: 16px 24px 16px 0;
  border-bottom: 1px solid var(--line);
}

.caps dd {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- approach, work ---------- */

.panel {
  background: var(--panel);
  padding: 32px 40px;
  border-left: 3px solid var(--granite);
}

.panel p { max-width: 66ch; }

.lede-sub { color: var(--muted); margin-bottom: 24px; }

/* ---------- contact ---------- */

.contact .note {
  margin-top: 24px;
  font-size: 15px;
  color: var(--muted);
}

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

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

footer span a { padding: 13px 0; }

footer nav { display: flex; gap: 0 24px; flex-wrap: wrap; }
footer nav a { display: inline-block; line-height: 44px; padding: 0 8px; margin: 0 -8px; }

/* ---------- prose pages (privacy) ---------- */

.prose { padding-top: 64px; padding-bottom: 80px; }
.prose h1 { max-width: 20ch; margin-bottom: 8px; }
.prose .dateline { color: var(--muted); font-size: 15px; margin-bottom: 48px; }
.prose h2 {
  font: 400 27px/1.25 var(--serif);
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--ink);
  margin: 48px 0 12px;
}
.prose ul { max-width: 66ch; padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }

/* ---------- 404 ---------- */

.missing { padding-top: 120px; padding-bottom: 160px; }
.missing h1 { margin-bottom: 24px; }

/* ---------- the phone bar ---------- */

/* Shown by site.js on narrow screens while neither "Message on LinkedIn"
   button is in view; hidden again the moment one is. */
.phone-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  z-index: 5;
}
.phone-bar .cta { display: block; text-align: center; }
body.has-phone-bar { padding-bottom: 80px; }

@media (max-width: 620px) {
  .phone-bar.is-visible { display: block; }
  .wrap { padding: 0 20px; }
  header.hero { padding: 56px 0 48px; }
  section { padding: 48px 0; }
  .hero .lede { font-size: 19px; }
  .caps { grid-template-columns: 1fr; }
  .caps dt { padding-bottom: 0; border-bottom: 0; }
  .caps dd { padding-top: 4px; }
  .panel { padding: 24px; }
  .missing { padding-top: 72px; padding-bottom: 96px; }
  .prose { padding-top: 40px; padding-bottom: 64px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .masthead nav, .phone-bar, .skip { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; }
}
