/* wp-content/plugins/ceca-widgets/widgets/cta-banner/cta-banner.css */

/* Geometry mirrors Figma node 2044:1262 on a 1440×450 canvas: content inset
   72px, photo shape 511×449 bleeding 75px off the right edge, accent polygon
   224×209 rotated -69.42° overlapping the photo's lower-left. */

.ceca-cta-banner {
	--ceca-cta-bg: #411024;
	--ceca-cta-accent: #c65a93;
	--ceca-cta-text: #ffffff;
	--ceca-cta-secondary: #d9d9d9;

	/* Bleed padding: centers the 1296px content box inside the full-bleed
	   banner — 72px at the 1440 design width, growing on wider viewports so
	   text stays aligned with the site grid. */
	--ceca-cta-pad: max(var(--ceca-gutter, 72px), calc(50vw - var(--ceca-site-width, 1440px) / 2 + var(--ceca-gutter, 72px)));

	/* Design-to-viewport unit: 1px at/above the 1440 design width,
	   shrinking proportionally below it so the composition scales down
	   instead of cropping on smaller screens. */
	--ceca-cta-u: min(1px, calc(100vw / 1440));

	/* The virtual 1440 canvas right edge: 0 below the site width (canvas =
	   viewport), growing on wider screens so shapes stay on the grid. */
	--ceca-cta-edge: calc(50vw - min(50vw, var(--ceca-site-width, 1440px) / 2));

	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: calc(450 * var(--ceca-cta-u));
	/* Full-bleed breakout: the container is capped at the site width, so the
	   banner pulls itself out to the viewport edges for its background. */
	margin-inline: calc(50% - 50vw);
	padding: 60px var(--ceca-cta-pad);
	background: var(--ceca-cta-bg);
}

/* Photo + accent scale WITH THE BAND: heights are percentages of the
   banner (their share of the design band) and widths come from each
   shape's aspect ratio, so the composition stays proportioned like the
   Figma artboard at any banner height and any viewport width. Horizontal
   offsets ride the virtual canvas edge, scaled by --ceca-cta-u below
   1440. At each design's reference state (bottom 450 / top 400 / middle
   346 band on a 1440 viewport) every value resolves to the exact Figma
   number.

   Bottom photo: full band height, bleeding 75px past the canvas edge —
   at 1440 the viewport clips its pointed right side (the design's
   cut-off look); wider screens reveal it. */
.ceca-cta-banner__media {
	position: absolute;
	top: 0;
	bottom: 0;
	width: auto;
	aspect-ratio: 511 / 450;
	right: calc(var(--ceca-cta-edge) - 75 * var(--ceca-cta-u));
	-webkit-mask-image: url('mask.svg');
	mask-image: url('mask.svg');
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.ceca-cta-banner__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Shape-position variants reproduce the three hero designs exactly
   (Figma 2112:8866 bottom / 2484:1542 top / 2654:1342 middle). Each swaps
   the photo mask AND carries its own accent size + placement — the
   designs scale and re-rotate the octagon per variant, they don't just
   slide one size up and down:
   top    = photo 463×391 flush to the banner top, 50px past the canvas;
   middle = 368×323 top-aligned, 90px inside the canvas edge. */
/* Top photo: full band height (always meets the bottom edge), 50px past
   the canvas — 463 wide at the design's 400 band. */
.ceca-cta-banner--shape-top .ceca-cta-banner__media {
	aspect-ratio: 463 / 400;
	right: calc(var(--ceca-cta-edge) - 50 * var(--ceca-cta-u));
	-webkit-mask-image: url('mask-top.svg');
	mask-image: url('mask-top.svg');
}

/* Middle photo: the design leaves a 23px gap under it in its 346 band —
   kept as a 6.6% bottom inset so the look holds at any band height. */
.ceca-cta-banner--shape-middle .ceca-cta-banner__media {
	aspect-ratio: 368 / 323;
	bottom: 6.6%;
	right: calc(var(--ceca-cta-edge) + 90 * var(--ceca-cta-u));
	-webkit-mask-image: url('mask-middle.svg');
	mask-image: url('mask-middle.svg');
}

/* Bottom accent: 283 tall in the 450 band (62.9%), hanging 44px past the
   band bottom (-9.8%) so it always renders cropped by the bottom edge. */
.ceca-cta-banner__accent {
	position: absolute;
	bottom: -9.8%;
	height: 62.9%;
	width: auto;
	aspect-ratio: 274 / 283;
	transform: translateY(var(--ceca-cta-accent-shift, 0px));
	right: calc(var(--ceca-cta-edge) + 181 * var(--ceca-cta-u));
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ceca-cta-accent);
	pointer-events: none;
}

/* The octagon is a rotated 224×209 vector centred in its 274×283 frame —
   81.8% / 73.9% hold that ratio at any accent size. */
.ceca-cta-banner__accent svg {
	flex: none;
	width: 81.8%;
	height: 73.9%;
	transform: rotate(-69.42deg);
}

/* Top accent: 0.907-scale octagon poking 7px above the band top (-1.75%
   of the 400 band), well left of the photo. */
.ceca-cta-banner--shape-top .ceca-cta-banner__accent {
	top: -1.75%;
	bottom: auto;
	height: 64.25%;
	aspect-ratio: 249 / 257;
	right: calc(var(--ceca-cta-edge) + 305 * var(--ceca-cta-u));
}

/* Middle accent: 0.72-scale, re-rotated to -71.66° per the design,
   tucked against the photo's lower-left. */
.ceca-cta-banner--shape-middle .ceca-cta-banner__accent {
	top: 33.8%;
	bottom: auto;
	height: 58.4%;
	aspect-ratio: 195 / 202;
	right: calc(var(--ceca-cta-edge) + 358 * var(--ceca-cta-u));
}

.ceca-cta-banner--shape-middle .ceca-cta-banner__accent svg {
	width: 83.1%;
	height: 74.8%;
	transform: rotate(-71.66deg);
}

.ceca-cta-banner__content {
	position: relative;
	z-index: 1;
	max-width: 856px;
}

/* Line above the heading ("Marking 30 years"): 25/30 (user, 2026-09-30;
   was the Figma 152:866 20/30). Mobile keeps its 16/24 below. */
.ceca-cta-banner__intro {
	margin: 0 0 14px;
	color: var(--ceca-cta-text);
	font-size: 25px;
	font-weight: 400;
	line-height: 30px;
}

.ceca-cta-banner__heading {
	margin: 0 0 30px;
	color: var(--ceca-cta-text);
	font-size: clamp(30px, 3.47vw, 50px);
	font-weight: 700;
	line-height: 1.2;
}

/* Paragraph beneath the heading (careers/teal variants): 20/32 regular. */
/* The membership banner's fixed headline is long — 40px at desktop
   (user, 2026-09-30), easing down on tablets; phones keep 26px. */
@media (min-width: 768px) {
	.ceca-cta-banner.ceca-cta-banner--membership .ceca-cta-banner__heading {
		font-size: clamp(30px, 2.78vw, 40px);
	}
}

.ceca-cta-banner__subtext {
	margin: -6px 0 30px;
	color: var(--ceca-cta-text);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.6;
	max-width: 720px;
}

.ceca-cta-banner__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

/* Double-class + element selectors so these always beat theme/kit rules that
   target bare `a` elements (e.g. `.elementor-kit-XX a`). */
.ceca-cta-banner a.ceca-cta-banner__button {
	display: inline-block;
	padding: 5px 18px;
	border-radius: 300px;
	background: var(--ceca-cta-accent);
	color: var(--ceca-cta-bg);
	font-size: 18px;
	font-weight: 400;
	line-height: 30px;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* The site's hyperlink style: the dotted underline body-copy links use
   (child theme style.css, same tokens), drawn as a background so it follows
   wrapped lines (Trello snag, user 2026-11-18; replaces the 2026-09-29
   no-underline). */
.ceca-cta-banner a.ceca-cta-banner__link {
	color: var(--ceca-cta-secondary);
	font-size: 18px;
	font-weight: 400;
	line-height: 30px;
	text-decoration: none;
	padding-bottom: var(--ceca-link-dot-offset, 2px);
	background-image: linear-gradient(90deg, currentColor var(--ceca-link-dot, 1px), transparent var(--ceca-link-dot, 1px));
	background-size: var(--ceca-link-dot-gap, 3px) var(--ceca-link-dot, 1px);
	background-repeat: repeat-x;
	background-position: 0 100%;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	transition: color 0.2s ease, opacity 0.2s ease;
}

/* Hover colours restated explicitly so Elementor kit `a:hover`/`button:hover`
   globals can never recolour these (the stray pink hover). The widget's own
   hover controls still win — {{WRAPPER}} selectors outrank these. */
.ceca-cta-banner a.ceca-cta-banner__link:hover,
.ceca-cta-banner a.ceca-cta-banner__button:hover {
	opacity: 0.85;
}

.ceca-cta-banner a.ceca-cta-banner__button:hover {
	background: var(--ceca-cta-accent);
	color: var(--ceca-cta-bg);
}

.ceca-cta-banner a.ceca-cta-banner__link:hover {
	color: var(--ceca-cta-secondary);
}

/* Photo + accent bleed behind the text on narrow screens — drop them and let
   the panel carry the CTA. */
@media (max-width: 1024px) {
	.ceca-cta-banner__media,
	.ceca-cta-banner__accent {
		display: none;
	}

	.ceca-cta-banner {
		min-height: 0;
		padding: 48px var(--ceca-cta-pad);
	}
}

/* --- mobile design pass (Figma 2372:7357): shapes return ------------------ */
/* Bottom (plum): photo top-right bleeding off, accent on its lower-left,
   text below, actions stacked. Top (teal): text first, photo pinned
   bottom-right, accent mid-left. Middle keeps the text-only fallback. */
@media (max-width: 767px) {
	.ceca-cta-banner {
		padding: 40px 20px;
	}

	.ceca-cta-banner__heading {
		font-size: 26px;
		line-height: 33px;
	}

	.ceca-cta-banner__intro {
		font-size: 16px;
		line-height: 24px;
		margin-bottom: 10px;
	}

	.ceca-cta-banner__actions {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	/* Bottom variant */
	.ceca-cta-banner--shape-bottom {
		justify-content: flex-start;
		min-height: 540px;
		padding: 303px 20px 35px;
	}

	.ceca-cta-banner--shape-bottom .ceca-cta-banner__heading {
		font-size: 30px;
		line-height: 35px;
	}

	.ceca-cta-banner--shape-bottom .ceca-cta-banner__media {
		display: block;
		top: 0;
		bottom: auto;
		right: -56px;
		width: 311px;
		height: 273px;
		aspect-ratio: auto;
	}

	.ceca-cta-banner--shape-bottom .ceca-cta-banner__accent {
		display: flex;
		top: 150px;
		bottom: auto;
		right: 100px;
		width: 160px;
		height: 166px;
		aspect-ratio: auto;
	}

	.ceca-cta-banner--shape-bottom .ceca-cta-banner__accent svg {
		width: 131px;
		height: 122px;
	}

	/* Top variant */
	.ceca-cta-banner--shape-top {
		justify-content: flex-start;
		min-height: 511px;
		padding: 30px 20px 300px;
	}

	.ceca-cta-banner--shape-top .ceca-cta-banner__media {
		display: block;
		top: auto;
		bottom: 0;
		right: -40px;
		width: 334px;
		height: 293px;
		aspect-ratio: auto;
	}

	.ceca-cta-banner--shape-top .ceca-cta-banner__accent {
		display: flex;
		top: 246px;
		bottom: auto;
		left: 58px;
		right: auto;
		width: 142px;
		height: 147px;
		aspect-ratio: auto;
	}

	.ceca-cta-banner--shape-top .ceca-cta-banner__accent svg {
		width: 116px;
		height: 109px;
	}
}

/* Mobile refinements (critic pass). Doubled-up selectors on the type: the
   Elementor kit styles bare h2/p at higher specificity than one class and
   was inflating the banner text to 50px on phones. */
@media (max-width: 767px) {
	.ceca-cta-banner .ceca-cta-banner__heading {
		margin-bottom: 25px;
		font-size: 26px;
		line-height: 33px;
		letter-spacing: 0;
	}

	.ceca-cta-banner--shape-bottom .ceca-cta-banner__heading,
	.ceca-cta-banner.ceca-cta-banner--shape-bottom .ceca-cta-banner__heading {
		font-size: 30px;
		line-height: 35px;
	}

	.ceca-cta-banner .ceca-cta-banner__intro {
		font-size: 16px;
		line-height: 24px;
	}

	.ceca-cta-banner .ceca-cta-banner__subtext {
		font-size: 16px;
		line-height: 26px;
	}

	.ceca-cta-banner a.ceca-cta-banner__button {
		display: inline-flex;
		align-items: center;
		min-height: 40px;
		padding: 5px 22px;
	}
}

/* Critic round 2: teal octagon up to design size; plum accent nudged
   up-left; a touch more button padding. */
@media (max-width: 767px) {
	.ceca-cta-banner--shape-top .ceca-cta-banner__accent {
		width: 162px;
		height: 168px;
	}

	.ceca-cta-banner--shape-top .ceca-cta-banner__accent svg {
		width: 132px;
		height: 123px;
	}

	.ceca-cta-banner--shape-bottom .ceca-cta-banner__accent {
		top: 140px;
		right: 115px;
	}

	.ceca-cta-banner a.ceca-cta-banner__button {
		padding: 5px 26px;
	}
}
