/* ==========================================================
   Sayers — Admiralty
   One stylesheet. Tokens, base, components, responsive.
   ========================================================== */

:root {
  /* Palette */
  --navy:       #1B2A40;
  --backdrop:   #36496A;
  --separation: #57708F;
  --rules:      #A5B2C5;
  --coal:       #14130F;
  --coffee:     #6B4F3E;
  --rope:       #B5A794;
  --sage:       #A9BC9C;
  --ground:     #F0EDE6;
  --white:      #FFFFFF;

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  /* Space */
  --measure: 38rem;
  --wide:    52rem;
  --gutter:  1.5rem;
  --band:    3.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--coal);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum";
}

img, svg { max-width: 100%; }

/* ---------- Layout ---------- */

.inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.inner--wide { max-width: var(--wide); }

/* ---------- Links ---------- */

a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--coffee); outline-offset: 3px; }

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ground);
  color: var(--navy);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Navy band (masthead on every page) ---------- */

.band {
  background: var(--navy);
  color: var(--ground);
  padding: 2.5rem 0 var(--band);
}
.band--home { padding-top: 3.5rem; }

.wordmark { display: block; width: 100%; max-width: 18rem; height: auto; }
.band--home .wordmark { max-width: 27rem; }

.nav {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}
.nav a { color: var(--rules); text-decoration: none; }
.nav a:hover { color: var(--ground); text-decoration: underline; text-underline-offset: 0.3em; }
.nav a:focus-visible { outline-color: var(--sage); }
.nav [aria-current="page"] { color: var(--sage); }

.positioning { margin: 1.75rem 0 0; max-width: 30rem; color: var(--ground); }

.standfirst {
  margin: 1.5rem 0 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rules);
}

/* ---------- Page body ---------- */

.page { padding: 3.5rem 0 1rem; }

.page h1 {
  margin: 0 0 1.75rem;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  color: var(--navy);
}

.page h2 {
  margin: 3rem 0 0.25rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coffee);
}

.page h3 {
  margin: 1.5rem 0 0.25rem;
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--navy);
}

.page p { margin: 0 0 1.1rem; }
.page p:last-child { margin-bottom: 0; }

.lede { font-size: 1.25rem; line-height: 1.5; }

.hairline { border: 0; height: 1px; background: var(--rope); margin: 2.5rem 0; }

.meta {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coffee);
}

/* ---------- Index of work (home) ---------- */

.contents { list-style: none; margin: 0; padding: 0; }
.contents > li { margin: 0; padding-top: 2rem; }
.contents > li + li { border-top: 1px solid var(--rope); margin-top: 2rem; }

.entry { display: flex; align-items: baseline; gap: 0.75rem; text-decoration: none; }
.entry:hover .entry__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.entry__title { font-size: 1.6rem; font-weight: 400; color: var(--navy); white-space: nowrap; }
.entry__leader {
  flex: 1;
  min-width: 2rem;
  border-bottom: 1px dotted var(--separation);
  transform: translateY(-0.35em);
}
.entry__where {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coffee);
  white-space: nowrap;
}
.entry__desc { margin: 0.5rem 0 0; max-width: 32rem; font-size: 1.0625rem; }

/* ---------- Work item (writings) ---------- */

.item { padding-top: 2rem; }
.item + .item { border-top: 1px solid var(--rope); margin-top: 2rem; }
.item__status { margin: 0.75rem 0 0; }

.pending {
  color: var(--backdrop);
  font-style: italic;
}

/* ---------- Contact band ---------- */

.contact {
  background: var(--navy);
  color: var(--ground);
  margin-top: 3.5rem;
  padding: var(--band) 0;
}
.contact h2 {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}
.contact p { margin: 0; max-width: 30rem; }
.contact__address { margin-top: 1rem; font-size: 1.35rem; }
.contact a { color: var(--ground); }
.contact a:focus-visible { outline-color: var(--sage); }

/* ---------- Footer ---------- */

.foot {
  padding: 1.75rem 0 3rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--backdrop);
}
.foot ul {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.foot a { color: var(--backdrop); }

/* ---------- Responsive ---------- */

@media (max-width: 30em) {
  .band { padding-top: 2rem; }
  .nav ul { gap: 1.1rem; }
  .entry { flex-wrap: wrap; gap: 0.4rem; }
  .entry__leader { display: none; }
  .entry__title { white-space: normal; }
  .contact__address { font-size: 1.05rem; word-break: break-word; }
}

/* ---------- Motion ---------- */

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

/* ---------- Print ---------- */

@media print {
  .band, .contact { background: var(--white); color: var(--coal); }
  .band a, .contact a, .positioning, .standfirst, .contact h2, .nav a { color: var(--coal); }
  .nav, .skip { display: none; }
}
