/* Bump and Beyond — Home page craft CSS ("the ledger that thinks")
   Loaded only on the front page (page 26), after bb-tokens.css, bb-base.css and
   every Elementor stylesheet (see inc/enqueue.php). Layout, headings, buttons,
   plan cards, the FAQ accordion and the final CTA band are shared and live in
   bb-base.css; this file holds only what is unique to Home. Spacing between
   widgets uses bb-base's --bb-mt / --bb-mb properties. */

@property --bb-pct {
	syntax: '<number>';
	inherits: true;
	initial-value: 0;
}

:root { --bb-ease-expo-out: var(--bb-ease-out-expo); } /* alias kept for back-compat; motion.css uses the token directly */

.bb-mock-ring-amount, .bb-mock-row-amt { font-variant-numeric: tabular-nums lining-nums; }

/* Section H2s share one rhythm: generous space above (section padding),
   a tighter, consistent gap below. */
.bb-empathy-h2, .bb-how-h2, .bb-pricing-h2, .bb-dashboard-h2, .bb-faq-h2 { --bb-mb: var(--bb-space-7); }
.bb-empathy-h2 .elementor-heading-title,
.bb-how-h2 .elementor-heading-title,
.bb-pricing-h2 .elementor-heading-title,
.bb-dashboard-h2 .elementor-heading-title { max-width: 22ch; }

/* ================= 1. HERO ================= */
.e-con.bb-hero {
	padding-block: var(--bb-space-8) calc(var(--bb-space-9) + var(--bb-space-5));
	position: relative;
	overflow: hidden;
}
@media (max-width: 1024px) { .e-con.bb-hero { padding-block: var(--bb-space-7) var(--bb-space-8); } }
@media (max-width: 767px) { .e-con.bb-hero { padding-block: var(--bb-space-5) var(--bb-space-7); overflow: visible; } }

.e-con.bb-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: var(--bb-space-8);
	align-items: center;
	width: 100%;
	max-width: var(--bb-container-width);
	margin-inline: auto;
	padding-inline: var(--bb-gutter);
}
@media (max-width: 900px) {
	.e-con.bb-hero-grid { grid-template-columns: 1fr; gap: var(--bb-space-7); }
}
@media (max-width: 767px) {
	.e-con.bb-hero-grid { padding-inline: var(--bb-gutter-mobile); gap: var(--bb-space-6); }
}

.e-con.bb-hero-copy { display: flex; flex-direction: column; }
.bb-hero-h1 { --bb-mb: var(--bb-space-5); }
.bb-hero-h1 .elementor-heading-title {
	font-size: clamp(2.625rem, 1.5rem + 3.6vw, 4.5rem);
	line-height: 1.04;
	letter-spacing: -0.035em;
	font-variation-settings: 'opsz' 72;
	max-width: 12ch;
}
.bb-hero-lead { --bb-mb: var(--bb-space-6); max-width: 34ch; }
.elementor-widget-text-editor.bb-hero-lead { color: var(--bb-muted); font-size: var(--bb-lead-size); line-height: 1.55; }
.e-con.bb-hero-ctas {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--bb-space-3) var(--bb-space-6);
	--bb-mb: var(--bb-space-4);
}
.bb-hero-ctas > .elementor-widget { width: auto; flex-shrink: 0; }
.bb-hero-ctas .elementor-button { white-space: nowrap; }
.bb-hero-jump-wrap a { white-space: nowrap; }
.elementor-widget-text-editor.bb-hero-note { color: var(--bb-muted); font-size: var(--bb-small-size); }

/* Hero mockup: slightly rotated, ruled paper behind it */
.e-con.bb-hero-mock-wrap {
	position: relative;
	width: 100%;
	padding: var(--bb-space-6) var(--bb-space-2) var(--bb-space-2);
}
.bb-hero-mock-wrap::before {
	content: "";
	position: absolute;
	inset: 0 -12px -40px 12px;
	background-image: repeating-linear-gradient(to bottom, var(--bb-line) 0, var(--bb-line) 1px, transparent 1px, transparent 29px);
	border-radius: var(--bb-radius-lg);
	z-index: 0;
	transform: rotate(1deg);
	pointer-events: none;
}
.bb-hero-mock-wrap::after {
	/* very faint paper grain */
	content: "";
	position: absolute;
	inset: 0 -12px -40px 12px;
	opacity: 0.035;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	z-index: 0;
	pointer-events: none;
}
.bb-mock-hero { position: relative; z-index: 1; }

.bb-mock-card {
	background: var(--bb-white);
	border-radius: var(--bb-radius-lg);
	box-shadow: 0 20px 40px -18px rgba(38, 49, 28, 0.28), 0 2px 6px rgba(13, 20, 26, 0.05);
	padding: var(--bb-space-6);
	max-width: 440px;
	margin-inline: auto;
	transform: rotate(-1.2deg);
	position: relative;
}
@media (max-width: 767px) {
	.bb-mock-card { transform: rotate(-0.6deg); max-width: none; padding: var(--bb-space-5); }
}
.bb-mock-head { margin-bottom: var(--bb-space-5); display: flex; justify-content: space-between; align-items: baseline; }
.bb-mock-title { font-family: var(--bb-font-display); font-weight: 600; color: var(--bb-olive-900); font-size: 1.0625rem; }
.bb-mock-ring-wrap {
	display: flex;
	align-items: center;
	gap: var(--bb-space-5);
	margin-bottom: var(--bb-space-4);
	padding-bottom: var(--bb-space-5);
	border-bottom: 1px solid var(--bb-line);
}
.bb-mock-ring {
	--bb-pct: 77;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	flex-shrink: 0;
	background: conic-gradient(var(--bb-olive-700) calc(var(--bb-pct) * 1%), var(--bb-sage-100) 0);
	display: flex;
	align-items: center;
	justify-content: center;
	animation: bb-ring-fill 900ms var(--bb-ease-expo-out) both;
}
@keyframes bb-ring-fill { from { --bb-pct: 0; } to { --bb-pct: 77; } }
.bb-mock-ring-hole { width: 76px; height: 76px; border-radius: 50%; background: var(--bb-white); }
.bb-mock-ring-label { display: flex; flex-direction: column; }
.bb-mock-ring-amount { font-family: var(--bb-font-display); font-weight: 600; font-size: 1.75rem; color: var(--bb-olive-900); line-height: 1.1; }
.bb-mock-ring-of { font-size: var(--bb-small-size); color: var(--bb-muted); }

.bb-mock-rows { list-style: none; margin: 0; padding: 0; }
.bb-mock-row {
	display: grid;
	grid-template-columns: 1fr 72px auto;
	grid-template-areas: "label bar amt" "flag flag flag";
	align-items: center;
	column-gap: var(--bb-space-3);
	padding-block: 11px;
	border-bottom: 1px solid var(--bb-line);
	animation: bb-row-settle 600ms var(--bb-ease-expo-out) both;
}
.bb-mock-row:last-child { border-bottom: none; }
/* The one authored moment: the ring fills, then each row settles in turn.
   Rows are never invisible; only a 6px translate animates. */
.bb-mock-hero .bb-mock-row:nth-of-type(1) { animation-delay: 120ms; }
.bb-mock-hero .bb-mock-row:nth-of-type(2) { animation-delay: 220ms; }
.bb-mock-hero .bb-mock-row:nth-of-type(3) { animation-delay: 320ms; }
.bb-mock-hero .bb-mock-row:nth-of-type(4) { animation-delay: 420ms; }
@keyframes bb-row-settle { from { transform: translateY(6px); } to { transform: none; } }
.bb-mock-row-label { grid-area: label; font-size: var(--bb-small-size); font-weight: 700; color: var(--bb-ink); }
.bb-mock-row-bar { grid-area: bar; height: 6px; border-radius: var(--bb-radius-pill); background: var(--bb-sage-100); overflow: hidden; }
.bb-mock-row-fill { display: block; height: 100%; width: calc(var(--fill, 0) * 1%); background: var(--bb-olive-700); border-radius: var(--bb-radius-pill); }
.bb-mock-row-fill.bb-fill-over { background: var(--bb-over); }
.bb-mock-row-amt { grid-area: amt; font-size: var(--bb-small-size); font-weight: 700; color: var(--bb-ink); text-align: right; white-space: nowrap; min-width: 6.5em; }
.bb-mock-row-of { font-weight: 400; color: var(--bb-muted); }
.bb-mock-row-flag {
	grid-area: flag;
	justify-self: start;
	font-family: var(--bb-font-display);
	font-style: italic;
	font-size: 0.875rem;
	margin-top: 2px;
	padding-left: 14px;
	position: relative;
}
.bb-mock-row-flag::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 1px; background: currentColor; }
.bb-flag-over { color: var(--bb-over); }
.bb-flag-under { color: var(--bb-under); }

@media (prefers-reduced-motion: reduce) {
	.bb-mock-ring, .bb-mock-row { animation: none; transform: none; }
}

/* ================= 2. EMPATHY — editorial ledger rows ================= */
.e-con.bb-empathy-items { display: flex; flex-direction: column; max-width: 60rem; }
.e-con.bb-empathy-row {
	display: grid;
	grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr);
	gap: var(--bb-space-6);
	align-items: baseline;
	padding-block: var(--bb-space-6);
	border-top: 1px solid rgba(38, 49, 28, .16);
}
.bb-empathy-items > .bb-empathy-row:last-child { border-bottom: 1px solid rgba(38, 49, 28, .16); }
@media (max-width: 640px) {
	.e-con.bb-empathy-row { grid-template-columns: 1fr; gap: var(--bb-space-2); padding-block: var(--bb-space-5); }
}
.bb-empathy-term .elementor-heading-title {
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
	letter-spacing: -0.02em;
	line-height: 1.1;
}
.elementor-widget-text-editor.bb-empathy-line { color: var(--bb-ink); font-size: 1.125rem; max-width: 44ch; }
.elementor-widget-text-editor.bb-empathy-close { --bb-mt: var(--bb-space-6); color: var(--bb-muted); font-family: var(--bb-font-display); font-style: italic; font-size: 1.125rem; }

/* ================= 3. HOW IT WORKS — flowing sequence, offset steps ================= */
.e-con.bb-how-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--bb-space-7);
	position: relative;
}
.bb-how-steps::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 26px;
	height: 1px;
	background: var(--bb-line);
	z-index: 0;
}
@media (max-width: 900px) {
	.e-con.bb-how-steps { grid-template-columns: 1fr; gap: var(--bb-space-6); }
	.bb-how-steps::before { display: none; }
}
.e-con.bb-step-item { display: flex; flex-direction: column; position: relative; z-index: 1; }
@media (max-width: 900px) {
	.e-con.bb-step-item { display: grid; grid-template-columns: 52px 1fr; column-gap: var(--bb-space-4); }
	.bb-step-item > .bb-step-badge { grid-row: 1 / span 2; }
}
.elementor-widget-text-editor.bb-step-badge {
	--bb-mb: var(--bb-space-4);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--bb-olive-900);
	color: var(--bb-cream);
	font-family: var(--bb-font-display);
	font-weight: 600;
	font-size: 1.25rem;
	font-variant-numeric: lining-nums;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 8px var(--bb-cream); /* knocks the connector line out around the badge */
}
.bb-step-title { --bb-mb: var(--bb-space-2); }
.elementor-widget-text-editor.bb-step-body { color: var(--bb-ink); max-width: 32ch; }
.bb-how-link { --bb-mt: var(--bb-space-7); }

/* ================= 4. PRICING (shared card styles in bb-base.css) ================= */
.bb-pricing .bb-pricing-cards { max-width: 60rem; }
.bb-pricing .bb-pricing-note { max-width: 60rem; }

/* ================= 5. DASHBOARD — scrubber + insights ================= */
.e-con.bb-dashboard-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: var(--bb-space-8);
	align-items: start;
}
@media (max-width: 900px) { .e-con.bb-dashboard-grid { grid-template-columns: 1fr; gap: var(--bb-space-6); } }

.bb-scrubber { position: relative; }
.bb-scrub-input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	opacity: 0;
}
.bb-scrub-chips {
	display: flex;
	gap: var(--bb-space-2);
	margin-bottom: var(--bb-space-5);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 4px;
	margin-inline: -4px;
}
.bb-scrub-chip {
	scroll-snap-align: start;
	flex-shrink: 0;
	min-height: 44px;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 20px;
	border-radius: var(--bb-radius-pill);
	border: 1.5px solid var(--bb-olive-900);
	color: var(--bb-olive-900);
	font-family: var(--bb-font-body);
	font-weight: 600;
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	background: transparent;
	transition: background-color var(--bb-duration-fast) var(--bb-ease), color var(--bb-duration-fast) var(--bb-ease);
}
.bb-scrub-chip:hover { background: var(--bb-sage-100); }
#bb-m1:checked ~ .bb-scrub-chips label[for="bb-m1"],
#bb-m4:checked ~ .bb-scrub-chips label[for="bb-m4"],
#bb-m8:checked ~ .bb-scrub-chips label[for="bb-m8"],
#bb-m12:checked ~ .bb-scrub-chips label[for="bb-m12"] {
	background: var(--bb-olive-900);
	color: var(--bb-cream);
	font-weight: 800;
}
#bb-m1:focus-visible ~ .bb-scrub-chips label[for="bb-m1"],
#bb-m4:focus-visible ~ .bb-scrub-chips label[for="bb-m4"],
#bb-m8:focus-visible ~ .bb-scrub-chips label[for="bb-m8"],
#bb-m12:focus-visible ~ .bb-scrub-chips label[for="bb-m12"] {
	outline: 3px solid var(--bb-under);
	outline-offset: 3px;
}

.bb-scrub-panels {
	background: var(--bb-white);
	border-radius: var(--bb-radius-lg);
	padding: var(--bb-space-6);
	box-shadow: 0 16px 32px -18px rgba(38, 49, 28, 0.22), 0 2px 6px rgba(13, 20, 26, 0.05);
	position: relative;
}
@media (max-width: 767px) { .bb-scrub-panels { padding: var(--bb-space-5); } }
.bb-scrub-panel { display: none; position: relative; }
#bb-m1:checked ~ .bb-scrub-panels #bb-panel-m1,
#bb-m4:checked ~ .bb-scrub-panels #bb-panel-m4,
#bb-m8:checked ~ .bb-scrub-panels #bb-panel-m8,
#bb-m12:checked ~ .bb-scrub-panels #bb-panel-m12 { display: block; }
.bb-scrub-panel .bb-mock-row { animation: none; transform: none; }

.e-con.bb-insights-col { display: flex; flex-direction: column; padding-top: 68px; /* aligns with the panel below the chips */ }
@media (max-width: 900px) { .e-con.bb-insights-col { padding-top: 0; } }
.bb-section .e-con > .e-con.bb-insight {
	--bb-mb: var(--bb-space-5);
	padding-bottom: var(--bb-space-5);
	border-bottom: 1px solid var(--bb-line);
}
.bb-insight-title { --bb-mb: var(--bb-space-2); }
.bb-insight-title .elementor-heading-title { display: flex; align-items: center; gap: 10px; }
.bb-insight-title .elementor-heading-title::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}
.bb-insight-over .elementor-heading-title::before { background: var(--bb-over); }
.bb-insight-under .elementor-heading-title::before { background: var(--bb-under); }
.elementor-widget-text-editor.bb-insight-body { color: var(--bb-ink); max-width: 40ch; }
.bb-insights-btn { --bb-mt: var(--bb-space-3); align-self: flex-start; width: auto; }

/* ================= 6. EARLY ACCESS ================= */
.bb-early-inner > .elementor-widget { max-width: 38rem; }
.bb-early-h2 { --bb-mb: var(--bb-space-4); }
.elementor-widget-text-editor.bb-early-body { --bb-mb: var(--bb-space-2); font-size: 1.125rem; }

/* ================= 7. FAQ (accordion + two-column layout in bb-base.css) ================= */
.bb-faq-link { --bb-mt: var(--bb-space-2); }

/* ================= Mobile composition (390px) ================= */
@media (max-width: 767px) {
	.bb-hero-lead { --bb-mb: var(--bb-space-5); }
	.bb-hero-ctas .elementor-widget-button { width: 100%; }
	.bb-hero-ctas .elementor-widget-button .elementor-button { width: 100%; }
	.bb-scrub-chips { scroll-padding-inline: 4px; }
	.bb-mock-row { grid-template-columns: minmax(0, 1fr) 48px auto; column-gap: var(--bb-space-2); }
	.bb-mock-row-label { font-size: 0.8125rem; }
	.bb-mock-row-amt { font-size: 0.8125rem; min-width: 0; }
	.bb-hero-mock-wrap::before, .bb-hero-mock-wrap::after { inset: 8px 4px -16px 4px; }
}
