/**
 * 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(16px, 4vw, 32px);
	--qq-section-space: clamp(4rem, 8vw, 7.5rem);
	--qq-radius: 30px;
	--qq-radius-card: 20px;
	--qq-radius-section: clamp(30px, 4.2vw, 60px);
	--qq-radius-pill: 750px;
	--qq-gradient: linear-gradient(90deg, var(--wp--preset--color--violet) 0%, var(--wp--preset--color--orange) 100%);
	--qq-shadow: 0 30px 70px rgb(39 54 83 / 0.08);
	--qq-line: rgb(39 54 83 / 0.1);
	--qq-ease: cubic-bezier(0.23, 1, 0.32, 1);
	/* Height of the header bar over the top of the page; site--layout.css changes it per breakpoint. Here too, so
	   that the Hero keeps its proportions in the editor, where there is no header. */
	--qq-header-height: 61px;
}

*,
*::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;
	letter-spacing: -0.03em;
}

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, 760px) + 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);
}

/* Light lavender wash fading to white, rounded top corners (e.g. Clients). */
.section--bg-lavender {
	--section-bg: #faf8fe;
	border-radius: 50px 50px 0 0;
	background: linear-gradient(180deg, rgb(140 51 255 / 0.07) 0%, var(--wp--preset--color--base) 100%);
}

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

/* Night: the dark navy of the Hero and footer, rounded like a card. */
.section--bg-night {
	--section-bg: var(--wp--preset--color--night);
	border-radius: var(--qq-radius-section);
	background-color: var(--section-bg);
	color: rgb(255 255 255 / 0.85);
}

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

/* Section heading: eyebrow, title, text */

.eyebrow {
	display: inline-flex;
	align-items: center;
	margin: 0 0 16px;
	padding: 6px 14px;
	border-radius: var(--qq-radius);
	background-color: rgb(110 127 153 / 0.15);
	color: var(--wp--preset--color--heading);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

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

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

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

.section-heading__title {
	font-size: var(--wp--preset--font-size--xx-large);
	letter-spacing: -0.05em;
	line-height: 1.1;
}

.section-heading__text {
	margin-top: 20px;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	line-height: 1.5;
}

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

/* *Accent* words in headings (qq_accent()): a highlighter bar under the lower part of the letters —
   lavender on light backgrounds, orange on dark ones. */
.accent {
	padding-inline: 0.04em;
	background: linear-gradient(var(--accent-bar, rgb(140 51 255 / 0.31)), var(--accent-bar, rgb(140 51 255 / 0.31))) no-repeat 0 92% / 100% 0.28em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

:is(.section--bg-night, .hero, .page-header, .site-footer) .accent {
	--accent-bar: var(--wp--preset--color--orange);
}

/* Gradient text for headings that use it (e.g. Approach, CTA: Founder). */
.text-gradient {
	background: linear-gradient(110deg, var(--wp--preset--color--violet) 0%, var(--wp--preset--color--orange) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Buttons: gradient pills, as in the header and every call to action */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 49px;
	padding: 14px 40px;
	border: 0;
	border-radius: var(--qq-radius-pill);
	background: var(--qq-gradient);
	background-size: 160% 100%;
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-position 0.5s var(--qq-ease), box-shadow 0.3s, transform 0.3s var(--qq-ease);
}

.button:hover,
.button:focus-visible {
	background-position: 100% 0;
	box-shadow: 0 12px 30px rgb(140 51 255 / 0.3);
	color: var(--wp--preset--color--base);
	transform: translateY(-2px);
}

.button--small {
	min-height: 41px;
	padding: 10px 18px;
	font-weight: 600;
}

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

.button--outline:hover,
.button--outline:focus-visible {
	box-shadow: none;
	color: var(--wp--preset--color--violet);
}

.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--violet);
	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: 48px;
	height: 48px;
	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: 20px;
	height: 20px;
}

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

/* Google rating (qq_rating()): five stars and "Based on 100+ reviews" */

.rating {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
	font-size: var(--wp--preset--font-size--small);
}

.rating__stars {
	display: inline-flex;
	gap: 2px;
	color: #fbbf24;
}

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

.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 {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.75;
}

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

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

.prose h2 {
	font-size: clamp(28px, 2.6vw, 38px);
	letter-spacing: -0.04em;
}

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

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

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

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

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

.prose blockquote {
	margin-inline: 0;
	padding: 24px 32px;
	border-left: 3px solid var(--wp--preset--color--violet);
	border-radius: 0 var(--qq-radius-card) var(--qq-radius-card) 0;
	background-color: var(--wp--preset--color--mist);
	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 violet 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: 17px;
	letter-spacing: 0.02em;
}

.check-list__item .icon {
	flex: none;
	width: 24px;
	height: 24px;
	padding: 3px;
	border: 1.5px solid var(--wp--preset--color--violet);
	border-radius: 50%;
	color: var(--wp--preset--color--violet);
}

/* Dot list: small violet 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.55em;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--wp--preset--color--violet), #b98bff);
	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, 24px)) / var(--slider-per-view, 3));
	grid-auto-flow: column;
	gap: var(--slider-gap, 24px);
	/* Room for the cards' hover lift and shadow, which the scrolling row would clip. */
	margin: -12px 0 -40px;
	padding: 12px 0 40px;
	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--violet);
	outline-offset: 4px;
}

.slider__controls {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: clamp(24px, 3vw, 40px);
}

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

.section--bg-night .slider__button {
	border-color: rgb(255 255 255 / 0.3);
	color: var(--wp--preset--color--base);
}

.slider__button:hover,
.slider__button:focus-visible {
	border-color: var(--wp--preset--color--violet);
}

.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 audit popup and sections with a form; qq_form()).
   Light grey rounded fields, the gradient submit pill. */

.lead-form {
	position: relative;
}

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

.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: 54px;
	padding: 14px 20px;
	border: 1px solid transparent;
	border-radius: 14px;
	background-color: #f3f3f7;
	color: var(--wp--preset--color--heading);
	font: inherit;
	transition: border-color 0.3s, background-color 0.3s;
}

.lead-form :is(input, select, textarea):focus {
	border-color: var(--wp--preset--color--violet);
	background-color: var(--wp--preset--color--base);
	outline: none;
}

.lead-form ::placeholder {
	color: rgb(39 54 83 / 0.6);
	opacity: 1;
}

.lead-form select {
	padding-right: 48px;
	background: #f3f3f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23273653' 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: 54px;
	padding: 0 40px;
	border: 0;
	border-radius: var(--qq-radius-pill);
	background: var(--qq-gradient);
	background-size: 160% 100%;
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background-position 0.5s var(--qq-ease), box-shadow 0.3s;
}

.lead-form .wpcf7-submit:hover,
.lead-form .wpcf7-submit:focus-visible {
	background-position: 100% 0;
	box-shadow: 0 12px 30px rgb(140 51 255 / 0.3);
}

.lead-form .wpcf7-spinner {
	position: absolute;
	right: 20px;
	bottom: 15px;
	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(--qq-line);
	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;
	}
}
