/* St. John Church Suite — public styles.
   Colours fall back to the church palette if the theme has not set them. */

:root {
	--sjc-navy: var(--sj-navy, #3f4459);
	--sjc-slate: var(--sj-slate, #575d78);
	--sjc-orange: var(--sj-orange, #e8734a);
	--sjc-purple: var(--sj-purple, #5e4a6b);
	--sjc-green: var(--sj-green, #4cc47f);
	--sjc-bg: var(--sj-bg, #ebebeb);
	--sjc-ink: var(--sj-ink, #2f3446);
	--sjc-muted: var(--sj-muted, #6b7085);
	--sjc-line: rgba(63, 68, 89, .16);
	--sjc-display: var(--sj-display, "Archivo", system-ui, sans-serif);
	--sjc-body: var(--sj-body, inherit);
}

/* ---------- shared bits ---------- */

.sjc-eyebrow {
	font-family: var(--sjc-display);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--sjc-muted);
	margin: 0 0 .5rem;
}

.sjc-muted { color: var(--sjc-muted); }

.sjc-btn {
	display: inline-block;
	font-family: var(--sjc-display);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	padding: .95em 1.9em;
	background: var(--sjc-orange);
	color: #fff;
	border: 1px solid var(--sjc-orange);
	border-radius: 0;
	cursor: pointer;
	text-decoration: none;
	transition: background .18s ease, color .18s ease;
}

.sjc-btn:hover,
.sjc-btn:focus-visible { background: var(--sjc-navy); border-color: var(--sjc-navy); color: #fff; }

.sjc-btn--ghost { background: transparent; color: var(--sjc-navy); border-color: currentColor; }
.sjc-btn--ghost:hover { background: var(--sjc-navy); color: #fff; }
.sjc-btn--small { padding: .6em 1.2em; font-size: .68rem; }
.sjc-btn--wide { width: 100%; text-align: center; }

.sjc-empty {
	padding: 1.5rem;
	background: rgba(63, 68, 89, .05);
	color: var(--sjc-muted);
	border-left: 3px solid var(--sjc-line);
}

.sjc-alert {
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	border-left: 4px solid var(--sjc-green);
	background: rgba(76, 196, 127, .12);
	color: var(--sjc-ink);
}

.sjc-alert--error { border-left-color: var(--sjc-orange); background: rgba(232, 115, 74, .12); }

/* ---------- scripture links ---------- */

.sjc-ref {
	color: inherit;
	text-decoration: none;
	border-bottom: 2px solid rgba(232, 115, 74, .45);
	padding-bottom: 1px;
	white-space: nowrap;
	transition: border-color .15s ease, background .15s ease;
}

.sjc-ref:hover,
.sjc-ref:focus-visible {
	border-bottom-color: var(--sjc-orange);
	background: rgba(232, 115, 74, .1);
}

.sjc-book-grid {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 1px;
	background: var(--sjc-line);
	border: 1px solid var(--sjc-line);
}

.sjc-book-grid a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 1rem 1.1rem;
	background: #fff;
	text-decoration: none;
	color: var(--sjc-navy);
}

.sjc-book-grid a:hover { background: var(--sjc-navy); color: #fff; }
.sjc-book-grid__name { font-family: var(--sjc-display); font-weight: 600; }
.sjc-book-grid__count { font-size: .8rem; opacity: .6; font-variant-numeric: tabular-nums; }

/* ---------- video ---------- */

.sjc-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	margin: 0 0 1.25rem;
}

.sjc-video iframe,
.sjc-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.sjc-video--file { aspect-ratio: auto; background: none; }
.sjc-video--file video { position: static; }

/* ---------- live ---------- */

.sjc-live__badge {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--sjc-display);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--sjc-orange);
	margin: 0 0 .9rem;
}

.sjc-live__dot {
	width: .55rem;
	height: .55rem;
	border-radius: 50%;
	background: var(--sjc-orange);
	box-shadow: 0 0 0 0 rgba(232, 115, 74, .55);
	animation: sjc-pulse 2s infinite;
}

@keyframes sjc-pulse {
	70% { box-shadow: 0 0 0 .7rem rgba(232, 115, 74, 0); }
	100% { box-shadow: 0 0 0 0 rgba(232, 115, 74, 0); }
}

.sjc-live__badge--next { color: var(--sjc-muted); }
.sjc-live__next { font-family: var(--sjc-display); font-size: 1.5rem; font-weight: 700; margin: 0 0 1rem; }
.sjc-live__countdown { font-variant-numeric: tabular-nums; color: var(--sjc-orange); }
.sjc-live__replay { margin: 0 0 1rem; }
.sjc-live__link { font-size: .9rem; }
.sjc-fb-page { max-width: 500px; }

@media (prefers-reduced-motion: reduce) {
	.sjc-live__dot { animation: none; }
}

/* ---------- cards ---------- */

.sjc-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.75rem;
}

.sjc-cards--grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sjc-cards--list { grid-template-columns: 1fr; }

.sjc-card-item__link {
	display: block;
	text-decoration: none;
	color: var(--sjc-navy);
}

.sjc-card-item__media {
	display: block;
	overflow: hidden;
	margin-bottom: 1rem;
	aspect-ratio: 3 / 2;
}

.sjc-card-item__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.sjc-card-item__link:hover .sjc-card-item__media img { transform: scale(1.04); }

.sjc-card-item__date {
	display: block;
	font-family: var(--sjc-display);
	font-size: .68rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--sjc-muted);
	margin-bottom: .45rem;
}

.sjc-card-item__title {
	display: block;
	font-family: var(--sjc-display);
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.25;
}

.sjc-card-item__ref {
	display: block;
	margin-top: .4rem;
	color: var(--sjc-orange);
	font-size: .9rem;
}

/* ---------- prayer wall ---------- */

.sjc-wall {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 1.5rem;
}

.sjc-wall__item {
	break-inside: avoid;
	background: #fff;
	border-left: 3px solid var(--sjc-purple);
	padding: 1.25rem 1.4rem;
	margin: 0 0 1.5rem;
}

.sjc-wall__item.is-answered { border-left-color: var(--sjc-green); }
.sjc-wall__flag {
	font-family: var(--sjc-display);
	font-size: .65rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--sjc-green);
	margin: 0 0 .4rem;
}
.sjc-wall__text { margin: 0 0 .75rem; }
.sjc-wall__meta { margin: 0; font-size: .82rem; color: var(--sjc-muted); }

@media (max-width: 700px) { .sjc-wall { columns: 1; } }

/* ---------- service times ---------- */

.sjc-times { list-style: none; margin: 0; padding: 0; }

.sjc-times li {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	padding: .8rem 0;
	border-bottom: 1px solid var(--sjc-line);
}

.sjc-times__label { font-weight: 600; }
.sjc-times__time { font-family: var(--sjc-display); letter-spacing: .06em; color: var(--sjc-orange); white-space: nowrap; }

/* ---------- related ---------- */

.sjc-related { margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--sjc-line); }
.sjc-related__title { font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; }
.sjc-related__list { list-style: none; margin: 1rem 0 0; padding: 0; }
.sjc-related__list li { border-bottom: 1px solid var(--sjc-line); }
.sjc-related__list a { display: flex; gap: 1rem; padding: .8rem 0; text-decoration: none; color: var(--sjc-navy); }
.sjc-related__list a:hover { color: var(--sjc-orange); }
.sjc-related__date { color: var(--sjc-muted); font-size: .8rem; min-width: 8rem; }

/* ---------- forms ---------- */

.sjc-form-wrap { max-width: 640px; }
.sjc-form-title { margin: 0 0 1.5rem; }

.sjc-field { margin: 0 0 1.35rem; }

.sjc-field label {
	display: block;
	font-family: var(--sjc-display);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sjc-navy);
	margin-bottom: .5rem;
}

.sjc-field input[type="text"],
.sjc-field input[type="email"],
.sjc-field input[type="tel"],
.sjc-field input[type="url"],
.sjc-field input[type="date"],
.sjc-field input[type="time"],
.sjc-field input[type="number"],
.sjc-field input[type="search"],
.sjc-field input[type="password"],
.sjc-field select,
.sjc-field textarea {
	width: 100%;
	padding: .85rem 1rem;
	border: 1px solid var(--sjc-line);
	background: #fff;
	color: var(--sjc-ink);
	font: inherit;
	border-radius: 0;
}

.sjc-field input:focus,
.sjc-field select:focus,
.sjc-field textarea:focus {
	outline: 2px solid var(--sjc-orange);
	outline-offset: 1px;
	border-color: var(--sjc-orange);
}

.sjc-field--check label {
	display: flex;
	gap: .65rem;
	align-items: flex-start;
	font-family: inherit;
	font-size: 1rem;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 400;
	color: var(--sjc-ink);
}

.sjc-field--check input { margin-top: .25rem; }

.sjc-help {
	display: block;
	margin-top: .4rem;
	font-size: .85rem;
	color: var(--sjc-muted);
	font-family: var(--sjc-body);
	letter-spacing: 0;
	text-transform: none;
	font-weight: 400;
}

.sjc-req { color: var(--sjc-orange); }

.sjc-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- scripture pages ---------- */

.sjc-scripture-page { padding: 4rem 0 6rem; }
.sjc-scripture-page .sjc-wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.sjc-page-head { max-width: 42rem; }
.sjc-page-head h1 { margin: 0 0 .75rem; }
.sjc-lede { font-size: 1.15rem; color: var(--sjc-muted); }

.sjc-message-list { list-style: none; margin: 2.5rem 0 0; padding: 0; }

.sjc-message-list__item {
	padding: 1.75rem 0;
	border-top: 1px solid var(--sjc-line);
}

.sjc-message-list__item h2 { margin: .25rem 0 .35rem; font-size: 1.5rem; }
.sjc-message-list__item h2 a { text-decoration: none; color: var(--sjc-navy); }
.sjc-message-list__item h2 a:hover { color: var(--sjc-orange); }
.sjc-message-list__date {
	margin: 0;
	font-family: var(--sjc-display);
	font-size: .68rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--sjc-muted);
}
.sjc-message-list__ref { margin: 0 0 .5rem; color: var(--sjc-orange); }

/* ---------- form grouping helpers ----------
   Used by the connection card and by any theme template that wants two
   fields side by side or a set of checkboxes under one legend. */

.sjc-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0 1.25rem;
}

.sjc-fieldset {
	border: 1px solid var(--sjc-line, rgba(63, 68, 89, .16));
	padding: 1.1rem 1.25rem 1.25rem;
	margin: 0 0 1.25rem;
}

.sjc-fieldset legend {
	padding: 0 .5rem;
	font-family: var(--sjc-display, inherit);
	font-size: .66rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--sjc-muted, #6b7085);
}

.sjc-check,
.sjc-field--check label {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	margin-bottom: .6rem;
	font-size: .98rem;
	line-height: 1.45;
	cursor: pointer;
}

.sjc-check input,
.sjc-field--check input {
	margin-top: .28em;
	width: 1.05rem;
	height: 1.05rem;
	accent-color: var(--sjc-orange, #e8734a);
	flex: none;
}

.sjc-check:last-child { margin-bottom: 0; }

/* ---------- events ----------
   The row-with-a-date-block used on the front page and the events archive. */

.sjc-events {
	display: grid;
	gap: 1px;
	background: var(--sjc-line, rgba(63, 68, 89, .16));
	border: 1px solid var(--sjc-line, rgba(63, 68, 89, .16));
}

.sjc-event {
	background: var(--sjc-paper, #fff);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem clamp(1rem, 3vw, 2rem);
	padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.15rem, 2.5vw, 2rem);
	text-decoration: none;
}

a.sjc-event:hover { background: #f6f6f8; }

.sjc-event__date {
	text-align: center;
	background: var(--sjc-navy, #3f4459);
	color: #fff;
	padding: .6rem .85rem;
	min-width: 4.25rem;
	flex: none;
}

.sjc-event__day { display: block; font-family: var(--sjc-display, inherit); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.sjc-event__mon { display: block; font-family: var(--sjc-display, inherit); font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sjc-orange, #e8734a); margin-top: .25rem; }

.sjc-event__body { flex: 1 1 14rem; min-width: 0; }
.sjc-event__name { display: block; font-family: var(--sjc-display, inherit); font-size: 1.15rem; font-weight: 700; color: var(--sjc-navy, #3f4459); line-height: 1.3; }
.sjc-event__meta { display: block; font-size: .93rem; color: var(--sjc-muted, #6b7085); margin-top: .25rem; }

.sjc-event__go {
	margin-left: auto;
	font-family: var(--sjc-display, inherit);
	font-size: .64rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--sjc-orange, #e8734a);
	white-space: nowrap;
}

/* when / where / how to join, on a single event */

.sjc-event-details {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: .5rem 1.25rem;
	margin: 0 0 2rem;
	padding: 1.25rem 0;
	border-block: 1px solid var(--sjc-line, rgba(63, 68, 89, .16));
}

.sjc-event-details dt {
	font-family: var(--sjc-display, inherit);
	font-size: .64rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--sjc-muted, #6b7085);
	padding-top: .25rem;
}

.sjc-event-details dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 520px) {
	.sjc-event-details { grid-template-columns: 1fr; gap: .15rem; }
	.sjc-event-details dt { margin-top: .9rem; }
	.sjc-event-details dt:first-child { margin-top: 0; }
}

/* ---------- people ---------- */

.sjc-people {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
	gap: clamp(1.75rem, 3vw, 3rem);
}

.sjc-person__photo { aspect-ratio: 4 / 5; margin-bottom: 1.2rem; overflow: hidden; background: var(--sjc-slate, #575d78); }
.sjc-person__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sjc-person__photo--empty { background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 12px, transparent 12px 24px), var(--sjc-slate, #575d78); }
.sjc-person__name { font-size: 1.4rem; margin: 0 0 .2rem; }
.sjc-person__role { font-family: var(--sjc-display, inherit); font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--sjc-muted, #6b7085); margin: 0 0 .6rem; }
.sjc-person__bio { font-size: .96rem; color: var(--sjc-muted, #6b7085); }
.sjc-person__email { color: var(--sjc-orange, #e8734a); font-size: .95rem; overflow-wrap: anywhere; }
.sjc-person__phone { font-size: .95rem; color: var(--sjc-muted, #6b7085); }

/* ---------- classes ---------- */

.sjc-class-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
	gap: 1px;
	background: var(--sjc-line, rgba(63, 68, 89, .16));
	border: 1px solid var(--sjc-line, rgba(63, 68, 89, .16));
}

.sjc-mini {
	background: var(--sjc-paper, #fff);
	padding: 1.5rem 1.4rem;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	gap: .4rem;
	transition: background .2s ease;
}

a.sjc-mini:hover { background: var(--sjc-navy, #3f4459); }
a.sjc-mini:hover .sjc-mini__name { color: #fff; }
a.sjc-mini:hover .sjc-mini__meta { color: rgba(255, 255, 255, .7); }
.sjc-mini__when { font-family: var(--sjc-display, inherit); font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sjc-orange, #e8734a); }
.sjc-mini__name { font-family: var(--sjc-display, inherit); font-size: 1.02rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sjc-navy, #3f4459); line-height: 1.3; }
.sjc-mini__meta { font-size: .92rem; color: var(--sjc-muted, #6b7085); }

.sjc-classes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
	gap: 1px;
	background: var(--sjc-line, rgba(63, 68, 89, .16));
	border: 1px solid var(--sjc-line, rgba(63, 68, 89, .16));
}

.sjc-class { background: var(--sjc-paper, #fff); padding: clamp(1.4rem, 2.5vw, 2.15rem); display: flex; flex-direction: column; }
.sjc-class__tag { align-self: flex-start; margin-bottom: 1rem; padding: .32rem .7rem; background: var(--sjc-bg, #ebebeb); font-family: var(--sjc-display, inherit); font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sjc-slate, #575d78); }
.sjc-class__name { font-size: 1.1rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; margin: 0 0 1.1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--sjc-orange, #e8734a); }
.sjc-class dl { margin: 0 0 1.25rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem .9rem; }
.sjc-class dt { font-family: var(--sjc-display, inherit); font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sjc-muted, #6b7085); padding-top: .35rem; }
.sjc-class dd { margin: 0; font-size: .96rem; }
.sjc-class__how { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--sjc-line, rgba(63, 68, 89, .16)); }
.sjc-class__how h4 { font-family: var(--sjc-display, inherit); font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sjc-muted, #6b7085); margin: 0 0 .7rem; }
.sjc-class__how ul { list-style: square; margin: 0; padding-left: 1.1rem; font-size: .92rem; }
.sjc-class__how li { margin-bottom: .6rem; }
.sjc-class__how a { overflow-wrap: anywhere; }
.sjc-class__pin { color: var(--sjc-muted, #6b7085); font-size: .86rem; }
.sjc-class__notes { margin: .9rem 0 0; font-size: .9rem; }

.sjc-form-intro { color: var(--sjc-muted, #6b7085); margin-bottom: 1.25rem; }
