/*
 * Site v2 - new homepage (audit sections 9 and 12).
 * Loaded only when y4c_v2() is true (inc/patterns.php), after main-v4.css.
 * Every rule is scoped to body.y4c-v2, so visitors on the current site see no change.
 *
 * Mobile first, RTL, palette from the Yemeni identity section (WCAG AA checked):
 *   jiss #FAF6EE page | stone #EFE5D3 cards/alt sections | basalt #2A2420 text 14.2:1
 *   ash #5E5047 secondary 7.18:1 | coffee #5B3A24 headings, primary button (white 10.12:1)
 *   brick #9C4A26 sub-titles 5.69:1 | sky #245F7E links, focus 6.47:1 | leaf #46613A growth (white 6.93:1)
 *   honey #C8892B decoration, prayer button with basalt text 5.15:1 (never text on light)
 *   night #1F2A33 dark section (jiss text 13.55:1, honey 4.92:1)
 * No web fonts, no images: decoration is CSS and inline SVG data URIs, aria-free pseudo-elements.
 */

body.y4c-v2 {
	--jiss: #FAF6EE;
	--stone: #EFE5D3;
	--basalt: #2A2420;
	--ash: #5E5047;
	--coffee: #5B3A24;
	--brick: #9C4A26;
	--sky: #245F7E;
	--leaf: #46613A;
	--honey: #C8892B;
	--night: #1F2A33;
	--v2-radius: 14px;
	--v2-gutter: 16px;
	--v2-max: 1120px;
	--v2-read: 'Noto Naskh Arabic', 'Geeza Pro', 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* ---------- Page frame ---------- */
body.y4c-v2 .y4c-v2-home {
	display: flex;
	flex-direction: column;
	background: var(--jiss);
	color: var(--basalt);
	font-size: 1.0625rem;
	line-height: 1.85;
	letter-spacing: 0;
}

/*
 * Mobile order (section 12, part 5): prayer and safe contact rises to third,
 * right after the four pathways. Desktop keeps the page order from the editor.
 */
body.y4c-v2 .y4c-v2-home > .hv2-hero { order: -3; }
body.y4c-v2 .y4c-v2-home > .hv2-paths { order: -2; }
body.y4c-v2 .y4c-v2-home > .hv2-prayer { order: -1; }

body.y4c-v2 .y4c-v2-home .hv2-sec {
	position: relative;
	margin: 0;
	padding: 44px var(--v2-gutter) 48px;
}
body.y4c-v2 .y4c-v2-home .hv2-sec > * {
	max-width: var(--v2-max);
	margin-inline: auto;
}
/* Classic themes wrap group children in .wp-block-group__inner-container. */
body.y4c-v2 .y4c-v2-home .hv2-sec > * + *,
body.y4c-v2 .y4c-v2-home .hv2-sec > .wp-block-group__inner-container > * + * { margin-top: 18px; }
body.y4c-v2 .y4c-v2-home .hv2-sec > .wp-block-group__inner-container > * { margin-bottom: 0; }

/* Gypsum band between the major sections: a thin zigzag, 40% opacity. */
body.y4c-v2 .y4c-v2-home .hv2-sec:not(.hv2-hero)::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 10px;
	opacity: .4;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0 10L10 1l10 9' fill='none' stroke='%23C8892B' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x 0 0 / 20px 10px;
}

/* Section backgrounds */
body.y4c-v2 .y4c-v2-home .hv2-paths,
body.y4c-v2 .y4c-v2-home .hv2-week,
body.y4c-v2 .y4c-v2-home .hv2-lib { background: var(--stone); }
body.y4c-v2 .y4c-v2-home .hv2-prayer { background: var(--night); color: var(--jiss); }

/* ---------- Type ---------- */
body.y4c-v2 .y4c-v2-home h1,
body.y4c-v2 .y4c-v2-home h2,
body.y4c-v2 .y4c-v2-home h3 {
	font-family: var(--font, 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif);
	font-weight: 700;
	color: var(--coffee);
	letter-spacing: 0;
	line-height: 1.45;
}
body.y4c-v2 .y4c-v2-home .hv2-sec__title { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.1rem); }
body.y4c-v2 .y4c-v2-home .hv2-card__title { font-size: 1.15rem; }
body.y4c-v2 .y4c-v2-home .hv2-sec__intro,
body.y4c-v2 .y4c-v2-home .hv2-lead { max-width: 68ch; color: var(--basalt); }
body.y4c-v2 .y4c-v2-home p { margin: 0; }

body.y4c-v2 .y4c-v2-home a { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
body.y4c-v2 .y4c-v2-home a:hover { text-decoration-thickness: 2px; }

body.y4c-v2 .y4c-v2-home a:focus-visible,
body.y4c-v2 .y4c-v2-home .wp-block-button__link:focus-visible {
	outline: 3px solid var(--sky);
	outline-offset: 2px;
	box-shadow: none;
}

/* Verses: a reading face from the system, no border on the hero verse. */
body.y4c-v2 .y4c-v2-home .hv2-verse {
	margin-block: 22px 0;
	padding: 4px 16px 4px 0;
	border: 0;
	border-inline-start: 4px solid var(--honey);
	font-family: var(--v2-read);
	font-size: 1.2rem;
	line-height: 1.95;
	color: var(--coffee);
	background: none;
	quotes: none;
}
body.y4c-v2 .y4c-v2-home .hv2-verse p { margin: 0; font-style: normal; }
body.y4c-v2 .y4c-v2-home .hv2-verse cite {
	display: block;
	margin-top: 6px;
	font-family: var(--font, 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif);
	font-size: .95rem;
	font-style: normal;
	font-weight: 600;
	color: var(--ash);
}

/* ---------- Buttons ---------- */
body.y4c-v2 .y4c-v2-home .hv2-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 22px;
}
body.y4c-v2 .y4c-v2-home .hv2-btn { margin: 0; }
body.y4c-v2 .y4c-v2-home .hv2-btn .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 24px;
	border: 2px solid transparent;
	border-radius: 10px;
	font-family: var(--font, 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
}
body.y4c-v2 .y4c-v2-home .hv2-btn--primary .wp-block-button__link { background: var(--coffee); color: #FFFFFF; }
body.y4c-v2 .y4c-v2-home .hv2-btn--primary .wp-block-button__link:hover { background: var(--basalt); }
body.y4c-v2 .y4c-v2-home .hv2-btn--prayer .wp-block-button__link { background: var(--honey); color: var(--basalt); }
body.y4c-v2 .y4c-v2-home .hv2-btn--prayer .wp-block-button__link:hover { background: #D69A3F; }
body.y4c-v2 .y4c-v2-home .hv2-btn--grow .wp-block-button__link { background: var(--leaf); color: #FFFFFF; }
body.y4c-v2 .y4c-v2-home .hv2-btn--grow .wp-block-button__link:hover { background: #37502D; }
body.y4c-v2 .y4c-v2-home .hv2-btn--secondary .wp-block-button__link { background: transparent; color: var(--brick); border-color: var(--brick); }
body.y4c-v2 .y4c-v2-home .hv2-btn--secondary .wp-block-button__link:hover { background: var(--brick); color: #FFFFFF; }
body.y4c-v2 .y4c-v2-home .hv2-btn--card .wp-block-button__link {
	min-height: 44px;
	padding: 8px 16px;
	background: var(--coffee);
	color: #FFFFFF;
	font-size: 1rem;
}
body.y4c-v2 .y4c-v2-home .hv2-btn--card .wp-block-button__link:hover { background: var(--basalt); }

/* ---------- 1. Hero ---------- */
body.y4c-v2 .y4c-v2-home .hv2-hero {
	padding-top: 56px;
	text-align: center;
	overflow: hidden;
}
/* Qamariya: half-round window with coloured panes, drawn once, behind the verse. */
body.y4c-v2 .y4c-v2-home .hv2-hero::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 50%;
	width: min(520px, 92%);
	aspect-ratio: 2 / 1.04;
	transform: translateX(-50%);
	opacity: .2;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 104'%3E%3Cpath d='M24 102a76 76 0 0 1 152 0z' fill='%23245F7E' fill-opacity='.10'/%3E%3Cpath d='M60 102a40 40 0 0 1 80 0z' fill='%23C8892B' fill-opacity='.35'/%3E%3Cg fill='none' stroke='%23C8892B' stroke-width='1.4'%3E%3Cpath d='M4 102a96 96 0 0 1 192 0z'/%3E%3Cpath d='M24 102a76 76 0 0 1 152 0'/%3E%3Cpath d='M60 102a40 40 0 0 1 80 0'/%3E%3Cpath d='M100 62V26M71.7 73.7L46.3 48.3M128.3 73.7l25.4-25.4M63 86.7L29.8 73M137 86.7L170.2 73M84.7 65L71 31.8M115.3 65L129 31.8'/%3E%3C/g%3E%3C/svg%3E") no-repeat center top / contain;
}
body.y4c-v2 .y4c-v2-home .hv2-hero > * { position: relative; }
body.y4c-v2 .y4c-v2-home .hv2-eyebrow {
	font-weight: 700;
	font-size: 1rem;
	color: var(--brick);
}
body.y4c-v2 .y4c-v2-home .hv2-verse--hero {
	max-width: 36em;
	padding: 0;
	border: 0;
	font-size: 1.4rem;
}
body.y4c-v2 .y4c-v2-home .hv2-hero__title {
	max-width: 22em;
	margin-top: 22px;
	font-size: clamp(1.75rem, 1.2rem + 3vw, 2.75rem);
	line-height: 1.4;
}
body.y4c-v2 .y4c-v2-home .hv2-lead { font-size: 1.1rem; }
body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-verse--hero,
body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-hero__title,
body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-lead { margin-inline: auto; }
body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-actions { justify-content: center; }
body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-btn { flex: 1 1 100%; }
body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-btn .wp-block-button__link { width: 100%; }
body.y4c-v2 .y4c-v2-home .hv2-note { font-size: .95rem; color: var(--ash); }

/* ---------- Cards (shared) ---------- */
body.y4c-v2 .y4c-v2-home .hv2-cards.wp-block-columns {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin-top: 22px;
	margin-bottom: 0;
}
body.y4c-v2 .y4c-v2-home .hv2-card.wp-block-column {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	margin: 0;
	padding: 20px 18px;
	background: var(--stone);
	border: 1px solid rgba(91, 58, 36, .16);
	border-radius: var(--v2-radius);
}
body.y4c-v2 .y4c-v2-home .hv2-paths .hv2-card,
body.y4c-v2 .y4c-v2-home .hv2-week .hv2-card,
body.y4c-v2 .y4c-v2-home .hv2-lib .hv2-card { background: var(--jiss); }
body.y4c-v2 .y4c-v2-home .hv2-card > * { margin: 0; }
body.y4c-v2 .y4c-v2-home .hv2-card .hv2-actions { margin-top: auto; padding-top: 6px; }
body.y4c-v2 .y4c-v2-home .hv2-card__link { margin-top: auto; font-weight: 700; }

/* ---------- 2. Pathways: arched cards with a small line icon ---------- */
body.y4c-v2 .y4c-v2-home .hv2-cards--paths.wp-block-columns { grid-template-columns: 1fr; }
body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card {
	padding-top: 22px;
	border-radius: 44px 44px var(--v2-radius) var(--v2-radius);
}
body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card::before {
	content: "";
	display: block;
	width: 36px;
	height: 36px;
	background: var(--brick);
	-webkit-mask: var(--v2-icon) no-repeat center / contain;
	mask: var(--v2-icon) no-repeat center / contain;
}
body.y4c-v2 .y4c-v2-home .hv2-card--seeker {
	--v2-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V10a7 7 0 0 1 14 0v11'/%3E%3Cpath d='M3 21h18M14.5 13.5v2'/%3E%3C/svg%3E");
}
body.y4c-v2 .y4c-v2-home .hv2-card--believer {
	--v2-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 19h18M7 19a5 5 0 0 1 10 0M12 5v3M5.6 9.6l1.8 1.8M18.4 9.6l-1.8 1.8'/%3E%3C/svg%3E");
}
body.y4c-v2 .y4c-v2-home .hv2-card--growing {
	--v2-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V11M12 11C12 7 9 5 5 5c0 4 3 6 7 6zM12 14c0-3 2.5-5 6-5 0 3-2.5 5-6 5z'/%3E%3C/svg%3E");
}
body.y4c-v2 .y4c-v2-home .hv2-card--crisis {
	--v2-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h6M10 4V2.5h4V4M8 7h8l-1 11H9zM12 11v3M7 21h10'/%3E%3C/svg%3E");
}
body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card.hv2-card--crisis { border: 2px solid var(--brick); }
body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card--growing::before { background: var(--leaf); }
body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card--seeker::before { background: var(--sky); }
body.y4c-v2 .y4c-v2-home .hv2-card__urgent {
	padding: 10px 12px;
	border-inline-start: 4px solid var(--brick);
	border-radius: 8px;
	background: rgba(156, 74, 38, .08);
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.75;
	color: var(--basalt);
}

/* ---------- 3. Trust ---------- */
body.y4c-v2 .y4c-v2-home .hv2-card.wp-block-column.hv2-card--point { border-inline-start: 4px solid var(--honey); }

/* ---------- 4. Prayer for this week ---------- */
body.y4c-v2 .y4c-v2-home .hv2-prayer-text {
	font-family: var(--v2-read);
	font-size: 1.15rem;
	line-height: 1.95;
}
body.y4c-v2 .y4c-v2-home .hv2-card__ref { font-size: .95rem; font-weight: 600; color: var(--ash); }
body.y4c-v2 .y4c-v2-home .hv2-card__kicker { font-weight: 700; color: var(--brick); }
body.y4c-v2 .y4c-v2-home .hv2-card--verse .hv2-verse { margin-top: 0; }

/* ---------- 5. Discipleship: a numbered list on phones, three steps on wide screens ---------- */
body.y4c-v2 .y4c-v2-home .hv2-steps {
	display: grid;
	gap: 12px;
	padding: 0;
	list-style: none;
	counter-reset: y4c-step;
}
body.y4c-v2 .y4c-v2-home .hv2-steps li {
	position: relative;
	padding: 14px 60px 14px 16px;
	background: var(--stone);
	border-radius: var(--v2-radius);
	counter-increment: y4c-step;
}
body.y4c-v2 .y4c-v2-home .hv2-steps li::before {
	content: counter(y4c-step, arabic-indic);
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--leaf);
	color: #FFFFFF;
	font-weight: 700;
	line-height: 1;
}
body.y4c-v2 .y4c-v2-home .hv2-steps strong { color: var(--coffee); font-weight: 700; }

/* ---------- 6. Prayer and safe contact (dark section) ---------- */
body.y4c-v2 .y4c-v2-home .hv2-prayer h2,
body.y4c-v2 .y4c-v2-home .hv2-prayer h3,
body.y4c-v2 .y4c-v2-home .hv2-prayer .hv2-sec__intro { color: var(--jiss); }
body.y4c-v2 .y4c-v2-home .hv2-prayer .hv2-verse { color: var(--honey); }
body.y4c-v2 .y4c-v2-home .hv2-prayer .hv2-verse cite { color: var(--jiss); }
body.y4c-v2 .y4c-v2-home .hv2-prayer a { color: var(--honey); }
body.y4c-v2 .y4c-v2-home .hv2-prayer a:focus-visible,
body.y4c-v2 .y4c-v2-home .hv2-prayer .wp-block-button__link:focus-visible { outline-color: var(--honey); }
body.y4c-v2 .y4c-v2-home .hv2-prayer .hv2-btn--prayer .wp-block-button__link { color: var(--basalt); }
body.y4c-v2 .y4c-v2-home .hv2-prayer .hv2-btn--secondary .wp-block-button__link { color: var(--jiss); border-color: var(--jiss); }
body.y4c-v2 .y4c-v2-home .hv2-prayer .hv2-btn--secondary .wp-block-button__link:hover { background: var(--jiss); color: var(--night); }
body.y4c-v2 .y4c-v2-home .hv2-promises {
	margin-top: 26px;
	padding: 18px 18px 16px;
	border: 1px solid rgba(200, 137, 43, .55);
	border-radius: var(--v2-radius);
	background: rgba(250, 246, 238, .05);
}
body.y4c-v2 .y4c-v2-home .hv2-promises__title { font-size: 1.1rem; }
body.y4c-v2 .y4c-v2-home .hv2-promises__list {
	margin-top: 10px;
	padding-inline-start: 1.3em;
	list-style: disc;
}
body.y4c-v2 .y4c-v2-home .hv2-promises__list li + li { margin-top: 6px; }
body.y4c-v2 .y4c-v2-home .hv2-promises__list li::marker { color: var(--honey); }

/* ---------- 8. Library: whole card is the link ---------- */
body.y4c-v2 .y4c-v2-home .hv2-card--linked { position: relative; }
body.y4c-v2 .y4c-v2-home .hv2-card--linked .hv2-card__title a { color: var(--coffee); }
body.y4c-v2 .y4c-v2-home .hv2-card--linked .hv2-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--v2-radius);
}
body.y4c-v2 .y4c-v2-home .hv2-card.wp-block-column.hv2-card--linked:hover { border-color: var(--coffee); }

/* ---------- Wider screens ---------- */
@media (min-width: 380px) {
	body.y4c-v2 .y4c-v2-home .hv2-cards--paths.wp-block-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card { padding: 18px 14px; }
	body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card p { font-size: .98rem; line-height: 1.75; }
}
@media (min-width: 600px) {
	body.y4c-v2 .y4c-v2-home .hv2-sec { padding: 60px 24px 64px; }
	body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-btn { flex: 0 1 auto; }
	body.y4c-v2 .y4c-v2-home .hv2-hero .hv2-btn .wp-block-button__link { width: auto; min-width: 200px; }
	body.y4c-v2 .y4c-v2-home .hv2-cards--trust.wp-block-columns,
	body.y4c-v2 .y4c-v2-home .hv2-cards--lib.wp-block-columns,
	body.y4c-v2 .y4c-v2-home .hv2-cards--serve.wp-block-columns { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (min-width: 900px) {
	body.y4c-v2 .y4c-v2-home > .hv2-hero,
	body.y4c-v2 .y4c-v2-home > .hv2-paths,
	body.y4c-v2 .y4c-v2-home > .hv2-prayer { order: 0; }
	body.y4c-v2 .y4c-v2-home .hv2-hero { padding-top: 84px; padding-bottom: 76px; }
	body.y4c-v2 .y4c-v2-home .hv2-cards--paths.wp-block-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
	body.y4c-v2 .y4c-v2-home .hv2-cards--paths .hv2-card { padding: 24px 18px 20px; }
	body.y4c-v2 .y4c-v2-home .hv2-cards--week.wp-block-columns { grid-template-columns: 3fr 2fr; }
	/* Desktop shows the first lines of the prayer; phones read it in full (section 12, part 5). */
	body.y4c-v2 .y4c-v2-home .hv2-prayer-text {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		overflow: hidden;
	}
	body.y4c-v2 .y4c-v2-home .hv2-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	body.y4c-v2 .y4c-v2-home .hv2-steps li { padding: 62px 18px 18px; }
	body.y4c-v2 .y4c-v2-home .hv2-steps li::before { top: 18px; right: 18px; }
}

/* Motion only for people who have not asked to reduce it. */
@media (prefers-reduced-motion: no-preference) {
	body.y4c-v2 .y4c-v2-home .wp-block-button__link,
	body.y4c-v2 .y4c-v2-home .hv2-card--linked { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
}

/* Windows high contrast: keep card edges and focus visible. */
@media (forced-colors: active) {
	body.y4c-v2 .y4c-v2-home .hv2-card,
	body.y4c-v2 .y4c-v2-home .hv2-promises { border: 1px solid CanvasText; }
	body.y4c-v2 .y4c-v2-home .hv2-sec::before,
	body.y4c-v2 .y4c-v2-home .hv2-hero::before { display: none; }
}
