/*
 * The public website, sjanorthumberland.ca (templates/public). Stands alone: no Frappe or Bootstrap styles.
 * Follows the SJA brand book (2015): white and green predominant, Avenir type (Avenir Next on Apple devices; Nunito Sans, a close free web font, elsewhere; Arial last).
 * The logo red stays in the logo. --brand is Pantone 7739; --green-600 is a deeper shade of it for text and buttons,
 * since white on the brand green itself is too low contrast for body-size text.
 */

:root {
	--green-950: #07201a;
	--green-900: #0b2c1e;
	--green-800: #12432d;
	--green-700: #18573a;
	--green-600: #00773b;
	--brand: #039347;
	--lime: #8dc640;
	--burgundy: #822433;
	--green-200: #cfddd7;
	--green-100: #e5ebe9;
	--green-50: #f3f7f5;
	--red: #d52b1e;

	--ink: #14211b;
	--muted: #4f6158;
	--line: #dbe4df;
	--paper: #ffffff;
	--tint: #f3f7f5;

	--radius: 14px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(7, 32, 26, .06), 0 8px 24px rgba(7, 32, 26, .08);
	--shadow-lg: 0 2px 4px rgba(7, 32, 26, .06), 0 18px 40px rgba(7, 32, 26, .14);
	--wrap: 1160px;
	--gutter: clamp(16px, 4vw, 32px);
	--font: "Avenir Next", "Avenir", "Nunito Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-600); text-underline-offset: 3px; }
a:hover { color: var(--green-800); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--green-900); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

.sr-only {
	position: absolute; 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: 12px; top: -48px; z-index: 100;
	background: var(--green-900); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 780px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--sm { width: 1em; height: 1em; }

/* ---------- buttons, chips, small bits ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .75em 1.3em; border-radius: 999px; border: 2px solid transparent;
	font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .55em 1.05em; font-size: .9rem; }
.btn--lg { padding: .9em 1.6em; font-size: 1.05rem; }
.btn--primary { background: var(--green-600); color: #fff; }
.btn--primary:hover { background: var(--green-800); color: #fff; }
.btn--ghost { border-color: var(--green-200); color: var(--green-700); background: #fff; }
.btn--ghost:hover { border-color: var(--green-600); color: var(--green-800); }
.btn--light { background: #fff; color: var(--green-800); }
.btn--light:hover { background: var(--green-50); color: var(--green-900); }
.btn--outline-light { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

.eyebrow {
	display: inline-flex; align-items: center; gap: .6em; margin: 0 0 .8em;
	font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--green-600);
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--brand); }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: var(--lime); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 46em; }

.chip {
	display: inline-flex; align-items: center; gap: .35em; padding: .2em .65em; border-radius: 999px;
	font-size: .78rem; font-weight: 700; background: var(--green-50); color: var(--green-700); text-decoration: none;
}
.chip--facebook { background: #e8f0fe; color: #1a56c4; }
.chip--instagram { background: #fde8f1; color: #b4236b; }
a.chip:hover { filter: brightness(.96); }

.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-decoration: none; color: var(--green-600); }
.link-arrow .icon { transition: transform .15s; }
a.link-arrow:hover .icon, a:hover > .link-arrow .icon, .program-card:hover .link-arrow .icon { transform: translateX(3px); }

/* ---------- announcement + header ---------- */
.announce { background: var(--burgundy); color: #fff; font-weight: 700; font-size: .92rem; text-align: center; }
.announce .wrap { padding-top: .55em; padding-bottom: .55em; }
.announce a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.announce a:hover { text-decoration: underline; }

.site-header {
	position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green-900); flex: none; }
.brand:hover { color: var(--green-900); }
.brand__emblem { width: 44px; height: 44px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-weight: 900; font-size: 1.08rem; letter-spacing: -.01em; }
.brand__unit { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green-600); margin-top: 3px; }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand__unit { color: var(--green-200); }

.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav__list a {
	display: block; padding: .5em .75em; border-radius: 8px; text-decoration: none;
	color: var(--ink); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.site-nav__list a:hover { background: var(--green-50); color: var(--green-800); }
.site-nav__list a[aria-current="page"] { color: var(--green-600); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 8px 8px 0 0; }

.nav-toggle {
	display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px;
	border: 1px solid var(--line); background: #fff; color: var(--green-900); cursor: pointer;
	align-items: center; justify-content: center;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }

@media (max-width: 1180px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 12px;
		background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
		padding: 12px var(--gutter) 20px;
	}
	.site-nav.is-open { display: flex; }
	.site-nav__list { flex-direction: column; }
	.site-nav__list a { padding: .8em .6em; font-size: 1.05rem; border-bottom: 1px solid var(--green-50); border-radius: 0; }
	.site-nav__list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--brand); padding-left: 1em; border-radius: 0; }
	.site-nav__actions .btn { width: 100%; padding: .9em; font-size: 1rem; }
}

/* ---------- home hero ---------- */
.hero {
	position: relative; isolation: isolate; overflow: hidden; color: #fff;
	min-height: min(78vh, 680px); display: flex; align-items: flex-end; background: var(--green-900);
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(.8); }
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(90deg, rgba(7, 32, 26, .92) 0%, rgba(7, 32, 26, .72) 45%, rgba(7, 32, 26, .25) 100%),
		linear-gradient(0deg, rgba(7, 32, 26, .55) 0%, rgba(7, 32, 26, 0) 50%);
}
.hero__inner { padding-top: clamp(80px, 14vh, 140px); padding-bottom: clamp(56px, 10vh, 104px); }
.hero__title { color: #fff; font-size: clamp(2.3rem, 5.6vw, 4rem); max-width: 14em; margin-bottom: .35em; text-wrap: balance; }
.hero__text { font-size: clamp(1.08rem, 1.8vw, 1.3rem); max-width: 34em; color: rgba(255, 255, 255, .9); margin-bottom: 1.8em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tint { background: var(--tint); }
.section--flush { padding: 0; }
.section--top-tight { padding-top: 8px; }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-title { margin-bottom: .3em; text-wrap: balance; }

/* programs */
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.program-card {
	display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden;
	text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line);
	transition: transform .2s, box-shadow .2s;
}
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.program-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-100); }
.program-card__icon {
	position: absolute; right: 16px; bottom: 16px; width: 64px; height: 64px; border-radius: 50%;
	background: #fff; box-shadow: 0 4px 14px rgba(7, 32, 26, .25); padding: 4px;
}
.program-card__icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; transform: none !important; }
.program-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.program-card:hover .program-card__media img { transform: scale(1.04); }
.program-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.program-card__body h3 { font-size: 1.3rem; font-weight: 900; }
.program-card__body p { color: var(--muted); flex: 1; }

/* split (coverage) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.check-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; }
.check-list .icon { color: #fff; background: var(--brand); border-radius: 50%; padding: 4px; width: 26px; height: 26px; margin-top: 1px; }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-card { position: relative; display: flex; flex-direction: column; }
.news-card__link { color: inherit; text-decoration: none; }
.news-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.news-card__link:hover { color: var(--green-700); }
.news-card__link:focus-visible { outline: none; }
.news-card:focus-within { outline: 3px solid var(--lime); outline-offset: 2px; }
.news-card__event { position: relative; z-index: 1; margin: 14px 0 0; }
.chip--event { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); }
.chip--event:hover { background: var(--green-100); color: var(--green-800); }
.article__event { margin: -4px 0 8px; }
.news-card__media { aspect-ratio: 16 / 10; background: var(--green-100); overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__media--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--green-700), var(--green-900)); }
.news-card__media--empty .news-card__emblem { width: 64px; height: 64px; object-fit: contain; opacity: .9; }
.news-card__body { padding: 18px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.news-card__teaser { flex: 1; }
.news-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); font-weight: 700; margin-bottom: .6em; }
.news-card__title { font-size: 1.15rem; font-weight: 900; margin-bottom: .4em; }
.news-card__teaser { color: var(--muted); font-size: .95rem; margin: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; color: var(--muted); font-weight: 700; }
.empty { text-align: center; padding: 48px 16px; background: var(--tint); border-radius: var(--radius); color: var(--muted); }
.follow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--muted); margin-top: 1.2em; }

/* photos */
.photo-strip { display: grid; grid-template-columns: repeat(6, 1fr); }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.photo-grid__item { margin: 0; }
.photo-grid__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.photo-grid__item figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.photo-grid--article { margin: 8px 0 24px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ---------- inner pages ---------- */
.page-hero { background: linear-gradient(180deg, var(--green-50), #fff); padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px); }
.page-hero--plain { padding-bottom: clamp(24px, 4vw, 40px); }
.page-hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.page-hero__media { margin: 0; }
.page-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.prose { font-size: 1.06rem; max-width: 44em; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose h3 { font-size: 1.3rem; font-weight: 900; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--green-600); }
.prose img { border-radius: var(--radius-sm); margin: 1.2em 0; }
.prose blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.1em; border-left: 4px solid var(--brand); color: var(--muted); }
.prose > :first-child { margin-top: 0; }

.side-card, .card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.side-card { position: sticky; top: 100px; border-top: 4px solid var(--brand); }
.side-card h2, .card h2 { font-size: 1.3rem; }
.side-card p, .card p { color: var(--muted); }
.side-card__actions { display: grid; gap: 10px; }
.card--green { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.card--green h2 { color: #fff; }
.card--green p { color: rgba(255, 255, 255, .85); }

/* article */
.article { padding: clamp(32px, 5vw, 56px) 0 clamp(40px, 6vw, 72px); }
.article__head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-wrap: balance; }
.link-back { display: inline-block; margin-bottom: 18px; font-weight: 700; text-decoration: none; }
.article__media { margin-top: 8px; margin-bottom: 28px; }
.article__media img { width: 100%; border-radius: var(--radius); max-height: 640px; object-fit: cover; }
.article__source { margin-top: 8px; }

/* ---------- contact ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact-aside { display: grid; gap: 20px; }
.form { padding: clamp(22px, 3vw, 34px); }
.form__row { margin-bottom: 18px; }
.form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-weight: 700; font-size: .95rem; }
.field__optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
	width: 100%; font: 400 1rem/1.4 var(--font); color: var(--ink);
	padding: .75em .9em; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(0, 102, 51, .14); }
.field [aria-invalid="true"] { border-color: var(--red); }
.form__event { border: 0; margin: 4px 0 18px; padding: 18px 18px 2px; background: var(--tint); border-radius: var(--radius-sm); }
.form__event legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-weight: 900; color: var(--green-800); }
.form__event > .form__row { clear: both; }
.form__notice { margin: 0 0 18px; padding: 16px 18px; background: var(--green-50); border: 1px solid var(--green-200); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); }
.form__notice p { margin: 0 0 10px; }
.form__notice .form__notice-small { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.form.is-sent .form__notice { display: none; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-bottom: 14px; }
.form__note { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
.form.is-sent .form__note { display: none; }
.form__status { min-height: 1.4em; font-weight: 700; margin: 0 0 14px; }
.form__status.is-error { color: var(--red); }
.form__status.is-ok { color: var(--green-600); }
.form.is-sent .form__row, .form.is-sent .form__event, .form.is-sent .cf-turnstile, .form.is-sent button { display: none; }
.form.is-sent .form__status { font-size: 1.2rem; margin: 0; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .icon { margin-top: 2px; color: var(--green-200); }
.contact-list a { color: inherit; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-list--dark .icon { color: var(--green-600); }
.contact-list--dark a { color: var(--ink); font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-950); color: rgba(255, 255, 255, .78); font-size: .95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-top: 64px; padding-bottom: 40px; }
.site-footer__brand p { margin: 16px 0 18px; max-width: 24em; }
.site-footer__heading { font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.site-footer a { color: rgba(255, 255, 255, .88); }
.site-footer a:hover { color: #fff; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.link-list a { text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.social-links { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0; }
.social-links a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); transition: background .15s; }
.social-links a:hover { background: var(--brand); }
.site-footer__base { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; padding-bottom: 28px; font-size: .85rem; }
.site-footer__base p { margin: 0; }
.site-footer__base p a { margin-left: .6em; }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
	.program-grid, .news-grid { grid-template-columns: 1fr 1fr; }
	.split, .page-hero__inner, .content-layout, .contact-layout { grid-template-columns: 1fr; }
	.split__media { order: 2; }
	.side-card { position: static; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.photo-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.program-grid, .news-grid, .form__row--2 { grid-template-columns: 1fr; }
	.site-header__inner { min-height: 66px; }
	.brand__emblem { width: 38px; height: 38px; }
	.brand__name { font-size: 1rem; }
	.hero { min-height: 0; }
	.hero::after { background: linear-gradient(0deg, rgba(7, 32, 26, .94) 0%, rgba(7, 32, 26, .7) 60%, rgba(7, 32, 26, .45) 100%); }
	.hero__actions .btn { width: 100%; }
	.site-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
	.side-card__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
