/*
 * Main site footer: deep-green Hill Country skyline (chapel tower left, church tower right).
 * Loaded on every page that uses the main footer (not the festival pages; they have their own).
 * Overrides the Customizer CSS "Footer" rules and Kadence's footer colors, so selectors start
 * with #colophon. The Kadence footer settings themselves are unchanged.
 *
 * Image: footer/skyline-1983.webp (1983×793), footer/skyline-1200.webp for phones, both lossless,
 * from the cleaned master _migration/photos/footer/skyline-clean.png (flat areas are exactly
 * #1E4432 sky / #1C412F trees, so there are no compression blocks).
 * The top ~52% of the image is plain sky; the towers and trees fill the lower part.
 * --stj-sky-h is the height of that lower part at the current background size; the
 * columns leave that much room below them so the towers and trees show. The image's bottom
 * edge is the same green as the fill, so the copyright gets its own plain band below it.
 */

#colophon {
	--stj-ft-bg: #1E4432;          /* the image's sky colour exactly */
	--stj-ft-text: #F4EFE3;        /* warm ivory */
	--stj-ft-muted: #DCD5C3;       /* copyright */
	--stj-ft-gold: #D9BD7C;        /* section labels only */
	--stj-ft-gold-rule: #AD8B3B;   /* St. Joseph Gold, thin rules */
	--stj-sky-w: max(100%, 1100px);
	--stj-sky-h: calc(max(100vw, 1100px) * 0.4 * 0.52);
	--stj-copy-h: 3.25rem;         /* copyright row; the skyline sits just above it */
	--stj-sky-img: url(footer/skyline-1983.webp);
	/* Copyright band: #1C412F is the image's bottom edge, so there's no seam. */
	background:
		var(--stj-sky-img) no-repeat center bottom var(--stj-copy-h) / var(--stj-sky-w) auto,
		linear-gradient(#1C412F, #1C412F) no-repeat center bottom / 100% calc(var(--stj-copy-h) + 1px),
		var(--stj-ft-bg);
	color: var(--stj-ft-text);
	border-top: 3px solid var(--stj-ft-gold-rule);
}

#colophon .site-middle-footer-wrap,
#colophon .site-bottom-footer-wrap,
#colophon .site-footer-row-container-inner {
	background: transparent;
	border: 0;
}

/* Columns over the plain upper sky. Desktop: the hills begin 61.5% down the image (so 38.5%
 * of its height is hills and trees); the padding puts them ~50px below the last line of text
 * (~20px from 1280px up), and the church tower's spire rises beside the columns, clear of the text. */
#colophon .site-middle-footer-wrap .site-footer-row-container-inner {
	padding-top: 3.5rem;
	padding-bottom: calc(max(100vw, 1100px) * 0.4 * 0.385 + 21px);
}
@media (min-width: 1280px) {
	#colophon .site-middle-footer-wrap .site-footer-row-container-inner { padding-bottom: calc(100vw * 0.4 * 0.385 - 10px); }
}
#colophon .site-middle-footer-wrap .site-footer-row { column-gap: 3rem; }

/* Copyright: last line, on the plain band below the trees. */
#colophon .site-bottom-footer-wrap .site-footer-row-container-inner { padding-top: .75rem; padding-bottom: 1.25rem; }
#colophon .site-bottom-footer-wrap .footer-html,
#colophon .site-bottom-footer-wrap .footer-html p { color: var(--stj-ft-muted); font-size: .875rem; margin: 0; }

/* Logo: two styles, chosen by one class on the logo image block in the Footer 1 widget
 * ("Additional CSS class": footer-logo stj-logo-badge  or  footer-logo stj-logo-reversed).
 * B, stj-logo-reversed (LIVE, CR 2026-10-27): footer/logo-reversed@2x.webp (ivory lines, gold
 *    tagline, made from the original PNG); the <img> stays in place, invisible, for its alt text and size.
 * A, stj-logo-badge (kept as the alternative): the original full-color logo on a small ivory
 *    badge with a thin gold border. */
#colophon .footer-logo.stj-logo-badge img {
	box-sizing: content-box;
	background: var(--stj-ft-text);
	padding: 14px 16px;
	border: 1.5px solid #C9A75A;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
#colophon .footer-logo.stj-logo-reversed a { display: inline-block; background: url(footer/logo-footer-ivory-gold@4x.webp) no-repeat 0 0 / contain; } /* 4x lossless WebP rendered from the official pack (CR, 2026-11-19); the SVG version lost its lettering in Safari. Was footer/logo-reversed@2x.webp */
#colophon .footer-logo.stj-logo-reversed img { opacity: 0; }

/* Text and links */
#colophon .footer-widget-area,
#colophon .footer-contact,
#colophon .footer-urgent,
#colophon .footer-contact strong { color: var(--stj-ft-text); }
#colophon .footer-contact strong { letter-spacing: .01em; }
#colophon a,
#colophon .footer-navigation .footer-menu-container > ul > li > a,
#colophon .footer-navigation .footer-menu-container > ul li.current-menu-item > a,
#colophon .footer-html a { color: var(--stj-ft-text); text-decoration-color: rgba(244, 239, 227, .55); }
#colophon a:hover,
#colophon a:focus-visible,
#colophon .footer-navigation .footer-menu-container > ul li a:hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--stj-ft-gold); }
#colophon a:focus-visible { outline: 2px solid var(--stj-ft-gold); outline-offset: 2px; }

/* Section labels: muted gold, thin gold rule above. */
#colophon h2.footer-heading { color: var(--stj-ft-gold); border-top-color: var(--stj-ft-gold-rule); margin-top: .35rem; }

/* Social icons in ivory (brand colors don't read on the green). */
#colophon .footer-social-wrap .social-button,
#colophon .footer-social-wrap .social-button:hover { color: var(--stj-ft-text) !important; }
#colophon .footer-social-wrap .social-button:hover { opacity: .8; }

/* Narrower screens: the image is drawn wider than the screen so both towers stay in view. */
@media (max-width: 1099px) {
	#colophon {
		--stj-sky-w: 125%;
		--stj-sky-h: calc(125vw * 0.4 * 0.52);
	}
	#colophon .site-middle-footer-wrap .site-footer-row-container-inner { padding-bottom: max(2.5rem, calc(var(--stj-sky-h) - 1.5rem)); }
}
/* Phones: a little larger so both towers still show; the copyright wraps to two lines. */
@media (max-width: 767px) {
	#colophon {
		--stj-sky-w: 133%;
		--stj-sky-h: calc(133vw * 0.4 * 0.52);
		--stj-copy-h: 4.5rem;
		--stj-sky-img: url(footer/skyline-1200.webp);
	}
	#colophon .site-middle-footer-wrap .site-footer-row-container-inner {
		padding-top: 2.75rem;
		padding-bottom: max(2rem, calc(var(--stj-sky-h) - 1.75rem));
	}
	#colophon .site-middle-footer-wrap .site-footer-row { row-gap: 2.25rem; }
	#colophon .site-bottom-footer-wrap .footer-html p { font-size: .8125rem; line-height: 1.5; }
}

/* Phones (CR, 2026-11-02): Quick Links as a compact, left-aligned two-column grid. */
@media (max-width: 767px) {
	#colophon .footer-navigation { text-align: left; }
	#colophon .footer-navigation .footer-menu-container > ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 2px; max-width: 340px; margin: 0 auto; justify-items: start; }
	#colophon .footer-navigation .footer-menu-container > ul > li { margin: 0; width: 100%; text-align: left; }
	#colophon .footer-navigation .footer-menu-container > ul > li > a { padding: 6px 0; display: block; }
}

/* Tablets (CR, 2026-11-19): the four footer columns as a 2 × 2 grid instead of one long column. */
@media (min-width: 768px) and (max-width: 1099px) {
	#colophon .site-middle-footer-inner-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; column-gap: 48px; row-gap: 2rem; }
	#colophon .site-middle-footer-inner-wrap .site-footer-section { text-align: left; justify-content: flex-start; }
	#colophon .site-middle-footer-inner-wrap .site-footer-section::after { display: none; }
}

/* Phones (2026-11-23, CR: the right column wasn't centred): the two Quick Links columns are sized to their longest
   link and centred together as a pair under the heading, with one gutter between them, so the space left of the
   first column equals the space right of the second. Links still left-aligned within each column; same links, order. */
@media (max-width: 767px) {
	#colophon .footer-navigation .footer-menu-container > ul { grid-template-columns: repeat(2, max-content); justify-content: center; column-gap: 40px; max-width: none; }
}
@media (max-width: 340px) {
	#colophon .footer-navigation .footer-menu-container > ul { column-gap: 24px; }
}
