/*
 * Shared styles for builder sections. Colours, type and buttons come from
 * SYB Theme's tokens (base.css); each widget adds its own file on top.
 */

.syb-section {
	position: relative;
}

/*
 * "Space above / below" (Advanced tab). The pixel values are desktop values,
 * set as --syb-pt / --syb-pb on the section; mobile uses 60% of them.
 */

.syb-has-pt {
	padding-top: calc(var(--syb-pt) * 0.6) !important;
}

.syb-has-pb {
	padding-bottom: calc(var(--syb-pb) * 0.6) !important;
}

@media (min-width: 768px) {
	.syb-has-pt {
		padding-top: var(--syb-pt) !important;
	}

	.syb-has-pb {
		padding-bottom: var(--syb-pb) !important;
	}
}

/*
 * A section's own background (Style > Background): a layer behind the content that
 * holds a colour, a gradient, an image or a video, and an optional colour overlay.
 * Markup: includes/class-background.php.
 */

/* The section stacks on its own, so the layer can sit behind its content with z-index -1. */
.syb-section.syb-has-bg {
	isolation: isolate;
	/* The background the widget comes with gives way to the chosen one. */
	background: none;
}

.syb-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	/* Lets the video player be sized against the section itself (cqw / cqh). */
	container-type: size;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	pointer-events: none;
}

.syb-bg__image,
.syb-bg__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* A video shows only while it really plays (builder.js adds is-playing); until then the image does. */
.syb-bg__video {
	opacity: 0;
	transition: opacity 0.6s ease;
}

.syb-bg__video.is-playing {
	opacity: 1;
}

/* A player cannot "cover" by itself: keep it 16:9 and at least as large as the section. */
.syb-bg__video--embed {
	inset: 50% auto auto 50%;
	width: max(100cqw, 177.78cqh);
	height: max(100cqh, 56.25cqw);
	min-width: 100%;
	min-height: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	transform: translate(-50%, -50%);
}

.syb-bg__overlay {
	position: absolute;
	inset: 0;
}

/* Phones and tablets cannot keep a background still while the page scrolls; let it move. */
@media (hover: none) {
	.syb-bg {
		background-attachment: scroll !important;
	}
}

/*
 * Text on a background of your own (Style > Background > Text on this background).
 * Only what stands directly on the background changes: the section heading and its
 * introduction, the hero copy, the closing banner, free text. Cards keep their colours.
 */

.syb-section.syb-text-light .syb-head__title,
.syb-section.syb-text-light .syb-hero__title,
.syb-section.syb-text-light .syb-hero__accent,
.syb-section.syb-text-light .syb-cta-banner__title,
.syb-section.syb-text-light .syb-html__inner,
.syb-section.syb-text-light > .entry-content,
.syb-section.syb-text-light .syb-html__inner :is(h1, h2, h3, h4, h5, h6, strong),
.syb-section.syb-text-light > .entry-content :is(h1, h2, h3, h4, h5, h6, strong) {
	color: #ffffff;
}

.syb-section.syb-text-light .syb-head__eyebrow,
.syb-section.syb-text-light .syb-hero__eyebrow,
.syb-section.syb-text-light .syb-head__title .syb-accent,
.syb-section.syb-text-light .syb-html__inner a,
.syb-section.syb-text-light > .entry-content a {
	color: #a9d8ff;
}

.syb-section.syb-text-light .syb-head__text,
.syb-section.syb-text-light .syb-hero__text,
.syb-section.syb-text-light .syb-hero__crumbs,
.syb-section.syb-text-light .syb-hero__crumbs a,
.syb-section.syb-text-light .syb-hero__highlights,
.syb-section.syb-text-light .syb-cta-banner__text {
	color: rgba(255, 255, 255, 0.86);
}

.syb-section.syb-text-light .syb-hero__badge {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
}

.syb-section.syb-text-dark .syb-head__title,
.syb-section.syb-text-dark .syb-hero__title,
.syb-section.syb-text-dark .syb-cta-banner__title,
.syb-section.syb-text-dark .syb-html__inner,
.syb-section.syb-text-dark > .entry-content {
	color: var(--c-ink);
}

.syb-section.syb-text-dark .syb-head__eyebrow,
.syb-section.syb-text-dark .syb-hero__eyebrow,
.syb-section.syb-text-dark .syb-hero__accent,
.syb-section.syb-text-dark .syb-head__title .syb-accent {
	color: var(--c-blue);
}

.syb-section.syb-text-dark .syb-head__text,
.syb-section.syb-text-dark .syb-hero__text,
.syb-section.syb-text-dark .syb-hero__crumbs,
.syb-section.syb-text-dark .syb-hero__crumbs a,
.syb-section.syb-text-dark .syb-hero__highlights,
.syb-section.syb-text-dark .syb-cta-banner__text {
	color: var(--c-body);
}

.syb-section.syb-text-dark .syb-hero__badge {
	border-color: var(--c-border);
	background: var(--c-tag);
	color: var(--c-blue);
}

/* Default vertical rhythm of a section; widgets with their own background or spacing override it. */

.syb-pad {
	padding-block: 56px 44px;
}

.syb-bg-soft {
	background: var(--c-soft);
}

/* White at the top fading to a light blue, closed off by a hairline. */
.syb-bg-sky {
	background: linear-gradient(180deg, var(--c-white) 0%, #e9f5ff 100%);
}

/* White fading to a pale blue (form and FAQ sections). */
.syb-bg-mist {
	background: linear-gradient(180deg, var(--c-white) 0%, #eef4ff 100%);
}

.syb-bg-warm {
	background: #fffaf4;
}

.syb-bg-tint {
	background: #f7f8fd;
}

@media (min-width: 768px) {
	.syb-pad {
		padding-block: 96px 72px;
	}
}

/* Photo slot (syb_builder_photo): a photo, or a tinted tile with its caption until one is chosen */

.syb-photo {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius-lg);
	text-align: center;
}

.syb-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.syb-photo--empty {
	padding: 16px;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

/* White rings spreading from the top right corner. */
.syb-photo--empty::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-radial-gradient(circle at 100% 10%, rgba(255, 255, 255, 0) 0 39px, rgba(255, 255, 255, 0.75) 39px 40px);
	-webkit-mask-image: radial-gradient(circle at 100% 10%, #000 0, transparent 250px);
	mask-image: radial-gradient(circle at 100% 10%, #000 0, transparent 250px);
	pointer-events: none;
}

.syb-photo--empty > * {
	position: relative;
}

.syb-photo--blue {
	background: linear-gradient(135deg, #cfe0ff 0%, #eaf0ff 100%);
	color: #5f78b3;
}

.syb-photo--warm {
	background: linear-gradient(135deg, #ffe0c7 0%, #fff1e3 100%);
	color: #b8794f;
}

.syb-photo--violet {
	background: linear-gradient(135deg, #dedcff 0%, #f0efff 100%);
	color: #6f69b8;
}

/* Note banner: a grey strip with a sentence and one or two buttons */

.syb-note-banner {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	border-radius: var(--radius-md);
	background: var(--c-tile);
}

.syb-note-banner p {
	color: var(--c-body);
	font-size: 16px;
	line-height: 24px;
}

@media (min-width: 768px) {
	.syb-note-banner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 24px;
		padding: 20px 24px;
	}

	.syb-note-banner .syb-buttons {
		flex: none;
		flex-wrap: nowrap;
		gap: 12px;
	}
}

/* Section heading (Presets::heading) */

.syb-head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	margin-bottom: 28px;
}

.syb-head--center {
	align-items: center;
	text-align: center;
}

.syb-head__eyebrow {
	color: var(--c-blue);
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	line-height: 1.45;
}

.syb-head__title {
	max-width: 30em;
}

.syb-head__text {
	max-width: 42em;
}

.syb-accent {
	color: var(--c-blue);
}

@media (min-width: 768px) {
	.syb-head {
		gap: 16px;
		margin-bottom: 40px;
	}
}

/* Coloured cards used across the design: blue with dots, dark with rings, navy with looper */

.syb-tone-blue,
.syb-tone-indigo,
.syb-tone-dark,
.syb-tone-navy {
	color: var(--c-white);
	box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.25);
}

.syb-tone-indigo {
	background-color: #3854ed;
	background-image: url("../img/pattern-dots.png"), linear-gradient(180deg, #2b47e1 0%, #3854ed 34%, #6e85ff 100%);
	background-repeat: no-repeat;
	background-position: center bottom, center;
	background-size: 100% auto, cover;
}

.syb-tone-blue {
	background-color: #3f9cf6;
	background-image: url("../img/pattern-dots.png"), linear-gradient(180deg, #0067b7 0%, #43a0f9 47%, #3f9cf6 100%);
	background-repeat: no-repeat;
	background-position: center bottom, center;
	background-size: 100% auto, cover;
}

.syb-tone-dark {
	background-color: var(--c-dark);
	background-image: url("../img/pattern-rings.svg");
	background-repeat: no-repeat;
	background-position: right -12px bottom -157px;
	background-size: 369px 369px;
}

.syb-tone-navy {
	background-color: var(--c-navy);
	background-image: url("../img/pattern-looper.svg");
	background-repeat: no-repeat;
	background-position: left -172px top 38px;
	background-size: 730px 730px;
}

.syb-tone-white {
	border: 1px solid var(--c-line);
	background: var(--c-white);
	color: var(--c-body);
	box-shadow: var(--shadow-md);
}

/* Button rows: stacked and full width on mobile, side by side from tablet up */

.syb-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.syb-buttons .btn {
	width: 100%;
}

@media (min-width: 768px) {
	.syb-buttons {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 16px;
		width: auto;
	}

	.syb-buttons .btn {
		width: auto;
	}
}

/* Key numbers: a 2-column card on mobile, one open row from tablet up */

.syb-numbers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	width: 100%;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-md);
	background: var(--c-white);
	box-shadow: var(--shadow-md);
}

.syb-numbers__item {
	position: relative;
	display: flex;
	flex-direction: column-reverse; /* the number sits above its label */
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 18px 8px;
	text-align: center;
}

.syb-numbers__item:nth-child(n + 3) {
	border-top: 1px solid var(--c-line-strong);
}

.syb-numbers__item:nth-child(even)::before {
	content: "";
	position: absolute;
	left: 0;
	top: calc(50% - 22px);
	width: 1px;
	height: 44px;
	background: var(--c-line-strong);
}

.syb-numbers__value {
	margin: 0;
	color: var(--c-blue);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
}

.syb-numbers__label {
	color: var(--c-body);
	font-size: 13px;
	line-height: 18px;
}

@media (min-width: 768px) {
	.syb-numbers {
		position: relative;
		grid-template-columns: repeat(var(--syb-cols, 4), minmax(0, 240px));
		justify-content: center;
		gap: 24px 50px;
		padding: 28px 32px;
		overflow: visible;
		border: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	/* Hairline that fades out towards both ends. */
	.syb-numbers::before {
		content: "";
		position: absolute;
		inset: 0 0 auto;
		height: 1px;
		background: linear-gradient(90deg, rgba(43, 71, 225, 0) 0%, rgba(43, 71, 225, 0.5) 25%, #0f33fe 50%, rgba(43, 71, 225, 0.25) 77%, rgba(43, 71, 225, 0) 100%);
		opacity: 0.5;
	}

	.syb-numbers__item {
		gap: 5px;
		padding: 0;
	}

	.syb-numbers__item:nth-child(n + 3) {
		border-top: 0;
	}

	.syb-numbers__item:nth-child(even)::before {
		display: none;
	}

	.syb-numbers__value {
		font-size: 32px;
		font-weight: 700;
		line-height: 40px;
	}

	.syb-numbers__label {
		color: #575870;
		font-size: 14px;
		font-weight: 500;
		line-height: 20px;
	}
}

/* Message shown only to editors when a section cannot be displayed */

.syb-notice {
	padding-block: 16px;
	background: #fff8e5;
	color: #6b4e00;
	font-size: 14px;
	line-height: 20px;
}

/* Logo tile: white box holding a partner logo, or its name when there is no image */

.syb-logo-tile {
	display: grid;
	place-items: center;
	min-width: 0;
	min-height: 76px;
	padding: 12px 14px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-md);
	background: var(--c-white);
	box-shadow: var(--shadow-sm);
	text-align: center;
}

.syb-logo-tile img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 40px;
	object-fit: contain;
}

.syb-logo-name {
	color: var(--c-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.syb-logo-tile--highlight {
	border-color: #cfe2ff;
	background: #eef5ff;
	box-shadow: none;
}

.syb-logo-tile--highlight .syb-logo-name {
	color: var(--c-blue);
	font-weight: 600;
}

/* Key numbers inside a white card with dividers (hero of Partners & Clients) */

@media (min-width: 768px) {
	.syb-logo-tile {
		min-height: 88px;
	}

	.syb-logo-tile img {
		max-height: 46px;
	}

	.syb-numbers--card {
		gap: 0;
		width: min(100%, 1040px);
		padding: 28px 16px;
		border: 1px solid var(--c-line);
		border-radius: var(--radius-md);
		background: var(--c-white);
		box-shadow: var(--shadow-md);
		grid-template-columns: repeat(var(--syb-cols, 4), minmax(0, 1fr));
	}

	.syb-numbers--card::before {
		display: none;
	}

	.syb-numbers--card .syb-numbers__item {
		gap: 4px;
		padding-inline: 8px;
	}

	.syb-numbers--card .syb-numbers__item + .syb-numbers__item::before {
		content: "";
		position: absolute;
		display: block;
		left: 0;
		top: calc(50% - 24px);
		width: 1px;
		height: 48px;
		background: #e6e8f2;
	}

	.syb-numbers--card .syb-numbers__value {
		font-weight: 600;
	}

	.syb-numbers--card .syb-numbers__label {
		color: var(--c-body);
		font-weight: 400;
	}
}

/*
 * Forms: states shared by the Form and Subscribe sections.
 */

/* Trap for bots: people never see or reach it. */
.syb-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.syb-form__status.is-error {
	background: #fdecea;
	color: #912018;
}

.syb-form__status.is-success {
	background: #e7f6ec;
	color: #14613a;
}

[data-syb-form].is-sending [type="submit"] {
	opacity: 0.65;
	cursor: progress;
}

/*
 * Entrance animation (Advanced > Entrance animation): the blocks of a section fade in
 * and rise 16px, one after another, the first time the section scrolls into view.
 *
 * `syb-anim` is set on <html> by an inline script, so without JavaScript nothing is
 * hidden. builder.js adds `is-entered` to each block when its section is in view,
 * and `syb-enter-group` to a block whose children should arrive one by one (cards).
 */

.syb-anim [data-syb-enter] > .container > :not(.syb-enter-group):not(.is-entered),
.syb-anim [data-syb-enter] .syb-enter-group > :not(.is-entered) {
	opacity: 0;
	transform: translateY(16px);
}

/*
 * Blocks outside the container (marquee, artwork) are placed with their own transforms: fade only.
 * The section's background and its custom CSS are not blocks; they are there from the start.
 */
.syb-anim [data-syb-enter] > :not(.container):not(.syb-bg):not(style):not(.is-entered) {
	opacity: 0;
}

.syb-anim [data-syb-enter] .is-entered:not(.is-settled) {
	transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1), transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
	transition-delay: var(--syb-enter-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
	.syb-anim [data-syb-enter] > .container > :not(.syb-enter-group):not(.is-entered),
	.syb-anim [data-syb-enter] .syb-enter-group > :not(.is-entered) {
		transform: none;
	}

	.syb-anim [data-syb-enter] .is-entered:not(.is-settled) {
		transition: opacity 0.2s ease;
		transition-delay: 0ms;
	}
}

/* Key numbers that count up (builder.js): equal-width digits, so the text does not jitter. */

[data-syb-count] {
	font-variant-numeric: tabular-nums;
}

/*
 * reCAPTCHA in Form and Subscribe sections (SYB Builder > Form settings).
 * v2: Google's checkbox (304x78), drawn by builder.js; the space is kept so nothing jumps.
 * v3: Google's floating badge would sit on the chat buttons, so it is hidden and the
 * notice Google asks for in that case is shown under the form instead.
 */

.syb-captcha--v2 {
	min-height: 78px;
}

.syb-captcha--v3 {
	margin: 0;
	color: var(--c-mute);
	font-size: 12px;
	line-height: 18px;
}

.syb-captcha--v3 a {
	color: inherit;
	text-decoration: underline;
}

.grecaptcha-badge {
	visibility: hidden;
}

@media (max-width: 359.98px) {
	/* The checkbox is 304px wide; very small phones get it a little smaller. */
	.syb-captcha--v2 .syb-captcha__box {
		transform: scale(0.88);
		transform-origin: left top;
	}
}
