/**
 * D&D's Caring Hearts — Homepage sections (part A).
 *
 * Utility top bar, hero, care-philosophy intro, services grid, the
 * reusable dark CTA band, and the inquiry/tour strip. Depends on the
 * tokens/utilities defined in homepage-base.css.
 *
 * @package generatepress-ddch
 */

/* ----------------------------------------------------------------------- */
/* Utility top bar                                                        */
/* ----------------------------------------------------------------------- */

.ddch-topbar {
	background-color: var(--ddch-charcoal);
	color: var(--ddch-cream);
	font-size: 0.875rem;
}

.ddch-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: center;
	padding-block: 0.6rem;
}

.ddch-topbar__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.ddch-topbar__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

/*
 * Compounded with the ".ddch-topbar" ancestor (specificity 0,2,1) to beat
 * "body.home a" (0,1,2) in homepage-base.css — otherwise this link color
 * is silently overridden by teal. Confirmed via computed-style: without
 * this, links here rendered as teal-on-charcoal at 2.41:1, well under
 * the WCAG AA 4.5:1 minimum (intended cream-on-charcoal reaches 12.50:1).
 */
.ddch-topbar .ddch-topbar__item a {
	color: var(--ddch-cream);
	text-decoration: none;
}

.ddch-topbar__item a:hover {
	color: var(--ddch-peach);
	text-decoration: underline;
}

.ddch-topbar__item .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--ddch-peach);
}

.ddch-topbar__item--email {
	display: none;
}

/* ----------------------------------------------------------------------- */
/* Hero                                                                    */
/* ----------------------------------------------------------------------- */

.ddch-hero {
	background: linear-gradient(180deg, var(--ddch-cream) 0%, var(--ddch-ivory) 100%);
	padding-block: var(--ddch-section-pad);
}

.ddch-hero__inner {
	display: grid;
	gap: 3rem;
	align-items: center;
}

.ddch-hero__title {
	font-family: var(--ddch-font-heading);
	font-weight: 600;
	color: var(--ddch-charcoal);
	font-size: clamp(2.25rem, 1.7rem + 2.6vw, 3.5rem);
	line-height: 1.12;
	margin: 0 0 1.25rem;
}

.ddch-hero__text {
	color: var(--ddch-muted);
	font-size: 1.1875rem;
	max-width: 34rem;
	margin: 0 0 2rem;
}

.ddch-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.ddch-hero__actions .ddch-btn--ghost {
	color: var(--ddch-sage-dark);
	border-color: var(--ddch-sage);
}

.ddch-hero__actions .ddch-btn--ghost:hover,
.ddch-hero__actions .ddch-btn--ghost:focus-visible {
	/* "--ddch-sage" gives only 3.74:1 with white text (fails AA); swapped
	   to "--ddch-sage-dark" (5.88:1) — see homepage-base.css button comment. */
	background-color: var(--ddch-sage-dark);
	color: var(--ddch-white);
}

.ddch-hero__media {
	aspect-ratio: 4 / 5;
	border-radius: var(--ddch-radius-lg);
	overflow: hidden;
	box-shadow: var(--ddch-shadow);
}

/* ----------------------------------------------------------------------- */
/* Care-philosophy intro                                                  */
/* ----------------------------------------------------------------------- */

.ddch-intro {
	padding-block: var(--ddch-section-pad);
	background-color: var(--ddch-ivory);
}

.ddch-intro__inner {
	max-width: 46rem;
	text-align: center;
	margin-inline: auto;
}

.ddch-intro__body p {
	color: var(--ddch-ink);
	font-size: 1.1875rem;
	margin: 0 0 1.25rem;
}

.ddch-intro__email {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 1rem 0 0;
	font-weight: 600;
	color: var(--ddch-teal);
}

.ddch-intro__email a {
	text-decoration: none;
	color: inherit;
}

.ddch-intro__email a:hover {
	/* "--ddch-terracotta-dark" on the ivory section background only
	   reaches 3.11:1 (fails AA); swapped to "--ddch-terracotta-darker"
	   (4.90:1) — see homepage-base.css button comment for the token. */
	color: var(--ddch-terracotta-darker);
}

.ddch-intro__email .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ----------------------------------------------------------------------- */
/* Services grid                                                          */
/* ----------------------------------------------------------------------- */

.ddch-services {
	padding-block: var(--ddch-section-pad);
	background-color: var(--ddch-cream);
}

.ddch-services__grid {
	display: grid;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ----------------------------------------------------------------------- */
/* Dark CTA band (reused for cta1 + cta2)                                 */
/* ----------------------------------------------------------------------- */

.ddch-cta-band {
	position: relative;
	background-color: var(--ddch-charcoal);
	background-image:
		linear-gradient(150deg, rgba(43, 42, 40, 0.86) 0%, rgba(43, 42, 40, 0.72) 100%),
		var(--ddch-cta-bg, none);
	background-size: cover;
	background-position: center;
	color: var(--ddch-white);
	padding-block: clamp(3rem, 2.6rem + 1.6vw, 4.5rem);
}

.ddch-cta-band--no-image {
	background-image: linear-gradient(150deg, var(--ddch-charcoal) 0%, var(--ddch-sage-dark) 130%);
}

.ddch-cta-band__inner {
	max-width: 40rem;
	text-align: center;
	margin-inline: auto;
}

.ddch-cta-band__title {
	font-family: var(--ddch-font-heading);
	font-weight: 600;
	font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.25rem);
	margin: 0 0 0.75rem;
}

.ddch-cta-band__text {
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 1.75rem;
	font-size: 1.0625rem;
}

/* ----------------------------------------------------------------------- */
/* Inquiry / tour strip                                                    */
/* ----------------------------------------------------------------------- */

.ddch-strip {
	background-color: var(--ddch-sage-dark);
	color: var(--ddch-white);
	padding-block: 2rem;
}

.ddch-strip__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: 1rem;
}

/*
 * Compounded with ".ddch-strip" ancestor (specificity 0,2,0) to beat
 * "body.home a" (0,1,2) in homepage-base.css. Without this, both the
 * link text and the strong heading inside it render as teal (rgb 39,110,108)
 * instead of white — confirmed via getComputedStyle. Teal on sage-dark
 * only reaches ~2.41:1 (fails AA). This is the same bug pattern already
 * fixed on topbar, footer, and contact-list link selectors.
 */
.ddch-strip .ddch-strip__link {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1 1 260px;
	max-width: 420px;
	padding: 1.25rem 1.5rem;
	text-decoration: none;
	color: var(--ddch-white);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--ddch-radius);
	text-align: left;
	transition: background 0.2s var(--ddch-ease), transform 0.2s var(--ddch-ease);
}

.ddch-strip .ddch-strip__link:hover,
.ddch-strip .ddch-strip__link:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	transform: translateY(-2px);
}

.ddch-strip .ddch-strip__link:hover .ddch-strip__detail,
.ddch-strip .ddch-strip__link:focus-visible .ddch-strip__detail {
	text-decoration: underline;
}

/* Circular icon bg echoes --ddch-peach at low opacity. */
.ddch-strip__link .dashicons {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	font-size: 26px;
	line-height: 52px;
	text-align: center;
	background: rgba(230, 181, 158, 0.2);
	border-radius: 50%;
	color: var(--ddch-peach);
}

.ddch-strip__link strong {
	display: block;
	font-family: var(--ddch-font-heading);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 0.2rem;
	/* color inherits from .ddch-strip .ddch-strip__link → white ✓ */
}

.ddch-strip__detail {
	display: block;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.78);
}

/* Divider replaced by card gap; element kept in DOM for existing markup. */
.ddch-strip__divider {
	display: none;
}

/* ----------------------------------------------------------------------- */
/* Breakpoints                                                             */
/* ----------------------------------------------------------------------- */

@media (min-width: 700px) {
	.ddch-topbar__item--email {
		display: inline-flex;
	}
}

@media (min-width: 860px) {
	.ddch-hero__inner {
		grid-template-columns: 1.05fr 0.95fr;
	}
}

/* .ddch-strip__divider mobile rule removed — divider replaced by card gap. */
