:root {
  --paper: #050505;
  --ink: #eceae3;
  --muted: #a09e96;
  --quiet: #7c7b74;
  --signal: #f5bd26;
  --micro: clamp(12px, .68rem + .08vw, 13px);
  --page-x: clamp(1rem, 1.65vw, 1.5rem);
  --gutter: clamp(.8rem, 1.35vw, 1.5rem);
  --max-width: 112rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--muted);
  font: 400 var(--micro)/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 4px;
}

p {
  margin: 0;
  max-width: 74ch;
  text-wrap: pretty;
  widows: 3;
  orphans: 3;
}

.masthead {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
  min-height: 3.75rem;
  padding: 0 var(--page-x);
  background: linear-gradient(#050505 76%, transparent);
  color: var(--quiet);
  font-size: .92em;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.masthead .wordmark { grid-column: 1 / 4; color: var(--ink); }
.masthead > span:not(.place) { grid-column: 5 / 10; }
.masthead .place { grid-column: 10 / 13; text-align: right; }

.page-shell {
  min-height: 100vh;
  padding: 5.75rem var(--page-x) 3.5rem;
  border: 1px solid #34342f;
  border-radius: 0 0 1.15rem 1.15rem;
}

.opening-spread,
.register {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.portrait-plate {
  grid-column: 1 / 5;
  position: sticky;
  top: 5.75rem;
  width: 100%;
  margin: 0;
}

.portrait-plate img {
  display: block;
  width: 100%;
  height: auto;
  background: #ddd9ce;
}

.portrait-plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: var(--gutter);
  padding-top: .5rem;
  color: var(--quiet);
  font-size: .8em;
  text-transform: uppercase;
  letter-spacing: .075em;
}

.statement {
  grid-column: 5 / 13;
  min-width: 0;
}

.statement article {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  column-gap: var(--gutter);
  scroll-margin-top: 5.5rem;
}

.statement article + article { margin-top: 1rem; }

.statement .key {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gutter);
  color: var(--quiet);
  font-size: .86em;
  text-transform: uppercase;
  letter-spacing: .075em;
}

.statement article > p { grid-column: 3 / 9; }
.statement article:first-child p { color: #c3c1b9; }

.statement strong,
.fields b,
.side-notes a {
  color: var(--ink);
  font-weight: 400;
}

.register {
  margin-top: clamp(5rem, 8vw, 8rem);
  margin-bottom: 3.5rem;
}

.fields { grid-column: 1 / 9; }
.side-notes { grid-column: 10 / 13; }

.register h2 {
  margin: 0 0 .75rem;
  color: var(--quiet);
  font: inherit;
  font-size: .84em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .085em;
}

.fields h2 {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.fields h2 span { grid-column: 2 / 6; }

.fields ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.fields li {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  column-gap: var(--gutter);
  min-height: 1.75rem;
}

.fields li > span { grid-column: 1 / 2; }
.field-line { display: contents; }
.field-line b { grid-column: 2 / 6; }
.field-line small { grid-column: 6 / 9; }

.fields small {
  color: var(--quiet);
  font: inherit;
  font-size: .82em;
  text-transform: uppercase;
  letter-spacing: .065em;
}

.side-notes {
  display: grid;
  align-content: start;
  gap: 2.5rem;
}

.side-notes p { max-width: 30ch; }

.office-link,
.contact-link {
  display: inline-block;
  margin-top: .75rem;
  padding-bottom: .1rem;
  border-bottom: 1px solid var(--quiet);
}

.office-link:hover,
.contact-link:hover,
footer a:hover { color: var(--signal); }

footer {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding: 1rem var(--page-x) 1.2rem;
  color: var(--quiet);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .075em;
}

footer > span { grid-column: 1 / 6; }

footer nav {
  grid-column: 9 / 13;
  display: flex;
  justify-content: space-between;
  gap: var(--gutter);
}

@media (max-width: 900px) {
  .masthead .wordmark { grid-column: 1 / 5; }
  .masthead > span:not(.place) { grid-column: 5 / 13; text-align: right; }
  .masthead .place { display: none; }
  .portrait-plate { grid-column: 1 / 5; }
  .statement { grid-column: 5 / 13; }
  .statement .key { grid-column: 1 / 3; }
  .statement article > p { grid-column: 3 / 9; }
  .fields { grid-column: 1 / 13; }
  .side-notes {
    grid-column: 7 / 13;
    margin-top: 4rem;
  }
  footer nav { grid-column: 7 / 13; }
}

@media (max-width: 760px) {
  .opening-spread { row-gap: 3rem; }
  .portrait-plate {
    grid-column: 1 / 13;
    position: static;
    width: min(100%, 32rem);
  }
  .statement { grid-column: 1 / 13; }
  .statement article {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .statement .key { grid-column: 1 / 3; }
  .statement article > p { grid-column: 3 / 13; }
  .side-notes { grid-column: 1 / 7; }
  footer > span { grid-column: 1 / 7; }
  footer nav { grid-column: 7 / 13; }
}

@media (max-width: 520px) {
  :root { --micro: 12.5px; --page-x: .9rem; --gutter: .65rem; }
  body { letter-spacing: .03em; line-height: 1.54; }
  .masthead { min-height: 3.5rem; }
  .masthead .wordmark { grid-column: 1 / 7; }
  .masthead > span { display: none; }
  .page-shell { padding-top: 5rem; padding-bottom: 2.5rem; border-radius: 0 0 .75rem .75rem; }
  .statement article { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .statement .key {
    grid-column: 1 / 7;
    grid-template-columns: 2.5rem 1fr;
    margin-bottom: .4rem;
  }
  .statement article > p { grid-column: 1 / 7; }
  .statement article + article { margin-top: 1.5rem; }
  .register { margin-top: 4rem; }
  .fields h2 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .fields h2 span { grid-column: 2 / 7; }
  .fields li {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 0;
    margin-bottom: .5rem;
  }
  .fields li > span { grid-column: 1 / 2; }
  .field-line b,
  .field-line small { grid-column: 2 / 7; }
  .side-notes { grid-column: 1 / 13; margin-top: 3rem; }
  .side-notes p { max-width: 34ch; }
  footer > span { display: none; }
  footer nav { grid-column: 1 / 13; }
}

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