/* Age Path (CUSTOM-TEMPLATE.md D7). Ministries along an age line; choose a stage to see its photo and details.
   Variables (restyle from css/screen.css):
   --cc-age-path-line       the line behind the tabs
   --cc-age-path-muted      ages and secondary text
   --cc-age-path-accent     active tab, dots and indicator (Branding main; currentColor on dark sections)
   --cc-age-path-radius     photo corners (Branding --img-radius)
   --cc-age-path-gap        space between track and panel (clamp(32px, 5cqw, 72px))
   --cc-age-path-title-font, -body-font, -label-font   fonts (Branding)
   Modifiers: --single (one stage, no track), .is-ready (script active). Script sets --x --w --y --h on .cc-age-path__tabs. */
.cc-age-path {
	--cc-age-path-line: color-mix(in srgb, currentColor 22%, transparent);
	--cc-age-path-muted: color-mix(in srgb, currentColor 76%, transparent);
	--cc-age-path-accent: var(--color-main);
	--cc-age-path-radius: var(--img-radius, 0);
	--cc-age-path-gap: clamp(32px, 5cqw, 72px);
	--cc-age-path-title-font: var(--font-titles);
	--cc-age-path-body-font: var(--font-body);
	--cc-age-path-label-font: var(--font-small-titles);
	container-type: inline-size;
	min-width: 0;
}
.bg-main .cc-age-path, .bg-black .cc-age-path, .bg-image .cc-age-path, .bg-video .cc-age-path { --cc-age-path-accent: currentColor; }
.cc-age-path :is(a, [tabindex]):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.cc-age-path [hidden] { display: none !important; }
.cc-age-path .cc-age-path__track-label {
	margin: 0 0 16px;
	font-family: var(--cc-age-path-label-font);
	font-size: 16px;
	line-height: 1.3;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cc-age-path-muted);
}
/* Phones: tabs stack along a vertical line */
.cc-age-path .cc-age-path__tabs { position: relative; display: flex; flex-direction: column; padding-inline-start: 28px; }
.cc-age-path .cc-age-path__tabs::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 5px; width: 2px; background: var(--cc-age-path-line); }
.cc-age-path .cc-age-path__tab {
	position: relative;
	display: block;
	padding: 14px 0;
	color: inherit;
	text-decoration: none;
	min-height: 44px;
	box-sizing: border-box;
}
.cc-age-path .cc-age-path__tab::before {
	content: '';
	position: absolute;
	inset-inline-start: -28px;
	top: 22px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--cc-age-path-line);
	box-sizing: border-box;
}
.cc-age-path .cc-age-path__name { display: block; font-family: var(--cc-age-path-title-font); font-size: clamp(22px, 5cqw, 30px); line-height: 1.1; overflow-wrap: anywhere; }
.cc-age-path .cc-age-path__ages { display: block; margin-top: 4px; font-family: var(--cc-age-path-body-font); font-size: 16px; line-height: 1.3; color: var(--cc-age-path-muted); }
.cc-age-path .cc-age-path__tab.is-active .cc-age-path__name { color: var(--cc-age-path-accent); }
.cc-age-path .cc-age-path__tab.is-active::before { background: var(--cc-age-path-accent); }
.cc-age-path .cc-age-path__indicator { display: none; }
.cc-age-path.is-ready .cc-age-path__indicator {
	display: block;
	position: absolute;
	inset-inline-start: 5px;
	top: 0;
	width: 2px;
	height: 1px;
	background: var(--cc-age-path-accent);
	transform-origin: 0 0;
	transform: translateY(var(--y, 0px)) scaleY(var(--h, 0));
	pointer-events: none;
}
.cc-age-path .cc-age-path__panels { margin-top: var(--cc-age-path-gap); }
.cc-age-path:not(.is-ready) .cc-age-path__panel + .cc-age-path__panel { margin-top: var(--cc-age-path-gap); }
.cc-age-path .cc-age-path__panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3cqw, 40px); min-width: 0; scroll-margin-top: calc(var(--ct-header-h, 0px) + 24px); }
.cc-age-path.cc-age-path--single .cc-age-path__panels { margin-top: 0; }
.cc-age-path .cc-age-path__media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--cc-age-path-radius); background: color-mix(in srgb, currentColor 8%, transparent); }
.cc-age-path .cc-age-path__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cc-age-path .cc-age-path__panel-title { margin: 0; font-family: var(--cc-age-path-title-font); line-height: 1.05; overflow-wrap: anywhere; }
.cc-age-path .cc-age-path__panel-ages { margin-top: 10px; font-size: 18px; color: var(--cc-age-path-muted); }
.cc-age-path .cc-age-path__when { margin-top: 16px; font-family: var(--cc-age-path-label-font); font-size: 16px; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--cc-age-path-accent); }
.cc-age-path .cc-age-path__text { margin: 16px 0 0; max-width: 54ch; font-family: var(--cc-age-path-body-font); }
.cc-age-path .cc-age-path__body .button { margin-top: 24px; }

@container (min-width: 700px) {
	.cc-age-path .cc-age-path__tabs { flex-direction: row; padding-inline-start: 0; padding-top: 28px; }
	.cc-age-path .cc-age-path__tabs::before { inset-block: 5px auto; inset-inline: 0; width: auto; height: 2px; }
	.cc-age-path .cc-age-path__tab { flex: 1 1 0; min-width: 0; padding: 8px 12px 8px 0; }
	.cc-age-path .cc-age-path__tab::before { inset-inline-start: 0; top: -28px; }
	.cc-age-path.is-ready .cc-age-path__indicator { inset-inline-start: 0; top: 5px; width: 1px; height: 2px; transform: translateX(var(--x, 0px)) scaleX(var(--w, 0)); }
}
@container (min-width: 800px) {
	.cc-age-path .cc-age-path__panel { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
	.cc-age-path .cc-age-path__panel--no-img { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
	.cc-age-path.is-ready .cc-age-path__indicator { transition: transform 280ms cubic-bezier(.22, 1, .36, 1); }
	@keyframes cc-age-path-in { from { opacity: 0; } to { opacity: 1; } }
	.cc-age-path.is-ready .cc-age-path__panel:not([hidden]) { animation: cc-age-path-in 200ms ease both; }
}
