/*
Theme Name: Acadian
Theme URI: https://abccamp.com
Author: Acadian Baptist Center
Description: Custom block theme for Acadian Baptist Center — a place set apart in Acadiana since 1917.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: acadian
*/

/* ---- utility classes used by page content ---- */

.abc-card {
	background: #ffffff;
	border: 1px solid #e5dfd0;
	border-radius: 14px;
	padding: 1.75rem !important;
	transition: box-shadow .2s ease, transform .2s ease;
	height: 100%;
	box-shadow: 0 1px 2px rgba(22, 49, 31, .05), 0 10px 28px -14px rgba(22, 49, 31, .16);
}
.abc-card:hover {
	box-shadow: 0 2px 4px rgba(22, 49, 31, .06), 0 18px 40px -12px rgba(22, 49, 31, .26);
	transform: translateY(-2px);
}
/* single-word headings in cards must never split mid-word */
.abc-card h2, .abc-card h3 { overflow-wrap: normal; }

.abc-eyebrow {
	display: inline-block;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #c96f26;
	font-family: "Source Sans 3", sans-serif;
}
/* centered eyebrows must be block-level for text-align to position them */
p.abc-eyebrow.has-text-align-center { display: block; }
.abc-eyebrow-on-dark { color: #e0b356 !important; }

/* dark / photo sections own their text colors — independent of WP preset
   classes, identical in light and dark mode */
.abc-hero h1, .abc-hero h2, .abc-hero h3,
.abc-band h1, .abc-band h2, .abc-band h3,
.abc-cta-grad h1, .abc-cta-grad h2, .abc-cta-grad h3,
.abc-split-card h2, .abc-split-card h3 {
	color: #ffffff !important;
}
.abc-hero p:not(.abc-eyebrow), .abc-band p:not(.abc-eyebrow),
.abc-split-card p:not(.abc-eyebrow) {
	color: #ece5d3 !important;
}
.abc-cta-grad p { color: #f8ecdc !important; }
.abc-hero .wp-block-button__link, .abc-band .wp-block-button__link,
.abc-split-card .wp-block-button__link {
	color: #ffffff !important;
}
.abc-hero .is-style-outline .wp-block-button__link,
.abc-band .is-style-outline .wp-block-button__link {
	color: #ffffff !important;
	border-color: #ffffff;
	background: transparent;
}
.abc-cta-grad .wp-block-button__link {
	color: #ffffff !important;
	background-color: #16311f;
}
/* links inside dark/photo sections stay white in BOTH modes — the global light
   (forest) and dark (sage) link colors are unreadable over photos */
.abc-hero a:not(.wp-block-button__link),
.abc-band a:not(.wp-block-button__link),
.abc-split-card a:not(.wp-block-button__link),
.abc-cta-grad a:not(.wp-block-button__link) {
	color: #ffffff !important;
}
.abc-split-card h2 a, .abc-split-card h3 a,
.abc-hero h1 a, .abc-hero h2 a, .abc-hero h3 a,
.abc-band h1 a, .abc-band h2 a, .abc-band h3 a {
	text-decoration: none;
}
.abc-split-card h2 a:hover, .abc-split-card h3 a:hover { text-decoration: underline; }

/* footer owns its colors the same way */
.abc-footer { background-color: #16311f; color: #ffffff; }
.abc-footer h1, .abc-footer h2, .abc-footer h3 { color: #ffffff !important; }
.abc-footer p { color: #c3d3c5 !important; }
.abc-footer a { color: #e0b356 !important; }
.abc-footer .wp-block-site-title a { color: #ffffff !important; }

/* no page-background strips between full-bleed sections */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > * + * { margin-block-start: 0 !important; }

/* nav */
.wp-block-navigation a { font-weight: 600; }
.wp-block-navigation a:hover { color: #c96f26; text-decoration: none; }

/* buttons */
.wp-block-button__link { transition: background .15s ease, transform .15s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.is-style-outline .wp-block-button__link:hover { background: rgba(201, 111, 38, .08); }

/* keep long headings from overflowing small screens */
h1, h2, h3 { overflow-wrap: break-word; }

/* ---- rich backgrounds ---- */

/* photo heroes are wp:cover blocks; .abc-hero adds the warm dusk overlay */
.abc-hero {
	position: relative;
	overflow: hidden;
}
.abc-hero .wp-block-cover__background {
	background: linear-gradient(160deg,
		rgba(22, 49, 31, .86) 0%,
		rgba(22, 49, 31, .62) 45%,
		rgba(50, 32, 12, .6) 100%) !important;
	opacity: 1 !important;
}

/* dual-hero split cards: photo covers with rounded corners + hover lift */
.abc-split-card {
	border-radius: 16px;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
	box-shadow: 0 14px 36px -16px rgba(22, 49, 31, .45);
}
.abc-split-card:hover { transform: translateY(-3px); }
.abc-split-card .wp-block-cover__background {
	background: linear-gradient(180deg,
		rgba(22, 49, 31, .22) 0%,
		rgba(22, 49, 31, .88) 78%) !important;
	opacity: 1 !important;
}

/* deep forest band with faint gold grid */
.abc-band {
	background-color: #16311f;
	background-image:
		radial-gradient(640px 360px at 82% 0%, rgba(224, 179, 86, .13), transparent 60%),
		radial-gradient(700px 420px at 8% 100%, rgba(35, 79, 54, .8), transparent 65%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 .5H.5V44' fill='none' stroke='%23e0b356' stroke-opacity='.06'/%3E%3Ccircle cx='.5' cy='.5' r='1.2' fill='%23e0b356' fill-opacity='.08'/%3E%3C/svg%3E");
}

/* warm cream section with soft glows */
.abc-mesh-cream {
	background-color: #f6f2e8;
	background-image:
		radial-gradient(700px 420px at 10% 0%, rgba(201, 111, 38, .10), transparent 60%),
		radial-gradient(600px 380px at 95% 100%, rgba(35, 79, 54, .10), transparent 65%);
	border-top: 1px solid #eae4d4;
	border-bottom: 1px solid #eae4d4;
}

/* sunset gradient cta band */
.abc-cta-grad {
	background-image: linear-gradient(120deg, #9d5312 0%, #c96f26 55%, #ab5c17 100%);
}

/* stats band numbers */
.abc-stat h2, .abc-stat h3 {
	font-family: Fraunces, Georgia, serif;
	font-size: clamp(2.2rem, 4vw, 3rem);
	color: #e0b356 !important;
	margin-bottom: 0;
	line-height: 1.05;
}
.abc-stat p { letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; font-weight: 650; }

/* icon chips */
.abc-icon {
	display: inline-flex;
	width: 46px;
	height: 46px;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: rgba(35, 79, 54, .1);
	color: #234f36;
	margin-bottom: .35rem;
}
.abc-icon svg { width: 24px; height: 24px; }

/* testimonial cards */
.abc-quote {
	background: #ffffff;
	border: 1px solid #e5dfd0;
	border-left: 4px solid #e0b356;
	border-radius: 12px;
	padding: 1.6rem !important;
	height: 100%;
	box-shadow: 0 8px 24px -14px rgba(22, 49, 31, .18);
}
.abc-quote p { font-size: 1.02rem; }
.abc-quote cite { color: #5c6b60; font-style: normal; font-weight: 650; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
	.abc-card, .abc-split-card, .wp-block-button__link { transition: none; }
}

/* ---- dark mode (follows system preference) ----
   `base` stays white: it is the text color inside dark bands.
   Only background USAGES and ink/border variables flip. */
@media (prefers-color-scheme: dark) {
	body {
		--wp--preset--color--cream: #15221a;
		--wp--preset--color--text: #e7eee8;
		--wp--preset--color--muted: #a3b4a6;
		--wp--preset--color--border: #2a3d30;
		background-color: #0f1a13;
		color: var(--wp--preset--color--text);
	}
	body h1, body h2, body h3, body h4 { color: #edf3ec; }
	.has-base-background-color { background-color: #0f1a13 !important; }
	.has-cream-background-color { background-color: var(--wp--preset--color--cream) !important; }
	:root body a:where(:not(.wp-element-button)) { color: #7fbf94; }
	:root body a:where(:not(.wp-element-button)):hover { color: #e0b356; }
	.abc-card, .abc-quote {
		background: #17281c;
		border-color: #2a3d30;
		box-shadow: none;
	}
	.abc-card:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
	.abc-mesh-cream { background-color: #15221a; border-color: #21332a; }
	.abc-icon { background: rgba(127, 191, 148, .14); color: #7fbf94; }
	.abc-quote cite { color: #a3b4a6; }
	.wp-block-navigation a:hover { color: #e0b356; }
	.is-style-outline .wp-block-button__link:hover { background: rgba(224, 179, 86, .12); }
	/* the ABC badge logo is navy-on-transparent — give it a white plate on dark */
	.custom-logo { background: #ffffff; padding: 3px 7px; border-radius: 8px; box-sizing: content-box; }
}
