/* Strip Map: Ciaran Murray, Highland hospitality
   The series is drawn as a road north. Each essay is a milestone; the next one is the red marker ahead.
   One bold element (the road); everything else stays quiet. */

:root {
  --mist: #EDF0EC;
  --loch: #17312F;
  --lichen: #8C9A86;
  --heather: #6B3D61;
  --rowan: #B03A2E;
  --slate: #596365;
  --rule: #D3D9D2;
  --display: var(--gh-font-heading, "Young Serif", Georgia, serif);
  --body: var(--gh-font-body, "Literata", Georgia, serif);
  --measure: 66ch;
  --road-x: 1.25rem;   /* where the road runs, inside the road gutter */
  --gutter: 3.5rem;    /* road gutter width */
  --wrap: 72rem;
  --pad: 1.25rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--loch);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--heather); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--heather); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--pad); top: 0.5rem; z-index: 10; background: var(--loch); color: var(--mist); padding: 0.5rem 0.8rem; }

/* ---------- masthead ---------- */
.masthead .wrap {
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 2rem;
}
.masthead .name { font-family: var(--display); font-size: 1.5rem; color: var(--loch); text-decoration: none; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: 1rem; }
.nav a { color: var(--loch); text-decoration: none; display: inline-block; padding: 0.375rem 0; }
.nav a:hover { color: var(--heather); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--heather); }

/* ---------- intro ---------- */
.intro { padding-top: 3.5rem; padding-bottom: 2.5rem; }
.intro h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.05; letter-spacing: -0.01em;
  margin: 0 0 1rem; max-width: 16ch;
}
.intro p { margin: 0; max-width: 46ch; color: var(--slate); font-size: 1.2rem; }

/* ---------- home grid ---------- */
.home-grid { display: grid; gap: 2rem 4rem; padding-bottom: 2rem; }
@media (min-width: 64rem) { .home-grid:not(.single) { grid-template-columns: minmax(0, 1fr) 18rem; } }
.writer { align-self: start; padding-top: 0.2rem; }
.writer img { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.writer p { margin: 0 0 0.8rem; font-size: 1rem; line-height: 1.6; }

/* ---------- the road ---------- */
.road { list-style: none; margin: 0; padding: 0 0 2rem var(--gutter); position: relative; }
.road::before {
  content: ""; position: absolute; top: 0.9rem; bottom: 3rem; left: var(--road-x);
  width: 3px; background: var(--lichen);
}
.stop { position: relative; padding: 0 0 3rem; max-width: var(--measure); }
.stop::before { /* milestone */
  content: ""; position: absolute;
  left: calc(-1 * var(--gutter) + var(--road-x) - 0.45rem + 1.5px); top: 0.55rem;
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--mist); border: 3px solid var(--heather);
}
.stop .when { font-size: 0.95rem; color: var(--slate); margin: 0 0 0.35rem; }
.stop .when a { color: var(--slate); }
.stop h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; margin: 0 0 0.6rem;
}
.stop h2 a { color: var(--loch); text-decoration: none; }
.stop h2 a:hover { color: var(--heather); }
.stop .dek { margin: 0; }

/* the road ahead is not yet travelled: dotted, with a rowan marker */
.stop.ahead::after {
  content: ""; position: absolute;
  left: calc(-1 * var(--gutter) + var(--road-x)); top: 1.7rem; bottom: 0; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--mist) 0 6px, transparent 6px 12px);
}
.stop.ahead::before { border-radius: 1px; transform: rotate(45deg); border-color: var(--rowan); background: var(--rowan); }
.stop.ahead .when { color: var(--rowan); }

.pager { display: flex; gap: 1.5rem; padding: 0 0 2rem var(--gutter); }

/* ---------- post ---------- */
.post-head { padding-top: 2.5rem; }
.hero { margin: 0 0 2.5rem; }
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: #2E4643; }
@media (min-width: 48rem) { .hero img { aspect-ratio: auto; height: min(52vh, 34rem); } }
.hero figcaption, .gh-content figcaption { font-style: italic; color: var(--slate); font-size: 0.95rem; margin-top: 0.6rem; }
.post-head h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.08; margin: 0 0 1rem; max-width: 20ch;
}
.post-head .meta { color: var(--slate); margin: 0; }
.post-head .meta a { color: var(--slate); display: inline-block; padding: 0.25rem 0; }

.essay {
  max-width: var(--wrap); margin: 0 auto;
  padding: 2.5rem var(--pad) 3rem calc(var(--pad) + var(--gutter));
  position: relative;
}
.essay::before {
  content: ""; position: absolute; top: 2.5rem; bottom: 3rem; left: calc(var(--pad) + var(--road-x));
  width: 3px; background: var(--lichen);
}
.essay.plain::before { display: none; }
.essay.plain { padding-left: var(--pad); }
.essay > * { max-width: var(--measure); }
.gh-content p, .gh-content ul, .gh-content ol { margin: 0 0 1.3em; }
.gh-content li { margin-bottom: 0.4em; }
.gh-content h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; margin: 2.4em 0 0.8em; position: relative;
}
.essay:not(.plain) h2::before {
  content: ""; position: absolute;
  left: calc(-1 * var(--gutter) + var(--road-x) - 0.45rem + 1.5px); top: 0.35em;
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--mist); border: 3px solid var(--lichen);
}
.essay:not(.plain) h2.here::before { border-color: var(--heather); background: var(--heather); }
.gh-content h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1.25; margin: 2em 0 0.6em; }
.gh-content blockquote:not(.kg-blockquote-alt) {
  margin: 2rem 0; padding: 0 0 0 1.25rem; border-left: 3px solid var(--heather);
  font-size: 1.3rem; line-height: 1.5;
}
.gh-content blockquote.kg-blockquote-alt {
  margin: 2.5rem 0; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; color: var(--heather);
}
.gh-content hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.gh-content figure { margin: 2.2rem 0; }
.gh-content img { border-radius: 2px; }
.gh-content small, .gh-content .refs { font-size: 0.95rem; }
/* long URLs in Harvard reference entries must wrap on phones, not push the page sideways */
.gh-content p, .gh-content li, .gh-content figcaption { overflow-wrap: anywhere; }
/* Harvard list: smaller, with a hanging indent so each author stands out */
.gh-content h2#references ~ p { font-size: 0.95rem; line-height: 1.55; padding-left: 1.5em; text-indent: -1.5em; }

/* Koenig editor widths */
.gh-content .kg-width-wide { max-width: min(var(--wrap), calc(100vw - 2 * var(--pad))); }
.gh-content .kg-width-full { max-width: none; margin-left: calc(-1 * (var(--pad) + var(--gutter))); margin-right: calc(-1 * var(--pad)); }
.gh-content .kg-width-full img { border-radius: 0; }
.gh-content .kg-image { margin: 0 auto; }

/* next essay, after the post: dotted connector from the essay's road */
.next { padding-bottom: 3.5rem; }
.next .road { padding: 0 0 0 var(--gutter); }
.next .road::before { display: none; }
.next .stop { padding-bottom: 0; }
.next .stop.ahead::after {
  top: -3rem; bottom: auto; height: 3.4rem;
  background: repeating-linear-gradient(to bottom, var(--lichen) 0 6px, transparent 6px 12px);
}

/* ---------- subscribe ---------- */
.subscribe { background: var(--loch); color: var(--mist); padding: 3rem 0; }
.subscribe h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 0.4rem; }
.subscribe p { margin: 0 0 1.25rem; max-width: 48ch; color: #C9D3CD; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 34rem; }
.subscribe-form label { position: absolute; left: -9999px; }
.subscribe-form input {
  flex: 1 1 16rem; font: inherit; font-size: 1rem; padding: 0.75rem 0.9rem;
  border: 1px solid #4E6763; border-radius: 4px; background: #0F2422; color: var(--mist);
}
.subscribe-form input::placeholder { color: #94A39C; }
.subscribe-form button {
  font: inherit; font-size: 1rem; padding: 0.75rem 1.4rem; border: 0; border-radius: 4px;
  background: var(--mist); color: var(--loch); cursor: pointer;
}
.subscribe-form button:hover { background: #fff; }
.subscribe :focus-visible { outline-color: var(--mist); }
.form-msg { display: none; flex-basis: 100%; margin: 0.25rem 0 0; }
.subscribe-form.loading button { opacity: 0.6; }
.subscribe-form.success .form-msg--success { display: block; color: var(--mist); }
.subscribe-form.error .form-msg--error { display: block; color: #F2B8B0; }

/* ---------- footer ---------- */
.site-footer { padding: 2rem 0 3rem; font-size: 0.95rem; color: var(--slate); }
.site-footer p { margin: 0 0 0.75rem; }
.site-footer .nav a { color: var(--slate); }

/* ---------- small screens: the road narrows to the left edge ---------- */
@media (max-width: 40rem) {
  :root { --gutter: 1.75rem; --road-x: 0rem; }
  body { font-size: 1.0625rem; }
  .road::before, .essay::before { width: 2px; }
  .stop::before, .essay:not(.plain) h2::before { width: 0.8rem; height: 0.8rem; left: calc(-1 * var(--gutter) - 0.4rem + 1px); }
  .stop.ahead::after { width: 2px; }
}

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

/* ---------- after the essay ---------- */
.byline { padding-bottom: 2.5rem; }
.byline p { max-width: var(--measure); margin: 0 0 0 var(--gutter); padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--slate); font-size: 1rem; line-height: 1.6; }
.byline strong { color: var(--loch); font-weight: 600; }
.read-next { padding-bottom: 2rem; }
.read-next > h2 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 1.5rem var(--gutter); }
