/* Kington Parishes — shared styles
   Palette: limestone / hill-mist slate / old brass / heather / ink
   Type: Spectral (display) + Public Sans (body) */

:root {
  --limestone: #EDE9DF;
  --parchment: #F8F5EE;
  --slate: #46596A;
  --slate-dark: #2E3C48;
  --brass: #A8813C;
  --brass-dark: #7C5E28;
  --heather: #7C5F72;
  --heather-dark: #5E4657;
  --ink: #262521;
  --ink-soft: #4A473F;
  --line: rgba(38,37,33,0.16);
  --radius: 4px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--limestone);
  color: var(--ink);
  font-family: 'Public Sans', sans-serif;
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display { font-family: 'Spectral', serif; color: var(--ink); margin: 0 0 0.5em; line-height: 1.2; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--brass-dark); text-underline-offset: 3px; }
a:hover { color: var(--slate-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--heather);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--slate-dark);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- Header / Nav ---------- */
header.site {
  background: var(--slate-dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  max-width: var(--max);
  margin: 0 auto;
  flex-wrap: wrap;
}
.brand {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: #F8F5EE;
  text-decoration: none;
}
nav.links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 0.92rem;
}
nav.links a {
  color: #D6D0BF;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
}
nav.links a:hover, nav.links a[aria-current="page"] {
  color: #fff;
  border-color: var(--brass);
}
.btn-donate {
  background: var(--brass);
  color: #2E2610;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.88rem;
}
.btn-donate:hover { background: #C09A4E; color: #2E2610; }

/* ---------- Page header banner (non-home pages) ---------- */
.page-header {
  background: var(--slate-dark);
  padding: 56px 0 46px;
  position: relative;
  overflow: hidden;
}
.page-header .wrap { position: relative; z-index: 1; }
.page-header .kicker { color: #C9BEA0; }
.page-header h1 { color: #F8F5EE; font-size: clamp(1.9rem, 4vw, 2.6rem); max-width: 22ch; }
.page-header p.lede { color: #C4BFAF; max-width: 52ch; margin-top: 14px; font-size: 1.08rem; }
.page-header .ridge-watermark {
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  width: 100%; height: 56px;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Sections ---------- */
section { padding: 60px 0; }
section.alt { background: var(--parchment); }
section + section { border-top: 1px solid var(--line); }

.kicker {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--heather-dark);
  margin-bottom: 10px;
}
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; }
.section-head p { color: var(--ink-soft); margin-top: 12px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.card {
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: 0 1px 0 rgba(38,37,33,0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow-wrap: anywhere;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px -16px rgba(38,37,33,0.28);
}
.card h3 { font-size: 1.25rem; font-weight: 600; }
.card p { color: var(--ink-soft); margin: 10px 0 14px; }
.card .meta { font-size: 0.9rem; color: var(--slate); font-weight: 600; }
.card .tags { font-size: 0.82rem; color: var(--brass-dark); font-weight: 700; margin-bottom: 8px; }

.icon-badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--limestone);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.icon-badge svg { width: 22px; height: 22px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

.noticeboard-card {
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.noticeboard-card .thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--heather) 0%, var(--slate) 100%);
  display: flex; align-items: center; justify-content: center;
}
.noticeboard-card .thumb svg { width: 44px; height: 44px; opacity: 0.9; }
.noticeboard-card .body { padding: 16px 18px 18px; }
.noticeboard-card h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 4px; }
.noticeboard-card .date { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--slate);
  color: #F8F5EE;
  box-shadow: 0 3px 0 var(--slate-dark);
}
.btn-primary:hover { color: #F8F5EE; transform: translateY(-2px); box-shadow: 0 5px 0 var(--slate-dark); }
.btn-secondary {
  background: transparent;
  color: var(--slate-dark);
  border: 2px solid var(--slate-dark);
}
.btn-secondary:hover { background: var(--slate-dark); color: #F8F5EE; }

/* ---------- Safeguarding banner (footer link, not full text everywhere) ---------- */
.safeguard-strip {
  background: var(--heather-dark);
  color: #F3EEEF;
  padding: 18px 0;
}
.safeguard-strip .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.safeguard-strip p { margin: 0; font-size: 0.95rem; }
.safeguard-strip a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ---------- Footer ---------- */
footer.site {
  background: var(--slate-dark);
  color: #C9C3B2;
  padding: 52px 0 28px;
}
footer.site h4 { color: #F8F5EE; font-size: 1.05rem; font-weight: 600; margin-bottom: 12px; }
footer.site a { color: #C9C3B2; text-decoration: none; }
footer.site a:hover { color: #fff; }
.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }
.fine {
  padding-top: 18px;
  font-size: 0.82rem;
  color: #8D8778;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.fine a { color: #C9C3B2; }
.fine a:hover { color: #fff; }
.build-number { white-space: nowrap; }

/* ---------- Ridge SVG (home hero signature) ---------- */
.ridge-label { font-family: 'Spectral', serif; font-size: 13px; fill: #E7E2D6; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Home hero ---------- */
.hero { background: var(--slate-dark); padding: 64px 0 0; overflow: hidden; }
.hero .eyebrow { color: #C9BEA0; }
.hero h1 { color: #F8F5EE; font-size: clamp(2.1rem, 5vw, 3.1rem); max-width: 17ch; font-weight: 600; }
.hero p.lede { color: #C4BFAF; max-width: 50ch; margin-top: 16px; font-size: 1.1rem; }
.hero .cta-row { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.ridge-nav { margin-top: 44px; }
.ridge-nav svg { display: block; width: 100%; height: auto; }
.ridge-nav a { cursor: pointer; }
.ridge-nav a:focus-visible circle { stroke: #F8F5EE; stroke-width: 3; }
.ridge-sub { font-family: 'Public Sans', sans-serif; font-size: 10.5px; fill: #96907E; }

/* ---------- Our Churches ---------- */
.parish {
  padding: 56px 0;
  scroll-margin-top: 24px;
}
.parish + .parish { border-top: 1px solid var(--line); }
.parish.alt { background: var(--parchment); }
.parish h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.parish .dedication { color: var(--brass-dark); font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.parish .body-text { max-width: 66ch; color: var(--ink-soft); }
.parish .facts {
  display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px;
  font-size: 0.92rem;
}
.parish .facts div { color: var(--slate); font-weight: 600; }
/* Both current uses of .jump-row sit inside the dark .page-header banner
   (Our Churches' church list, Life Events' baptisms/weddings/funerals
   list), so it's styled light-on-dark by default rather than needing a
   per-instance override. */
.jump-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px;
}
.jump-row a {
  text-decoration: none; font-size: 0.86rem; font-weight: 700;
  padding: 7px 14px; border: 1px solid rgba(255,255,255,0.3); border-radius: 100px;
  color: #F8F5EE;
}
.jump-row a:hover { background: #F8F5EE; color: var(--slate-dark); border-color: #F8F5EE; }

/* ---------- Life Events ---------- */
.event-block { padding: 50px 0; }
.event-block + .event-block { border-top: 1px solid var(--line); }
.event-block.alt { background: var(--parchment); }
.event-block .body-text { max-width: 66ch; color: var(--ink-soft); }

/* ---------- Safeguarding ---------- */
.helpline-list { list-style: none; padding: 0; margin: 0; }
.helpline-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 0.98rem; flex-wrap: wrap;
}
.helpline-list a { font-weight: 700; }
.emergency-box {
  background: var(--heather-dark); color: #F3EEEF;
  padding: 24px 26px; border-radius: var(--radius); margin-bottom: 32px;
}
.emergency-box strong { font-size: 1.2rem; }

/* ---------- 404 ---------- */
.notfound {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.notfound-card {
  max-width: 540px; width: 100%;
  background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 46px 40px; text-align: center;
}
.notfound-card .arch { margin: 0 auto 20px; width: 64px; height: 64px; }
.notfound-card .cta-row { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
