/* The Quiet Wall: base system. White wall, paper gray, near-black ink, one small red mark. */
:root {
  --white: #ffffff;
  --paper: #f3f1ec;
  --paper-2: #e8e5dd;
  --rule: #dcd8ce;
  --ink: #121212;
  --ink-2: #4f4b45;
  --ink-3: #66625a;
  --accent: #f0050e;
  --rail: 220px;
  --vh: 100svh;
  --gut: clamp(28px, 4.4vw, 72px);
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --lift: 0 1px 1px rgba(18, 18, 18, .05), 0 14px 34px -16px rgba(18, 18, 18, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  padding-left: var(--rail);
  background-color: var(--white);
  /* the single hairline that separates the rail from the wall */
  background-image: linear-gradient(to right, transparent calc(var(--rail) - 1px), var(--rule) calc(var(--rail) - 1px), var(--rule) var(--rail), transparent var(--rail));
  color: var(--ink);
  font: 400 18px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; background-color: #f1efea; }
@view-transition { navigation: auto; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
main { animation: pageIn .25s ease backwards; }
::view-transition-group(*) { animation-duration: .8s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; }
a { color: inherit; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
[id] { scroll-margin-top: 28px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: #fff; }

.nb { white-space: nowrap; }
.skip {
  position: absolute; left: 12px; top: -72px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px;
  font: 500 15px/1.2 var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- the rail ---------- */
.rail {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: var(--rail); height: min(var(--vh), 1000px);
  padding: 38px 12px 30px 34px;
  display: flex; flex-direction: column;
}
.wordmark {
  display: inline-block; align-self: flex-start;
  font: 500 30px/1 var(--serif); letter-spacing: -.012em;
  text-decoration: none; color: var(--ink);
}
.menu-btn { display: none; }
.rail-menu { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; }
.rail nav ul { list-style: none; padding: 0; margin: 48px 0 0; }
.rail nav a {
  position: relative;
  padding: 0 0 0 20px; min-height: 44px; display: flex; align-items: center;
  font: 500 17px/1.3 var(--sans); letter-spacing: .005em;
  color: var(--ink-2); text-decoration: none;
}
.rail nav a:hover { color: var(--ink); }
.rail nav a[aria-current="page"] { color: var(--ink); }
.rail nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--accent);
}
.rail-foot { font: 400 15px/1.4 var(--sans); overflow-wrap: anywhere; color: var(--ink-2); }
.rail-foot a {
  text-decoration: underline; text-decoration-color: var(--rule);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
  display: inline-block; padding: 8px 0;
}
.rail-foot a:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- footer ---------- */
.site-foot {
  margin: clamp(88px, 9vw, 150px) var(--gut) 0;
  padding: 26px 0 40px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 40px;
  font: 400 16px/1.6 var(--sans); color: var(--ink-2);
}
.site-foot a { display: inline-block; padding: 8px 0; text-underline-offset: 5px; text-decoration-color: var(--rule); text-decoration-thickness: 1px; }
.site-foot a:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- shared bits ---------- */
.eyebrow {
  font: 500 15px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}
.link {
  display: inline-flex; align-items: center; gap: .55em;
  min-height: 44px; padding: 6px 0;
  font: 500 17px/1.3 var(--sans); color: var(--ink); text-decoration: none;
}
.link span:first-child {
  border-bottom: 1px solid var(--ink-3); padding-bottom: 2px;
  transition: border-color .3s ease;
}
.link:hover span:first-child { border-bottom-color: var(--ink); }
.link .arr { transition: transform .35s ease; }
.link:hover .arr { transform: translateX(4px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font: 500 16px/1 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  border-radius: 0;
}
.btn:hover { background: #000; }
.status-line {
  display: inline-flex; align-items: flex-start; gap: 12px;
  font: 400 16px/1.5 var(--sans); color: var(--ink-2);
}
.status-line::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: .6em; border-radius: 50%; background: var(--accent);
}
.tile-cap { font: 400 15px/1.45 var(--sans); color: var(--ink-3); margin-top: 10px; }

/* ---------- phone: slim top bar and a full-screen list ---------- */
@media (max-width: 900px) {
  :root { --gut: 22px; }
  body { padding-left: 0; background-image: none; font-size: 18px; }
  .rail {
    position: static; width: auto; height: auto;
    padding: 14px var(--gut) 8px;
    flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 4px 20px; border-bottom: 1px solid var(--rule);
  }
  .rail-menu { flex-basis: 100%; }
  .rail nav ul { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
  .rail nav a { padding: 10px 0; }
  .rail nav a[aria-current="page"]::before { display: none; }
  .rail nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
  .rail-foot { display: none; }

  .js body { padding-top: 58px; }
  .js .rail {
    position: fixed; left: 0; right: 0; top: 0; width: 100%; height: 58px;
    padding: 0 6px 0 var(--gut); flex-wrap: nowrap; background: var(--white); z-index: 60;
  }
  .js .wordmark { font-size: 25px; align-self: center; line-height: 1.1; }
  .js .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 76px; min-height: 52px; padding: 0 16px;
    background: none; border: 0; cursor: pointer; color: var(--ink);
    font: 500 16px/1 var(--sans); letter-spacing: .01em;
  }
  .js .rail-menu {
    display: none; position: fixed; left: 0; right: 0; top: 58px; bottom: 0;
    padding: 12px var(--gut) 28px; background: var(--white); z-index: 55;
    flex-direction: column; justify-content: space-between; overflow-y: auto;
  }
  .js.menu-open body { overflow: hidden; }
  .js.menu-open .rail-menu { display: flex; }
  .js .rail nav ul { display: block; margin: 0; }
  .js .rail nav li + li { border-top: 1px solid var(--rule); }
  .js .rail nav a {
    padding: 15px 0 15px 26px; font: 400 36px/1.15 var(--serif); letter-spacing: -.01em; text-decoration: none;
    color: var(--ink-2);
  }
  .js .rail nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
  .js .rail nav a[aria-current="page"]::before { display: block; width: 9px; height: 9px; margin-top: -4.5px; }
  .js .rail-foot { display: block; font-size: 17px; padding-top: 20px; }
  [id] { scroll-margin-top: 76px; }
  .site-foot { flex-direction: column; margin-top: 72px; }
}

@media (prefers-reduced-motion: never) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
