/*
 * Base: design tokens, reset, typography, buttons, section wrappers.
 * Loaded on the front end and in the block editor canvas.
 *
 * Breakpoints (min-width, px): 479, 768, 992, 1280, 1440.
 */

:root {
	--c-purple: #5e2bb1;
	--c-purple-dark: #3a1d69;
	--c-purple-deep: #4c248d;
	--c-purple-light: #a177e5;
	--c-dark: #1d0d36;
	--c-heading: #281547;
	--c-peach: #ff4d4d;
	--c-blue: #66ccff;
	--c-dust: #cbaa8c;
	--c-grey: #605f5f;
	--c-border: #b3b2b2;
	--c-lavender: #f7f2fb;
	--c-light-grey: #e8e8e8;
	--c-mist: #f7f7f7;
	--c-text: #363636;
	--c-white: #fff;

	--f-head: "Rhode", "Arial Narrow", sans-serif;
	--f-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

	--container: 1396px;
	--gutter: 16px;
	--radius: 24px;
	--section-pad: 120px;
	--header-h: 188px;
	--ease: 0.25s ease;
}

/* ------------------------------------------------------------ reset */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;

	@media (prefers-reduced-motion: reduce) {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	font-family: var(--f-body);
	font-size: 15px;
	line-height: 1.7;
	color: var(--c-text);
	background: var(--c-white);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote {
	margin: 0;
}

ul[role="list"],
ol[role="list"] {
	list-style: none;
	padding: 0;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

input,
textarea,
select {
	font: inherit;
}

:focus-visible {
	outline: 2px solid var(--c-purple);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--c-white);
	color: var(--c-heading);
	font-weight: 600;
	border-radius: 8px;

	&:focus {
		top: 16px;
	}
}

.icon {
	flex-shrink: 0;
}

/* ------------------------------------------------------------ layout helpers */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	position: relative;
	padding-block: var(--section-pad);

	&.spacing-compact {
		--section-pad: 60px;
	}

	&.spacing-none {
		--section-pad: 0px;
	}

	&.spacing-top-none {
		padding-top: 0;
	}
}

.bg-white {
	background-color: var(--c-white);
}

.bg-lavender {
	background-color: var(--c-lavender);
}

.bg-grey {
	background-color: var(--c-light-grey);
}

.bg-mist {
	background-color: var(--c-mist);
}

.bg-purple {
	background-color: var(--c-purple);
}

.bg-deep-purple {
	background-color: var(--c-purple-deep);
}

/* Dark section backgrounds (purple, deep purple) switch text to white */
.is-dark {
	color: var(--c-white);
}

/* ------------------------------------------------------------ typography */
.h-display,
.h-xl,
.h-lg,
.h-md,
.h-sm {
	font-family: var(--f-head);
	font-weight: 500;
	line-height: 1;
	letter-spacing: 1px;
	color: var(--c-heading);
}

.h-display {
	font-size: 56px;

	@media (min-width: 768px) {
		font-size: 70px;
	}

	@media (min-width: 1440px) {
		font-size: 95px;
	}
}

.h-xl {
	font-size: 48px;

	@media (min-width: 479px) {
		font-size: 56px;
	}

	@media (min-width: 992px) {
		font-size: 64px;
	}
}

.h-lg {
	font-size: 48px;

	@media (min-width: 479px) {
		font-size: 56px;
	}
}

.h-md {
	font-size: 32px;

	@media (min-width: 768px) {
		font-size: 40px;
	}
}

.h-sm {
	font-size: 24px;
}

.text-lg {
	font-size: 16px;
	line-height: 1.5;
	color: var(--c-dark);

	@media (min-width: 479px) {
		font-size: 18px;
	}
}

.is-dark .text-lg,
.is-dark .prose,
.on-dark .text-lg {
	color: inherit;
}

.is-dark :is(.h-display, .h-xl, .h-lg, .h-md, .h-sm),
.on-dark :is(.h-display, .h-xl, .h-lg, .h-md, .h-sm) {
	color: inherit;
}

/* Rich text from WYSIWYG fields and blog posts */
.prose {
	font-size: 18px;
	line-height: 1.5;
	color: var(--c-dark);

	& > * + * {
		margin-top: 15px;
	}

	& :is(h2, h3, h4, h5, h6) {
		font-family: var(--f-head);
		font-weight: 500;
		line-height: 1.1;
		letter-spacing: 1px;
		color: var(--c-heading);
		margin-top: 32px;
	}

	& h2 {
		font-size: 36px;
	}

	& h3 {
		font-size: 28px;
	}

	& h4 {
		font-size: 22px;
	}

	& :is(ul, ol) {
		line-height: 2;
		padding-left: 24px;
	}

	& a {
		color: var(--c-purple);
		text-decoration: underline;
		text-underline-offset: 2px;
	}

	& img {
		width: 100%;
		border-radius: 16px;
	}

	& blockquote {
		border-left: 4px solid var(--c-purple);
		padding-left: 20px;
	}
}

/* ------------------------------------------------------------ buttons */
.buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--f-head);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 1px;
	text-align: center;
	transition: background-color var(--ease), color var(--ease), border-color var(--ease);

	&.btn--primary,
	&.btn--secondary {
		padding: 16px 24px;
		border: 2px solid var(--c-purple);
		border-radius: 8px;
	}

	&.btn--primary {
		background: var(--c-purple);
		color: var(--c-white);

		&:hover {
			background: var(--c-purple-dark);
			border-color: var(--c-purple-dark);
		}
	}

	&.btn--secondary {
		background: var(--c-white);
		color: var(--c-purple);

		&:hover {
			background: var(--c-purple-light);
			color: var(--c-white);
		}
	}

	&.btn--arrow {
		color: var(--c-heading);

		& .icon {
			width: 14px;
		}

		&:hover span {
			text-decoration: underline;
		}
	}
}

.is-dark .btn--arrow,
.on-dark .btn--arrow {
	color: var(--c-white);
}

/* Keep primary buttons and links visible on purple sections */
.is-dark .btn--primary {
	border-color: var(--c-white);
}

.is-dark .prose a {
	color: inherit;
}

/* Small uppercase "Learn more →" link used on cards */
.card-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--c-heading);

	& .icon {
		width: 14px;
		color: var(--c-purple);
	}

	&:hover span {
		text-decoration: underline;
	}
}

/* Checklist with an icon (or check mark / bullet) per item: Comparison, Feature Grid */
.checklist {
	display: grid;
	align-content: start;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--c-heading);

	& li {
		display: flex;
		align-items: flex-start;
		gap: 12px;
	}

	& .list-icon {
		flex-shrink: 0;
		width: 20px;
		height: 20px;
		object-fit: contain;
	}

	& .list-icon--check {
		color: var(--c-purple);

		& svg {
			width: 20px;
			height: 20px;
		}
	}

	&.checklist--bullets {
		padding-left: 20px;
		list-style: disc;

		& li {
			display: list-item;
		}
	}

	&.checklist--cols-2 {
		@media (min-width: 479px) {
			grid-template-columns: 1fr 1fr;
			column-gap: 32px;
		}
	}
}

/* Google reviews badge (Widgets for Google Reviews) */
.reviews-badge {
	& .ti-widget.ti-goog {
		text-align: left !important;
	}

	& .ti-header-grid {
		padding: 10px !important;
	}
}

/* Decorative glows (peach + blue radial gradients) */
.glows {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;

	& img {
		position: absolute;
		max-width: none;
		width: 1680px;
		height: auto;
	}
}

/* Slider arrows (shared by card and post sliders) */
.slider-arrows {
	display: flex;
	gap: 10px;

	& button {
		display: grid;
		place-items: center;
		width: 50px;
		height: 50px;
		border: 2px solid var(--c-purple);
		border-radius: 8px;
		color: var(--c-purple);
		transition: background-color var(--ease);

		&:hover {
			background: var(--c-border);
		}

		&:disabled {
			opacity: 0.4;
			cursor: default;
		}
	}
}
