/* Christmas at Eastgate — homepage feature band.
   Loaded only on the front page, and only while the page content contains the
   `eg-xmas-home` block (inc/christmas.php). To take it down after Christmas,
   delete that block (wp eval-file tools/home-christmas.php remove) and this
   sheet stops loading by itself; the photo hero returns to full size. */

.eg-xmas-home {
	--xh-red: #AB001A;
	--xh-red-ink: #4E0010;
	--xh-gold: #DDA945;
	--xh-gold-soft: #EBCB86;
	--xh-white: #FFFFFF;
	--xh-line: rgba(255, 255, 255, 0.22);
	--xh-font: var(--wp--preset--font-family--avenir, 'avenir-next-lt-pro', 'Avenir Next', sans-serif);
	--xh-gutter: max(1.25rem, env(safe-area-inset-left, 0px));

	margin-block: 0 !important;
	background: var(--xh-red);
	color: var(--xh-white);
	font-family: var(--xh-font);
	text-align: center;
	/* The fixed transparent header sits over this band; drop the content below it. */
	padding-top: calc(var(--eg-header-h, 104px) + clamp(0.75rem, 2.5vw, 2rem));
	padding-bottom: clamp(3rem, 6vw, 4.75rem);
}
.eg-xmas-home *,
.eg-xmas-home *::before,
.eg-xmas-home *::after { box-sizing: border-box; }
.eg-xmas-home :is(h2, p, ul) { margin: 0; padding: 0; }
.eg-xmas-home :focus-visible { outline: 3px solid var(--xh-gold); outline-offset: 3px; }

.xh-wrap {
	max-width: 1140px;
	margin-inline: auto;
	padding-inline: var(--xh-gutter);
	display: grid;
	justify-items: center;
	gap: clamp(1.1rem, 2.4vw, 1.5rem);
}
.xh-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Paper grain from the artwork, under the content (never over type). */
.xh-grain { position: relative; isolation: isolate; overflow: hidden; }
.xh-grain::after {
	content: "";
	position: absolute;
	inset: 0;
	background: url(grain.webp) center / 420px;
	mix-blend-mode: multiply;
	opacity: 0.45;
	pointer-events: none;
	z-index: 0;
}
.xh-grain > .xh-wrap { position: relative; z-index: 1; }

.xh-lockup { display: block; width: min(100%, 760px); }
.xh-lockup img { display: block; width: 100%; height: auto; }

.xh-dateline {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1.1rem;
	font: 600 clamp(0.875rem, 2.2vw, 1.25rem)/1.2 var(--xh-font);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--xh-gold);
}
.xh-dateline i { display: block; width: clamp(40px, 10vw, 150px); height: 1.5px; background: var(--xh-gold); }

.xh-lede {
	max-width: 46ch;
	font-size: clamp(1rem, 1.8vw, 1.1875rem);
	line-height: 1.55;
	color: var(--xh-white);
	text-wrap: balance;
}

.xh-times {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	border-block: 1px solid var(--xh-line);
}
.xh-times li {
	display: grid;
	gap: 0.3rem;
	padding: 0.95rem clamp(1.25rem, 4vw, 2.5rem);
}
.xh-times li + li { border-left: 1px solid var(--xh-line); }
.xh-times strong {
	font: 700 0.75rem/1.2 var(--xh-font);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--xh-gold-soft);
}
.xh-times span { font: 700 clamp(1.0625rem, 2vw, 1.3125rem)/1.2 var(--xh-font); }

.xh-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 0.25rem; }
.xh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font: 700 0.875rem/1 var(--xh-font);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 1.05rem 1.6rem;
	border-radius: 2px;
	border: 1.5px solid transparent;
	transition: background 0.2s, color 0.2s, transform 0.2s;
}
.xh-btn:hover { transform: translateY(-1px); }
.xh-btn--gold { background: var(--xh-gold); color: var(--xh-red-ink) !important; }
.xh-btn--gold:hover { background: var(--xh-gold-soft); }
.xh-btn--line { border-color: currentColor; color: var(--xh-white) !important; background: none; }
.xh-btn--line:hover { background: var(--xh-white); color: var(--xh-red) !important; border-color: var(--xh-white); }

/* ── The regular photo hero, now second: same photos + rotation, shorter ── */
.wp-block-post-content > .eg-xmas-home + .wp-block-cover {
	min-height: clamp(380px, 58vh, 600px) !important;
	padding-top: clamp(3rem, 6vw, 4.5rem) !important;
	padding-bottom: clamp(3rem, 6vw, 4.5rem) !important;
}
.wp-block-post-content > .eg-xmas-home + .wp-block-cover h1 {
	font-size: clamp(2.5rem, 6.5vw, 4.75rem) !important;
}

@media (max-width: 560px) {
	.xh-dateline { flex-direction: column; gap: 0.45rem; }
	.xh-dateline i { display: none; }
	.xh-times { flex-direction: column; width: 100%; border-block: 0; gap: 0.5rem; }
	.xh-times li { padding: 0.75rem 1rem; border: 1px solid var(--xh-line); }
	.xh-times li + li { border-left: 1px solid var(--xh-line); }
	.xh-ctas { width: 100%; }
	.xh-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.xh-btn { transition: none; }
	.xh-btn:hover { transform: none; }
}
