/* Captain Jack Strain — memorial site
   Rebuilt 2026 from the original jackstrain.co.uk (faithful content, responsive shell) */

:root {
  --parchment: #f4efe4;
  --parchment-deep: #ece4d3;
  --ink: #2a2622;
  --ink-soft: #4a443c;
  --gold: #8a6d3b;
  --gold-soft: #b69b6a;
  --rule: #d6cab0;
  --banner-overlay: rgba(28, 24, 20, 0.52);
  --maxw: 820px;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Cinzel", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 5vw, 3.4rem);
  list-style: none;
  margin: 0;
  padding: 1rem 1rem;
}
.site-nav a {
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: var(--gold); }
.site-nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold-soft);
}

/* ---------- Banner system ---------- */
.banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fbf8f1;
  padding: clamp(3.5rem, 12vw, 9rem) 1.5rem;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--banner-overlay);
}
.banner > * { position: relative; z-index: 1; }
.banner-inner { max-width: 760px; }

.banner-hero { min-height: 78vh; background-image: url("../images/hero-jack.jpg"); background-position: center 30%; }
/* Hero: darken the left (behind the text) but keep Jack's portrait on the right bright */
.banner-hero::before {
  background: linear-gradient(to right,
    rgba(20,17,14,0.66) 0%,
    rgba(20,17,14,0.55) 42%,
    rgba(20,17,14,0.28) 68%,
    rgba(20,17,14,0.06) 86%,
    rgba(20,17,14,0.00) 100%);
}
.banner-letter { min-height: 42vh; background-image: url("../images/banner-letter.jpg"); }
.banner-wwi { min-height: 52vh; background-image: url("../images/banner-wwi.jpg"); }
.banner-passchendaele { min-height: 42vh; background-image: url("../images/banner-passchendaele.jpg"); }
.banner-remembrance { min-height: 52vh; background-image: url("../images/menin-gate.jpg"); background-position: center 35%; }

/* iOS doesn't support fixed attachment well — fall back to scroll */
@media (hover: none) and (pointer: coarse) {
  .banner { background-attachment: scroll; }
}

.banner h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
  text-shadow: 0 2px 18px rgba(0,0,0,0.5);
}
.banner .dates {
  font-family: var(--display);
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  letter-spacing: 0.12em;
  margin: 0 0 1.8rem;
  color: #efe7d6;
}
.banner blockquote {
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.6;
  margin: 0 auto 0.8rem;
  max-width: 640px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.banner blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin-top: 0.8rem;
  color: #e6dcc6;
}
.banner-title {
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3.6rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}

/* ---------- Content ---------- */
main { display: block; }
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.4rem;
}
.section.narrow { max-width: 700px; }

.lede {
  font-size: 1.32rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: 0.03em;
  margin: 0 0 1.2rem;
  color: var(--ink);
}
h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  margin: 2.4rem 0 0.6rem;
  color: var(--gold);
}
p { margin: 0 0 1.15rem; }
a { color: var(--gold); }
a:hover { color: var(--ink); }

.rule {
  border: 0;
  height: 1px;
  width: 120px;
  margin: 2.6rem auto;
  background: linear-gradient(to right, transparent, var(--gold-soft), transparent);
}

/* figures / images */
figure {
  margin: 2rem 0;
  text-align: center;
}
figure img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 6px 28px rgba(40,33,24,0.22);
  cursor: zoom-in;
}
figure.portrait img { max-width: 360px; }
figcaption {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* letters */
.letter {
  background: var(--parchment-deep);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold-soft);
  border-radius: 3px;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  margin: 0 0 2.2rem;
  box-shadow: 0 2px 14px rgba(40,33,24,0.06);
}
.letter .from {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 1rem;
}
.letter p { margin: 0 0 0.9rem; }
.letter .place { color: var(--ink-soft); font-style: italic; margin-bottom: 0.4rem; }
.letter .verse { text-align: center; font-style: italic; margin: 0.3rem 0; }
.letter .sign { font-style: italic; }

/* the closing memorial poem */
.poem {
  text-align: center;
  font-style: italic;
  line-height: 1.55;
  font-size: 1.15rem;
}
.poem p { margin: 0 0 1.1rem; }

/* a highlighted pull / quotation block on the Jack page */
.pull {
  font-style: italic;
  font-size: 1.22rem;
  line-height: 1.65;
  border-left: 3px solid var(--gold-soft);
  padding-left: 1.4rem;
  margin: 2rem 0;
  color: var(--ink-soft);
}
.note {
  background: var(--parchment-deep);
  border: 1px solid var(--rule);
  padding: 1.2rem 1.4rem;
  border-radius: 3px;
  font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2.6rem 1.4rem 3.2rem;
  border-top: 1px solid var(--rule);
  background: var(--parchment-deep);
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.site-footer .name { font-family: var(--display); letter-spacing: 0.1em; color: var(--ink); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 15, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  box-shadow: 0 10px 50px rgba(0,0,0,0.6);
}
