/* All Saints' Staplehurst — design system
   Warm cream ground, sanctuary blue + amber gold accents,
   soft serif headlines, generous whitespace. */

:root {
  --paper: #fbf7ee;
  --paper-deep: #f3ecdd;
  --card: #ffffff;
  --ink: #232f42;
  --ink-2: #57627a;
  --line: #e9e1cf;
  --gold: #9c7414;
  --gold-soft: #f4e6c2;
  --blue: #2d4a78;
  --blue-deep: #1d3357;
  --sky: #e8eef7;
  --sage: #2f5d46;
  --sage-soft: #e3efe7;
  --terra: #8f2d3a;
  --terra-soft: #f8e2e4;
  --radius: 18px;
  --radius-lg: 28px;
  --arch: 999px 999px 14px 14px;
  --shadow-rest: 0 1px 2px rgba(37, 50, 68, 0.04), 0 2px 10px rgba(37, 50, 68, 0.05);
  --shadow-lift: 0 2px 4px rgba(37, 50, 68, 0.06), 0 14px 36px rgba(37, 50, 68, 0.11);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 520;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2rem); }
.wrap--narrow { max-width: 800px; }

/* ---------- Safeguarding strip (site-wide, at the very top) ---------- */

.safeguard-strip {
  background: var(--terra-soft);
  padding: 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.safeguard-strip p { margin: 0; }
.safeguard-strip strong { color: var(--terra); }
.safeguard-strip a { color: var(--terra); font-weight: 700; }

/* ---------- Header ---------- */

.site-head {
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
/* leaded-light rule: four muted glass panes */
.site-head::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    #2d4a78 0 25%,
    #8f2d3a 25% 50%,
    #9c7414 50% 75%,
    #2f5d46 75% 100%
  );
  opacity: 0.75;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 26px;
  height: 34px;
  flex: none;
  display: block;
  opacity: 0.9;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 560;
  line-height: 1.1;
}
.brand__sub {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 700;
}

.nav { position: relative; }
.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.1rem;
  flex-wrap: wrap;
}
.nav a {
  display: block;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
}
.nav a:hover { background: var(--paper-deep); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--gold-soft); color: var(--ink); }

@media (max-width: 1020px) {
  .nav__toggle { display: block; }
  .nav ul {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    min-width: 230px;
    padding: 0.5rem;
    flex-direction: column;
  }
  .nav.open ul { display: flex; }
  .nav ul a { border-radius: 10px; }
}

/* ---------- Hero (framed photo card, fade-to-cream top) ---------- */

.hero { padding: 0.5rem clamp(0.75rem, 2.5vw, 2rem) 0; }
.hero__card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-shadow: var(--shadow-rest);
}
.hero__card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--paper) 0%,
    rgba(251, 247, 238, 0.96) 20%,
    rgba(251, 247, 238, 0.82) 38%,
    rgba(251, 247, 238, 0.35) 58%,
    rgba(251, 247, 238, 0) 78%
  );
}
@media (max-width: 700px) {
  .hero__card::before {
    background: linear-gradient(
      180deg,
      var(--paper) 0%,
      rgba(251, 247, 238, 0.97) 35%,
      rgba(251, 247, 238, 0.85) 55%,
      rgba(251, 247, 238, 0.4) 75%,
      rgba(251, 247, 238, 0) 92%
    );
  }
}
.hero__content {
  position: relative;
  text-align: center;
  max-width: 720px;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem 2rem;
}
.hero__content .overline {
  margin-bottom: 1rem;
  color: var(--ink);
  background: rgba(251, 247, 238, 0.82);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}
.hero__content h1 {
  margin-bottom: 0.4em;
  text-shadow: 0 1px 0 rgba(251, 247, 238, 0.6), 0 2px 18px rgba(251, 247, 238, 0.9);
}
.hero__content .lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink);
  font-weight: 600;
  max-width: 52ch;
  margin: 0 auto 0.5rem;
  text-shadow:
    0 0 2px rgba(251, 247, 238, 0.95),
    0 1px 10px rgba(251, 247, 238, 0.95),
    0 0 24px rgba(251, 247, 238, 0.85);
}
.hero__content .btn-row { justify-content: center; }

.overline {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.btn-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.3rem; }
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-deep); color: #fff; box-shadow: var(--shadow-lift); }
.btn--ghost { border-color: rgba(37, 50, 68, 0.35); color: var(--ink); background: rgba(251, 247, 238, 0.6); }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn--gold { background: var(--gold-soft); color: var(--ink); }
.btn--gold:hover { background: var(--gold); color: #fff; }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section--deep { background: var(--paper-deep); }
.section--sky { background: var(--sky); }
.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.4rem;
  flex-wrap: wrap;
}
.section__head p { color: var(--ink-2); margin: 0; max-width: 55ch; }
.section__more {
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
}
.section__more:hover { color: var(--gold); }

/* ---------- Quote band ---------- */

.quote-band { padding: clamp(3.5rem, 9vw, 6rem) 0; text-align: center; }
.quote-band .quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 26ch;
  margin: 0 auto 1.2rem;
}
.quote-band .quote__source {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Cards ---------- */

.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-rest);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card__img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card__body { padding: 1.3rem 1.4rem 1.45rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--ink-2); }
.card h3 { margin: 0; font-size: 1.22rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--blue); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.tag--blue { background: var(--sky); color: var(--blue); }
.tag--gold { background: var(--gold-soft); color: var(--gold); }
.tag--sage { background: var(--sage-soft); color: var(--sage); }
.tag--terra { background: var(--terra-soft); color: var(--terra); }

/* ---------- Service times / event rows ---------- */

.service-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 800px) { .service-strip { grid-template-columns: 1fr; } }
.service-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-rest);
}
.section--deep .service-card, .section--deep .card { box-shadow: none; }
.service-card__when {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.service-card h3 { margin: 0.45rem 0 0.35rem; }
.service-card p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }

.event-list {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-rest);
  padding: 0.4rem 1.6rem;
}
.event-row {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  padding: 1.2rem 0;
}
.event-row + .event-row { border-top: 1px solid var(--line); }
.event-row__date {
  flex: none;
  width: 62px;
  text-align: center;
  background: var(--gold-soft);
  border-radius: 12px;
  padding: 0.6rem 0.25rem 0.5rem;
}
.event-row__date .d { font-family: var(--font-display); font-size: 1.45rem; font-weight: 560; line-height: 1; }
.event-row__date .m { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.event-row__body { flex: 1; }
.event-row__body h3 { margin: 0 0 0.15rem; font-size: 1.15rem; }
.event-row__body h3 a { color: var(--ink); text-decoration: none; }
.event-row__body h3 a:hover { color: var(--blue); }
.event-row__body p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.event-row__time { font-weight: 800; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.04em; white-space: nowrap; }
@media (max-width: 600px) {
  .event-row { flex-wrap: wrap; gap: 0.9rem 1.1rem; align-items: flex-start; }
  .event-row__body { flex: 1 1 60%; min-width: 0; }
  .event-row__time { white-space: normal; flex-basis: 100%; margin-left: calc(62px + 1.1rem); }
  .event-list { padding: 0.4rem 1.2rem; }
}

/* ---------- Prose (article bodies) ---------- */

.prose { max-width: 70ch; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.7rem; }
.prose img { border-radius: var(--radius); margin: 1.6rem 0; }
.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.4rem 0 0.4rem 1.3rem;
  border-left: 3px solid var(--gold);
  color: var(--ink-2);
  font-style: italic;
}
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.35rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.6rem 0; font-size: 0.97rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.55rem 0.8rem; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-deep); }
.prose iframe { max-width: 100%; border-radius: var(--radius); }

.article-head { padding: 3.5rem 0 2rem; }
.article-head .meta { color: var(--ink-2); font-size: 0.95rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.9rem; }

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  background: var(--paper-deep);
  padding: clamp(2.8rem, 6vw, 4.2rem) 0 clamp(2.2rem, 5vw, 3.2rem);
}
.page-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); margin-bottom: 0.3em; }
.page-hero p.lead { color: var(--ink-2); font-size: 1.12rem; max-width: 60ch; margin: 0; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 800px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-rest);
}
.gallery-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery-grid figcaption { padding: 0.65rem 1rem; font-size: 0.85rem; color: var(--ink-2); }

/* ---------- Notice / callout panels ---------- */

.panel {
  border-radius: var(--radius);
  padding: 1.9rem 2rem;
  background: var(--card);
  box-shadow: var(--shadow-rest);
}
.panel--sky { background: var(--sky); box-shadow: none; }
.panel--gold { background: var(--gold-soft); box-shadow: none; }
.panel--sage { background: var(--sage-soft); box-shadow: none; }
.section--sky .panel { box-shadow: none; }
.panel h3 { margin-top: 0; font-size: 1.45rem; }
.panel p:last-child { margin-bottom: 0; }

.safeguarding-note strong { color: var(--terra); }

.panel--welcome { display: flex; gap: 1.5rem; align-items: center; }
.welcome-mark {
  width: 130px;
  flex: none;
  mix-blend-mode: multiply;
  opacity: 0.92;
}
@media (max-width: 600px) {
  .panel--welcome { flex-direction: column; align-items: flex-start; }
  .welcome-mark { width: 110px; }
}

/* ---------- Signpost links ---------- */

.signpost {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-rest);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.signpost:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); color: var(--ink); }
.signpost h3 { margin: 0; font-size: 1.2rem; }
.signpost p { margin: 0; color: var(--ink-2); font-size: 0.93rem; }
.signpost .go { color: var(--gold); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; margin-top: 0.5rem; }
.signpost:hover .go { color: var(--ink); }

/* ---------- Footer ---------- */

.site-foot {
  background: #1f3050;
  color: #c9d4e6;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.site-foot a { color: #eff4fa; }
.site-foot h4 {
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 800;
  margin-bottom: 0.9rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.2rem;
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 0.5rem; }
.foot-brand {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 0.7rem;
}
.foot-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 2.4rem;
  padding-top: 1.3rem;
  font-size: 0.85rem;
  color: #93a5bb;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Utilities ---------- */

.muted { color: var(--ink-2); }
.mt-0 { margin-top: 0; }
.center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Small-screen overrides (keep last in file) ---------- */

@media (max-width: 700px) {
  .brand__sub { display: none; }
  .brand__name { white-space: nowrap; font-size: 1.15rem; }
  .safeguard-strip { font-size: 0.83rem; }
  .sg-hide { display: none; }
}

@media (max-width: 420px) {
  .site-head .wrap { gap: 0.5rem; }
  .brand { gap: 0.45rem; }
  .brand__mark { width: 20px; height: 26px; }
  .brand__name { font-size: 0.98rem; }
  .nav__toggle { padding: 0.35rem 0.75rem; font-size: 0.9rem; }
}
