/**
 * Base layer, shared by the front end and the editor (add_editor_style).
 * Colours, fonts and sizes come from theme.json (--wp--preset--*); spacing and radii are the --qq-* tokens below.
 */

:root {
	--qq-gutter: clamp(20px, 10vw - 44px, 100px);
	--qq-section-space: clamp(3.5rem, 5.6vw, 5rem);
	--qq-radius: 24px;
	--qq-radius-card: 20px;
	--qq-radius-section: 20px;
	--qq-radius-pill: 100px;
	--qq-gradient: linear-gradient(90deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--primary-light) 100%);
	--qq-gradient-vertical: linear-gradient(180deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--primary-light) 100%);
	--qq-shadow: 0 10px 30px rgb(0 28 68 / 0.08);
	--qq-line: var(--wp--preset--color--periwinkle);
	--qq-ease: cubic-bezier(0.23, 1, 0.32, 1);
	/* Height of the sticky header bar; site--layout.css changes it per breakpoint. */
	--qq-header-height: 83px;
}

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

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

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

:is(h1, h2, h3, h4, h5, h6) {
	margin: 0;
}

p {
	margin: 0;
}

a {
	text-underline-offset: 0.15em;
}

/* Layout */

.container {
	width: 100%;
	max-width: calc(var(--wp--style--global--wide-size, 1240px) + 2 * var(--qq-gutter));
	margin-inline: auto;
	padding-inline: var(--qq-gutter);
}

.container--narrow {
	max-width: calc(var(--wp--style--global--content-size, 900px) + 2 * var(--qq-gutter));
}

/* Sections */

/* --section-bg is the section's background colour, for cut-outs that must match it. */
.section {
	--section-bg: var(--wp--preset--color--base);
	position: relative;
	padding-block: var(--qq-section-space);
}

.section--bg-lavender {
	--section-bg: var(--wp--preset--color--lavender);
	background-color: var(--section-bg);
}

.section--bg-mist {
	--section-bg: var(--wp--preset--color--mist);
	background-color: var(--section-bg);
}

/* Night: the navy of the Hero and the dark cards. */
.section--bg-night {
	--section-bg: var(--wp--preset--color--navy);
	background-color: var(--section-bg);
	color: rgb(255 255 255 / 0.85);
}

/* Brand: the blue gradient bands (CTA, stats, Locations). */
.section--bg-brand {
	--section-bg: var(--wp--preset--color--primary);
	background: var(--qq-gradient);
	color: var(--wp--preset--color--base);
}

.section--bg-brand-vertical {
	--section-bg: var(--wp--preset--color--primary);
	background: var(--qq-gradient-vertical);
	color: var(--wp--preset--color--base);
}

:is(.section--bg-night, .section--bg-brand, .section--bg-brand-vertical) :is(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--base);
}

/* Section heading: eyebrow (handwritten), title, text */

.eyebrow {
	margin: 0 0 12px;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--script);
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 700;
	line-height: 1.6;
}

:is(.section--bg-night, .section--bg-brand, .section--bg-brand-vertical) .eyebrow {
	color: var(--wp--preset--color--base);
}

.section-heading {
	max-width: 860px;
}

.section-heading--center {
	margin-inline: auto;
	text-align: center;
}

.section-heading__title {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.08;
}

.section-heading__text {
	max-width: 760px;
	margin-top: 20px;
	color: var(--wp--preset--color--heading);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.6;
}

:is(.section--bg-night, .section--bg-brand, .section--bg-brand-vertical) .section-heading__text {
	color: inherit;
}

.section-heading--center .section-heading__text {
	margin-inline: auto;
}

/* *Accent* words in headings (qq_accent()): italic, as in "simple, *transparent*". */
.accent {
	font-style: italic;
}

/* Gradient text for headings that use it. */
.text-gradient {
	background: var(--qq-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Buttons: pills. "" is the primary blue, "dark" navy, "outline" a white or navy outline, "small" the header size. */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 14px 28px;
	border: 1px solid transparent;
	border-radius: var(--qq-radius-pill);
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s, border-color 0.3s, color 0.3s, transform 0.3s var(--qq-ease);
}

.button:hover,
.button:focus-visible {
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
	transform: translateY(-2px);
}

.button--dark {
	background-color: var(--wp--preset--color--navy);
}

.button--dark:hover,
.button--dark:focus-visible {
	background-color: var(--wp--preset--color--primary);
}

.button--small {
	min-height: 44px;
	padding: 10px 20px;
}

.button--outline {
	border-color: currentColor;
	background-color: transparent;
	color: var(--wp--preset--color--heading);
}

:is(.section--bg-night, .section--bg-brand, .section--bg-brand-vertical) .button--outline {
	color: var(--wp--preset--color--base);
}

.button--outline:hover,
.button--outline:focus-visible {
	border-color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

.button__icon {
	display: inline-flex;
}

.button__icon .icon {
	width: 18px;
	height: 18px;
}

/* Text link with an underline that grows on hover ("View Full Case Study", "Learn More"). */
.text-link {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
	transition: background-size 0.3s var(--qq-ease);
}

.text-link:hover,
.text-link:focus-visible {
	background-size: 100% 1px;
}

.icon-button {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--heading);
	transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.icon-button .icon {
	width: 18px;
	height: 18px;
}

.icon-button:hover,
.icon-button:focus-visible {
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
}

/* Google rating (qq_rating()): the Google "G", the score, five stars and "630+ reviews" */

.rating {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	color: var(--wp--preset--color--heading);
	font-size: var(--wp--preset--font-size--medium);
}

.rating__google {
	width: 22px;
	height: 22px;
}

.rating__score {
	font-weight: 500;
}

.rating__stars {
	display: inline-flex;
	gap: 2px;
	color: var(--wp--preset--color--yellow);
}

.rating__star .icon {
	width: 20px;
	height: 20px;
}

.rating__star--empty {
	opacity: 0.3;
}

/* Logo rows (partner logos, award badges: qq_logos()) */

.logo-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.logo-row__image {
	width: auto;
	max-height: 100%;
	object-fit: contain;
}

/* Free text (Text section, articles, policies) */

.prose {
	color: var(--wp--preset--color--heading);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.6;
}

.prose > * + * {
	margin-block-start: 1.6em;
}

.prose :is(h2, h3, h4) {
	margin-block-start: 1.8em;
	line-height: 1.2;
}

.prose :is(h2, h3, h4) + * {
	margin-block-start: 1em;
}

.prose h2 {
	font-size: clamp(26px, 2.2vw, 32px);
}

.prose h3 {
	font-size: var(--wp--preset--font-size--x-large);
}

.prose h4 {
	font-size: 20px;
}

.prose :is(ul, ol) {
	padding-left: 2.6em;
}

.prose li + li {
	margin-top: 0.1em;
}

.prose a {
	color: var(--wp--preset--color--heading);
	font-weight: 600;
}

.prose a:hover {
	color: var(--wp--preset--color--primary);
}

.prose img {
	border-radius: var(--qq-radius-card);
}

.prose blockquote {
	margin-inline: 0;
	padding: 24px 32px;
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 0 var(--qq-radius-card) var(--qq-radius-card) 0;
	background-color: var(--wp--preset--color--lavender);
	font-size: var(--wp--preset--font-size--large);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
}

.prose :is(th, td) {
	padding: 12px 16px;
	border: 1px solid var(--qq-line);
	text-align: left;
}

/* Check list with blue circled ticks (About Us and others). */
.check-list {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.check-list__item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	font-size: 16px;
}

.check-list__item .icon {
	flex: none;
	width: 24px;
	height: 24px;
	padding: 4px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* On the blue and navy backgrounds the ticks are white circles. */
:is(.section--bg-night, .section--bg-brand, .section--bg-brand-vertical) .check-list__item .icon {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

/* Dot list: small blue dots (card bullet lists). */
.dot-list {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dot-list li {
	position: relative;
	padding-left: 18px;
}

.dot-list li::before {
	position: absolute;
	top: 0.6em;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	content: "";
}

/* Card slider (qq_slider(), assets/js/site--slider.js): a row of cards that scrolls and snaps, arrows under it.
   The section sets --slider-per-view (cards in view; a fraction shows the edge of the next one) and --slider-gap
   on its own element; they are only read here. A row that fits ("slider--static") is centred, without arrows. */

.slider__track {
	display: grid;
	grid-auto-columns: calc((100% - (var(--slider-per-view, 3) - 1) * var(--slider-gap, 20px)) / var(--slider-per-view, 3));
	grid-auto-flow: column;
	gap: var(--slider-gap, 20px);
	/* Room for the cards' hover lift and shadow, which the scrolling row would clip. */
	margin: -12px 0 -30px;
	padding: 12px 0 30px;
	overflow-x: auto;
	list-style: none;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.slider__track::-webkit-scrollbar {
	display: none;
}

.slider__track > * {
	scroll-snap-align: start;
}

.slider__track:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 4px;
}

.slider__controls {
	display: flex;
	justify-content: center;
	gap: 28px;
	margin-top: 20px;
}

.slider__button {
	padding: 0;
	border: 1px solid var(--wp--preset--color--heading);
	background-color: transparent;
	color: var(--wp--preset--color--heading);
	cursor: pointer;
}

:is(.section--bg-night, .section--bg-brand, .section--bg-brand-vertical) .slider__button {
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--base);
}

.slider__button:disabled {
	opacity: 0.35;
	pointer-events: none;
}

.slider--static .slider__track {
	justify-content: center;
}

.slider--static .slider__controls {
	display: none;
}

/* Forms: Contact Form 7 forms with html_class "lead-form" (the hero card, the popup and sections with a form; qq_form()).
   Lavender rounded fields, the blue submit pill. */

.lead-form {
	position: relative;
}

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

.lead-form__field--wide {
	grid-column: 1 / -1;
}

.lead-form .wpcf7-form-control-wrap {
	display: block;
}

.lead-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea) {
	width: 100%;
	min-height: 56px;
	padding: 14px 20px;
	border: 1px solid transparent;
	border-radius: 16px;
	background-color: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--heading);
	font: inherit;
	transition: border-color 0.3s, background-color 0.3s;
}

.lead-form :is(input:not([type="submit"]), select, textarea):focus {
	border-color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--base);
	outline: none;
}

.lead-form ::placeholder {
	color: var(--wp--preset--color--text);
	opacity: 1;
}

.lead-form select {
	padding-right: 48px;
	background: var(--wp--preset--color--lavender) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001c44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 18px center / 16px;
	appearance: none;
	cursor: pointer;
}

.lead-form textarea {
	height: 140px;
	resize: vertical;
}

.lead-form .wpcf7-submit {
	width: 100%;
	min-height: 60px;
	padding: 0 32px;
	border: 0;
	border-radius: var(--qq-radius-pill);
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.3s;
}

.lead-form .wpcf7-submit:hover,
.lead-form .wpcf7-submit:focus-visible {
	background-color: var(--wp--preset--color--navy);
}

.lead-form .wpcf7-spinner {
	position: absolute;
	right: 20px;
	bottom: 18px;
	margin: 0;
}

.lead-form .wpcf7-not-valid-tip {
	margin: 6px 0 0 20px;
	font-size: var(--wp--preset--font-size--small);
}

.lead-form .wpcf7-response-output {
	margin: 16px 0 0 !important;
	padding: 12px 20px !important;
	border-radius: 14px;
}

/* A sent form shows the "Thank you" popup (assets/js/site--popups.js) instead of its own message. */
.wpcf7 form.sent .wpcf7-response-output {
	display: none;
}

/* Editor-only hint inside a section, e.g. "No published services yet." */

.section-notice {
	margin: 24px 0 0;
	padding: 16px 20px;
	border: 1px dashed var(--wp--preset--color--slate);
	border-radius: 14px;
	color: var(--wp--preset--color--slate);
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.screen-reader-text:focus {
	z-index: 1000;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	padding: 12px 20px;
	clip-path: none;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--heading);
}

@media (max-width: 600px) {
	.lead-form__fields {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
