/* Before & After smile gallery. Markup: inc/before-after-gallery.php */

.cba {
	--cba-navy: #26396E;
	--cba-navy-deep: #1A2A57;
	--cba-cyan: #15B4E6;
	--cba-orange: #F2652D;
	--cba-green: #54BA4E;
	--cba-magenta: #E32D93;
	--cba-ink: #252525;
	--cba-muted: #5B6478;
	--cba-mist: #F2F5FA;
	--cba-radius: 20px;
	--cba-ease: cubic-bezier(.22, 1, .36, 1);

	font-family: "Lato", sans-serif;
	color: var(--cba-ink);
	overflow-x: clip;
}

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

.cba .cba-wrap {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Kit styles target bare h1/h2/h3/p/a; everything below is two classes deep to win. */
.cba .cba-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 22px;
	font-weight: 900;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--cba-cyan);
}
.cba .cba-eyebrow--dark { color: var(--cba-magenta); }
.cba .cba-eyebrow__dots { display: inline-flex; gap: 4px; }
.cba .cba-eyebrow__dots i { display: block; width: 14px; height: 6px; border-radius: 2px; }
.cba .cba-eyebrow__dots i:nth-child(1) { background: var(--cba-cyan); }
.cba .cba-eyebrow__dots i:nth-child(2) { background: var(--cba-orange); }
.cba .cba-eyebrow__dots i:nth-child(3) { background: var(--cba-green); }
.cba .cba-eyebrow__dots i:nth-child(4) { background: var(--cba-magenta); }

/* Buttons */
.cba .cba-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cba .cba-actions--center { justify-content: center; }
.cba .cba-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 16px 30px;
	border-radius: 0;
	font-family: "Lato", sans-serif;
	font-size: 15px;
	line-height: 1.2;
	font-weight: 900;
	letter-spacing: 1.25px;
	text-transform: uppercase;
	text-decoration: none;
	transition: transform .25s var(--cba-ease), box-shadow .25s var(--cba-ease), background-color .2s, color .2s;
}
.cba .cba-btn:hover { transform: translateY(-3px); }
.cba .cba-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cba .cba-btn--magenta { background: var(--cba-magenta); color: #fff; box-shadow: 0 10px 30px -8px rgba(227, 45, 147, .65); }
.cba .cba-btn--magenta:hover { background: #cc1f80; color: #fff; box-shadow: 0 16px 34px -8px rgba(227, 45, 147, .75); }
.cba .cba-btn--ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }
.cba .cba-btn--ghost:hover { background: #fff; color: var(--cba-navy); }
.cba .cba-btn--white { background: #fff; color: var(--cba-navy); }
.cba .cba-btn--white:hover { background: var(--cba-cyan); color: #fff; }

/* ---------- Hero ---------- */
.cba .cba-hero {
	position: relative;
	padding: 96px 0 150px;
	background:
		radial-gradient(900px 520px at 88% 18%, rgba(21, 180, 230, .38), transparent 60%),
		radial-gradient(700px 480px at 4% 100%, rgba(227, 45, 147, .30), transparent 60%),
		linear-gradient(160deg, var(--cba-navy) 0%, var(--cba-navy-deep) 100%);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
}
.cba .cba-hero::after {
	/* subtle dot texture */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.5px);
	background-size: 22px 22px;
	mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.cba .cba-hero__bars,
.cba .cba-cta__bars {
	position: absolute;
	z-index: -1;
	display: flex;
	gap: 18px;
	transform: rotate(-32deg);
	pointer-events: none;
}
.cba .cba-hero__bars { top: -140px; right: -120px; }
.cba .cba-hero__bars span,
.cba .cba-cta__bars span {
	display: block;
	width: 56px;
	height: 620px;
	border-radius: 28px;
	opacity: .9;
	animation: cba-bar-in 1.2s var(--cba-ease) both;
}
.cba .cba-hero__bars span:nth-child(1), .cba .cba-cta__bars span:nth-child(1) { background: var(--cba-cyan); animation-delay: .05s; }
.cba .cba-hero__bars span:nth-child(2), .cba .cba-cta__bars span:nth-child(2) { background: var(--cba-orange); animation-delay: .15s; margin-top: 70px; }
.cba .cba-hero__bars span:nth-child(3), .cba .cba-cta__bars span:nth-child(3) { background: var(--cba-green); animation-delay: .25s; margin-top: 140px; }
.cba .cba-hero__bars span:nth-child(4), .cba .cba-cta__bars span:nth-child(4) { background: var(--cba-magenta); animation-delay: .35s; margin-top: 210px; }

@keyframes cba-bar-in {
	from { transform: translateY(-120%); }
	to   { transform: translateY(0); }
}

.cba .cba-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	align-items: center;
	gap: 64px;
}
.cba .cba-hero__title {
	margin: 0 0 24px;
	font-family: "Lato", sans-serif;
	font-size: clamp(46px, 6.4vw, 92px);
	line-height: .98;
	font-weight: 900;
	letter-spacing: -1.5px;
	color: #fff;
	text-transform: none;
}
.cba .cba-hero__line { display: block; animation: cba-rise .9s var(--cba-ease) both; }
.cba .cba-hero__line--grad {
	animation-delay: .12s;
	background: linear-gradient(92deg, var(--cba-cyan) 0%, var(--cba-green) 55%, #9BE07F 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	padding-bottom: .08em;
}
.cba .cba-hero__intro {
	max-width: 520px;
	margin: 0 0 36px;
	font-size: 20px;
	line-height: 1.6;
	color: rgba(255, 255, 255, .86);
	animation: cba-rise .9s .22s var(--cba-ease) both;
}
.cba .cba-hero__copy .cba-actions { animation: cba-rise .9s .32s var(--cba-ease) both; }

@keyframes cba-rise {
	from { opacity: 0; transform: translateY(26px); }
	to   { opacity: 1; transform: none; }
}

.cba .cba-hero__media {
	position: relative;
	animation: cba-pop 1.1s .2s var(--cba-ease) both;
}
.cba .cba-hero__frame {
	position: relative;
	padding: 14px;
	background: #fff;
	transform: rotate(2deg);
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
}
.cba .cba-hero__frame::before {
	/* offset brand block behind the photo, echoing the site's stacked-photo style */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--cba-orange);
	transform: translate(-22px, 22px) rotate(-5deg);
}
.cba .cba-hero__hint {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 30px 0 0;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .75);
}

@keyframes cba-pop {
	from { opacity: 0; transform: translateY(40px) scale(.94); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Stats ---------- */
.cba .cba-stats {
	position: relative;
	z-index: 2;
	margin-top: -78px;
}
.cba .cba-stats__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: 0 auto;
	padding: 0;
	list-style: none;
	max-width: 1192px;
	background: #fff;
	box-shadow: 0 30px 60px -28px rgba(26, 42, 87, .45);
}
.cba .cba-stat {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 30px 28px 28px;
	border-top: 6px solid var(--accent);
}
.cba .cba-stat + .cba-stat { border-left: 1px solid #E6EAF2; }
.cba .cba-stat strong {
	font-size: 40px;
	line-height: 1;
	font-weight: 900;
	letter-spacing: -.5px;
	color: var(--accent);
}
.cba .cba-stat span {
	font-size: 14px;
	line-height: 1.4;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: var(--cba-navy);
}
.cba .cba-stat--cyan    { --accent: var(--cba-cyan); }
.cba .cba-stat--orange  { --accent: var(--cba-orange); }
.cba .cba-stat--green   { --accent: var(--cba-green); }
.cba .cba-stat--magenta { --accent: var(--cba-magenta); }

/* ---------- Cases ---------- */
.cba .cba-cases {
	/* pulled up under the stats card, which straddles hero and cases */
	margin-top: -78px;
	padding: 188px 0 100px;
	background:
		radial-gradient(rgba(38, 57, 110, .07) 1px, transparent 1.5px) 0 0 / 24px 24px,
		var(--cba-mist);
}
.cba .cba-cases__head {
	max-width: 760px;
	margin: 0 auto 64px;
	text-align: center;
}
.cba .cba-cases__title {
	margin: 0 0 18px;
	font-family: "Lato", sans-serif;
	font-size: clamp(36px, 4.6vw, 60px);
	line-height: 1.05;
	font-weight: 900;
	letter-spacing: -1px;
	text-transform: none;
	color: var(--cba-navy);
}
.cba .cba-cases__lede {
	margin: 0;
	font-size: 19px;
	line-height: 1.6;
	color: var(--cba-muted);
}

.cba .cba-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px;
}

.cba .cba-card {
	--accent: var(--cba-cyan);
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--cba-radius);
	box-shadow: 0 2px 4px rgba(26, 42, 87, .04), 0 24px 50px -30px rgba(26, 42, 87, .45);
	overflow: hidden;
	transition: transform .45s var(--cba-ease), box-shadow .45s var(--cba-ease);
}
.cba .cba-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 2px 4px rgba(26, 42, 87, .04), 0 40px 70px -32px rgba(26, 42, 87, .55);
}
.cba .cba-card::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	background: var(--accent);
	transform-origin: left;
	transform: scaleX(.18);
	transition: transform .6s var(--cba-ease);
}
.cba .cba-card:hover::after,
.cba .cba-card:focus-within::after { transform: scaleX(1); }

.cba .cba-card--cyan    { --accent: var(--cba-cyan); }
.cba .cba-card--orange  { --accent: var(--cba-orange); }
.cba .cba-card--green   { --accent: var(--cba-green); }
.cba .cba-card--magenta { --accent: var(--cba-magenta); }

/* Scroll reveal (class added by JS, so no-JS visitors see everything) */
.cba.cba-js .cba-card {
	opacity: 0;
	transform: translateY(48px);
	transition: opacity .8s var(--cba-ease), transform .8s var(--cba-ease), box-shadow .45s var(--cba-ease);
}
.cba.cba-js .cba-card.is-in { opacity: 1; transform: none; }
.cba.cba-js .cba-card.is-in:hover { transform: translateY(-6px); }
.cba.cba-js .cba-grid .cba-card:nth-child(2n).is-in { transition-delay: .12s, .12s, 0s; }
.cba.cba-js .cba-grid .cba-card:nth-child(2n).is-in:hover { transition-delay: 0s; }

.cba .cba-card__bar {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 22px 26px 26px;
}
.cba .cba-card__num {
	flex: none;
	font-size: 64px;
	line-height: .85;
	font-weight: 900;
	letter-spacing: -2px;
	color: transparent;
	-webkit-text-stroke: 2px var(--accent);
	transition: color .35s;
}
.cba .cba-card:hover .cba-card__num { color: var(--accent); }
.cba .cba-card__meta { flex: 1; min-width: 0; }
.cba .cba-card__kicker {
	margin: 0 0 4px;
	font-size: 12px;
	line-height: 1.2;
	font-weight: 900;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--accent);
}
.cba .cba-card__title {
	margin: 0;
	font-family: "Lato", sans-serif;
	font-size: 26px;
	line-height: 1.15;
	font-weight: 900;
	text-transform: none;
	color: var(--cba-navy);
}

/* Front / side toggle */
.cba .cba-toggle {
	flex: none;
	position: relative;
	display: inline-flex;
	padding: 4px;
	border-radius: 999px;
	background: var(--cba-mist);
}
.cba .cba-toggle__btn {
	position: relative;
	z-index: 1;
	min-width: 72px;
	min-height: 40px;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	font-family: "Lato", sans-serif;
	font-size: 13px;
	line-height: 1;
	font-weight: 900;
	letter-spacing: 1.25px;
	text-transform: uppercase;
	color: var(--cba-navy);
	cursor: pointer;
	transition: color .25s, background-color .25s, box-shadow .25s;
}
.cba .cba-toggle__btn:hover { background: rgba(38, 57, 110, .08); color: var(--cba-navy); }
.cba .cba-toggle__btn.is-active,
.cba .cba-toggle__btn.is-active:hover {
	background: var(--cba-navy);
	color: #fff;
	box-shadow: 0 6px 14px -6px rgba(26, 42, 87, .7);
}
.cba .cba-toggle__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Compare stage ---------- */
.cba .cba-stage {
	--pos: 50%;
	position: relative;
	aspect-ratio: 1504 / 877;
	overflow: hidden;
	background: #1d1d1f;
	cursor: ew-resize;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}
.cba .cba-view {
	position: absolute;
	inset: 0;
	opacity: 1;
	transition: opacity .45s var(--cba-ease);
}
.cba .cba-view[hidden] { display: block; opacity: 0; visibility: hidden; }
.cba .cba-img,
.cba .cba-stage img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	/* a little overscan hides the occasional white edge on cropped clinical photos */
	transform: scale(1.03);
	pointer-events: none;
	-webkit-user-drag: none;
}
.cba .cba-before {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--pos)) 0 0);
	-webkit-clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.cba .cba-divider {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos);
	width: 4px;
	margin-left: -2px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 0 24px rgba(0, 0, 0, .35);
	pointer-events: none;
}
.cba .cba-handle {
	position: absolute;
	top: 50%;
	left: var(--pos);
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--accent, var(--cba-magenta));
	box-shadow: 0 0 0 6px rgba(255, 255, 255, .35), 0 12px 28px rgba(0, 0, 0, .35);
	transform: translate(-50%, -50%);
	cursor: ew-resize;
	transition: transform .25s var(--cba-ease), box-shadow .25s;
}
.cba .cba-stage:hover .cba-handle,
.cba .cba-stage.is-dragging .cba-handle { transform: translate(-50%, -50%) scale(1.1); }
.cba .cba-handle:focus { outline: none; }
.cba .cba-handle:focus-visible { box-shadow: 0 0 0 4px var(--accent, var(--cba-magenta)), 0 0 0 9px #fff, 0 12px 28px rgba(0, 0, 0, .35); }
.cba .cba-stage--hero .cba-handle { color: var(--cba-magenta); }

.cba .cba-tag {
	position: absolute;
	top: 16px;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1;
	font-weight: 900;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: #fff;
	pointer-events: none;
	transition: opacity .3s;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.cba .cba-tag--before { left: 16px; background: rgba(26, 42, 87, .78); }
.cba .cba-tag--after  { right: 16px; background: var(--accent, var(--cba-magenta)); }
.cba .cba-stage--hero .cba-tag--after { background: var(--cba-magenta); }
/* fade a label as the divider slides over it */
.cba .cba-stage.is-near-left .cba-tag--before,
.cba .cba-stage.is-near-right .cba-tag--after { opacity: 0; }

/* ---------- Disclaimer + CTA ---------- */
.cba .cba-disclaimer {
	margin: 56px 0 0;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: var(--cba-muted);
}

.cba .cba-cta-wrap {
	padding: 0 0 110px;
	background:
		radial-gradient(rgba(38, 57, 110, .07) 1px, transparent 1.5px) 0 0 / 24px 24px,
		var(--cba-mist);
}
.cba .cba-cta {
	position: relative;
	padding: 96px 40px;
	border-radius: 28px;
	background:
		radial-gradient(700px 420px at 12% 0%, rgba(21, 180, 230, .35), transparent 60%),
		radial-gradient(620px 420px at 100% 100%, rgba(227, 45, 147, .32), transparent 60%),
		var(--cba-navy);
	box-shadow: 0 40px 80px -40px rgba(26, 42, 87, .7);
	color: #fff;
	text-align: center;
	overflow: hidden;
	isolation: isolate;
}
.cba .cba-cta__bars { left: -150px; bottom: -300px; opacity: .45; }
.cba .cba-cta__bars span { animation: none; }
.cba .cba-cta__inner { max-width: 820px; margin: 0 auto; }
.cba .cba-cta__grad {
	background: linear-gradient(92deg, var(--cba-cyan) 0%, var(--cba-green) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.cba .cba-cta__title {
	margin: 0 0 20px;
	font-family: "Lato", sans-serif;
	font-size: clamp(40px, 5.6vw, 76px);
	line-height: 1;
	font-weight: 900;
	letter-spacing: -1px;
	text-transform: none;
	color: #fff;
}
.cba .cba-cta__text {
	max-width: 640px;
	margin: 0 auto 40px;
	font-size: 20px;
	line-height: 1.6;
	color: rgba(255, 255, 255, .86);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.cba .cba-hero { padding: 72px 0 140px; }
	.cba .cba-hero__grid { grid-template-columns: 1fr; gap: 56px; }
	.cba .cba-hero__copy { text-align: center; }
	.cba .cba-hero__intro { margin-left: auto; margin-right: auto; }
	.cba .cba-hero__copy .cba-actions { justify-content: center; }
	.cba .cba-hero__media { max-width: 680px; width: 100%; margin: 0 auto; }
	.cba .cba-stats__list { grid-template-columns: repeat(2, 1fr); }
	.cba .cba-stat:nth-child(3) { border-left: 0; }
	.cba .cba-stat:nth-child(n+3) { border-top-width: 6px; }
	.cba .cba-grid { gap: 28px; }
	.cba .cba-card__bar { flex-wrap: wrap; }
}

@media (max-width: 900px) {
	.cba .cba-grid { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; }
}

@media (max-width: 767px) {
	.cba .cba-wrap { padding: 0 16px; }
	.cba .cba-hero { padding: 56px 0 120px; }
	.cba .cba-hero__bars { top: -200px; right: -220px; transform: rotate(-32deg) scale(.7); }
	.cba .cba-hero__intro { font-size: 17px; }
	.cba .cba-hero__frame { padding: 8px; transform: rotate(1.5deg); }
	.cba .cba-hero__frame::before { transform: translate(-12px, 12px) rotate(-4deg); }
	.cba .cba-actions { flex-direction: column; align-items: stretch; }
	.cba .cba-btn { justify-content: center; }
	.cba .cba-stat { padding: 22px 18px; }
	.cba .cba-stat strong { font-size: 30px; }
	.cba .cba-stat span { font-size: 12px; }
	.cba .cba-cases { padding-bottom: 72px; padding-top: 150px; }
	.cba .cba-cases__head { margin-bottom: 40px; }
	.cba .cba-cases__lede { font-size: 17px; }
	.cba .cba-card__bar { padding: 18px 18px 22px; gap: 14px; }
	.cba .cba-card__num { font-size: 48px; }
	.cba .cba-card__title { font-size: 22px; }
	.cba .cba-toggle { width: 100%; }
	.cba .cba-toggle__btn { flex: 1; }
	.cba .cba-handle { width: 50px; height: 50px; }
	.cba .cba-tag { top: 10px; padding: 6px 10px; font-size: 10px; letter-spacing: 2px; }
	.cba .cba-tag--before { left: 10px; }
	.cba .cba-tag--after { right: 10px; }
	.cba .cba-cta-wrap { padding-bottom: 64px; }
	.cba .cba-cta { padding: 64px 20px; border-radius: 20px; }
	.cba .cba-cta__text { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	.cba *,
	.cba *::before,
	.cba *::after {
		animation: none !important;
		transition: none !important;
	}
	.cba.cba-js .cba-card { opacity: 1; transform: none; }
}
