/* The Welcome Post, welcomepost.co.uk
   One stylesheet for the whole site. Colours and type match the printed booklet.
   Fonts are hosted on our own server (see fonts/OFL.txt), so nothing loads from Google. */

@font-face { font-family: "Libre Caslon Display"; src: url("fonts/libre-caslon-display-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral SC"; src: url("fonts/spectral-sc-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --paper: #F3EFE3;   /* the booklet's cream */
  --tint: #EAE3D1;    /* tinted panels */
  --ink: #1C1B16;     /* text and rules */
  --ink-2: #2E2B25;   /* quieter text */
  --muted: #57534A;
  --green: #123D29;   /* small caps and links */
  --green-dark: #0B2619;
  --rule: #CFC7B4;    /* hairlines */
  --measure: 36rem;
  --gutter: 1.25rem;
}

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

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
}

@media (min-width: 48rem) {
  body { font-size: 1.1875rem; }
}

/* Wider page and slightly bigger type on desktop (Ant, 12 Oct: it looked a bit thin) */
@media (min-width: 64rem) {
  :root { --measure: 48rem; }
  body { font-size: 1.25rem; }
  .hero { max-width: 40rem; }
}

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Skip link for keyboard users */
.skip {
  position: absolute;
  left: -999rem;
  top: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip:focus { left: var(--gutter); }

/* Masthead: the cover's title, rule and small caps line */
.masthead {
  padding-top: 2.75rem;
  text-align: center;
}

.masthead__name {
  display: inline-block;
  font-family: "Libre Caslon Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 10vw, 4.25rem);
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.masthead__rule {
  height: 1px;
  margin: 1.25rem 0 0;
  border: 0;
  background: var(--ink);
}

.nav { margin-top: 0.85rem; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-block;
  padding: 0.4rem 0 0.4rem 0.2em;
  font-family: "Spectral SC", Georgia, serif;
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
}

.nav a:hover { color: var(--green-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.4em; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.4em; }

/* Page content */
main {
  display: block;
  padding: 2.75rem 0 3.5rem;
}

h1 {
  margin: 0 0 1.25rem;
  font-family: "Libre Caslon Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 8vw, 3rem);
  line-height: 1.08;
  text-wrap: balance;
}

h2 {
  margin: 2.75rem 0 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: "Spectral SC", Georgia, serif;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

p { margin: 0 0 1rem; }

p, li, dd { text-wrap: pretty; }

.nowrap { white-space: nowrap; }

.lead {
  font-size: 1.25em;
  line-height: 1.5;
}

.kicker {
  margin: 0 0 0.9rem;
  font-family: "Spectral SC", Georgia, serif;
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.note {
  font-size: 0.9375rem;
  color: var(--muted);
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--green-dark); }
a:focus-visible, .masthead__name:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.more {
  font-family: "Spectral SC", Georgia, serif;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Home: a welcome like the cover */
.hero {
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.1rem;
  font-family: "Spectral", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.9rem, 7vw, 2.4rem);
  line-height: 1.15;
}

.hero .lead { color: var(--ink-2); text-wrap: balance; }

/* Lists of points, each with a short bold lead-in */
.points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.points li:first-child { padding-top: 0.25rem; }
.points li:last-child { border-bottom: 0; }

.points strong {
  display: block;
  font-weight: 600;
}

/* Contact details */
.details {
  margin: 0;
}

.details dt {
  margin-top: 1.1rem;
  font-family: "Spectral SC", Georgia, serif;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.details dt:first-child { margin-top: 0; }

.details dd { margin: 0.2rem 0 0; }

.details + .note { margin-top: 1.25rem; }

address { font-style: normal; }

/* A tinted box, as in the booklet */
.panel {
  margin: 2.75rem 0 0;
  padding: 1.35rem 1.25rem 0.4rem;
  background: var(--tint);
}

.panel h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Footer */
.footer {
  border-top: 1px solid var(--ink);
  padding: 1.5rem 0 3rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.footer p { margin: 0 0 0.35rem; }

.footer__links {
  margin-top: 0.9rem !important;
  font-family: "Spectral SC", Georgia, serif;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__links span { padding: 0 0.6em; color: var(--green); }

@media print {
  .nav, .skip { display: none; }
  body { background: #fff; }
}
