/* ============================================================
   Lumen — Tech Support · Diocese of Peterborough
   Shared design system: tokens, base type, chrome (nav + footer),
   buttons, badges, cards. Page-specific layout
   lives inline in each HTML file.
   ============================================================ */

:root {
  --bg: #faf7f0;
  --bg-alt: #efe9d8;
  --bg-deep: #15171c;
  --ink: #15171c;
  --ink-soft: #2e3038;
  --ink-mute: #6a6c75;
  --indigo: #1e2952;
  --indigo-deep: #101936;
  --sapphire: #2c5577;
  --gold: #c89a3a;
  --gold-soft: #e0c074;
  --gold-deep: #8a6a1f;
  --rose: #8b3a3a;
  --emerald: #3d6a4f;
  --stone: #ccc6b3;
  --rule: #c9c0a8;
  --ok: #3d6a4f;
  --warn: #c89a3a;
  --err: #8b3a3a;

  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--indigo); }
strong { color: var(--ink); }

/* ---------- Stained-glass brand mark ---------- */
.mark {
  position: relative;
  background: var(--indigo);
  border: 2px solid var(--bg-deep);
  border-radius: 45% 45% 2px 2px / 38% 38% 2px 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.mark.dark { background: var(--gold); }
.mark > .lead-h,
.mark > .lead-v,
.mark > .pane {
  position: absolute;
  background: var(--bg-deep);
}
.mark > .lead-h { left: 0; right: 0; top: 58%; height: 2px; }
.mark > .lead-v.left { top: 0; bottom: 0; left: 33.3%; width: 2px; }
.mark > .lead-v.right { top: 0; bottom: 0; left: 66.6%; width: 2px; }
.mark > .pane.gold { left: 33.3%; right: 33.3%; top: 58%; bottom: 0; background: var(--gold); }
.mark.dark > .pane.gold { background: var(--indigo); }

/* ---------- Wordmark lockups ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.wordmark .mark { width: 48px; height: 55px; }
.wordmark .words {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid rgba(21, 23, 28, 0.18);
  padding-left: 14px;
}
.wordmark .words-main {
  font: 500 italic 26px/1 var(--serif);
  color: var(--bg-deep);
  letter-spacing: -0.005em;
}
.wordmark .words-sub {
  font: 600 11px/1 var(--sans);
  color: var(--ink-mute);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.wordmark.dark .words { border-left-color: rgba(250, 247, 240, 0.22); }
.wordmark.dark .words-main { color: var(--bg); }
.wordmark.dark .words-sub { color: var(--gold-soft); }

.wordmark.stacked { flex-direction: column; align-items: flex-start; gap: 6px; }
.wordmark.stacked .words { border-left: 0; padding-left: 0; }
.wordmark.stacked .words-sub { letter-spacing: 0.34em; color: var(--gold); order: -1; }
.wordmark.stacked .words-main { font-size: 42px; line-height: 0.95; }

/* ---------- Utility strip + main nav ---------- */
.utility {
  background: var(--indigo);
  color: var(--gold-soft);
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 10px 56px;
}

.nav {
  background: var(--bg);
  border-bottom: 2px solid var(--bg-deep);
  padding: 18px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-items { display: flex; align-items: center; gap: 26px; }
.nav-items a {
  font: 600 13px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.15s;
}
.nav-items a:hover { color: var(--bg-deep); }
.nav-items a.active { color: var(--bg-deep); }
.nav-items a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -2px;
  width: 24px;
  height: 4px;
  background: var(--gold);
}

/* ---------- Buttons ---------- */
.lbtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 2px solid var(--indigo);
  background: var(--indigo);
  color: var(--bg);
  font: 600 15px/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.lbtn.primary {
  background: var(--indigo);
  color: var(--bg);
  border-color: var(--indigo);
  box-shadow: 0 4px 0 -1px var(--indigo-deep);
}
.lbtn.gold {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
  box-shadow: 0 4px 0 -1px var(--gold-deep);
}
.lbtn.secondary {
  background: var(--bg);
  color: var(--indigo);
  border-color: var(--indigo);
  box-shadow: none;
}
.lbtn.danger {
  background: var(--rose);
  color: var(--bg);
  border-color: var(--rose);
  box-shadow: none;
}
.lbtn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  box-shadow: none;
}
.lbtn:hover { transform: translate(-1px, -1px); }
.lbtn:active { transform: translate(1px, 2px); box-shadow: 0 1px 0 -1px var(--indigo-deep); }
.lbtn.sm { padding: 8px 16px; font-size: 13px; }
.lbtn.lg { padding: 18px 32px; font-size: 17px; }

/* ---------- Badges ---------- */
.lbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--stone);
  color: var(--bg-deep);
}
.lbadge.ok { background: var(--ok); color: var(--bg); }
.lbadge.warn { background: var(--gold); color: var(--bg-deep); }
.lbadge.err { background: var(--rose); color: var(--bg); }

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h1,
.section-head h2 {
  font: 400 italic 48px/1 var(--serif);
  margin: 0;
  letter-spacing: -0.005em;
}
.section-head .num {
  font: 700 11px/1 var(--sans);
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.section-rule {
  height: 4px;
  background: var(--bg-deep);
  margin: 20px 0 28px;
  position: relative;
}
.section-rule::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  height: 4px;
  background: var(--gold);
}

/* ---------- Site footer ---------- */
footer.site {
  background: var(--bg-deep);
  color: var(--bg);
  padding: 40px 56px;
}
footer.site .grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
footer.site .col h4 {
  font: 700 11px/1 var(--sans);
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
footer.site .col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: 400 14px/1.5 var(--sans);
}
footer.site .col a { color: var(--bg); text-decoration: none; }
footer.site .col a:hover { color: var(--gold-soft); }
footer.site .photo {
  margin-top: 16px;
  height: 80px;
  border-radius: 2px;
  overflow: hidden;
}
footer.site .photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
footer.site .divider {
  height: 2px;
  background: var(--indigo);
  margin: 28px 0 14px;
}
footer.site .legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- Page container helpers ---------- */
.page {
  padding: 64px 56px 80px;
  max-width: 1100px;
  margin: 0 auto;
}
.page.narrow { max-width: 880px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .utility, .nav, .page, footer.site { padding-left: 32px; padding-right: 32px; }
  footer.site .grid { grid-template-columns: 1fr 1fr; }
  .section-head h1, .section-head h2 { font-size: 36px; }
}
@media (max-width: 720px) {
  .nav-items { display: none; }
  .utility { font-size: 10px; padding: 8px 24px; letter-spacing: 0.22em; }
  .nav { padding: 16px 24px; }
  .page, footer.site { padding-left: 24px; padding-right: 24px; }
  .wordmark .words-main { font-size: 22px; }
  .wordmark .words-sub { font-size: 10px; letter-spacing: 0.18em; }
  .wordmark .mark { width: 40px; height: 46px; }
  .section-head h1, .section-head h2 { font-size: 30px; }
}
@media (max-width: 520px) {
  footer.site .grid { grid-template-columns: 1fr; }
}
