:root {
  --paper: #ffffff;
  --ink: #1a1c1e;
  --quiet: #5f676d;
  --faint: #8b9298;
  --rule: #e4e3de;
  --blue: #1d4e6e;

  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;

  --rail-w: 200px;
  --gutter: 40px;
  --measure: 34rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(29,78,110,.3); }
a:hover { border-bottom-color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
  border: 0;
}

.contact { display: flex; align-items: center; gap: 8px; color: var(--faint); }
.contact svg { width: 18px; height: 18px; flex: none; }
.contact a {
  font-family: var(--sans);
  font-size: 13px;
  border: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width .25s ease, opacity .25s ease;
}
.contact:hover a, .contact a:focus-visible { max-width: 15rem; opacity: 1; }

/* ---------- mobile position disclosure ---------- */

.where {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--quiet);
  cursor: pointer;
}
.where svg { width: 11px; height: 8px; transition: transform .2s ease; }
.where[aria-expanded="true"] svg { transform: rotate(180deg); }

.wherelist {
  display: none;
  position: sticky;
  top: 53px;
  z-index: 9;
  margin: 0;
  padding: 14px var(--gutter) 18px;
  list-style: none;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--faint);
}
.wherelist li { padding: 5px 0 5px 22px; position: relative; }
.wherelist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--rule);
}
.wherelist li.on { color: var(--ink); }
.wherelist li.on::before { width: 14px; background: var(--ink); }

/* ---------- frame + rail ---------- */

.frame { display: flex; align-items: flex-start; }

.rail { width: var(--rail-w); flex: none; padding: 72px 0 0 var(--gutter); }
.rail ol {
  position: sticky;
  top: 45vh;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
  transition: color .3s ease;
}
.rail i {
  display: block;
  width: 10px;
  height: 1px;
  flex: none;
  background: var(--rule);
  transition: width .3s ease, background .3s ease;
}
.rail li.on { color: var(--ink); }
.rail li.on i { width: 20px; background: var(--ink); }

/* ---------- column ---------- */

.column { flex: 1; min-width: 0; padding-right: var(--gutter); }

section { max-width: var(--measure); padding: 56px 0; border-bottom: 1px solid var(--rule); }
.opening { padding-top: 72px; }
.coda { border-bottom: 0; padding-bottom: 96px; }

p { margin: 0 0 20px; }
p.last, ul.last { margin-bottom: 0; }
.quiet { color: var(--quiet); }

.lede { font-size: 26px; line-height: 1.42; font-weight: 300; margin-bottom: 28px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}

h2 { font-size: 21px; font-weight: 400; line-height: 1.45; margin: 0 0 26px; }
h3 { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .01em; margin: 40px 0 14px; }
.statement { font-size: 21px; line-height: 1.5; font-weight: 300; margin-bottom: 8px; }

ul { margin: 0 0 20px; padding: 0; list-style: none; }
ul li { position: relative; padding-left: 20px; margin-bottom: 9px; line-height: 1.6; }
ul li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--faint); }

.centred { text-align: center; margin-left: auto; margin-right: auto; }
.portrait { width: 96px; height: 96px; border-radius: 50%; background: #f2f1ec; margin: 0 auto 28px; }

.plate { margin: 0 0 28px; height: 220px; background: #f7f6f2; border-radius: 4px; }

.invitation { margin-top: 44px; padding-left: 22px; border-left: 2px solid var(--rule); }

/* ---------- mobile ---------- */

@media (max-width: 820px) {
  :root { --gutter: 24px; --measure: none; }
  body { font-size: 17px; }
  .rail { display: none; }
  .where { display: flex; }
  .wherelist { display: block; }
  .column { padding-left: var(--gutter); }
  .contact { display: none; }
  .wherelist::after {
    content: "andreas@whatweadd.com";
    display: block;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    font-size: 13px;
    color: var(--blue);
  }
  section { padding: 44px 0; }
  .opening { padding-top: 48px; }
  .lede { font-size: 22px; }
  h2, .statement { font-size: 19px; }
}
