/* ==========================================================================
   St. Hedwig's Parish theme
   1. Fonts   2. Palettes   3. Base   4. Layout   5. Header, hero, nav
   6. Components   7. Homepage sections   8. Inner pages   9. Intentions
   10. Footer   11. Utilities
   ========================================================================== */

/* 1. Fonts (self-hosted, SIL Open Font License) ------------------------- */
@font-face {
	font-family: "Righteous";
	src: url("../fonts/righteous-400.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Work Sans";
	src: url("../fonts/work-sans-var.woff") format("woff");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* 2. Palettes ------------------------------------------------------------ */
/* Every colour on the site comes from these roles. Swap the palette in
   Parish Settings, or preview with ?palette=dusk-glass on any page. */
:root,
body[data-palette="stained-glass"] {
	--c-bg: #EDE3D0;
	--c-surface: #FFFFFF;
	--c-ink: #141B2D;
	--c-primary: #1F4FA3;
	--c-on-primary: #FFFFFF;
	--c-accent: #B3262D;
	--c-accent-2: #5B2C6F;
	--g1: #1F4FA3;
	--g2: #F2B632;
	--g3: #B3262D;
	--g4: #5B2C6F;
	--logo-mark: #1F4FA3; --logo-name: #B3262D; --logo-sub: #5B2C6F;
}
body[data-palette="dusk-glass"] {
	--c-bg: #F5EDE0; --c-ink: #3B2A20; --c-primary: #1F4FA3; --c-accent: #A9521A; --c-accent-2: #3B2A20;
	--g1: #C8641E; --g2: #E0A030; --g3: #1F4FA3; --g4: #3B2A20;
	--logo-mark: #C8641E; --logo-name: #E0A030; --logo-sub: #E0A030;
}
body[data-palette="tower-dusk"] {
	--c-bg: #F5EDE0; --c-ink: #3B2A20; --c-primary: #4A5560; --c-accent: #A9521A; --c-accent-2: #4A5560;
	--g1: #C8641E; --g2: #E0A030; --g3: #4A5560; --g4: #3B2A20;
	--logo-mark: #E0A030; --logo-name: #3B2A20; --logo-sub: #C8641E;
}
body[data-palette="patron-paint"] {
	--c-bg: #F4ECDA; --c-ink: #1F2A44; --c-primary: #8E1B22; --c-accent: #8E1B22; --c-accent-2: #1F2A44;
	--g1: #8E1B22; --g2: #C9A24A; --g3: #8FA3AE; --g4: #1F2A44;
	--logo-mark: #8E1B22; --logo-name: #1F2A44; --logo-sub: #8FA3AE;
}
body[data-palette="sanctuary-wood"] {
	--c-bg: #EFE6D6; --c-ink: #4A2F1F; --c-primary: #2F5D3A; --c-accent: #2F5D3A; --c-accent-2: #4A2F1F;
	--g1: #C08A4E; --g2: #D9A441; --g3: #2F5D3A; --g4: #4A2F1F;
	--logo-mark: #4A2F1F; --logo-name: #2F5D3A; --logo-sub: #C08A4E;
}

:root {
	--c-line: color-mix(in srgb, var(--c-ink) 14%, transparent);
	--c-muted: color-mix(in srgb, var(--c-ink) 78%, var(--c-bg));
	--font-display: "Righteous", "Trebuchet MS", system-ui, sans-serif;
	--font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--fs-h1: clamp(2.125rem, 1.6rem + 2.2vw, 3rem);
	--fs-h2: clamp(1.75rem, 1.45rem + 1.25vw, 2.25rem);
	--fs-h3: clamp(1.375rem, 1.25rem + 0.55vw, 1.625rem);
	--fs-h4: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem);
	--fs-body: clamp(1.0625rem, 1.04rem + 0.1vw, 1.125rem);
	--fs-small: 0.9375rem;
	--fs-btn: 1.0625rem;
	--sp-1: 0.5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2rem; --sp-5: 3rem; --sp-6: 4rem;
	--section-y: clamp(3.5rem, 2.5rem + 4vw, 6rem);
	--gutter: clamp(1.25rem, 0.5rem + 4vw, 7.5rem);
	--radius: 0.5rem;
	--shadow: 0 0.25rem 1rem color-mix(in srgb, var(--c-ink) 10%, transparent);
	--lead: 0.3125rem;
}

/* 3. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6.5rem; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0 0 var(--sp-2); text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.15; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-h4); line-height: 1.3; margin: 0 0 var(--sp-1); }
p, ul, ol, dl, figure, details { margin: 0 0 var(--sp-2); }
* + h2 { margin-top: var(--sp-5); }
* + h3 { margin-top: var(--sp-4); }
a { color: var(--c-primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--g2) 45%, transparent); }
small, .small { font-size: var(--fs-small); }
hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--sp-4) 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: var(--sp-2); top: -10rem; z-index: 100;
	background: var(--c-ink); color: var(--c-surface); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius);
}
.skip-link:focus { top: var(--sp-2); }

/* 4. Layout -------------------------------------------------------------- */
.container { width: 100%; max-width: calc(75rem + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--surface { background: var(--c-surface); }
.section__head { max-width: 45rem; margin-bottom: var(--sp-4); }
.section__head p { margin-bottom: 0; }

.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
@media (min-width: 56.25em) {
	.split { grid-template-columns: 1fr 1fr; }
	.split--narrow-left { grid-template-columns: 25rem 1fr; }
	.split--wide-left { grid-template-columns: 1fr 1fr; }
	.split .order-first { order: -1; }
}
.stack > * + * { margin-top: var(--sp-3); }
.stack > * { margin-bottom: 0; }

/* 5. Header, hero, nav --------------------------------------------------- */
.site-top {
	display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
	padding-block: 1.25rem; position: relative; z-index: 6;
}
.site-logo { display: inline-block; flex: none; }
.site-logo img, .site-logo .logo-svg { height: clamp(3.75rem, 2.4rem + 4vw, 6.875rem); width: auto; }
.logo-svg { display: block; aspect-ratio: 985 / 394; }
.logo-mark { fill: var(--logo-mark); }
.logo-name { fill: var(--logo-name); }
.logo-sub { fill: var(--logo-sub); }
.site-footer .logo-mark, .site-footer .logo-name, .site-footer .logo-sub { fill: #fff; }
.nav-symbol { display: block; height: 2.5rem; width: auto; }
.nav-symbol--tint { width: 2.25rem; background: var(--symbol-colour, var(--c-primary)); -webkit-mask: var(--symbol) center / contain no-repeat; mask: var(--symbol) center / contain no-repeat; }

.lang-switch ul { list-style: none; margin: 0; padding: 0.25rem; display: flex; gap: 0.25rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px; }
.lang-switch a {
	display: grid; place-items: center; min-width: 2.75rem; min-height: 2.5rem; padding-inline: 0.875rem;
	border-radius: 999px; color: var(--c-ink); font-weight: 600; font-size: var(--fs-btn); text-decoration: none;
}
.lang-switch a:hover { background: color-mix(in srgb, var(--c-primary) 10%, transparent); }
.lang-switch a[aria-current] { background: var(--c-primary); color: var(--c-on-primary); }
.lang-switch.is-preview { opacity: 0.7; }

/* Hero: the photo sits inside the church's own roofline. */
.hero { position: relative; --peak: 6%; --eave: 39%; height: clamp(26rem, 17rem + 30vw, 41.25rem); }
.home .site-top { position: absolute; inset-inline: 0; top: 0; }
.hero__photo {
	position: absolute; inset: 0; overflow: hidden;
	clip-path: polygon(0 var(--eave), 50% var(--peak), 100% var(--eave), 100% 100%, 0 100%);
	background: var(--c-ink);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero__photo::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to bottom, transparent 40%, color-mix(in srgb, var(--c-ink) 82%, transparent) 100%);
}
.hero__beam { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--c-ink); }
.hero__beam polyline { fill: none; stroke: currentColor; stroke-width: 10; stroke-linejoin: round; }
.hero__content { position: absolute; inset-inline: 0; bottom: clamp(2rem, 1rem + 3vw, 3.5rem); color: var(--c-surface); z-index: 2; }
.hero__content h1 { color: #fff; margin-bottom: var(--sp-1); max-width: 18ch; }
.hero__content p { color: #fff; max-width: 40rem; margin-bottom: var(--sp-3); }
@media (max-width: 56.24em) {
	.hero { --peak: 0%; --eave: 16%; height: clamp(22rem, 14rem + 30vw, 28rem); }
	.home .site-top { position: relative; }
}

/* Main navigation with the cross in the centre */
.nav-sentinel { height: 1px; margin-bottom: -1px; }
.main-nav { position: sticky; top: 0; z-index: 50; background: var(--c-surface); box-shadow: var(--shadow); }
.admin-bar .main-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .main-nav { top: 0; } }
.main-nav__inner { display: flex; align-items: center; gap: var(--sp-2); max-width: calc(75rem + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); min-height: 4.5rem; }
.main-nav__mark { display: none; color: var(--c-primary); flex: none; }
.main-nav__mark img, .main-nav__mark .logo-svg { height: 2.75rem; width: auto; }
.main-nav__menus { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(1.25rem, 2.2vw, 2.5rem); }
.main-nav__cross { color: var(--symbol-colour, var(--c-primary)); }
.main-nav__cross svg { width: 1.5rem; height: auto; }
.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 0.25rem clamp(1.25rem, 2.2vw, 2.5rem); }
.main-nav .menu a { white-space: nowrap; }
.main-nav__side--left .menu { justify-content: flex-end; }
.main-nav__side--right .menu { justify-content: flex-start; }
.main-nav .menu a {
	display: inline-flex; align-items: center; min-height: 3rem; color: var(--c-ink); font-weight: 600;
	font-size: var(--fs-btn); text-decoration: none; border-bottom: 2px solid transparent;
}
.main-nav .menu a:hover, .main-nav .current-menu-item > a, .main-nav .menu a[aria-current] { color: var(--c-primary); border-bottom-color: currentColor; }
.main-nav__toggle, .main-nav__quick { display: none; }

/* Donate: contrast call-to-action button in the main nav. */
.main-nav .menu-cta > a {
	min-height: 2.75rem; padding: 0.5rem 1.125rem; border: 0; border-radius: var(--radius);
	background: var(--c-accent); color: #fff;
}
.main-nav .menu-cta > a:hover,
.main-nav .menu-cta.current-menu-item > a,
.main-nav .menu-cta > a[aria-current] { background: color-mix(in srgb, var(--c-accent) 82%, #000); color: #fff; border: 0; }
.main-nav .menu-cta > a:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; }
.main-nav.is-stuck .main-nav__mark { display: block; }

@media (max-width: 75em) {
	.main-nav__menus { gap: 1.25rem; }
	.main-nav .menu { gap: 0.25rem 1.125rem; }
	.main-nav .menu a { font-size: 0.9375rem; }
	.main-nav .menu-cta > a { padding-inline: 0.875rem; }
}
@media (max-width: 64em) {
	.main-nav__menus { gap: 0.875rem; }
	.main-nav .menu { gap: 0.25rem 0.875rem; }
	.main-nav .menu a { font-size: 0.875rem; }
}
@media (max-width: 56.24em) {
	.main-nav__inner { min-height: 4rem; flex-wrap: wrap; }
	.main-nav__mark { display: block; }
	.main-nav__mark img, .main-nav__mark .logo-svg { height: 2.25rem; }
	.main-nav__quick { display: flex; gap: 0.5rem; margin-left: auto; }
	.main-nav__quick a { font-size: var(--fs-small); font-weight: 600; text-decoration: none; padding: 0.5rem 0.75rem; min-height: 2.75rem; display: inline-flex; align-items: center; border-radius: var(--radius); color: var(--c-primary); }
	.main-nav__toggle {
		display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.5rem 0.875rem;
		border: 2px solid var(--c-primary); border-radius: var(--radius); background: transparent; color: var(--c-primary);
		font: 600 var(--fs-small) var(--font-body); cursor: pointer;
	}
	.main-nav__toggle-bars, .main-nav__toggle-bars::before, .main-nav__toggle-bars::after {
		display: block; width: 1.125rem; height: 2px; background: currentColor; position: relative; content: "";
	}
	.main-nav__toggle-bars::before { position: absolute; top: -6px; }
	.main-nav__toggle-bars::after { position: absolute; top: 6px; }
	.main-nav__menus { display: none; flex-basis: 100%; grid-template-columns: 1fr; gap: 0; padding-bottom: var(--sp-2); }
	.main-nav.is-open .main-nav__menus { display: grid; }
	.main-nav__cross { display: none; }
	.main-nav .menu { flex-direction: column; gap: 0; justify-content: flex-start !important; }
	.main-nav .menu a { width: 100%; border-bottom: 1px solid var(--c-line); min-height: 3.25rem; }
	.main-nav .menu-cta { margin-top: var(--sp-2); }
	.main-nav .menu-cta > a { justify-content: center; min-height: 3rem; border-bottom: 0; }
}
@media (max-width: 26em) {
	.main-nav__quick a:last-child { display: none; }
}

/* 6. Components ---------------------------------------------------------- */
.btn, .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 3rem; padding: 0.75rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent;
	font: 600 var(--fs-btn)/1.2 var(--font-body); text-decoration: none; cursor: pointer; text-align: center;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.btn--primary, .wp-block-button__link { background: var(--c-primary); color: var(--c-on-primary); }
.btn--primary:hover, .wp-block-button__link:hover { background: color-mix(in srgb, var(--c-primary) 85%, var(--c-ink)); color: var(--c-on-primary); }
.btn--secondary, .is-style-outline .wp-block-button__link { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--secondary:hover, .is-style-outline .wp-block-button__link:hover { background: color-mix(in srgb, var(--c-primary) 8%, transparent); color: var(--c-primary); }
.btn--photo { background: transparent; color: #fff; border-color: #fff; }
.btn--photo:hover { background: rgb(255 255 255 / 0.12); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.btn--block { width: 100%; }

.card {
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}
.accent-bar { display: block; width: 2.5rem; height: 0.375rem; border-radius: 3px; background: var(--g2); margin-bottom: var(--sp-2); }

/* Glass colours */
.glass-1 { background: var(--g1); }
.glass-2 { background: var(--g2); }
.glass-3 { background: var(--g3); }
.glass-4 { background: var(--g4); }
.glass-light { background: var(--c-bg); }

/* Glass mosaic: decorative, based on the stained-glass wall */
.mosaic {
	display: flex; gap: var(--lead); padding: var(--lead); background: var(--c-ink);
	border-radius: 4px; aspect-ratio: 6 / 5; width: 100%;
}
.mosaic--tall { aspect-ratio: 4 / 5; }
.mosaic--wide { aspect-ratio: 6 / 5; }
.mosaic__col { display: flex; flex-direction: column; gap: var(--lead); flex-basis: 0; min-width: 0; }
.mosaic__pane { display: block; flex-basis: 0; min-height: 0; }
.glass-strip { display: flex; gap: 4px; padding: 4px; height: 1.75rem; background: var(--c-ink); }
.glass-strip span { flex-basis: 0; }

/* Tiles (sacraments, pastoral groups) */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
.tile {
	position: relative; display: flex; flex-direction: column; gap: 0.75rem; padding: var(--sp-3);
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tile__pane { width: 2rem; height: 2.75rem; border-radius: 3px; }
.tile__link, .tile__title { font-weight: 600; font-size: var(--fs-h4); line-height: 1.3; color: var(--c-ink); text-decoration: none; }
.tile__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.tile__more { font-size: var(--fs-small); color: var(--c-primary); margin-top: auto; }

/* 7. Homepage sections --------------------------------------------------- */
.welcome__photo { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.mass-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); margin-bottom: var(--sp-3); }
.mass-card h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-h4); margin: 0; }
.mass-card .town { color: var(--c-muted); font-size: var(--fs-small); margin: 0.125rem 0 var(--sp-1); }
.mass-card ul { list-style: none; padding: 0; margin: 0 0 var(--sp-2); }
.mass-card li { padding-block: 0.25rem; }
.mass-card a { font-weight: 600; font-size: var(--fs-small); }
.note { font-size: var(--fs-small); color: var(--c-muted); }

.action-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.action-card {
	position: relative; display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem 1.75rem;
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.action-card__pane { flex: none; width: 3rem; height: 4rem; border-radius: 4px; }
.action-card__text { flex: 1; }
.action-card a { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--c-ink); text-decoration: none; line-height: 1.25; }
.action-card a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.action-card p { margin: 0.25rem 0 0; font-size: var(--fs-small); color: var(--c-muted); }
.action-card__arrow { color: var(--c-primary); font-size: 1.5rem; }

.event-list { list-style: none; margin: 0 0 var(--sp-3); padding: 0; }
.event-list li { display: grid; grid-template-columns: 7rem 1fr; gap: var(--sp-2); padding-block: 0.875rem; border-bottom: 1px solid var(--c-line); }
.event-list .date { font-weight: 600; color: var(--c-primary); }
.event-list a { color: var(--c-ink); text-decoration: none; font-weight: 500; }
.event-list a:hover { color: var(--c-primary); text-decoration: underline; }
.event-feature { display: grid; grid-template-columns: minmax(8rem, 13.75rem) 1fr; overflow: hidden; padding: 0; position: relative; }
.event-feature__poster { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2 / 3; background: color-mix(in srgb, var(--c-ink) 8%, var(--c-bg)); }
.event-feature__body { padding: 1.75rem; align-self: center; }
.event-feature__when { color: var(--c-accent); font-size: var(--fs-small); font-weight: 600; margin-bottom: 0.25rem; }
.event-feature h3 { margin: 0 0 var(--sp-1); }
.event-feature h3 a { color: var(--c-ink); text-decoration: none; }
.event-feature h3 a::after { content: ""; position: absolute; inset: 0; }

.parish-family__grid { display: grid; gap: var(--sp-3); align-items: stretch; }
@media (min-width: 56.25em) { .parish-family__grid { grid-template-columns: 1.5fr 1fr; } }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-line); min-height: 22rem; background: var(--c-surface); }
.map-frame iframe { width: 100%; height: 100%; min-height: 22rem; border: 0; }
.parish-list { list-style: none; margin: 0; padding: var(--sp-3); display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.parish-list h3 { font: 600 var(--fs-h4)/1.3 var(--font-body); margin: 0 0 0.25rem; }
.parish-list p { margin: 0; font-size: var(--fs-small); }
.parish-list .pin { display: inline-block; width: 0.875rem; height: 0.875rem; border-radius: 50%; margin-right: 0.5rem; vertical-align: -0.05em; }

/* 8. Inner pages --------------------------------------------------------- */
.page-title { padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem) var(--sp-4); }
.page-title h1 { margin-bottom: var(--sp-2); }
.page-title__intro { max-width: 45rem; margin: 0; }
.breadcrumbs ol { list-style: none; margin: 0 0 var(--sp-2); padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: var(--fs-small); color: var(--c-muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.5rem; }
.breadcrumbs a { color: var(--c-muted); }

.page-body { padding-bottom: var(--section-y); }
.layout-sidebar { display: grid; gap: var(--sp-5); }
@media (min-width: 56.25em) { .layout-sidebar { grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 5rem; align-items: start; } .layout-sidebar aside { position: sticky; top: 6.5rem; } }
.sidebar > * + * { margin-top: var(--sp-3); }
.sidebar h2 { font-size: var(--fs-h3); margin: 0 0 var(--sp-1); }
.sidebar p { margin-bottom: 0.5rem; }

.entry-content { max-width: 47.5rem; }
.layout-sidebar .entry-content { max-width: none; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content li { margin-bottom: 0.375rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }

.is-style-callout {
	position: relative; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
	padding: 1.5rem 1.5rem 1.5rem 2.75rem; margin-bottom: var(--sp-4);
}
.is-style-callout::before { content: ""; position: absolute; left: 1.25rem; top: 1.5rem; bottom: 1.5rem; width: 0.5rem; border-radius: 4px; background: var(--g2); }
.is-style-callout > :last-child { margin-bottom: 0; }
.is-style-callout h3, .is-style-callout h2 { font: 600 var(--fs-h4)/1.3 var(--font-body); margin: 0 0 0.375rem; }
.is-style-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.75rem; margin-block: var(--sp-4); }
.is-style-card > :last-child { margin-bottom: 0; }

ol.is-style-timeline { list-style: none; padding: 0; counter-reset: step; }
ol.is-style-timeline > li { counter-increment: step; position: relative; padding: 0.75rem 0 1rem 4.25rem; min-height: 4.25rem; margin: 0; }
ol.is-style-timeline > li::before {
	content: counter(step); position: absolute; left: 0; top: 0.75rem; width: 2.75rem; height: 3.25rem;
	display: grid; place-items: center; border-radius: 4px; background: var(--g1); color: #fff;
	font: 400 var(--fs-h3)/1 var(--font-display);
}
ol.is-style-timeline > li:nth-child(4n+2)::before { background: var(--g3); }
ol.is-style-timeline > li:nth-child(4n+3)::before { background: var(--g4); }
ol.is-style-timeline > li:nth-child(4n+4)::before { background: var(--g2); color: var(--c-ink); }
ol.is-style-timeline strong { display: block; font-size: var(--fs-h4); }

.wp-block-details { border-bottom: 1px solid var(--c-line); padding: 0; margin: 0; }
.wp-block-details summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2);
	padding: 1.25rem 0; font-weight: 600; font-size: var(--fs-h4);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font: 400 1.75rem/1 var(--font-display); color: var(--c-primary); }
.wp-block-details[open] summary::after { content: "\2212"; }
.wp-block-details > :not(summary) { margin-top: 0; }
.wp-block-details > :last-child { padding-bottom: 1.25rem; margin-bottom: 0; }
.wp-block-details + :not(.wp-block-details) { margin-top: var(--sp-4); }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); max-width: 47.5rem; }
.post-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.post-list h2 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 600; margin: 0; }
.pagination { margin-top: var(--sp-4); display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.pagination .page-numbers { padding: 0.5rem 0.875rem; border-radius: var(--radius); border: 1px solid var(--c-line); text-decoration: none; }
.pagination .current { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }

.event-single { display: grid; gap: var(--sp-4); }
@media (min-width: 56.25em) { .event-single { grid-template-columns: 22rem 1fr; align-items: start; } }
.event-single__poster img { border-radius: var(--radius); width: 100%; }
.event-meta { list-style: none; padding: 0; margin: 0 0 var(--sp-3); }
.event-meta li { padding-block: 0.375rem; border-bottom: 1px solid var(--c-line); }
.event-meta strong { display: inline-block; min-width: 4.5rem; }

/* 9. Mass intentions ----------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.toolbar .btn-row { margin-left: auto; }
.month-switch { display: flex; align-items: center; gap: 0.25rem; }
.month-switch h2 { margin: 0; font-size: var(--fs-h3); min-width: 11ch; text-align: center; }
.month-switch a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius); text-decoration: none; font: 400 1.75rem/1 var(--font-display); }
.month-switch a:hover { background: color-mix(in srgb, var(--c-primary) 10%, transparent); }

.intentions-wrap { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.intentions { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.intentions caption { text-align: left; padding: var(--sp-2) var(--sp-3); }
.intentions th, .intentions td { text-align: left; vertical-align: top; padding: 0.875rem 1rem; border-bottom: 1px solid var(--c-line); }
.intentions thead th { background: var(--c-ink); color: var(--c-surface); font-weight: 600; font-size: var(--fs-body); }
.intentions tbody th { font-weight: 600; white-space: nowrap; width: 8rem; }
.intentions tr.is-sunday { background: var(--c-bg); }
.intentions .entry { display: block; }
.intentions .entry + .entry { margin-top: 0.375rem; }
.intentions .by { color: var(--c-muted); }
.intentions .is-empty, .intentions .no-mass { color: var(--c-muted); }
@media (max-width: 47.99em) {
	.intentions thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.intentions tr { display: block; padding: 0.75rem 1rem; border-bottom: 1px solid var(--c-line); }
	.intentions tbody th, .intentions td { display: block; border: 0; padding: 0.25rem 0; width: auto; }
	.intentions tbody th { font-size: var(--fs-body); padding-bottom: 0.375rem; }
	.intentions td::before { content: attr(data-label); display: block; font-weight: 600; color: var(--c-ink); }
	.intentions td.is-empty-cell { display: none; }
}

/* 10. Footer ------------------------------------------------------------- */
.site-footer { background: var(--c-ink); color: var(--c-surface); }
.site-footer a { color: var(--c-surface); }
.site-footer__grid { display: grid; gap: var(--sp-4); padding-block: 4.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer h2 { font-size: var(--fs-h3); margin: 0 0 var(--sp-1); color: #fff; }
.site-footer h3 { font: 600 var(--fs-h4)/1.3 var(--font-body); margin: 0 0 var(--sp-1); color: #fff; }
.site-footer p, .site-footer li { font-size: var(--fs-small); color: color-mix(in srgb, var(--c-surface) 88%, var(--c-ink)); margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer__bottom { border-top: 1px solid rgb(255 255 255 / 0.15); padding-block: var(--sp-3); font-size: var(--fs-small); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2); }

/* 11. Utilities ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.alignwide { max-width: 75rem; }
.wp-block-image figcaption, .wp-caption-text { font-size: var(--fs-small); color: var(--c-muted); }

/* Hero beam: wide and narrow rooflines */
.hero__beam--narrow { display: none; }
@media (max-width: 56.24em) {
	.hero__beam--wide { display: none; }
	.hero__beam--narrow { display: block; }
}

/* Mobile refinements ------------------------------------------------------ */
@media (max-width: 56.24em) {
	/* Hero: photo in the roofline on top, words on solid ink below for readability */
	.hero { height: auto; --photo-h: clamp(14rem, 55vw, 20rem); }
	.hero__photo { position: relative; height: var(--photo-h); }
	.hero__photo::after { display: none; }
	.hero__beam { inset: 0 0 auto 0; height: var(--photo-h); }
	.hero__content { position: relative; bottom: auto; background: var(--c-ink); padding-block: 1.75rem 2.25rem; }
	.hero__content .btn { flex: 1 1 auto; }
	/* Mosaics become a short band on small screens */
	.mosaic, .mosaic--tall { aspect-ratio: 5 / 2; }
	/* One logo at a time: the nav mark appears once the bar sticks */
	.main-nav__mark { display: none; }
	.main-nav.is-stuck .main-nav__mark { display: block; }
	.intentions tr.is-empty-row { display: none; }
}
.mass-card ul:last-child { margin-bottom: 0; }

/* Clickable cards: the whole card is the link ---------------------------- */
.tile, .action-card, .event-feature, .event-row { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease; }
.tile:not(.tile--placeholder):hover, .tile:not(.tile--placeholder):focus-within,
.action-card:hover, .action-card:focus-within,
.event-feature:hover, .event-feature:focus-within {
	transform: translateY(-3px);
	border-color: var(--c-primary);
	box-shadow: 0 0.75rem 1.75rem color-mix(in srgb, var(--c-ink) 16%, transparent);
}
.tile:not(.tile--placeholder):hover .tile__link, .tile:not(.tile--placeholder):focus-within .tile__link { color: var(--c-primary); }
.tile__arrow, .action-card__arrow { display: inline-block; transition: transform 0.18s ease; }
.tile:hover .tile__arrow, .tile:focus-within .tile__arrow,
.action-card:hover .action-card__arrow, .action-card:focus-within .action-card__arrow { transform: translateX(4px); }
/* Keyboard focus outlines the whole card rather than the words */
.tile__link:focus-visible, .action-card a:focus-visible, .event-feature h3 a:focus-visible, .event-row a:focus-visible { outline: none; }
.tile:has(.tile__link:focus-visible), .action-card:has(a:focus-visible), .event-feature:has(a:focus-visible) { outline: 3px solid var(--c-primary); outline-offset: 3px; }
.tile--placeholder { background: transparent; border-style: dashed; box-shadow: none; }
.tile--placeholder:hover { border-color: var(--c-line); box-shadow: none; }
.tile__hint { font-size: var(--fs-small); color: var(--c-muted); }
/* Event rows: whole row clickable */
.event-row { position: relative; padding-inline: 0.5rem; margin-inline: -0.5rem; border-radius: 4px; }
.event-row a::after { content: ""; position: absolute; inset: 0; }
.event-row:hover, .event-row:focus-within { background: color-mix(in srgb, var(--c-primary) 7%, transparent); }
.event-row:hover a { color: var(--c-primary); }
.event-row:has(a:focus-visible) { outline: 3px solid var(--c-primary); outline-offset: 0; }

/* Photo in place of a mosaic */
.visual-photo { width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 4px; }
.visual-photo.mosaic--tall { aspect-ratio: 4 / 5; }
@media (max-width: 56.24em) { .visual-photo, .visual-photo.mosaic--tall { aspect-ratio: 3 / 2; } }
/* Map frame and the parish list under it */
.map-frame--map { min-height: 26rem; }
.map-frame--map iframe { display: block; height: 100%; min-height: 26rem; }
.parish-list--row { padding: var(--sp-4) 0 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

/* Mobile homepage: shorter scroll, key info first ------------------------- */
@media (max-width: 56.24em) {
	/* 1. The hero already shows the church; skip the second photo */
	.home .welcome__photo { display: none; }
	.home .welcome__photo-wrap { display: none; }

	/* 2. Mass times as compact rows in one card */
	.mass-grid { gap: 0; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
	.mass-card {
		display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: var(--sp-2); align-items: start;
		padding: 0.875rem 1rem; border: 0; border-radius: 0; box-shadow: none; background: transparent;
	}
	.mass-card + .mass-card { border-top: 1px solid var(--c-line); }
	.mass-card .accent-bar { display: none; }
	.mass-card h3 { grid-column: 1; font-size: var(--fs-body); }
	.mass-card .town { grid-column: 1; margin: 0; }
	.mass-card ul { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: right; font-weight: 600; font-size: var(--fs-small); }
	.mass-card li { padding-block: 0.125rem; }
	.mass-card > a { grid-column: 1 / -1; margin-top: 0.375rem; }

	/* 3. Decorative mosaics on the homepage: hidden on phones (photos still show) */
	.home main .mosaic, .home main .visual-slot:has(> .mosaic) { display: none; }

	/* 4 and 5. Sacrament and group tiles: two short columns */
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
	.tile { padding: 1rem; gap: 0.5rem; min-height: 6.5rem; }
	.tile__pane { width: 1.25rem; height: 1.75rem; }
	.tile__link, .tile__title { font-size: var(--fs-body); }
	.tile__hint { font-size: 0.75rem; }

	/* 6. Featured event: small poster beside the text */
	.event-feature { grid-template-columns: 6.5rem 1fr; }
	.event-feature__poster { aspect-ratio: 2 / 3; max-height: none; height: 100%; }
	.event-feature__body { padding: 1rem; }
	.event-feature h3 { font-size: var(--fs-h4); }
	.event-feature__body p:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

	/* 7. Narrower date column */
	.event-list li { grid-template-columns: 4.25rem 1fr; gap: 0.75rem; }
}
@media (max-width: 22em) {
	.tiles { grid-template-columns: 1fr; }
	.mass-card { grid-template-columns: 1fr; }
	.mass-card ul { grid-column: 1; grid-row: auto; text-align: left; margin-top: 0.25rem; }
}

.section-tiles { margin-top: var(--sp-4); }

/* Quotes (Quote and Pullquote blocks) ------------------------------------- */
.entry-content blockquote, .wp-block-quote {
	margin: var(--sp-4) 0; padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 4px solid var(--c-primary); font-size: 1.1875rem; line-height: 1.6;
}
.entry-content blockquote p, .wp-block-quote p { margin: 0 0 0.5rem; }
.entry-content blockquote cite, .wp-block-quote cite,
.wp-block-quote p:last-child:not(:first-child) {
	display: block; font-size: var(--fs-small); font-style: normal; font-weight: 600; color: var(--c-muted);
}
.wp-block-pullquote { margin: var(--sp-4) 0; padding: var(--sp-3) 0; border-block: 3px solid var(--c-primary); text-align: center; }
.wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; font-size: 1.375rem; }
/* A quote placed inside another quote shows as one quote */
.wp-block-quote .wp-block-quote, .entry-content blockquote blockquote { border: 0; padding: 0; margin: 0; font-size: inherit; }
/* Section pages: six tiles sit as 3 + 3 on wide screens */
@media (min-width: 56.25em) { .section-tiles .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
a[href^="tel:"] { white-space: nowrap; }

/* Embedded Google map inside page content */
.map-embed { margin: var(--sp-2) 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-line); background: color-mix(in srgb, var(--c-ink) 6%, var(--c-bg)); }
.map-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 10; height: auto; border: 0; }
@media (max-width: 56.24em) { .map-embed iframe { aspect-ratio: 4 / 3; } }

/* Two-column content (parish pages): use the full width */
.entry-content:has(> .wp-block-columns) { max-width: none; }
.wp-block-columns { display: flex; gap: var(--sp-4); align-items: flex-start; margin: 0 0 var(--sp-4); }
.wp-block-column { min-width: 0; flex: 1 1 0; }
.wp-block-column > *:first-child { margin-top: 0; }
.parish-columns .is-style-card + .is-style-card { margin-top: var(--sp-3); }
@media (max-width: 56.24em) {
	.wp-block-columns { flex-direction: column; gap: var(--sp-3); }
	.wp-block-column { flex-basis: 100% !important; width: 100%; }
}

/* Glass strip under the main nav (stays with the sticky bar) */
.glass-strip--nav { height: 0.75rem; gap: 3px; padding: 3px 0; }
/* Section dividers: half-width glass strips, alternating sides */
.glass-divider { display: flex; position: relative; z-index: 1; height: 0; }
.glass-divider--right { justify-content: flex-end; }
.glass-divider--left { justify-content: flex-start; }
.glass-strip--divider { width: 50%; height: 1.125rem; gap: 3px; padding: 3px; transform: translateY(-50%); }
.glass-divider--right .glass-strip--divider { padding-right: 0; }
.glass-divider--left .glass-strip--divider { padding-left: 0; }
@media (max-width: 56.24em) { .glass-strip--divider { width: 70%; height: 0.75rem; } }

/* Mass intentions: message for a month with nothing posted yet */
.intentions-empty { padding: var(--sp-3); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); }
@media (max-width: 56.24em) { .intentions-wrap.is-empty { display: none; } }

/* Mass intentions: parish filter, print options, single-parish list */
.parish-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 var(--sp-2); }
.parish-filter a {
	display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.375rem 1rem;
	border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface);
	color: var(--c-ink); font-weight: 600; font-size: var(--fs-small); text-decoration: none;
}
.parish-filter a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.parish-filter a[aria-current] { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.print-options { margin: 0 0 var(--sp-3); border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.print-options summary { cursor: pointer; padding: 0.75rem 1rem; font-weight: 600; color: var(--c-primary); min-height: 2.75rem; }
.print-options form { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: flex-end; padding: 0 1rem 1rem; }
.print-options form p { margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.print-options label { font-weight: 600; font-size: var(--fs-small); }
.print-options select, .print-options input[type="date"] { min-height: 2.75rem; padding: 0.375rem 0.625rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; font: inherit; }
.print-options .hint { font-size: 0.8125rem; color: var(--c-muted); }
.intentions-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.intentions-list li { display: grid; grid-template-columns: 6rem 1fr; gap: var(--sp-2); padding: 0.75rem 1rem; }
.intentions-list li + li { border-top: 1px solid var(--c-line); }
.intentions-list li.is-sunday { background: color-mix(in srgb, var(--c-accent) 6%, var(--c-surface)); }
.intentions-list .il-day { font-weight: 700; }
.intentions-list .entry, .intentions-list .no-mass { display: block; }
.intentions-list .by { color: var(--c-muted); font-size: var(--fs-small); }
.print-options form p[hidden] { display: none; }
.print-options .pr-by { align-self: center; }
.print-options .pr-by label { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; font-weight: 400; font-size: var(--fs-body); }
.print-options .pr-by input { width: 1.25rem; height: 1.25rem; }

/* Monogram in the menu bar (Parish Settings > Symbol) */
.nav-symbol--mark { height: 2.75rem; width: auto; }
.nav-symbol--mark .logo-mark { fill: var(--symbol-colour, var(--c-primary)); }
.note--confessions { font-weight: 600; color: var(--c-ink); margin-top: var(--sp-2); }
.bulletin-for { margin: 0 0 0.25rem; font-size: var(--fs-small); font-weight: 600; color: var(--c-accent); }
