@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

/**
 * MY FAMILY REWARDS — page styles.
 *
 * A port of the live page's CSS. Three sources were merged:
 *   1. The cssCode of each Bricks "code" element (verbatim — the clamp() ramps,
 *      the circle geometry, the sticky card behaviour and the FAQ card styling
 *      are all copied value-for-value).
 *   2. Bricks' per-element CSS for the six top-level elements (the section
 *      backgrounds, the join band's background image settings, the 32px spacer).
 *   3. The typographic baseline Bricks' THEME STYLES supply globally, read off
 *      the live page with getComputedStyle and restated here under .cwpr-rewards
 *      (see "Baseline" below).
 *
 * Where live fought itself — element inline styles overriding class rules inside
 * the step cards — the EFFECTIVE computed value is what is written here, not the
 * losing declaration. e.g. a card <h2> is 28px because its inline style beat the
 * stylesheet's 22px; 28px is what this file says.
 *
 * Every measurement was verified against live at 1440px and 375px.
 *
 * SCOPING: everything is under .cwpr-rewards (or the body page class) so it
 * cannot leak into the other three pages this plugin serves.
 *
 * @package cw-page-rebuild
 */

/* ---------------------------------------------------------------------------
 * Page-level requirement: keep horizontal overflow visible.
 *
 * The theme sets body { overflow-x: hidden }. That silently breaks
 * position: sticky for every descendant, which is the entire mechanic of the
 * step cards — so live's step-card code element overrides it globally with
 * html, body { overflow-x: visible !important }. Same fix, scoped to this page
 * only rather than applied site-wide. Safe because every block on this page is
 * max-width constrained; verified no horizontal scrollbar at 1440px or 375px.
 * ------------------------------------------------------------------------- */
body.cwpr-page-my-family-rewards {
	overflow-x: visible;
}

/* ---------------------------------------------------------------------------
 * Baseline
 *
 * Restated explicitly rather than inherited from Bricks' theme styles, because
 * this template bypasses Bricks' rendering and must not depend on whether that
 * theme-style CSS happens to be emitted. Values are live's computed values:
 * body 15px / 1.7, headings 700 / 1.4 / no margin, ul 15px 0 with 40px indent.
 *
 * WHY EVERY ELEMENT SELECTOR BELOW IS WRAPPED IN :where()
 * On live this baseline arrives as bare `h2 {}` / `p {}` theme-style rules —
 * specificity 0,0,1 — so the component rules that follow (a single class each,
 * 0,1,0) beat them and their margins and colours land. Scoping the same
 * declarations as `.cwpr-rewards h2` would raise them to 0,1,1 and silently
 * OUTRANK every component rule: headings lose their colour and every
 * margin-bottom on the page collapses to 0. That regression was real and was
 * caught by measuring this stylesheet against live rather than assuming.
 * :where() contributes no specificity, so these rules sit at 0,0,0 — weaker
 * than live's originals, which is exactly what a baseline should be, and the
 * component rules below always win.
 * ------------------------------------------------------------------------- */
.cwpr-rewards {
	font-family: -apple-system, system-ui, 'Segoe UI', roboto, helvetica, arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
	font-size: 15px;
	line-height: 1.7;
	color: #2d3748;
}

:where(.cwpr-rewards) :where(h1, h2, h3, h4, h5, h6) {
	margin: 0;
	font-weight: 700;
	line-height: 1.4;
}

:where(.cwpr-rewards) :where(p) {
	margin: 0;
	line-height: 1.7;
}

:where(.cwpr-rewards) :where(ul) {
	margin: 15px 0;
	padding-left: 40px;
}

:where(.cwpr-rewards) :where(a) {
	color: inherit;
	text-decoration: none;
}

/* Matches Bricks' own img reset — inline with vertical-align, not display:block. */
:where(.cwpr-rewards) :where(img) {
	max-width: 100%;
	height: auto;
	outline: none;
	vertical-align: middle;
}

/* ---------------------------------------------------------------------------
 * Layout shells
 *
 * Stand-ins for Bricks' .brxe-section / .brxe-container. The 25px side gutter is
 * the site's theme-style container padding; the containers on this page are all
 * set to full width (Bricks' var(--full-width) idiom), so the section is
 * full-bleed and its child is inset by 25px.
 * ------------------------------------------------------------------------- */
.cwpr-rewards__section {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.cwpr-rewards__container {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding: 0 25px;
}

/* The 32px whitespace container between the step cards and the join band. */
.cwpr-rewards__spacer {
	width: 100%;
	height: 32px;
}

/* ---------------------------------------------------------------------------
 * 1. Hero slider
 *
 * Full-bleed, no gutter — Smart Slider draws its own full-width breakout.
 * Height is entirely the slider's (488px at 1440px on live); nothing is imposed
 * here so the slider stays free to be re-sized in Smart Slider itself.
 * ------------------------------------------------------------------------- */
.cwpr-rewards__slider {
	width: 100%;
}

/* ---------------------------------------------------------------------------
 * 2. Everyday savings
 * ------------------------------------------------------------------------- */

/*
 * The background sits on BOTH the full-bleed section and the inset block, as on
 * live — the section's colour is what fills the 25px gutters.
 */
.cwpr-rewards__savings {
	background-color: #f7f7f7;
}

.cwpr-savings {
	width: 100%;
	background: #f7f7f7;
	padding: clamp(40px, 6vw, 60px) 20px;
	box-sizing: border-box;
	text-align: center;
}

.cwpr-savings__lead {
	color: #f58220;
	font-style: italic;
	font-weight: 700;
	font-size: clamp(14px, 2.6vw, 18px);
	margin: 0 0 10px;
}

.cwpr-savings__headline {
	color: #0056a4;
	font-weight: 700;
	font-size: clamp(20px, 5.2vw, 32px);
	margin: 0 0 clamp(28px, 5vw, 50px);
}

.cwpr-savings__circles {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(20px, 5vw, 40px);
}

.cwpr-savings__circle {
	width: clamp(220px, 40vw, 260px);
	aspect-ratio: 1 / 1;             /* keeps it perfectly round at every width */
	border-radius: 50%;
	padding: clamp(16px, 6%, 30px) clamp(12px, 5%, 20px);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, .15);
	transition: transform .4s ease, box-shadow .4s ease;
}

.cwpr-savings__circle h3 {
	margin: 0 0 10px;
	font-weight: 700;
	font-size: clamp(16px, 4vw, 20px);
}

.cwpr-savings__circle p {
	margin: 0;
	font-size: clamp(13px, 3.2vw, 16px);
}

.cwpr-savings__circle--c1 { background: #7cc63f; }
.cwpr-savings__circle--c2 { background: #0e56ad; }
.cwpr-savings__circle--c3 { background: #28c5c5; }
.cwpr-savings__circle--c4 { background: #fc881d; }

/* Hover lift, with the glow tinted to match each circle. */
.cwpr-savings__circle--c1:hover { transform: translateY(-10px) scale(1.05); box-shadow: 0 10px 20px rgba(124, 198, 63, .6); }
.cwpr-savings__circle--c2:hover { transform: translateY(-10px) scale(1.05); box-shadow: 0 10px 20px rgba(14, 86, 173, .6); }
.cwpr-savings__circle--c3:hover { transform: translateY(-10px) scale(1.05); box-shadow: 0 10px 20px rgba(40, 197, 197, .6); }
.cwpr-savings__circle--c4:hover { transform: translateY(-10px) scale(1.05); box-shadow: 0 10px 20px rgba(252, 136, 29, .6); }

.cwpr-savings__cta-wrap {
	margin-top: clamp(30px, 6vw, 50px);
}

.cwpr-savings__cta {
	display: inline-block;
	padding: clamp(12px, 2.5vw, 16px) clamp(22px, 4.5vw, 32px);
	background: #555;
	color: #fff;
	text-decoration: none;
	font-size: clamp(16px, 2.5vw, 18px);
	font-weight: 500;
	border-radius: 4px;
	transition: background .3s ease, transform .2s ease;
}

.cwpr-savings__cta:hover {
	background: #333;
	color: #fff;
}

/* ---------------------------------------------------------------------------
 * 3. How it works — sticky step cards
 *
 * Each card sticks 250px from the top and the JS scales the one behind down as
 * the next arrives, so they appear to stack. The 100px gap plus the 80px
 * per-card bottom margin is what gives each card enough scroll distance for the
 * effect to read.
 * ------------------------------------------------------------------------- */
.cwpr-steps {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 100px;
	padding: 80px 20px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
}

.cwpr-steps__card {
	position: sticky;
	top: 250px;
	min-height: 350px;
	max-width: 680px;
	width: 100%;
	margin: 0 auto 80px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 40px 30px;
	border-radius: 20px;
	box-sizing: border-box;
	z-index: 1;
	/*
	 * 0.4s, not the 0.5s live's stylesheet asks for: live's JS immediately
	 * overwrites the transition inline with 0.4s, so 0.4s is what actually runs.
	 */
	transform: scale(1);
	filter: brightness(1);
	transition: transform .4s ease, filter .4s ease;
	will-change: transform, filter;
}

.cwpr-steps__card--signup  { background: #7cc63f; }
.cwpr-steps__card--shop    { background: #0e56ad; }
.cwpr-steps__card--earn    { background: #28c5c5; }
.cwpr-steps__card--support { background: #fc881d; }

.cwpr-steps__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	flex-wrap: wrap;
}

/* Cards 2 and 4 put the artwork on the left. */
.cwpr-steps__inner--reverse {
	flex-direction: row-reverse;
}

.cwpr-steps__title,
.cwpr-steps__text,
.cwpr-steps__terms,
.cwpr-steps__cta {
	max-width: 325px;
	line-height: 1.4;
	color: #fff;
}

.cwpr-steps__title {
	font-size: 28px;
	font-weight: 800;
	margin: 0 0 10px;
}

/* First paragraph is the lead; a second, where present, is a smaller aside. */
.cwpr-steps__text {
	font-size: 18px;
	margin: 0 0 20px;
}

.cwpr-steps__text--2 {
	font-size: 16px;
}

.cwpr-steps__cta {
	display: inline-block;
	padding: 10px 20px;
	background-color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 700;
	font-size: 14px;
}

/* The button label takes the card's colour. */
.cwpr-steps__card--signup  .cwpr-steps__cta { color: #7cc63f; }
.cwpr-steps__card--shop    .cwpr-steps__cta { color: #0e56ad; }
.cwpr-steps__card--earn    .cwpr-steps__cta { color: #28c5c5; }
.cwpr-steps__card--support .cwpr-steps__cta { color: #fc881d; }

.cwpr-steps__terms {
	font-size: 12px;
	margin: 10px 0 16px;
}

/*
 * Definite 240px basis rather than letting the column shrink-wrap the image.
 * Live gets away with `width:100%` on a shrink-to-fit parent because by the time
 * it matters the image has loaded and lends its intrinsic size; with lazy
 * loading that percentage is circular and the column measures 0 until the image
 * arrives, which would collapse the card and then jolt it open.
 */
.cwpr-steps__media {
	flex: 0 0 240px;
}

.cwpr-steps__media img {
	max-width: 240px;
	width: 100%;
	border-radius: 10px;
}

/* Mobile / tablet — cards go single-column but KEEP the sticky stack. */
@media (max-width: 768px) {
	.cwpr-steps {
		gap: 60px;
		padding: 60px 20px;
		max-width: 100%;
	}

	.cwpr-steps__card {
		position: sticky;
		top: 120px;              /* lower stick point for a short viewport */
		min-height: 320px;
		max-width: 100%;
		align-items: flex-start;
		flex-direction: column;
		padding: 28px 20px;
	}

	.cwpr-steps__inner {
		flex-direction: column;
		gap: 18px;
	}

	/* Column layout means reversing would put the image above the copy. */
	.cwpr-steps__inner--reverse {
		flex-direction: column;
	}

	.cwpr-steps__media {
		flex: 0 0 auto;
		width: 100%;
	}

	.cwpr-steps__media img {
		max-width: 100%;
		margin-top: 14px;
	}

	.cwpr-steps__title,
	.cwpr-steps__text,
	.cwpr-steps__terms,
	.cwpr-steps__cta {
		max-width: 100%;
	}
}

/*
 * Honour a reduced-motion preference. !important is deliberate: the scroll
 * handler writes transform/filter inline, and only !important outranks that.
 */
@media (prefers-reduced-motion: reduce) {
	.cwpr-steps__card {
		transition: none;
		transform: none !important;
		filter: none !important;
	}

	.cwpr-savings__circle {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * 5. Join band
 *
 * The background image is set inline on the section by the template, so it can
 * be mapped onto the current environment's uploads URL.
 * ------------------------------------------------------------------------- */
.cwpr-rewards__join {
	background-blend-mode: normal;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	padding-top: 20px;
	padding-bottom: 20px;
}

.cwpr-join {
	width: 100%;
	padding: 100px 20px;
	text-align: center;
	font-family: 'Open Sans', sans-serif;
	background-color: transparent;
	box-sizing: border-box;
}

.cwpr-join__lead {
	color: #f58220;
	font-style: italic;
	font-size: clamp(16px, 2vw, 20px);
	margin: 0 0 40px;
}

.cwpr-join__headline {
	color: #fff;
	font-size: clamp(32px, 5vw, 60px);
	margin: 0 0 40px;
	line-height: 1.3;
	font-style: italic;
}

/* "JOIN" and "TODAY!" are light; the programme name carries the weight. */
.cwpr-join__headline-light { font-weight: 400; }
.cwpr-join__headline-bold  { font-weight: 700; }

.cwpr-join__line {
	color: #fff;
	font-size: clamp(20px, 2.5vw, 28px);
	margin: 0 0 10px;
}

.cwpr-join__line--last {
	margin-bottom: 50px;
}

.cwpr-join__cta {
	display: inline-block;
	background-color: #7cba42;
	color: #fff;
	padding: 18px 40px;
	font-size: clamp(18px, 2vw, 22px);
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
}

.cwpr-join__cta:hover {
	color: #fff;
}

/* ---------------------------------------------------------------------------
 * 6. FAQ accordion
 * ------------------------------------------------------------------------- */

/* Section colour fills the 25px gutters either side of the inset block. */
.cwpr-rewards__faq {
	background-color: #f0f0f0;
}

.cwpr-faq {
	width: 100%;
	background-color: #f0f0f0;
	padding: 100px 20px;
	font-family: 'Open Sans', sans-serif;
	box-sizing: border-box;
}

.cwpr-faq__container {
	max-width: 1000px;
	margin: 0 auto;
}

.cwpr-faq__heading {
	color: #0056a4;
	text-align: left;
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 50px;
}

.cwpr-faq__list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cwpr-faq__item {
	background: #fff;
	border-radius: 12px;
	padding: 30px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.cwpr-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cwpr-faq__question p {
	margin: 0;
	font-weight: 700;
	font-size: 20px;
	color: #333;
}

.cwpr-faq__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	border-radius: 50%;
	background-color: #d3d3d3;
	font-size: 24px;
	color: #fff;
	transition: transform 0.3s ease;
	margin-left: 12px;
}

.cwpr-faq__item.is-open .cwpr-faq__arrow {
	transform: rotate(90deg);
}

.cwpr-faq__answer {
	display: none;
	margin-top: 16px;
	font-size: 18px;
	color: #555;
}

.cwpr-faq__item.is-open .cwpr-faq__answer {
	display: block;
}

.cwpr-faq__answer ul {
	margin-top: 10px;
	padding-left: 20px;
}

/* Answer links keep the blue, semi-bold treatment from live. */
.cwpr-faq__answer a {
	color: #0056a4;
	font-weight: 600;
	text-decoration: none;
}

.cwpr-faq__answer a:hover,
.cwpr-faq__answer a:focus {
	text-decoration: underline;
	color: #0056a4;
}

.cwpr-faq__answer a:visited {
	color: #0056a4;
}

/* Keyboard users need to see which row is focused; live offered no cue. */
.cwpr-faq__question:focus-visible {
	outline: 2px solid #0056a4;
	outline-offset: 4px;
}

/* ---------------------------------------------------------------------------
 * Step-card artwork as a link (site owner, 2026-08-19)
 *
 * display:block so the anchor is exactly the image box and not a text-sized
 * inline strip, and a small lift on hover so it reads as tappable. The card
 * itself is the only thing that moves on the page, so the transform is cheap.
 * ------------------------------------------------------------------------- */
.cwpr-rewards .cwpr-steps__media-link {
	display: block;
	line-height: 0;
	text-decoration: none;
	transition: transform 0.18s ease;
}

.cwpr-rewards .cwpr-steps__media-link:hover {
	transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
	.cwpr-rewards .cwpr-steps__media-link {
		transition: none;
	}

	.cwpr-rewards .cwpr-steps__media-link:hover {
		transform: none;
	}
}
