/* =========================================================
   vsp.org.uk  -  main stylesheet
   One file for every page. Replaces style.css, boxed.css
   and colors/blue.css from the old template.
   ========================================================= */

:root {
  --navy:      #1f3a5f;   /* cheatline blue */
  --red:       #a8282f;   /* cheatline red */
  --silver:    #c7ccd2;   /* bare aluminium */
  --paper:     #f5f6f7;   /* page background */
  --ink:       #20262d;   /* body text */
  --muted:     #5b6570;   /* captions, notes */
  --measure:   46rem;     /* reading width for the story */
  --page:      72rem;     /* width of header, menu and footer */
  --head-font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body-font: "Source Serif 4", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

/* Big screens: scale the whole page up so it fills the space
   without the lines of text becoming too long to read */
@media (min-width: 1400px) { html { font-size: 112.5%; } }
@media (min-width: 2000px) { html { font-size: 125%; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 1.1875rem;          /* 19px - easy on the eye */
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* Skip link for keyboard and screen-reader users */
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: #fff; padding: 0.5rem 1rem;
}
.skip:focus { left: 0; z-index: 10; }

/* ---------- Header ---------- */
.site-head {
  background: #fff;
  padding: 2.5rem 1.25rem 0;
}
.site-head .inner { max-width: var(--page); margin: 0 auto; }

.reg {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--red);
  margin: 0 0 0.25rem;
}

.site-title {
  font-family: var(--head-font);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.05;
  color: var(--navy);
  margin: 0 0 1.75rem;
}

/* The cheatline: navy over red, like the stripe along a Viscount's windows */
.cheatline {
  height: 22px;
  background:
    linear-gradient(var(--navy) 0 14px, #fff 14px 16px, var(--red) 16px 22px);
}

/* ---------- Navigation ---------- */
.site-nav { background: var(--navy); }
.site-nav ul {
  max-width: var(--page); margin: 0 auto; padding: 0 0.75rem;
  list-style: none;
  display: flex; flex-wrap: wrap;
}
.site-nav a {
  display: block;
  padding: 0.8rem 0.75rem;
  font-family: var(--head-font);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.site-nav a:hover { color: var(--silver); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -4px 0 var(--red);
}

/* ---------- Main content ---------- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.lead {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-top: 0;
}

h2 {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--navy);
  margin: 2.75rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 2px solid var(--silver);
}

.promise {
  font-style: italic;
  font-weight: 600;
  color: var(--navy);
}

.signoff {
  margin-top: 2rem;
  font-style: italic;
  color: var(--muted);
}

/* Photographs: allowed to run a little wider than the text */
figure {
  margin: 2.5rem -1.25rem;
}
@media (min-width: 52rem) {
  figure { margin-left: -4rem; margin-right: -4rem; }
}
@media (min-width: 64rem) {
  figure { margin-left: -9rem; margin-right: -9rem; }
}
figure img {
  width: 100%;
  border: 1px solid var(--silver);
  background: #fff;
}
figcaption {
  font-family: var(--head-font);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  padding: 0.6rem 1.25rem 0;
}

.print-note {
  background: #fff;
  border-left: 5px solid var(--red);
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
}
.print-note p { margin: 0; }

/* ---------- Footer ---------- */
.site-foot {
  background: var(--navy);
  color: #fff;
  font-family: var(--head-font);
  font-size: 0.95rem;
}
.site-foot .inner {
  max-width: var(--page); margin: 0 auto;
  padding: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  justify-content: space-between;
}
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--silver); }

/* Two photographs side by side (one above the other on phones) */
figure.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 40rem) {
  figure.pair { grid-template-columns: 1fr 1fr; }
}
figure.pair figcaption { grid-column: 1 / -1; padding-top: 0; }

/* "Carry on reading" link at the foot of a page */
.next-page {
  margin-top: 3rem;
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 1.15rem;
}
.next-page a {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border-bottom: 5px solid var(--red);
}
.next-page a:hover { background: var(--red); color: #fff; }

/* A small picture, such as a logo, sitting beside the text */
figure.aside {
  margin: 0.5rem 0 1.5rem;
  max-width: 14rem;
}
@media (min-width: 40rem) {
  figure.aside { float: right; margin: 0.4rem 0 1rem 1.75rem; }
}
figure.aside figcaption { padding-left: 0; padding-right: 0; }
h2 { clear: both; }

/* Link out to the videos */
.video-link {
  background: #fff;
  border: 2px solid var(--navy);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
}
.video-link p { margin: 0 0 0.75rem; }
.video-link a {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 1.15rem;
}

/* Side-by-side photos that each have their own caption */
figure.pair figure { margin: 0; }
figure.pair figure figcaption { grid-column: auto; padding-top: 0.6rem; }

/* Links page: each link in its own card */
.link-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.link-list li {
  background: #fff;
  border-left: 5px solid var(--navy);
  padding: 0.9rem 1.25rem;
}
.link-list li:hover { border-left-color: var(--red); }
.link-list a {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 1.15rem;
}
.link-list p { margin: 0.2rem 0 0; color: var(--muted); font-size: 1.05rem; }

/* 404 page */
.not-found { text-align: center; }
.not-found figure { margin-left: 0; margin-right: 0; }
