/* Tak-Sherpa — hand-written stylesheet.
   Values taken from the original GeneratePress customizer settings:
     --contrast   #67bc44  green   (buttons)
     --contrast-2 #f7b600  amber   (header, nav, footer)
     --contrast-3 #151039  navy    (all text and headings)
     --base-2     #fbf7eb  cream   (page background)
     --accent     #0000ff  blue    (links)
   Container width 760px, body 18px/1.5. */

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-normal-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-normal-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-normal-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-normal-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --contrast: #67bc44;
  --contrast-hover: #76c256;
  --contrast-2: #f7b600;
  --contrast-3: #151039;
  --nav-hover: #2f2a53;
  --base-2: #fbf7eb;
  --base-3: #fff;
  /* Links: the brand green darkened until it clears WCAG AA on cream
     (4.85:1). The theme's own --accent was #0000ff, which read as an
     unstyled default and sat outside the palette. */
  --accent: #417a2c;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 760px;
}

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

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

body {
  margin: 0;
  background: var(--base-2);
  color: var(--contrast-3);
  font: 400 18px/1.5 var(--sans);
}

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--contrast-3); color: var(--base-3);
  padding: .75rem 1.25rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

:where(a):focus-visible { outline: 3px solid var(--contrast-3); outline-offset: 2px; }

/* ------------------------------------------------------- header + nav bars */
.site-header { background: var(--contrast-2); }
.header-inner { padding: 20px 0 10px; }
.brand { display: inline-flex; }
.brand img { display: block; width: 150px; height: auto; }

.site-nav { background: var(--contrast-2); }
.site-nav ul {
  display: flex; flex-wrap: wrap;
  margin: 0; padding: 0; list-style: none;
}
/* every state is listed: the generic a:visited/:focus rule below carries the
   same specificity and would otherwise tint nav links with the link colour */
.site-nav a,
.site-nav a:visited,
.site-nav a:hover,
.site-nav a:focus,
.site-nav a:active {
  display: block;
  padding: 0 22px;
  line-height: 50px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--contrast-3);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--nav-hover); }

/* ------------------------------------------------------------- page header */
.mast { text-align: center; }
.mast h1 { margin: 40px auto 0; max-width: var(--wrap); }
.mast img { display: block; margin: 0 auto; max-width: 100%; height: auto; }

/* ----------------------------------------------------------------- content */
main { padding-block: 70px; }

.prose > :first-child { margin-top: 0; }

h1, h2, h3, h4, h5, h6 { color: var(--contrast-3); margin: 1.5em 0 .6em; }
h1 { font-family: var(--serif); font-size: 48px; line-height: 1.2; font-weight: 700; text-align: center; margin-top: 0; }
h2 { font-family: var(--serif); font-size: 32px; line-height: 1.4; }
h3 { font-family: var(--sans); font-size: 22px; line-height: 1.5; }
h4 { font-family: var(--sans); font-size: 20px; line-height: 1.5; }

p { margin: 0 0 1.5em; }

a { color: var(--accent); }
a:visited, a:hover, a:focus, a:active { color: var(--accent); }

ul, ol { margin: 0 0 1.5em; padding-left: 1.35em; }
li { margin-bottom: .5em; }

blockquote {
  margin: 2em 0;
  padding: .25em 0 .25em 1.25em;
  border-left: 4px solid var(--contrast);
  font-style: italic;
}

hr { border: 0; border-top: 1px solid rgba(21, 16, 57, .15); margin: 2.5em 0; }

figure { margin: 2em 0; }
figure img, .prose img { display: block; max-width: 100%; height: auto; }
figcaption { margin-top: .6em; font-size: 15px; }

/* author sign-off: portrait beside the text, as the original 20%/75% grid */
.signature {
  display: flex; align-items: flex-start; gap: 20px;
  margin: 2.5em 0 0;
}
.signature figure { flex: 0 0 101px; margin: 0; }
.signature p { margin: 0; padding-top: 25px; }

img.portrait { width: 101px; height: auto; border-radius: 50%; }

@media (max-width: 480px) {
  .signature { display: block; }
  .signature p { padding-top: 1em; }
}

table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 16px; }
th, td { border: 1px solid rgba(21, 16, 57, .15); padding: .6em .75em; text-align: left; }
th { background: var(--base-3); }

/* ------------------------------------------------------------ CTA button */
.btn {
  display: inline-block;
  margin: .5em 0;
  padding: 0 22px;
  line-height: 44px;
  background: var(--contrast);
  color: var(--base-3);
  font-weight: 600;
  text-decoration: none;
}
.btn:visited { color: var(--base-3); }
.btn:hover, .btn:focus { background: var(--contrast-hover); color: var(--base-3); }

/* ------------------------------------------------- article listing (2 col) */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px;
}
.card { margin: 0; }
.card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card h2 { margin: .6em 0 .4em; font-size: 26px; line-height: 1.3; }
.card h2 a { color: var(--contrast-3); text-decoration: none; }
.card h2 a:visited { color: var(--contrast-3); }
.card h2 a:hover { text-decoration: underline; }
.card p { margin-bottom: .5em; font-size: 17px; }
.card .more a { font-weight: 600; }

@media (max-width: 767px) {
  .cards { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--contrast-2);
  color: var(--contrast-3);
  font-size: 15px;
  text-align: center;
}
.footer-inner { padding: 20px 0 25px; }
.footer-logo { display: block; margin: 0 auto 1em; width: 156px; height: auto; }
.site-footer p { margin: 0 0 1em; }
.site-footer a { color: var(--contrast-3); }
.site-footer a:visited, .site-footer a:hover { color: var(--contrast-3); }

@media (max-width: 768px) {
  main { padding-block: 60px; }
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  .site-nav a { padding: 0 14px; }
}
