/* MBI: the minimal site. Palette and type from the animation lab (animations/kit/lab.css). */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/source-sans-3-normal-300-800.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fonts/source-serif-4-normal-300-700.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(fonts/source-serif-4-italic-300-700.woff2) format("woff2"); }

:root {
  --ink: #17191b;
  --paper: #f4f4f2;
  --accent: #2f5bd3;
  --label-font: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  --text-font: "Source Serif 4", Georgia, serif;
  --muted: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --rule: color-mix(in srgb, var(--ink) 16%, var(--paper));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #e6e4df; --paper: #141618; --accent: #86a4f2; color-scheme: dark; }
}
:root[data-theme="dark"] { --ink: #e6e4df; --paper: #141618; --accent: #86a4f2; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; background: var(--paper); font: 18px/1.6 var(--text-font); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.page { max-width: 760px; margin: 0 auto; padding: 56px 24px 72px; min-height: 100vh; display: flex; flex-direction: column; }
.mark { display: block; width: 132px; height: auto; color: var(--ink); margin: 0 0 88px; }
.mark svg { display: block; width: 100%; height: auto; }

h1 { font: 400 34px/1.28 var(--text-font); letter-spacing: -0.008em; margin: 0 0 28px; max-width: 30ch; }
.lede { max-width: 620px; margin: 0 0 56px; }

.section { border-top: 1px solid var(--rule); padding-top: 20px; margin: 0 0 48px; display: grid; grid-template-columns: 180px 1fr; gap: 8px 32px; }
.section h2 { font: 600 14px/1.6 var(--label-font); color: var(--muted); margin: 3px 0 0; letter-spacing: 0.01em; }
.section p { margin: 0 0 0.8em; }
.section ul { list-style: none; margin: 0; padding: 0; }
.section li { padding: 2px 0; }

.contact p { margin: 0 0 0.6em; }
.contact .email { font-size: 22px; }

footer { margin-top: auto; padding-top: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 14px/1.5 var(--label-font); color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .page { padding: 32px 16px 48px; }
  .mark { width: 104px; margin-bottom: 56px; }
  h1 { font-size: 27px; }
  .section { grid-template-columns: 1fr; gap: 6px; }
}

.contact { margin-bottom: 72px; }
.section .work li { padding: 0 0 14px; }
.section .work li:last-child { padding-bottom: 0; }
.work b { display: block; font-weight: 600; }
.work span { display: block; color: color-mix(in srgb, var(--ink) 78%, var(--paper)); }

/* the work as a numbered stack */
.section ol { list-style: none; margin: 0; padding: 0; }
.work--numbered li { display: grid; grid-template-columns: 2.2em 1fr; column-gap: 0.6em; padding: 0 0 16px; }
.work--numbered li:last-child { padding-bottom: 0; }
.work--numbered i { grid-row: span 2; font: 500 14px/1.9 var(--label-font); font-style: normal; font-variant-numeric: tabular-nums; color: var(--muted); }

/* copy v2: eyebrow, calls to action */
html { scroll-behavior: smooth; }
.eyebrow { font: 600 13px/1.4 var(--label-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.lede { margin-bottom: 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 64px; }
.cta { display: inline-block; font: 600 15px/1 var(--label-font); padding: 13px 20px; border-radius: 3px; background: var(--ink); color: var(--paper); text-decoration: none; }
.cta:hover { background: var(--accent); color: var(--paper); }
.cta--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.cta--quiet:hover { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.contact .email { font-size: 22px; margin: 0; }
.copied { font: 500 14px/1 var(--label-font); color: var(--muted); margin-left: 10px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* header: the mark, and the one link to the other page */
header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin: 0 0 88px; }
header .mark { margin: 0; }
.nav { font: 600 15px/1.6 var(--label-font); margin-top: 2px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { header { margin-bottom: 56px; } .nav { margin-top: 0; } }

/* get in touch: the contact form */
button.cta { border: 0; cursor: pointer; }
button.cta:disabled { opacity: 0.6; cursor: default; }
.cta-row--tight { margin: 20px 0 0; }
.signup { display: grid; gap: 14px; margin: 0; max-width: 460px; }
.signup[hidden], .signup-thanks[hidden], .cta-row[hidden] { display: none; }
.signup label span { display: block; font: 600 14px/1.5 var(--label-font); color: var(--muted); margin-bottom: 4px; }
.signup label em { font-style: normal; font-weight: 400; }
.signup input, .signup textarea, .signup select { width: 100%; font: 17px/1.4 var(--text-font); color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: 10px 12px; }
.signup input:focus, .signup textarea:focus, .signup select:focus { outline: none; border-color: var(--accent); }
.signup textarea { resize: vertical; }
.signup select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.aside { font: 15px/1.5 var(--label-font); color: var(--muted); margin: 20px 0 0; }
.signup .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 6px 0 0; }
.signup-status { font: 14px/1.5 var(--label-font); color: var(--muted); }
.signup-thanks { font-size: 22px; margin: 20px 0 0; }
.signup-thanks:focus { outline: none; }

/* phones: the email address is one long word; keep it inside the column */
@media (max-width: 640px) { .contact .email { font-size: 18px; } }
.contact .email a, .section p a[href^="mailto:"] { overflow-wrap: anywhere; }

/* home: the Hopfield recall as a faint fixed background, driven by scroll (scroll.js sets its ink:
   very faint at the top, deepening towards the end). The page runs on past the text, so at the end
   of the scroll the settled mark sits in the space below it, above the footer. */
.bg { position: fixed; inset: 0; z-index: 0; opacity: 0.035; pointer-events: none; }
.bg ~ .page { position: relative; z-index: 1; }
.bg ~ .page main { padding-bottom: 46vh; }
@media (prefers-color-scheme: dark) { .bg { opacity: 0.0525; } }
.lede + .section { margin-top: 48px; }
