/* ==========================================================================
   GIAC — Cherry Hero block (giac/cherry-hero)
   Desktop: 50/50 split card, copy left, photo right.
   Mobile layouts (block sidebar > Mobile layout):
     stacked    photo on top, copy below (Home, Club Info style)
     immersive  photo fills the card, copy floats on a cream fade (Gym style)
     poster     title sits on the photo, buttons below (Tennis / Pickleball)
   Schemes: club (maroon/gold), tennis (navy/lime), pickleball (blue/gold).
   ========================================================================== */

.gch {
	/* scheme defaults = club */
	--gch-eyebrow: var(--giac-gold);
	--gch-title: var(--giac-maroon);
	--gch-blurb: var(--giac-body);
	--gch-btn1-bg: #520717;
	--gch-btn1-fg: #fff;
	--gch-btn2-fg: #520717;
	--gch-btn2-bd: var(--giac-gold);
	--gch-btn-font: var(--giac-sans-light);
	--gch-poster-eyebrow: var(--giac-gold-soft);
	--gch-poster-title: #fafaf8;
	--gch-poster-blurb: #fafaf8;
	--gch-poster-size: clamp(56px, 16vw, 72px);
	--gch-btn-size-m: 10px;

	--gch-side: clamp(28px, 4vw, 58px);
	--gch-radius: var(--cherry-desktop-radius);
	--gch-min-h: calc(100svh - 28px - var(--wp-admin--admin-bar--height, 0px));

	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	box-sizing: border-box;
	width: calc(100% - var(--cherry-edge) - var(--cherry-edge));
	max-width: none;
	min-height: var(--gch-min-h);
	margin: var(--cherry-desktop-gap) var(--cherry-edge) 3rem;
	padding: 0;
	overflow: hidden;
	background: var(--cherry-panel-color);
	border-radius: var(--gch-radius);
	color: var(--giac-ink);
}

.gch--tennis {
	--gch-eyebrow: var(--giac-tennis-olive);
	--gch-title: var(--giac-tennis-navy);
	--gch-blurb: var(--giac-tennis-navy);
	--gch-btn1-bg: var(--giac-tennis-navy);
	--gch-btn1-fg: var(--giac-tennis-lime);
	--gch-btn2-fg: var(--giac-tennis-olive);
	--gch-btn2-bd: var(--giac-tennis-olive);
	--gch-btn-font: var(--giac-sans);
	--gch-poster-eyebrow: var(--giac-tennis-lime);
	--gch-poster-title: #fafaf8;
	--gch-poster-blurb: var(--giac-tennis-lime);
	--gch-btn-size-m: 12px;
}

.gch--pickleball {
	--gch-eyebrow: var(--giac-pickle-gold);
	--gch-title: var(--giac-pickle-sky);
	--gch-blurb: var(--giac-pickle-ink);
	--gch-btn1-bg: var(--giac-pickle-blue);
	--gch-btn1-fg: var(--giac-pickle-gold);
	--gch-btn2-fg: var(--giac-pickle-ink);
	--gch-btn2-bd: var(--giac-pickle-ink);
	--gch-btn-font: var(--giac-sans);
	--gch-poster-eyebrow: #fafaf8;
	--gch-poster-title: #e0ad6b;
	--gch-poster-blurb: #fafaf8;
	--gch-poster-size: clamp(64px, 20vw, 84px);
	--gch-btn-size-m: 12px;
}

.gch--compact {
	--gch-min-h: calc(70svh - 28px);
}

@media (min-width: 960px) {
	.gch--d-no-buttons .gch__actions {
		display: none !important;
	}
}

.gch *,
.gch *::before,
.gch *::after {
	box-sizing: border-box;
}

/* ---------- Copy column ---------- */

.gch .gch__copy {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-width: 0;
	min-height: var(--gch-min-h);
	padding: clamp(110px, 14vh, 170px) var(--gch-side) clamp(20px, 3vh, 40px);
	background: var(--cherry-panel-color);
}

.gch .gch__eyebrow {
	margin: 0 0 15px;
	padding: 0 0 0 4px;
	color: var(--gch-eyebrow);
	font-family: var(--giac-sans);
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 4px;
	text-transform: uppercase;
}

.gch .gch__title {
	max-width: 520px;
	margin: 0 0 20px;
	padding: 0;
	color: var(--gch-title);
	font-family: var(--giac-serif-semi);
	font-size: clamp(52px, 4.85vw, 66px);
	font-weight: 700;
	line-height: 0.86;
	letter-spacing: -1px;
	text-transform: none;
}

.gch .gch__blurb {
	max-width: 500px;
	margin: 0 0 25px;
	padding: 0 0 0 4px;
	color: var(--gch-blurb);
	font-family: var(--giac-sans-light);
	font-size: 19px;
	font-weight: 400;
	line-height: 1.4;
}

/* ---------- Buttons ---------- */

.gch .gch__actions {
	display: flex;
	flex-flow: column nowrap;
	align-items: stretch;
	gap: 8px;
	width: min(100%, 390px);
	margin: 0;
	padding: 0;
}

.gch .gch__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 0;
	margin: 0;
	padding: 15px 22px;
	border: 1px solid transparent;
	border-radius: 50px;
	font-family: var(--gch-btn-font);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 1.5px;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
}

.gch .gch__btn--primary {
	background: var(--gch-btn1-bg);
	border-color: var(--gch-btn1-bg);
	color: var(--gch-btn1-fg) !important;
}

.gch .gch__btn--primary:hover,
.gch .gch__btn--primary:focus-visible {
	filter: brightness(0.88);
}

.gch .gch__btn--secondary {
	background: transparent;
	border-color: var(--gch-btn2-bd);
	color: var(--gch-btn2-fg) !important;
}

.gch .gch__btn--secondary:hover,
.gch .gch__btn--secondary:focus-visible {
	background: color-mix(in srgb, var(--gch-btn2-bd) 10%, transparent);
}

.gch .gch__btn:focus-visible {
	outline: 2px solid var(--gch-btn2-bd);
	outline-offset: 3px;
}

.gch .gch__arrow {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	transition: transform 0.25s var(--giac-ease);
}

.gch .gch__btn--primary:hover .gch__arrow {
	transform: translateX(3px);
}

/* ---------- Feature row + tagline ---------- */

.gch .gch__features {
	display: none;
	grid-template-columns: repeat(var(--gch-feature-count, 4), minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 18px 0 10px;
	list-style: none;
}

.gch .gch__features li {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 0;
	text-align: center;
}

.gch .gch__features svg {
	display: block;
	width: 34px;
	height: 34px;
	margin: 0 auto 18px;
	color: var(--giac-gold);
}

.gch .gch__features span {
	color: #2c302e;
	font-family: var(--giac-sans);
	font-size: 9px;
	line-height: 1.6;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.gch .gch__tagline {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: min(100%, 390px);
	margin: 18px 0 0;
	color: var(--giac-gold);
	font-family: var(--giac-sans);
	font-size: 10px;
	line-height: 1.7;
	letter-spacing: 2px;
	text-align: center;
	text-transform: uppercase;
}

.gch .gch__tagline::before,
.gch .gch__tagline::after {
	content: "";
	flex: 0 0 45px;
	height: 1px;
	background: rgba(168, 134, 67, 0.47);
}

.gch .gch__cue {
	display: flex;
	justify-content: center;
	margin-top: 14px;
	transition: opacity 0.4s ease, transform 0.4s var(--giac-ease), visibility 0s linear 0s;
}

/* Fades away once the visitor scrolls down (header.js adds .is-hidden). */
.gch .gch__cue.is-hidden {
	opacity: 0;
	transform: translateY(8px);
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.4s ease, transform 0.4s var(--giac-ease), visibility 0s linear 0.4s;
}

/* ---------- Photo column ---------- */

.gch .gch__media {
	position: relative;
	min-width: 0;
	min-height: var(--gch-min-h);
	overflow: hidden;
	border-radius: var(--gch-radius);
	background: #e9e3da;
	animation: gch-reveal 940ms 150ms var(--giac-ease) both;
}

.gch .gch__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	margin: 0;
	object-fit: cover;
	object-position: var(--gch-pos, 80% 50%);
	border-radius: 0;
}

.gch .gch__poster {
	display: none;
}

.gch .gch__pill {
	position: absolute;
	left: 20px;
	bottom: 20px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 14px 10px 16px;
	border: 1px solid rgba(225, 181, 94, 0.63);
	border-radius: 100px;
	background: rgba(0, 0, 0, 0.25);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: #fff;
	font-family: var(--giac-sans);
	font-size: 10px;
	line-height: 1;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.gch .gch__pill i {
	display: block;
	width: 26px;
	height: 1.5px;
	border-radius: 99px;
	background: #a88643;
}

@keyframes gch-reveal {
	from { clip-path: inset(0 0 100% 0); }
	to { clip-path: inset(0 0 0 0); }
}

/* ==========================================================================
   Tablet + mobile
   ========================================================================== */

@media (max-width: 959px) {
	.gch {
		--gch-side: clamp(32px, 6vw, 56px);
		--gch-radius: var(--cherry-mobile-radius);
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
		margin: var(--cherry-mobile-gap) var(--cherry-edge) 2rem;
	}

	.gch .gch__media {
		grid-row: 1;
		min-height: clamp(360px, 58svh, 570px);
	}

	.gch .gch__img {
		object-position: var(--gch-pos-m, 50% 35%);
	}

	.gch .gch__copy {
		grid-row: 2;
		min-height: 0;
		padding: 28px var(--gch-side) 26px;
	}

	.gch .gch__eyebrow {
		margin-bottom: 12px;
		padding: 0;
	}

	.gch .gch__title {
		margin-bottom: 16px;
		font-size: 54px;
		font-weight: 400;
		line-height: 0.8;
	}

	.gch .gch__blurb {
		margin-bottom: 28px;
		padding: 0;
	}

	.gch .gch__actions {
		flex-flow: row nowrap;
		justify-content: center;
		gap: 12px;
		width: auto;
		margin: 0 calc(10px - var(--gch-side));
	}

	.gch .gch__btn {
		padding: 15px 16px;
		font-size: 12px;
		letter-spacing: 1.2px;
	}

	.gch .gch__btn--primary { flex: 1.3 1 0; }
	.gch .gch__btn--secondary { flex: 1 1 0; }

	.gch .gch__features {
		display: grid;
	}

	.gch .gch__tagline {
		width: 100%;
		font-size: 9px;
	}

	.gch .gch__cue {
		margin-top: 12px;
	}

	.gch--m-no-buttons .gch__actions {
		display: none !important;
	}
}

/* Tablet: wider equal pair of buttons */
@media (min-width: 601px) and (max-width: 959px) {
	.gch .gch__actions {
		width: min(100%, 560px);
		margin: 0 auto;
	}

	.gch .gch__btn--primary,
	.gch .gch__btn--secondary {
		flex: 1 1 0;
	}
}

@media (max-width: 600px) {
	.gch {
		--gch-side: 24px;
	}

	.gch .gch__copy {
		padding: 28px var(--gch-side) 22px;
	}

	.gch .gch__eyebrow {
		font-size: 12px;
	}

	.gch .gch__title {
		font-size: clamp(46px, 12vw, 52px);
		line-height: 0.84;
	}

	.gch .gch__blurb {
		font-size: 15px;
	}

	.gch .gch__btn {
		padding: 15px 12px;
		font-size: var(--gch-btn-size-m);
	}

	.gch .gch__media {
		min-height: clamp(340px, 56svh, 520px);
	}
}

/* ---------- Mobile layout: immersive (photo fills the card) ---------- */

@media (max-width: 959px) {
	.gch--m-immersive {
		display: block;
		min-height: calc(100svh - 20px - var(--wp-admin--admin-bar--height, 0px));
		border-radius: 20px;
	}

	.gch--m-immersive .gch__media {
		position: absolute;
		inset: 0;
		min-height: 0;
		border-radius: 20px;
	}

	.gch--m-immersive .gch__copy {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		padding: 72px 20px 16px;
		background: linear-gradient(180deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0.82) 20%, #fbfaf6 45%);
	}

	/* ---------- Mobile layout: poster (title on the photo) ---------- */

	.gch--m-poster .gch__media {
		min-height: clamp(420px, 65svh, 600px);
	}

	.gch--m-poster .gch__media::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(0deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0) 55%);
		pointer-events: none;
	}

	.gch--m-poster .gch__poster {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1;
		display: block;
		padding: 0 12px 22px;
	}

	.gch--m-poster .gch__poster p {
		margin: 0;
	}

	.gch--m-poster .gch__poster-eyebrow {
		margin-bottom: 14px !important;
		color: var(--gch-poster-eyebrow);
		font-family: var(--giac-sans);
		font-size: 12px;
		line-height: 1;
		letter-spacing: 4px;
		text-transform: uppercase;
	}

	.gch--m-poster .gch__poster-title {
		max-width: 62%;
		margin-bottom: 20px !important;
		color: var(--gch-poster-title);
		font-family: var(--giac-serif-semi);
		font-size: var(--gch-poster-size);
		line-height: 0.8;
		letter-spacing: -3px;
	}

	.gch--m-poster .gch__poster-blurb {
		max-width: 34ch;
		color: var(--gch-poster-blurb);
		font-family: var(--giac-sans);
		font-size: 17px;
		font-weight: 300;
		line-height: 1.4;
	}

	/* the real heading stays for SEO / screen readers, the poster shows it */
	.gch--m-poster .gch__copy > .gch__eyebrow,
	.gch--m-poster .gch__copy > .gch__title,
	.gch--m-poster .gch__copy > .gch__blurb {
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		border: 0;
	}

	.gch--m-poster .gch__copy {
		display: flex;
		flex-direction: column;
		padding: 28px 12px 18px;
	}

	/* Fill the first screen so the scroll cue sits at the bottom (like Gym). */
	.gch--m-poster {
		grid-template-rows: auto 1fr;
		min-height: calc(100svh - 20px - var(--wp-admin--admin-bar--height, 0px));
	}

	.gch--m-poster .gch__cue {
		margin-top: auto;
		padding-top: 18px;
	}

	.gch--m-poster .gch__actions {
		margin: 0;
		gap: 8px;
	}
}

@media (min-width: 601px) and (max-width: 959px) {
	.gch--m-poster .gch__actions {
		margin: 0 auto;
	}
}

/* ---------- Editor niceties ---------- */

.editor-styles-wrapper .gch .gch__media {
	animation: none;
}

.editor-styles-wrapper .gch .gch__media:not(:has(.gch__img)) {
	display: grid;
	place-items: center;
}

@media (prefers-reduced-motion: reduce) {
	.gch .gch__media {
		animation: none;
	}
}

/* Hero buttons + feature list fade in with the text, just after it. */
.gch .gch__actions.giac-blur-reveal { transition-delay: 0.22s; }
.gch .gch__features.giac-blur-reveal { transition-delay: 0.32s; }
.gch .gch__tagline.giac-blur-reveal { transition-delay: 0.4s; }
