/* ==========================================================================
   HQDM base: tokens, reset, type roles, links, buttons, forms, states, surfaces, light.
   Rules and rationale: DESIGN-GUIDELINES.md (v5 block at the top). Values come from theme.json presets.
   v5 (05.11.2026): cyan family, two-light ambient, lit hairlines, r-3, glass variants, HUD corners, horizon,
   eyebrow v5, glow bar, two-tone heading spans, cards lit from inside, one primary button, arrow button,
   custom checkbox/radio, bottom veil, icon medallion.
   ========================================================================== */
:root {
	/* colour */
	--c-bg: var(--wp--preset--color--bg);
	--c-bg-2: var(--wp--preset--color--bg-2);
	--c-surface: var(--wp--preset--color--surface);
	--c-surface-2: var(--wp--preset--color--surface-2);
	--c-line: var(--wp--custom--line);
	--c-line-2: var(--wp--custom--line-2);
	--c-text-strong: var(--wp--preset--color--text-strong);
	--c-text: var(--wp--preset--color--text);
	--c-text-muted: var(--wp--preset--color--text-muted);
	--c-text-faint: var(--wp--preset--color--text-faint);
	--c-brand: var(--wp--preset--color--brand);
	--c-brand-2: var(--wp--preset--color--brand-2);
	--c-neon: var(--wp--preset--color--neon);
	--c-accent: var(--wp--preset--color--accent);

	/* v5 cyan family: lines, dots, icon strokes, one highlighted word. Never body text, never on purple buttons. */
	--c-cyan: var(--wp--preset--color--cyan, #67e8f9);       /* 13.9:1 on --c-bg, 12.3:1 on glass */
	--c-cyan-2: var(--wp--preset--color--cyan-2, #3ad1ff);   /* atmosphere rim, deeper glow */
	--cyan-8: rgba(103, 232, 249, .08);
	--cyan-18: rgba(103, 232, 249, .18);
	--cyan-35: rgba(103, 232, 249, .35);
	--cyan-60: rgba(103, 232, 249, .6);
	--violet-glow: rgba(151, 71, 255, .45);

	/* v5 two-light system: violet from the left / top, cyan from the right / bottom (cyan at about half strength) */
	--light-l: radial-gradient(46% 40% at 0% 46%, rgba(151, 71, 255, .2), transparent 72%);   /* phase 4: the ellipse fades out ~17% inside the box top and bottom: no seam where a section ends */
	--light-r: radial-gradient(42% 38% at 100% 58%, rgba(58, 209, 255, .1), transparent 72%);

	/* v5 lit hairlines (novagrid): bright core in the middle, fading out to both sides */
	--hairline: linear-gradient(90deg, transparent, var(--c-line-2) 30%, var(--c-line-2) 70%, transparent);
	--hairline-lit: linear-gradient(90deg, transparent, rgba(235, 192, 252, .3) 27%, #ebc0fc 48%, rgba(235, 192, 252, .3) 70%, transparent);
	--hairline-cyan: linear-gradient(90deg, transparent, rgba(103, 232, 249, .28) 27%, #b9f6fd 48%, rgba(103, 232, 249, .28) 70%, transparent);
	--hairline-horizon: linear-gradient(90deg, transparent, rgba(196, 173, 255, .22) 20%, rgba(196, 173, 255, .5) 38%, #c8f8fd 50%, rgba(196, 173, 255, .5) 62%, rgba(196, 173, 255, .22) 80%, transparent);

	/* type */
	--ff-heading: var(--wp--preset--font-family--heading);
	--ff-body: var(--wp--preset--font-family--body);
	--fs-display: var(--wp--preset--font-size--display);       /* v5: 44 to 80px, home H1 */
	--fs-h1: var(--wp--preset--font-size--heading-lg);         /* v5: 36 to 64px */
	--fs-h2: var(--wp--preset--font-size--heading-md);         /* v5: 32 to 56px */
	--fs-h3: var(--wp--preset--font-size--heading-sm);         /* v5: 20 to 28px */
	--fs-h4: var(--wp--preset--font-size--heading-xs);
	--fs-statement: var(--wp--preset--font-size--statement);   /* v5: 24 to 40px, weight 400 */
	--fs-number: var(--wp--preset--font-size--number, clamp(2.5rem, 1.943rem + 2.286vw, 4rem));   /* v5: 40 to 64px tabular */
	--fs-lead: var(--wp--preset--font-size--lead);
	--fs-body: var(--wp--preset--font-size--medium);
	--fs-prose: var(--wp--preset--font-size--prose);
	--fs-ui: var(--wp--preset--font-size--small);
	--fs-label: var(--wp--preset--font-size--label);
	--fs-eyebrow: var(--wp--preset--font-size--eyebrow, clamp(.8125rem, .789rem + .095vw, .875rem));   /* v5: 13 to 14px */
	--fw-heading: 480;   /* phase 4: lighter display type (440 tested: too thin over the hero Earth's city lights) */
	--fw-heading-sm: 500;   /* v5: H3 / H4 */
	/* phase 4: measures in em, because Geist's ch is the wide zero (1ch = .66em): 66ch rendered 85 to 90 characters
	   per line. 33em = about 66 characters of running text at any size; the lede is a little shorter. */
	--measure-prose: 33em;
	--measure-lede: 30em;

	/* space: one section rhythm (v5). Two neighbouring sections give 2 x --section between their contents. */
	--sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
	--sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 128px;
	--section: clamp(56px, 5.6vw, 80px);
	--section-tight: clamp(40px, 4.4vw, 64px);
	--hero-top: clamp(120px, 14vw, 168px);
	--gutter: var(--wp--custom--gutter);
	--wide: var(--wp--style--global--wide-size, 1200px);
	--read: var(--wp--style--global--content-size, 680px);

	/* shape */
	--r-1: var(--wp--custom--radius--1);
	--r-2: var(--wp--custom--radius--2);
	--r-3: var(--wp--custom--radius--3, 1.25em);   /* v5: cards, panels, bento tiles, media mounts (20px at 16px) */
	--r-pill: var(--wp--custom--radius--pill);
	--shadow-1: var(--wp--custom--shadow--1);
	--shadow-2: var(--wp--custom--shadow--2);

	/* motion */
	--ease-out: cubic-bezier(.22, 1, .36, 1);
	--ease-in-out: cubic-bezier(.65, 0, .35, 1);
	--ease: cubic-bezier(.4, 0, .2, 1);
	--d-1: 150ms;
	--d-2: 250ms;
	--d-3: 500ms;
	--d-4: 700ms;
	--d-hover: 180ms;   /* v5: hover feedback arrives under 200ms; it leaves at --d-2 */

	/* liquid glass (guidelines §6): frosted fill + lit top edge; works in every browser */
	--glass-bg: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015) 60%), rgba(18, 10, 38, .42);
	--glass-bg-strong: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .02) 55%), rgba(16, 8, 34, .55);
	--glass-blur: blur(20px) saturate(170%);
	--glass-edge: rgba(255, 255, 255, .085);
	--glass-edge-hover: rgba(255, 255, 255, .16);
	/* v5 cards lit from inside: hairline ring + lit top edge + violet light rising from the bottom. No drop shadow. */
	--glass-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -56px 72px -56px rgba(151, 71, 255, .34);
	--glass-shadow-hover: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -64px 80px -52px rgba(151, 71, 255, .55);
	/* lit rim: bright at the top, almost gone on the sides, a violet trace at the bottom (drawn by ::after, masked to 1px) */
	--glass-rim: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .07) 14%, rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, .02) 80%, rgba(151, 71, 255, .26));
	--glass-rim-hover: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .12) 24%, rgba(255, 255, 255, .05) 60%, rgba(196, 173, 255, .45));
	/* v5 cyan rim: the trace sits on the bottom-right corner (cards in the right half of the two-light field) */
	--glass-rim-cyan: linear-gradient(155deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .07) 16%, rgba(255, 255, 255, .02) 46%, rgba(255, 255, 255, .02) 74%, rgba(103, 232, 249, .5));
	/* the same light for surfaces whose pseudo-elements are taken: per-side border colours */
	--glass-edge-lit: rgba(255, 255, 255, .15) rgba(255, 255, 255, .07) rgba(255, 255, 255, .035);
	/* card spotlight that follows the pointer (site.js sets --sx/--sy, :hover fades --so in) */
	--spot: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 0%), rgba(151, 71, 255, calc(.14 * var(--so))), transparent 42%);
	/* v5 glass variants (layered before --glass-bg) */
	--glass-lit-bottom: radial-gradient(70% 60% at 50% 115%, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 55%, transparent 75%);
	--glass-ray: linear-gradient(128deg, rgba(214, 200, 255, .16) 0%, rgba(214, 200, 255, .06) 18%, transparent 38%);
}

@property --so { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --hq-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--ff-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
	overflow-x: clip;
}
body::before {
	/* v5 ambient: two lights fixed behind the page (violet left, cyan right at about half strength), so glass
	   always has something to frost as the page scrolls */
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(44vmax 38vmax at 0% 28%, rgba(151, 71, 255, .15), transparent 70%),
		radial-gradient(40vmax 34vmax at 100% 66%, rgba(58, 209, 255, .075), transparent 70%),
		radial-gradient(34vmax 24vmax at 60% 108%, rgba(91, 46, 214, .12), transparent 70%);
}
::selection { background: var(--c-brand); color: #fff; }
img, svg, video { max-width: 100%; height: auto; }
figure { margin: 0; }
.hq-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* --------------------------------------------------------------------------
   Type roles (v5 scale: display 80, H1 64, H2 56, statement 40, H3 28, numbers 64)
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 { text-wrap: balance; margin-block: 0 .6em; }
h3, h4 { font-weight: var(--fw-heading-sm); }
p, li { text-wrap: pretty; }
p { margin-block: 0 1em; }
strong, b { color: var(--c-text-strong); font-weight: 600; }
:is(h1, h2, h3, h4, h5, h6) :is(strong, b) { font-weight: inherit; }   /* phase 4: crawl headings wrap their text in <strong>; the heading weight decides */
.hq-display { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -.02em; max-width: 14ch; }
.hq-title { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -.02em; max-width: 16ch; }
.hq-section-title { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.02em; max-width: 18ch; }
.hq-statement { font-family: var(--ff-heading); font-weight: 400; font-size: var(--fs-statement); line-height: 1.3; letter-spacing: -.02em; color: var(--c-text-strong); }
.hq-lede { font-size: var(--fs-lead); line-height: 1.55; color: var(--c-text-muted); max-width: var(--measure-lede); text-wrap: balance; }
.hq-number { font-family: var(--ff-heading); font-size: var(--fs-number); font-weight: 500; line-height: 1; letter-spacing: -.03em; color: var(--c-text-strong); font-variant-numeric: tabular-nums; }
.hq-meta { font-size: var(--fs-ui); color: var(--c-text-faint); font-variant-numeric: tabular-nums; }
[data-count], .hq-count-up { font-variant-numeric: tabular-nums; }
/* Two-tone headings: wrap an EXISTING word, the text stays 1:1. No gradient text anywhere. */
.hq-dim { color: var(--c-text-muted); }
.hq-cy { color: var(--c-cyan); }
/* All-caps source headings: caps need positive tracking (audit, about page) */
.hq-caps { letter-spacing: .01em; }

/* Eyebrow v5 (one rule for every page): label between two fading hairlines, a glowing cyan dot before the text.
   `.hq-label` (Webflow section labels) and `.hq-eyebrow` share it. Heroes and `.hq-label--pill` keep the glass pill. */
:is(.hq-label, .hq-eyebrow) {
	display: flex;
	align-items: center;
	gap: 14px;
	width: fit-content;
	max-width: 100%;
	margin: 0 0 var(--sp-4);
	font-family: var(--ff-body);
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--c-text);
	position: relative;
}
:is(.hq-label, .hq-eyebrow)::before,
:is(.hq-label, .hq-eyebrow)::after {
	content: "";
	flex: none;
	width: clamp(20px, 5vw, 56px);
	height: 14px;
	background: linear-gradient(90deg, transparent, rgba(196, 173, 255, .45)) 0 50% / 100% 1px no-repeat;
}
:is(.hq-label, .hq-eyebrow)::before {
	/* left rail ending in the cyan dot */
	width: calc(clamp(20px, 5vw, 56px) + 14px);
	background:
		radial-gradient(circle at calc(100% - 4px) 50%, #d9fbff 0 1.6px, var(--c-cyan) 2.4px, rgba(103, 232, 249, .32) 4px, transparent 7.5px),
		linear-gradient(90deg, transparent, rgba(196, 173, 255, .45)) 0 50% / calc(100% - 14px) 1px no-repeat;
}
:is(.hq-label, .hq-eyebrow)::after { background: linear-gradient(270deg, transparent, rgba(196, 173, 255, .45)) 0 50% / 100% 1px no-repeat; }
/* left-aligned heads: dot + label + one rail to the right */
:is(.hq-eyebrow--start, .hq-head--left .hq-label, .hq-head--split .hq-label) { justify-content: flex-start; }
:is(.hq-eyebrow--start, .hq-head--left .hq-label, .hq-head--split .hq-label)::before { width: 8px; background: radial-gradient(circle at 4px 50%, #d9fbff 0 1.6px, var(--c-cyan) 2.4px, rgba(103, 232, 249, .32) 4px, transparent 7.5px); }
/* hero eyebrow = glass pill with the cyan dot (mockup "WELCOME TO HQDM") */
:is(.hq-hero .hq-label, .hq-case-hero .hq-label, .hq-profile .hq-label, .hq-label--pill) {
	display: inline-flex;
	gap: var(--sp-2);
	padding: 7px 14px 7px 12px;
	font-size: var(--fs-label);
	border-radius: var(--r-pill);
	background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)), rgba(28, 16, 56, .35);
	-webkit-backdrop-filter: blur(14px) saturate(170%);
	backdrop-filter: blur(14px) saturate(170%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -8px 16px -10px rgba(151, 71, 255, .5), 0 8px 24px -14px rgba(151, 71, 255, .55);
}
:is(.hq-hero .hq-label, .hq-case-hero .hq-label, .hq-profile .hq-label, .hq-label--pill)::before {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--c-cyan);
	box-shadow: 0 0 0 3px var(--cyan-18), 0 0 10px 1px var(--cyan-60);
}
:is(.hq-hero .hq-label, .hq-case-hero .hq-label, .hq-profile .hq-label, .hq-label--pill)::after {
	/* glass rim (same recipe as the cards) */
	content: "";
	position: absolute;
	inset: 0;
	width: auto;
	height: auto;
	padding: 1px;
	border-radius: inherit;
	background: var(--glass-rim);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color var(--d-2) var(--ease), text-underline-offset var(--d-2) var(--ease); }
:where(p, li) > a:not(.wp-block-button__link) { text-decoration-color: color-mix(in srgb, var(--c-accent) 45%, transparent); }
@media (hover: hover) {
	a:hover { color: var(--c-text-strong); transition-duration: var(--d-1); }
	:where(p, li) > a:not(.wp-block-button__link):hover { text-underline-offset: .15em; text-decoration-color: currentColor; }
}

/* --------------------------------------------------------------------------
   Buttons (v5)
   ONE primary recipe for every primary action: `is-style-hq-star`, a plain core button with no style
   (the 129 x 44 "Book a Call" the audit found) and the hero link. Violet pill lit from above, a light that keeps
   travelling around the rim, magnetic hover (site.js), glint, label roll. One size (--btn-*), compact in the nav.
   Secondary: `is-style-hq-arrow` (outlined pill + 36px violet disc with an arrow; hover floods the pill).
   Ghost: outlined pill. Press 0.97 on all.
   -------------------------------------------------------------------------- */
.wp-block-button__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);
	min-height: 44px;
	font-family: var(--ff-body);
	text-decoration: none;
	transition: background-color var(--d-2) var(--ease), color var(--d-2) var(--ease), border-color var(--d-2) var(--ease), box-shadow var(--d-2) var(--ease), transform var(--d-1) var(--ease-out);
}
.wp-block-button__link:active { transform: scale(.97); transition-duration: 100ms; }
.wp-block-button__link[aria-disabled="true"], .wp-block-button__link:disabled { opacity: .4; pointer-events: none; }

:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link,
.hq-hero__links a:first-child {
	--mx: 0px;
	--my: 0px;
	isolation: isolate;
	overflow: hidden;
	color: #fff;
	font-size: var(--btn-fs, 1.125rem);
	font-weight: 600;
	line-height: 1.2;
	padding: var(--btn-py, 1rem) var(--btn-px, 2rem);
	background: linear-gradient(180deg, #8a5cf7 0%, #7140e4 55%, #6534d6 100%);
	border-radius: var(--r-pill);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .38),
		inset 0 -10px 18px -10px rgba(36, 8, 104, .75),
		0 0 0 1px rgba(151, 71, 255, .6),
		0 10px 28px -12px rgba(151, 71, 255, .85),
		0 0 44px -14px rgba(151, 71, 255, .7);
	translate: var(--mx) var(--my);
	transition: translate 400ms var(--ease-out), box-shadow var(--d-2) var(--ease-out), transform var(--d-1) var(--ease-out), color var(--d-2) var(--ease);
}
@media (max-width: 781px) { :root { --btn-fs: 1rem; --btn-py: .875rem; --btn-px: 1.625rem; } }
:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link::before,
.hq-hero__links a:first-child::before {
	/* the travelling rim light: a conic gradient masked to a 1.5px ring (paused off-screen by site.js) */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	padding: 1.5px;
	border-radius: inherit;
	background: conic-gradient(from var(--hq-a), transparent 0deg 220deg, rgba(196, 173, 255, .35) 280deg, #fff 335deg, rgba(196, 173, 255, .6) 350deg, transparent 360deg);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	animation: hq-rim 3.6s linear infinite;
	pointer-events: none;
}
.is-offscreen.wp-block-button__link::before, .is-offscreen.wp-block-button__link { animation-play-state: paused; }
:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link::after,
.hq-hero__links a:first-child::after {
	/* glint: a narrow, soft specular band that crosses once per hover, under the label */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 38%;
	z-index: -1;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06) 25%, rgba(255, 255, 255, .36) 50%, rgba(255, 255, 255, .06) 75%, transparent);
	transform: translateX(-130%) skewX(-20deg);
	pointer-events: none;
}
@keyframes hq-rim { to { --hq-a: 360deg; } }
/* label roll: site.js wraps the text once; the copy below is a text-shadow (no duplicate text in the DOM) */
/* the roll box matches the button's 1.2 line-height, so wrapping the label never changes the button height (CLS) */
.hq-roll { display: inline-block; height: 1.2em; line-height: 1.2; overflow: hidden; vertical-align: top; }
.hq-roll__in { display: block; text-shadow: 0 1.2em 0 currentColor; transition: transform 300ms var(--ease-out); }
@media (hover: hover) {
	:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link:hover,
	.hq-hero__links a:first-child:hover {
		color: #fff;
		background: linear-gradient(180deg, #9b72ff 0%, #7a48ee 55%, #6a38dc 100%);
		box-shadow:
			inset 0 1px 0 rgba(255, 255, 255, .55),
			inset 0 -10px 18px -10px rgba(36, 8, 104, .5),
			0 0 0 1px rgba(196, 173, 255, .9),
			0 0 0 5px rgba(151, 71, 255, .2),
			0 14px 36px -12px rgba(151, 71, 255, 1),
			0 0 80px -8px rgba(151, 71, 255, .9);
		transition-duration: 400ms, var(--d-hover), var(--d-1), var(--d-1);
	}
	:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link:hover::before,
	.hq-hero__links a:first-child:hover::before { padding: 2px; background: conic-gradient(from var(--hq-a), transparent 0deg 160deg, rgba(196, 173, 255, .5) 250deg, #fff 330deg, rgba(196, 173, 255, .8) 348deg, transparent 360deg); }
	:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link:hover::after,
	.hq-hero__links a:first-child:hover::after { transform: translateX(290%) skewX(-20deg); transition: transform 700ms cubic-bezier(.37, 0, .63, 1) 40ms; }
	:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link:hover .hq-roll__in,
	.hq-hero__links a:first-child:hover .hq-roll__in { transform: translateY(-1.2em); }
}
:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link:active,
.hq-hero__links a:first-child:active { transform: scale(.97); }

/* Ghost: outlined pill */
.is-style-hq-ghost .wp-block-button__link, .hq-hero__links a:not(:first-child) {
	color: var(--c-text-strong);
	font-weight: 500;
	border-radius: var(--r-pill);
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(221, 218, 231, .3);
	transition: background-color var(--d-2) var(--ease), box-shadow var(--d-2) var(--ease), transform var(--d-1) var(--ease-out);
}
@media (hover: hover) {
	.is-style-hq-ghost .wp-block-button__link:hover, .hq-hero__links a:not(:first-child):hover { color: var(--c-text-strong); background-color: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(221, 218, 231, .6); transition-duration: var(--d-hover); }
}

/* Arrow (v5 secondary, avenna): outlined pill, a 36px violet disc with an arrow on the right. Hover: the disc
   floods the whole pill (clip-path, no layout), the label turns white, the arrow turns -45deg. */
.is-style-hq-arrow .wp-block-button__link {
	isolation: isolate;
	min-height: 44px;
	padding: 4px calc(36px + 4px + .875rem) 4px 1.375rem;
	color: var(--c-text-strong);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	border-radius: var(--r-pill);
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(221, 218, 231, .3);
	transition: color var(--d-2) var(--ease), box-shadow var(--d-2) var(--ease), transform var(--d-1) var(--ease-out);
}
.is-style-hq-arrow .wp-block-button__link::before {
	/* the disc that becomes the fill */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: linear-gradient(180deg, #8a5cf7 0%, #7140e4 55%, #6534d6 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
	clip-path: inset(4px 4px 4px calc(100% - 40px) round 999px);
	transition: clip-path 260ms var(--ease-out);
}
.is-style-hq-arrow .wp-block-button__link::after {
	/* the arrow (mask of the line icon "arrow-right") */
	content: "";
	position: absolute;
	top: 50%;
	right: 4px;
	width: 36px;
	height: 36px;
	margin-top: -18px;
	background: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") 50% 50% / 18px 18px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") 50% 50% / 18px 18px no-repeat;
	transition: transform 260ms var(--ease-out);
}
@media (hover: hover) {
	.is-style-hq-arrow .wp-block-button__link:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(196, 173, 255, .7), 0 10px 30px -14px rgba(151, 71, 255, .8); transition-duration: var(--d-hover); }
	.is-style-hq-arrow .wp-block-button__link:hover::before { clip-path: inset(0 0 0 0 round 999px); transition-duration: 340ms; }
	.is-style-hq-arrow .wp-block-button__link:hover::after { transform: rotate(-45deg); }
}
.is-style-hq-arrow .wp-block-button__link:focus-visible::after { transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
	:is(.is-style-hq-star, .wp-block-button:not([class*="is-style-"])) > .wp-block-button__link::before,
	.hq-hero__links a:first-child::before { animation: none; --hq-a: 300deg; }
}

/* --------------------------------------------------------------------------
   Focus + skip link
   -------------------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: var(--r-1); }
.wp-block-button__link:focus-visible { outline-offset: 3px; border-radius: var(--r-pill); }
/* One skip link: core prints `.skip-link` for block themes (the theme's own `.hq-skip` was a duplicate, audit R13) */
.hq-skip, .skip-link.screen-reader-text:focus {
	position: fixed;
	left: var(--sp-4);
	top: -64px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip-path: none;
	padding: var(--sp-3) var(--sp-4);
	border-radius: var(--r-2);
	background: var(--c-text-strong);
	color: var(--c-bg);
	font-size: var(--fs-ui);
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	transition: top var(--d-2) var(--ease-out);
}
.hq-skip:focus, .skip-link.screen-reader-text:focus { top: var(--sp-4); color: var(--c-bg); }

/* --------------------------------------------------------------------------
   Forms (v5): custom checkbox / radio on dark glass (the contact form had a native white box).
   20px box, 1px edge at 3.5:1, violet when checked with a white mark, 44px label target.
   -------------------------------------------------------------------------- */
input:is([type="checkbox"], [type="radio"]) {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	display: inline-grid;
	place-content: center;
	width: 20px;
	height: 20px;
	margin: 0;
	font-size: 1rem;
	vertical-align: -4px;
	border: 0;
	border-radius: var(--r-1);
	background: rgba(255, 255, 255, .04);
	box-shadow: inset 0 0 0 1px rgba(221, 218, 231, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
	cursor: pointer;
	transition: background-color var(--d-1) var(--ease), box-shadow var(--d-1) var(--ease);
}
input[type="radio"] { border-radius: 50%; }
input:is([type="checkbox"], [type="radio"])::before {
	content: "";
	width: 12px;
	height: 12px;
	background: #fff;
	opacity: 0;
	transform: scale(.6);
	transition: opacity var(--d-1) var(--ease), transform var(--d-1) var(--ease-out);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") 50% 50% / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") 50% 50% / contain no-repeat;
}
input[type="radio"]::before { width: 8px; height: 8px; border-radius: 50%; -webkit-mask: none; mask: none; }
input:is([type="checkbox"], [type="radio"]):checked {
	background: linear-gradient(180deg, #8a5cf7, #6534d6);
	box-shadow: inset 0 0 0 1px rgba(196, 173, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 14px -2px rgba(151, 71, 255, .7);
}
input:is([type="checkbox"], [type="radio"]):checked::before { opacity: 1; transform: none; }
input:is([type="checkbox"], [type="radio"]):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
input:is([type="checkbox"], [type="radio"]):disabled { opacity: .4; cursor: not-allowed; }
@media (hover: hover) { input:is([type="checkbox"], [type="radio"]):not(:checked):not(:disabled):hover { box-shadow: inset 0 0 0 1px rgba(221, 218, 231, .7), inset 0 1px 0 rgba(255, 255, 255, .08); } }
label:has(> input:is([type="checkbox"], [type="radio"])) { display: inline-flex; align-items: center; gap: .625em; min-height: 44px; cursor: pointer; }

/* --------------------------------------------------------------------------
   Lists, tables, media
   -------------------------------------------------------------------------- */
ul.wp-block-list, ol.wp-block-list { padding-left: 1.15em; }
.wp-block-list li + li { margin-top: .4em; }
.wp-block-list li::marker { color: var(--c-text-faint); }
.hq-table { overflow-x: auto; font-size: 1rem; border-radius: var(--r-2); border: 1px solid; border-color: var(--glass-edge-lit); background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); }
.hq-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--fs-ui); }
.hq-table th, .hq-table td { padding: var(--sp-3) var(--sp-4); border: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); text-align: left; }
.hq-table thead { border-bottom: 0; }
.hq-table thead th { color: var(--c-text-faint); font-size: var(--fs-label); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .04); }
.hq-table tbody tr:last-child td { border-bottom: 0; }
.wp-block-image img { border-radius: var(--r-1); }
.wp-block-video { font-size: 1rem; }
.wp-block-video video { width: 100%; border-radius: var(--r-2); background: #000; display: block; }

/* --------------------------------------------------------------------------
   Shared surfaces: every card is liquid glass (guidelines §6), v5 = lit from inside, radius r-3
   -------------------------------------------------------------------------- */
.hq-card, .is-style-hq-card, .hq-glass {
	position: relative;
	font-size: 1rem;
	background: var(--glass-layer, linear-gradient(transparent, transparent)), var(--glass-bg);
	-webkit-backdrop-filter: var(--glass-blur);
	backdrop-filter: var(--glass-blur);
	border: 0;
	border-radius: var(--r-3);
	box-shadow: var(--glass-shadow);
}
.hq-card, .is-style-hq-card { padding: var(--sp-6); transition: box-shadow var(--d-2) var(--ease); }
@media (max-width: 600px) { .hq-card, .is-style-hq-card { padding: var(--sp-5); } }
/* glass variants: compose with any glass surface (they set the layer under the frost) */
.hq-glass--lit-bottom { --glass-layer: var(--glass-lit-bottom); }
.hq-glass--ray { --glass-layer: var(--glass-ray); }
.hq-glass--lit-bottom.hq-glass--ray { --glass-layer: var(--glass-ray), var(--glass-lit-bottom); }
.hq-glass--lit-bottom { box-shadow: var(--glass-shadow), inset 0 -1px 0 rgba(255, 255, 255, .22); }
.hq-rim--cyan { --rim: var(--glass-rim-cyan); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	:root { --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01)), #150c2b; --glass-bg-strong: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), #160d2e; }
}

/* Glass rim (the 1px light that makes a card read as glass). These surfaces have border: 0; their ::after is the rim. */
:is(.hq-card, .is-style-hq-card, .hq-glass, .hq-pillar, .hq-quote-card, .hq-why-row, .hq-geo__item, .hq-speed, .hq-area-card,
	.hq-area-about__text, .hq-post-card, .hq-team-card, .hq-showcase__item, .hq-case-meta__item, .hq-stack-card)::after {
	content: "";
	position: absolute;
	inset: 0;
	padding: 1px;
	border-radius: inherit;
	background: var(--rim, var(--glass-rim));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}
@media (hover: hover) {
	/* only surfaces that are links react to the pointer (Milan: nothing changes on hover unless it is clickable) */
	:is(.hq-area-card, .hq-post-card, .hq-team-card, a.hq-card, .hq-card--link):hover { --rim: var(--glass-rim-hover); box-shadow: var(--glass-shadow-hover); transition-duration: var(--d-hover); }
}
:is(a.hq-card, .hq-card--link):active { transform: scale(.99); }
/* Touch devices: blur is barely visible over the flat page and costs scroll smoothness */
@media (max-width: 781px), (hover: none) {
	:root { --glass-blur: blur(12px) saturate(150%); }
	:is(.hq-faq__item, .hq-why-row, .hq-stack-card, .hq-quote-card) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* HUD corners (astrolab; r2 G1, Milan 06.11: rounded, outside the element). Four 1px L-brackets drawn by one ::before
   (the ::after stays free for the glass rim): a 1px rounded frame --hud-g outside the element, concentric with it
   (frame radius = element radius + gap), masked down to its four corners, so the element sits framed inside them.
   Tunables: --hud-c colour, --hud-r the element's own radius (default r-3, the card radius), --hud-g the gap
   between element and frame, --hud-s the straight arm after the curve. Hosts must not clip overflow. */
.hq-hud { position: relative; --hud-c: rgba(103, 232, 249, .45); --hud-r: var(--r-3); --hud-g: 8px; --hud-s: 12px; }
.hq-hud::before {
	--hud-R: calc(var(--hud-r) + var(--hud-g));
	--hud-k: calc(var(--hud-R) + var(--hud-s));
	content: "";
	position: absolute;
	inset: calc(-1 * var(--hud-g));
	z-index: 2;
	pointer-events: none;
	border: 1px solid var(--hud-c);
	border-radius: var(--hud-R);
	-webkit-mask:
		linear-gradient(#000 0 0) 0 0 / var(--hud-k) var(--hud-k) no-repeat,
		linear-gradient(#000 0 0) 100% 0 / var(--hud-k) var(--hud-k) no-repeat,
		linear-gradient(#000 0 0) 0 100% / var(--hud-k) var(--hud-k) no-repeat,
		linear-gradient(#000 0 0) 100% 100% / var(--hud-k) var(--hud-k) no-repeat;
	mask:
		linear-gradient(#000 0 0) 0 0 / var(--hud-k) var(--hud-k) no-repeat,
		linear-gradient(#000 0 0) 100% 0 / var(--hud-k) var(--hud-k) no-repeat,
		linear-gradient(#000 0 0) 0 100% / var(--hud-k) var(--hud-k) no-repeat,
		linear-gradient(#000 0 0) 100% 100% / var(--hud-k) var(--hud-k) no-repeat;
}
.hq-hud--out { --hud-g: 8px; }
/* hosts whose own radius is not r-3 (the frame stays concentric with them) */
.hq-dstep__num.hq-hud { --hud-r: var(--r-1); --hud-g: 6px; --hud-s: 8px; }
.hq-rcard__result.hq-hud { --hud-r: var(--r-1); --hud-g: 6px; --hud-s: 10px; }

/* Icon medallion (§6.4): a dark glass disc with a cyan ring; the icon is centred by grid, never by line boxes.
   Children: an inline SVG from hqdm_icon() (24px, 1.5px stroke) or a legacy figure + img bitmap. */
.hq-medal {
	--medal: 48px;
	--icon: 24px;
	position: relative;
	flex: none;
	display: grid;
	place-items: center;
	width: var(--medal);
	height: var(--medal);
	margin: 0;
	line-height: 0;
	color: var(--c-cyan);
	border-radius: 50%;
	background: radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, .1), transparent 60%), rgba(12, 6, 28, .72);
	box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .5), inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 20px -4px rgba(103, 232, 249, .35);
}
.hq-medal :is(figure, picture, img) { display: block; margin: 0; line-height: 0; }
.hq-medal > :is(svg, img, figure), .hq-medal figure img { width: var(--icon); height: var(--icon); }
.hq-medal--sm { --medal: 36px; --icon: 18px; }
.hq-medal--lg { --medal: 56px; --icon: 28px; }
.hq-medal--violet { color: #c4adff; box-shadow: inset 0 0 0 1px rgba(196, 173, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 20px -4px rgba(151, 71, 255, .45); }
.hq-icon { display: block; flex: none; width: 24px; height: 24px; }

/* --------------------------------------------------------------------------
   Light and lines (v5)
   -------------------------------------------------------------------------- */
/* Glow bar under a hero H1 / big heading (mockup): 120 x 2px cyan line with a blurred cyan light under it.
   Markup: <span class="hq-glowbar" aria-hidden="true"></span> (motion.js grows it in the hero intro). */
.hq-glowbar {
	position: relative;
	display: block;
	width: 120px;
	height: 2px;
	margin: var(--sp-5) auto 0;
	border-radius: var(--r-pill);
	background: linear-gradient(90deg, rgba(103, 232, 249, .2), var(--c-cyan) 22%, #e6fdff 50%, var(--c-cyan) 78%, rgba(103, 232, 249, .2));
	box-shadow: 0 0 10px 0 var(--cyan-60), 0 0 2px 0 var(--c-cyan);
}
.hq-glowbar::after {
	content: "";
	position: absolute;
	left: -30%;
	right: -30%;
	top: 1px;
	height: 24px;
	background: radial-gradient(50% 100% at 50% 0%, var(--cyan-35), transparent 75%);
	pointer-events: none;
}
.hq-glowbar--start { margin-inline: 0; transform-origin: 0 50%; }
.hq-glowbar--sm { width: 28px; margin-top: var(--sp-3); }
.hq-glowbar--sm::after { height: 12px; }
/* rails (services mockup): fading hairlines either side of the bar */
.hq-glowbar--rails { width: min(560px, 86%); background: linear-gradient(90deg, transparent, rgba(196, 173, 255, .3)) 0 50% / calc(50% - 56px) 1px no-repeat, linear-gradient(270deg, transparent, rgba(196, 173, 255, .3)) 100% 50% / calc(50% - 56px) 1px no-repeat, linear-gradient(90deg, rgba(103, 232, 249, .3), var(--c-cyan) 25%, #e6fdff 50%, var(--c-cyan) 75%, rgba(103, 232, 249, .3)) 50% 50% / 64px 2px no-repeat; box-shadow: none; }
.hq-glowbar--rails::after { left: calc(50% - 60px); right: calc(50% - 60px); }

/* Horizon (chapter end): purple horizon glow rising from a 1px divider whose bright centre is cyan.
   Markup between two sections: <hr class="wp-block-separator hq-horizon"> (core separator) or <div class="hq-horizon" aria-hidden="true">. */
:is(.hq-horizon, .is-style-hq-horizon) {
	position: relative;
	z-index: 1;
	display: block;
	width: min(var(--wide), calc(100% - 2 * var(--gutter)));
	height: 1px;
	margin: 0 auto !important;
	padding: 0;
	border: 0 !important;
	opacity: 1 !important;
	color: transparent;
	background: var(--hairline-horizon);
	overflow: visible;
}
:is(.hq-horizon, .is-style-hq-horizon)::before {
	/* the horizon glow (wide, soft, rising) */
	content: "";
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 0;
	height: 120px;
	background: radial-gradient(50% 100% at 50% 100%, rgba(151, 71, 255, .3), rgba(151, 71, 255, .08) 55%, transparent 80%);
	pointer-events: none;
}
:is(.hq-horizon, .is-style-hq-horizon)::after {
	/* cyan bloom on the bright centre */
	content: "";
	position: absolute;
	left: 50%;
	top: -10px;
	width: 260px;
	height: 21px;
	translate: -50% 0;
	background: radial-gradient(50% 50% at 50% 50%, var(--cyan-35), transparent 75%);
	pointer-events: none;
}

/* Bottom-of-viewport veil (intellix): content softens as it reaches the bottom edge. Added by site.js once per page,
   hidden at the end of the page, on phones and with reduced transparency. */
.hq-veil {
	position: fixed;
	inset: auto 0 0;
	z-index: 50;
	height: 72px;
	pointer-events: none;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	-webkit-mask: linear-gradient(to top, #000 15%, transparent);
	mask: linear-gradient(to top, #000 15%, transparent);
	transition: opacity var(--d-3) var(--ease);
}
.hq-veil.is-end { opacity: 0; }
@media (max-width: 781px), (prefers-reduced-transparency: reduce) { .hq-veil { display: none; } }

/* Neon edge: a lit tube on the top edge with its glow falling inside (CTA panels, open FAQ) */
.hq-neon { position: relative; isolation: isolate; }
.hq-neon::after {
	content: "";
	position: absolute;
	inset: -1px 12% auto;
	height: 1px;
	background: linear-gradient(90deg, transparent, #c4adff 30%, #fff 50%, #c4adff 70%, transparent);
	box-shadow: 0 0 14px 1px rgba(151, 71, 255, .9), 0 0 48px 6px rgba(151, 71, 255, .35);
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Reduced transparency (OS setting): solid glass, same contrast, no backdrop blur */
@media (prefers-reduced-transparency: reduce) {
	:root { --glass-bg: rgba(22, 13, 44, .97); --glass-bg-strong: var(--c-surface-2); --glass-blur: none; }
}

/* phase 4: one prose measure everywhere (sections, cards, panels, FAQ answers, posts); components that set their own
   max-width win (zero specificity here). Headings balance, paragraphs avoid orphans. */
:where(.hq-section, .hq-card, .hq-prose, .hq-post, .hq-faq__a, .hq-tab, .hq-tabs__item) :where(p, li) { max-width: var(--measure-prose); }
:where(.has-text-align-center, .hq-head:not(.hq-head--left)) > :where(p) { margin-inline: auto; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p, li) { text-wrap: pretty; }
:where(.hq-head--left, .hq-head--split) > .hq-section-title { max-width: 20ch; }

/* phase 4: ONE photo treatment for raster photos in cards (blog cards, post hero, about team, profile portrait):
   slightly muted, a 12% violet tint in the shadows (multiply) and a 1px cyan rim on the mount. Step / rail images from
   the old site are lavender bitmaps: they get the duotone variant (grey, then multiplied into violet: dark shadows,
   lavender highlights) so they stop reading as flat slabs. Home pillars keep the lightest version (rim + shadow only,
   Milan asked for untinted pillar photos in v4). Maps keep their own vignette; screenshots/report images untouched. */
:root {
	--photo-filter: saturate(.85) contrast(1.05);
	--photo-tint: rgba(76, 29, 149, .12);
	--photo-rim: inset 0 0 0 1px rgba(103, 232, 249, .22);
	--photo-duo: #9b7be8;
}
