/* Afterglow: only what theme.json cannot express. Colors come from theme.json presets only. */

:root {
	--ag-header-h: var(--wp--custom--header-height--mobile);
	--ag-gutter: var(--wp--style--root--padding-left, 1.5rem);
	--ag-header-pad: var(--ag-gutter);
	--ag-focus: var(--wp--preset--color--purple-light);
	--ag-scrim: var(--wp--preset--color--base);
	--ag-scrim-deep: var(--wp--preset--color--purple-deep);
}
@media (min-width: 1024px) {
	:root { --ag-header-h: var(--wp--custom--header-height--desktop); }
}
@media (min-width: 768px) {
	:root { --ag-header-pad: clamp(1.25rem, 2.5vw, 3rem); }
}
@media (min-width: 768px) {
	:root { --ag-gutter: clamp(1.25rem, 4vw, 4.5rem); --wp--style--root--padding-left: var(--ag-gutter); --wp--style--root--padding-right: var(--ag-gutter); }
}

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
body { padding-inline: 0; overflow-x: clip; }
.wp-site-blocks { padding-inline: 0; }
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
.wp-block-group.ag-main { padding-inline: 0; }
main { font-optical-sizing: auto; }
h1, h2, h3, h4, .ag-logo, .ag-footer__wordmark { font-synthesis: none; }

:where(a, button, summary, input, [tabindex]):focus-visible,
dialog:focus-visible {
	outline: 3px solid var(--ag-focus);
	outline-offset: 3px;
	border-radius: 0;
}

.is-hidden { display: none !important; }

/* ---------- Sections ---------- */
/* Bands alternate: base (#intro, #approach, #faq), purple-deep (#services, #about, footer) via the block's backgroundColor. */
.ag-section {
	padding-block: var(--wp--preset--spacing--70);
	padding-inline: var(--ag-gutter);
	scroll-margin-top: var(--ag-header-hc); /* after a jump the header is condensed; the section's own padding gives the air */
}
/* The label's measurements are shared by the section and its container: the section needs them for its scroll margin
   and for the air above the next label, the container for the paper. */
.ag-section, .ag-offset {
	--ag-tear: 40px; /* width of a torn-edge band (the edge images are 40 px across); the tear line runs through its middle */
	--ag-paper-pad-y: 0.875rem; /* paper above the slugline and below the action line, to the tear line; clears the deepest tear (13 px) */
	--ag-paper-edge: calc(var(--ag-paper-pad-y) + var(--ag-tear) / 2);
	/* Height of the label's text block, slugline top to action-line bottom. afterglow.js measures it (wrapping changes
	   it on phones and while fonts load) and writes --ag-label-t on the section. Without script this is the two-line
	   case: slugline, the 0.375rem gap and two action lines, each 1.0625rem at 1.4. It is exact from 600px up. */
	--ag-label-est: calc(1.0625rem * 1.4 * 3 + 0.375rem);
	/* The paper's visible height between its top and bottom tear lines. --ag-seam-share of it (10%) sits above the
	   seam and the rest below, so the label hangs only a little over what is above. --ag-seam-up is how far the
	   paper's top edge (the top of the tear band) is above the seam: half a tear band plus that share of the height. */
	--ag-seam-share: 0.1;
	--ag-label-h: calc(var(--ag-label-t, var(--ag-label-est)) + 2 * var(--ag-paper-pad-y));
	--ag-seam-up: calc(var(--ag-tear) / 2 + var(--ag-label-h) * var(--ag-seam-share));
}
/* A section that opens with the paper label needs less air above it: the label marks the start. Between 600px and
   620px the label's torn band runs past the screen edge; clipping it here keeps it out of the page's scroll width. */
.ag-section:has(.ag-offset) { padding-block-start: var(--wp--preset--spacing--60); overflow-x: clip; }
/* Seam sections: every labelled section. Their label is not below the section's top edge but over it: 10% of the
   paper (between the tear lines, --ag-seam-share) is above the seam with whatever is above, 90% below. The first
   label (#intro) has its top tear line on the seam with the hero (share 0, set on its container below).
   The padding goes to 0 and the container's negative margin (below) pulls the label up. A plain section gets
   flow-root so that margin stays inside the section instead of collapsing through its top edge (overflow: clip does
   not do that); the Cover block (#book) is a flex container, whose items already are their own formatting context.
   Its overflow must stay visible vertically, or the overhang would be cut off. --ag-seam is the flag afterglow.js
   reads, so this selector stays the one place that says which sections are seams. */
.ag-section:has(.ag-offset) {
	--ag-seam: 1;
	padding-block-start: 0;
	overflow-y: visible;
	/* After a jump the whole top tear of the label must show under the condensed header, with a little air (6px, since
	   the browser rounds the scroll position). The label reaches --ag-seam-up above the section's top edge. */
	scroll-margin-top: calc(var(--ag-header-hc) + var(--ag-seam-up) + 6px);
}
.ag-section:has(.ag-offset):not(.wp-block-cover) { display: flow-root; }
/* The label hangs 10% of its height over the end of whatever is above. Give a section above the same air under
   its last content that every section has (spacing-70), counted from the label's top tear line: spacing-70 plus that
   10%. --ag-after-seam is 1 when a seam section follows (afterglow.js sets it, skipping hidden sections; the
   selectors give nearly the same answer before script runs, or without it: :has() cannot nest, so they cannot ask
   whether the next section has a label) and --ag-next-label-t is that section's text block height. The still band
   takes none: the label sits on the photo's faded edge on purpose. */
.ag-section {
	padding-block-end: calc(var(--wp--preset--spacing--70) + var(--ag-after-seam, 0) * (var(--ag-next-label-t, var(--ag-label-est)) + 2 * var(--ag-paper-pad-y)) * var(--ag-seam-share));
}
.ag-section:has(+ .ag-section:not(.is-hidden, #intro)),
.ag-section:has(+ .is-hidden + .ag-section:not(.is-hidden, #intro)) { --ag-after-seam: 1; }
.ag-measure { max-width: 42rem; }
.ag-section__cta { margin-block-start: var(--wp--preset--spacing--60) !important; }
#top { scroll-margin-top: 0; }

/* Screenplay slugline (scene heading): "1  INT. AFTERGLOW CREATIVE - DAY", set in Cutive Mono.
   It is its own row at the top of the section container and never wraps from 480px up. */
.ag-slate {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1.0625rem;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}
.ag-slate__num { margin-inline-end: 1.25ch; }
.ag-slate, .ag-step__num, .ag-role { font-synthesis: none; }
/* Below 480px the longest slugline cannot fit one line at >=16px: wrap, with a hanging indent so
   wrapped text lines up after the scene number (1 digit + 1.25ch gap + letter-spacing). */
@media (max-width: 479.98px) {
	.ag-slate {
		white-space: normal;
		padding-inline-start: calc(2.25ch + 0.04em);
		text-indent: calc(-2.25ch - 0.04em);
	}
}

/* Section container. A thin line marks the start of each section; the slugline and the action line sit on a torn
   paper label laid over that line, 10% of the paper above it and 90% below, covering it on the left. The label starts
   off the left screen edge and ends in a torn edge 600px across; the action line wraps to two lines. The content
   follows below the label. The line is the section's top edge; the first label's top tear line lies on it. */
.ag-offset {
	--ag-offset-gap: var(--wp--preset--spacing--50);
	--ag-paper-pad-x: 1.75rem; /* the least paper right of the text, to the tear line */
	/* From the text's left edge to the screen's left edge: the section gutter, or more once the content column
	   (the wide size) is narrower than the screen. Overshoot on screens with a scrollbar is clipped by body. */
	--ag-paper-bleed: max(var(--ag-gutter), (100vw - var(--wp--style--global--wide-size)) / 2);
	/* Where the torn right edge sits, measured from the screen's left edge. On screens wider than about 1565px the
	   content column is centred, the paper bleeds further left, and the label grows by that extra margin so the text
	   keeps the same room. Keep the phone breakpoint below equal to this (a media query can't read a variable). */
	--ag-label-reach: 600px;
	--ag-tear-top: url(../img/paper-tear-top.webp);
	--ag-tear-bottom: url(../img/paper-tear-bottom.webp);
	--ag-rim-top: url(../img/paper-rim-top.webp);
	--ag-rim-bottom: url(../img/paper-rim-bottom.webp);
	--ag-tear-top-x: 0px;
	--ag-tear-bottom-x: 0px;
	--ag-tear-right: url(../img/paper-tear-right.webp);
	--ag-rim-right: url(../img/paper-rim-right.webp);
	--ag-tear-right-y: 0px;
	position: relative;
	z-index: 0; /* a stacking context: the paper (z-index -1) sits between the section and the text */
	display: grid;
	/* Column 1 is the label's text column: it ends --ag-paper-pad-x short of the tear line. Everything else spans both. */
	grid-template-columns: min(calc(var(--ag-label-reach) - var(--ag-gutter) - var(--ag-paper-pad-x)), 100%) minmax(0, 1fr);
	row-gap: var(--ag-offset-gap);
	text-align: left;
}
.ag-offset > * { margin: 0; grid-column: 1 / -1; }
/* Both lines are black on the paper whatever color the block carries (the block keeps a light color, so the
   text stays readable in the editor, which has no paper). */
.ag-offset > .ag-slate,
.ag-offset > .ag-action { grid-column: 1; color: var(--wp--preset--color--base) !important; }
.ag-offset > .ag-slate { margin-block-end: calc(0.375rem - var(--ag-offset-gap)); }
/* Action line: the screenplay's scene description. It caps at 40 characters a line (the label's text column is
   wider than that at every screen width that shows a label), so an action line of up to 80 characters takes two lines. */
.ag-offset > .ag-action {
	max-width: 40ch;
	text-wrap: pretty;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1.0625rem;
	font-weight: 400;
	line-height: 1.4;
	font-synthesis: none;
}
/* Below the label: its bottom tear, then some air before the heading. */
.ag-offset > .ag-action + *,
.ag-offset > .ag-slate + :not(.ag-action) { margin-block-start: calc(var(--ag-paper-edge) + 0.5rem - var(--ag-offset-gap)); }
/* The paper. An absolutely positioned grid item takes its grid area as its containing block, so the paper spans
   rows 1-2 (slugline and action line) in column 1, plus its insets: the bleed to the screen edge on the left, the
   padding and half a tear band elsewhere. Its mask is the label's silhouette: torn top + body + torn bottom added
   together, then intersected with the torn right end (one image, opaque to the left of the tear). The rim images
   whiten the fibrous band a tear exposes. Being absolutely positioned also lets axe see that a pseudo-element sits
   behind the text instead of misjudging black on the dark section; test:contrast checks base on paper. */
.ag-offset::before {
	content: "";
	position: absolute;
	z-index: -1;
	grid-column: 1 / span 1; /* explicit spans: for an absolutely positioned item an auto end line means the container's edge */
	grid-row: 1 / span 2;
	inset: calc(-1 * var(--ag-paper-edge)) calc(-1 * (var(--ag-paper-pad-x) + var(--ag-tear) / 2)) calc(-1 * var(--ag-paper-edge)) calc(-1 * var(--ag-paper-bleed));
	pointer-events: none;
	background:
		var(--ag-rim-right) right var(--ag-tear-right-y) / var(--ag-tear) 400px repeat-y,
		var(--ag-rim-top) var(--ag-tear-top-x) 0 / 1200px var(--ag-tear) repeat-x,
		var(--ag-rim-bottom) var(--ag-tear-bottom-x) 100% / 1200px var(--ag-tear) repeat-x,
		url(../img/paper-grain.svg) 0 0 / 240px 240px,
		var(--wp--preset--color--paper);
	-webkit-mask:
		var(--ag-tear-right) right var(--ag-tear-right-y) / 1400px 400px repeat-y,
		var(--ag-tear-top) var(--ag-tear-top-x) 0 / 1200px var(--ag-tear) repeat-x,
		linear-gradient(#000 0 0) 0 calc(var(--ag-tear) - 1px) / 100% calc(100% - 2 * var(--ag-tear) + 2px) no-repeat,
		var(--ag-tear-bottom) var(--ag-tear-bottom-x) 100% / 1200px var(--ag-tear) repeat-x;
	-webkit-mask-composite: source-in, source-over, source-over, source-over;
	mask:
		var(--ag-tear-right) right var(--ag-tear-right-y) / 1400px 400px repeat-y,
		var(--ag-tear-top) var(--ag-tear-top-x) 0 / 1200px var(--ag-tear) repeat-x,
		linear-gradient(#000 0 0) 0 calc(var(--ag-tear) - 1px) / 100% calc(100% - 2 * var(--ag-tear) + 2px) no-repeat,
		var(--ag-tear-bottom) var(--ag-tear-bottom-x) 100% / 1200px var(--ag-tear) repeat-x;
	mask-composite: intersect, add, add, add;
}
.ag-offset:not(:has(> .ag-action))::before { grid-row: 1 / span 1; }
/* Below 600px (--ag-label-reach) the label would be wider than the screen, so the paper runs edge to edge as a
   divider (no right tear). At exactly 600px the label's tear line meets the screen edge, so nothing jumps. */
@media (max-width: 599.98px) {
	.ag-offset { --ag-tear-right: linear-gradient(#000 0 0); --ag-rim-right: none; grid-template-columns: minmax(0, 1fr); }
	.ag-offset::before { right: calc(-1 * var(--ag-paper-bleed)); }
}
/* Every label: it starts at the container's top, so the padding is just the paper above the text, and the negative
   margin lifts the container until the section's top edge, where the line (below) is, sits --ag-seam-share of the
   paper's height below its top tear line. (Not a child selector: in the Cover block the container sits inside the
   cover's inner wrapper.) */
.ag-section:has(.ag-offset) .ag-offset {
	border-top: 0;
	padding-top: var(--ag-paper-edge);
	margin-block-start: calc(-1 * var(--ag-seam-up));
}
/* The section line. It is an absolutely positioned item with automatic placement, so it spans the container's
   padding box (the content column) and its top is measured from the container's top: the same distance the margin
   lifted it, which lands it on the section's top edge whatever the text block measures. It paints below the paper (z-index -2 against the
   paper's -1), so only the part right of the torn edge shows. */
.ag-section:has(.ag-offset) .ag-offset::after {
	content: "";
	position: absolute;
	z-index: -2;
	top: var(--ag-seam-up);
	left: 0;
	right: 0;
	height: 1px;
	background: var(--wp--preset--color--border);
	pointer-events: none;
}
/* A label's bottom tear and the next label's top tear share an x offset: the two halves of one tear. The first
   label's top tear and the last label's bottom tear have offsets of their own. */
/* The first label's top tear line lies on the seam with the hero: none of the paper above it but the tear itself.
   Set on the container only: the section's own share sizes the room #intro leaves at its bottom for the next label,
   which hangs 10% over it. */
#intro .ag-offset { --ag-seam-share: 0; --ag-tear-top-x: -440px; --ag-tear-bottom-x: -150px; }
#services .ag-offset { --ag-tear-top-x: -150px; --ag-tear-bottom-x: -560px; --ag-tear-right-y: -90px; }
#approach .ag-offset { --ag-tear-top-x: -560px; --ag-tear-bottom-x: -970px; --ag-tear-right-y: -180px; }
#about .ag-offset { --ag-tear-top-x: -970px; --ag-tear-bottom-x: -330px; --ag-tear-right-y: -270px; }
#faq .ag-offset { --ag-tear-top-x: -330px; --ag-tear-bottom-x: -760px; --ag-tear-right-y: -40px; }
#book .ag-offset { --ag-tear-top-x: -760px; --ag-tear-bottom-x: -1080px; --ag-tear-right-y: -140px; }
.ag-offset__main > * { margin: 0; }
.ag-offset__main > * + * { margin-block-start: var(--wp--preset--spacing--40); }
/* Running paragraphs cap at a readable measure; headings and component layouts use the whole container. */
.ag-offset__main > p, .ag-offset__main p:where(:not(.ag-slate)) { max-width: 68ch; }
.ag-offset__main > h2 + * { margin-block-start: var(--wp--preset--spacing--60); }
.ag-offset__main > .ag-section__cta,
.ag-offset__wide > .ag-section__cta { margin-block-start: var(--wp--preset--spacing--60); }
@media (min-width: 1024px) {
	.ag-offset { --ag-offset-gap: var(--wp--preset--spacing--60); }
}

/* ---------- Buttons ---------- */
.wp-block-button__link,
.ag-faq summary {
	min-height: 2.75rem;
}
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	border-radius: 0;
	transition: filter 0.15s ease;
}
.wp-block-button__link.has-orange-background-color:hover { filter: brightness(1.08); }
.wp-block-button__link:focus-visible { outline: 3px solid var(--ag-focus); outline-offset: 3px; }
.wp-block-buttons { gap: 0.75rem; }

/* ---------- Header ---------- */
/* Frosted glass that fades into the page instead of ending on a line, built the way smooth glass headers usually
   are: a progressive blur under an eased tint.
   - .ag-header::before, the main pane: blur(16px) + saturation. It reaches --ag-header-fade below the bar, so its
     blur already takes in content about to slide under (Josh Comeau's extended-backdrop technique), and fades
     out over the first half of that zone.
   - .ag-header__inner::before / ::after: weaker blurs (6px, 2px) over the fade zone only, each fading out further
     down, so the blur eases off instead of cross-fading a sharp copy with a heavily blurred one.
   - .ag-header::after, the tint: base at 62% over the bar (white nav text keeps >=4.5:1 even over a pure-white
     pixel, see tests/contrast-pairs.json) plus a faint top sheen, faded out over the whole zone.
   Every fade follows an ease-in-out (cosine) curve in 10 steps rather than a linear ramp, whose start and end
   show as hard edges. --s is where a fade starts, --l its length.
   The glass is for the top of the page only. Once the page scrolls, afterglow.js sets html.ag-condensed and the
   header turns solid black: the blur layers and the sheen fade out (opacity), the tint goes to 100%
   (background-color) and its fade below the bar is clipped away, so the bar ends on a clean edge. At the same time
   the bar shortens to --ag-header-hc and the logo shrinks; a matching bottom margin keeps the page below from
   moving. These transitions sit on the
   pseudo-elements, never in the header's own transition list: WebKit drops the margin transition when a custom
   property shares that list, and the page then jumps while the bar shrinks. */
:root {
	--ag-header-hc: 3.25rem;
	--ag-header-now: var(--ag-header-h);
	--ag-header-fade: 3rem;
	--ag-header-ease: 0.3s cubic-bezier(0.2, 0, 0, 1);
}
@media (min-width: 1024px) {
	:root { --ag-header-hc: 3.5rem; }
}
html.ag-condensed { --ag-header-now: var(--ag-header-hc); }
.ag-header {
	position: sticky;
	top: 0;
	z-index: 50;
	transition: margin-bottom var(--ag-header-ease);
}
html.ag-condensed .ag-header { margin-bottom: calc(var(--ag-header-h) - var(--ag-header-hc)); }
.ag-header::before,
.ag-header::after,
.ag-header__inner::before,
.ag-header__inner::after {
	content: "";
	position: absolute; /* containing block: the sticky header (the inner row is not positioned) */
	inset: 0 0 calc(-1 * var(--ag-header-fade));
	z-index: -1;
	pointer-events: none;
	--ag-fade: linear-gradient(to bottom,
		#000 var(--s),
		rgb(0 0 0 / 0.976) calc(var(--s) + 0.1 * var(--l)),
		rgb(0 0 0 / 0.905) calc(var(--s) + 0.2 * var(--l)),
		rgb(0 0 0 / 0.794) calc(var(--s) + 0.3 * var(--l)),
		rgb(0 0 0 / 0.655) calc(var(--s) + 0.4 * var(--l)),
		rgb(0 0 0 / 0.5) calc(var(--s) + 0.5 * var(--l)),
		rgb(0 0 0 / 0.345) calc(var(--s) + 0.6 * var(--l)),
		rgb(0 0 0 / 0.206) calc(var(--s) + 0.7 * var(--l)),
		rgb(0 0 0 / 0.095) calc(var(--s) + 0.8 * var(--l)),
		rgb(0 0 0 / 0.024) calc(var(--s) + 0.9 * var(--l)),
		rgb(0 0 0 / 0) calc(var(--s) + var(--l)));
	-webkit-mask-image: var(--ag-fade);
	mask-image: var(--ag-fade);
}
.ag-header::before,
.ag-header__inner::before,
.ag-header__inner::after { transition: opacity var(--ag-header-ease); }
html.ag-condensed .ag-header::before,
html.ag-condensed .ag-header__inner::before,
html.ag-condensed .ag-header__inner::after { opacity: 0; }
.ag-header::before {
	--s: calc(100% - var(--ag-header-fade));
	--l: calc(var(--ag-header-fade) / 2);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	/* The sheen sits under the tint here (so 18% reads as about 7%) and fades out with the glass. */
	background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) var(--ag-header-now));
}
.ag-header__inner::before,
.ag-header__inner::after {
	top: calc(var(--ag-header-now) - 1px); /* the fade zone only */
	--s: calc(var(--ag-header-fade) * 0.3);
	--l: calc(var(--ag-header-fade) * 0.5);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.ag-header__inner::after {
	--s: calc(var(--ag-header-fade) * 0.5);
	--l: calc(var(--ag-header-fade) * 0.5);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}
.ag-header::after {
	--s: calc(100% - var(--ag-header-fade));
	--l: var(--ag-header-fade);
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 62%, transparent);
	clip-path: inset(0 0 0 0);
	transition: background-color var(--ag-header-ease), clip-path var(--ag-header-ease);
}
html.ag-condensed .ag-header::after {
	background-color: var(--wp--preset--color--base);
	clip-path: inset(0 0 var(--ag-header-fade) 0); /* the bar only: no fade below it */
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.ag-header::after { background-color: color-mix(in srgb, var(--wp--preset--color--base) 90%, transparent); }
}
/* Full-bleed row: logo hugs the left padding, "Book a call" the right one. */
.ag-header__inner {
	height: var(--ag-header-now);
	box-sizing: border-box;
	max-width: none;
	width: 100%;
	margin-inline: 0;
	padding-inline: var(--ag-header-pad);
	gap: 0.5rem;
	transition: height var(--ag-header-ease);
}
.ag-logo { margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1; margin-right: auto; white-space: nowrap; transition: font-size var(--ag-header-ease); }
.ag-logo a { color: var(--wp--preset--color--contrast); text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; }
html.ag-condensed .ag-logo { font-size: 1rem; }
.ag-header__cta { order: 2; margin: 0; }
.ag-header__cta .wp-block-button__link { padding: 0.5rem 1rem; font-size: 1rem; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
	.ag-header, .ag-header__inner, .ag-logo,
	.ag-header::before, .ag-header::after, .ag-header__inner::before, .ag-header__inner::after { transition: none; }
}

/* Navigation block (core). Inline links from 1024px; below that only the menu button shows. Core collapses
   at 600px; links + logo + CTA don't fit between 600 and 1023, so the collapse is stretched to 1024 here with
   the same two switches core uses. Specificity is deliberately higher than core's block stylesheet so load
   order doesn't matter. */
.ag-header nav.ag-nav { order: 3; flex: none; margin: 0; }
.ag-header nav.ag-nav .wp-block-navigation__container { gap: 0.25rem; }
.ag-header nav.ag-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-weight: 500;
}
/* Header sits over video at 62% alpha: hover keeps contrast text (5.37:1 worst case); purple goes in the underline, not the text. */
.ag-header nav.ag-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--purple-light);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}
.ag-header nav.ag-nav .wp-block-navigation__responsive-container-open,
.ag-header nav.ag-nav .wp-block-navigation__responsive-container-close {
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}
.ag-header nav.ag-nav .wp-block-navigation__responsive-container-close { display: flex; }

@media (max-width: 1023.98px) {
	/* Below 1024 the row is menu button | logo | Book a call. The 1fr auto 1fr grid puts the logo at the true
	   centre whenever both sides fit; on the narrowest phones it centres in the space between them. */
	.ag-header .ag-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 0.5rem; }
	.ag-header nav.ag-nav { grid-row: 1; grid-column: 1; justify-self: start; }
	.ag-header .ag-header__inner > .ag-logo { grid-row: 1; grid-column: 2; margin: 0; }
	.ag-header .ag-header__inner > .ag-header__cta { grid-row: 1; grid-column: 3; justify-self: end; margin: 0; }
	/* Collapsed: core's inline list stays hidden until the menu is open. */
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container-open { display: flex; }

	/* Open: a dropdown panel under the header (not full screen). The close button sits where the open button was. */
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container.is-menu-open {
		top: var(--ag-header-now);
		bottom: auto;
		height: auto;
		max-height: calc(100vh - var(--ag-header-now));
		max-height: calc(100dvh - var(--ag-header-now));
		padding: 0.5rem var(--ag-gutter) 1rem;
		border-bottom: 1px solid var(--wp--preset--color--border);
		overflow: visible;
		animation: none;
	}
	.ag-header nav.ag-nav .wp-block-navigation__responsive-close,
	.ag-header nav.ag-nav .wp-block-navigation__responsive-dialog { max-width: var(--wp--style--global--wide-size); margin-inline: auto; width: 100%; }
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container-close {
		top: calc(var(--ag-header-now) / -2 - 1.875rem); /* centres the button on the header row (panel top is the header's height, padding-top 0.5rem) */
		right: auto;
		left: calc(var(--ag-header-pad) - var(--ag-gutter));
		z-index: 2;
	}
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 0; }
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__container { gap: 0; width: 100%; }
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item { width: 100%; }
	.ag-header nav.ag-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content { width: 100%; padding: 0 0.25rem; font-size: 1.125rem; }
	html.has-modal-open .ag-header nav.ag-nav .wp-block-navigation__responsive-container-open { opacity: 0; }
	/* No JS: the menu button can't work, so the links take a second row and the header grows. */
	html:not(.js) .ag-header__inner { height: auto; padding-block: 0.25rem; }
	html:not(.js) .ag-header nav.ag-nav { grid-row: 2; grid-column: 1 / -1; width: 100%; }
	html:not(.js) .ag-header nav.ag-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: block; position: relative; width: 100%; background: transparent; }
	html:not(.js) .ag-header nav.ag-nav .wp-block-navigation__responsive-container-open,
	html:not(.js) .ag-header nav.ag-nav .wp-block-navigation__responsive-container-close { display: none; }
}
@media (min-width: 1024px) {
	.ag-header__cta { order: 3; margin-left: 0.75rem; }
	.ag-logo { margin-right: 0; }
	.ag-header nav.ag-nav { order: 1; margin-inline: auto; }
	.ag-logo { font-size: 1.25rem; }
	html.ag-condensed .ag-logo { font-size: 1.125rem; }
	.ag-header__cta .wp-block-button__link { padding: 0.6rem 1.25rem; }
}
/* Below 480px "Book a call" is too wide for a true-centre logo, so the logo centres between the two buttons
   (equal gaps) and steps down a size. */
@media (max-width: 479.98px) {
	.ag-header .ag-header__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
	.ag-header .ag-header__inner > .ag-logo { justify-self: center; font-size: 1rem; }
	html.ag-condensed .ag-header .ag-header__inner > .ag-logo { font-size: 0.9375rem; }
}
@media (max-width: 380px) {
	.ag-header .ag-header__inner > .ag-logo { font-size: 0.9375rem; }
	html.ag-condensed .ag-header .ag-header__inner > .ag-logo { font-size: 0.875rem; }
	.ag-header__cta .wp-block-button__link { padding: 0.5rem 0.75rem; }
}

/* ---------- Hero ---------- */
.wp-block-cover.ag-hero {
	min-height: 100vh;
	min-height: 100svh;
	margin-top: calc(var(--ag-header-h) * -1);
	padding: calc(var(--ag-header-h) + var(--wp--preset--spacing--60)) var(--ag-gutter) var(--ag-gutter);
	align-items: flex-end;
	justify-content: flex-start;
	position: relative;
	isolation: isolate;
	background: var(--wp--preset--color--base);
	container-type: inline-size; /* cqw = the hero's content width (viewport minus gutters), scrollbar-safe */
}
.ag-hero .wp-block-cover__video-background { object-fit: cover; z-index: -2; }
/* Light veil over the whole frame plus a bottom-up gradient toward purple-deep so the wordmark reads over bright footage. */
.ag-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(to top, color-mix(in srgb, var(--ag-scrim-deep) 92%, transparent) 0%, color-mix(in srgb, var(--ag-scrim-deep) 62%, transparent) 24%, transparent 58%),
		linear-gradient(color-mix(in srgb, var(--ag-scrim) 22%, transparent), color-mix(in srgb, var(--ag-scrim) 22%, transparent));
}
.ag-hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: none;
	margin: 0;
	position: relative;
	z-index: 1;
}
/* "Welcome to" rides on top of the wordmark: its left edge lines up with the left point of the A's apex, and its
   bottom sits just above the capital letters' top edge. --ag-wm is the wordmark's font size; AFTERGLOW spans the
   hero's content width, 6.99 = the word's advance width in em (Marion Bold), so 100cqw / 6.99 fills the line.
   Measured on Marion Bold: the A's apex starts 0.328em after the line's left edge (its topmost ink);
   cap tops sit 0.046em below the top of the 0.8-line-height box. Both scale with --ag-wm,
   so the relationship holds at every width. Two text blocks ("Welcome to", "Afterglow") read in order as one phrase. */
.ag-hero-title { --ag-wm: calc(100cqw / 6.99); margin: 0; }
.ag-hero-title > .ag-hero-welcome {
	display: block;
	margin: 0 0 calc(0.2em - 0.046 * var(--ag-wm)) calc(0.328 * var(--ag-wm));
	font-family: var(--wp--preset--font-family--body);
	font-size: clamp(1.125rem, 2vw, 1.75rem);
	font-weight: 500;
	line-height: 1.1;
	color: var(--wp--preset--color--contrast);
}
.ag-hero-title > .ag-hero-wordmark {
	display: block;
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0;
	line-height: 0.8;
	white-space: nowrap;
	color: var(--wp--preset--color--contrast);
	font-size: calc((100vw - 2 * var(--ag-gutter)) / 7.1);
	font-size: var(--ag-wm);
}

.ag-hero-toggle {
	display: none;
	position: absolute;
	z-index: 2;
	top: calc(var(--ag-header-h) + var(--ag-header-fade) + 0.5rem); /* below the header's glass and its fade */
	right: var(--ag-header-pad);
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 0;
	background: color-mix(in srgb, var(--wp--preset--color--base) 70%, transparent);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}
.js .ag-hero-toggle { display: inline-flex; }
.ag-hero-toggle:hover { background: var(--wp--preset--color--surface-raised); }
.ag-hero-toggle[aria-pressed="false"] .ag-icon-play,
.ag-hero-toggle[aria-pressed="true"] .ag-icon-pause { display: none; }

/* ---------- Intro ---------- */
.ag-intro__h1 { max-width: none; text-wrap: balance; }
@media (min-width: 1024px) {
	.ag-intro__h1 { font-size: clamp(3.25rem, 1rem + 4.2vw, 5.5rem); line-height: 1.02; }
}
.ag-offset__main > .ag-intro__statement { max-width: 52ch; }
.ag-offset__main > .ag-intro__actions { margin-block-start: var(--wp--preset--spacing--60); }

/* ---------- Services ---------- */
.ag-services-grid.ag-services-grid { grid-template-columns: 1fr; gap: var(--wp--preset--spacing--50); }
@media (min-width: 600px) { .ag-services-grid.ag-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ag-services-grid.ag-services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--wp--preset--spacing--50); } }
.ag-service-card {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	border-radius: 0;
}
.ag-service-card > * { margin: 0; }
.ag-service-card figure { margin: 0; }
.ag-service-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 0;
}
.ag-service-card h3 { font-size: var(--wp--preset--font-size--large); margin-top: var(--wp--preset--spacing--20); }
.ag-offset__wide > .ag-services-grid + .ag-section__cta { margin-block-start: var(--wp--preset--spacing--60); }

/* ---------- Widescreen still (2.39:1) ---------- */
.ag-stillband { padding-block: 0; }
/* The still fades into black at its bottom edge; the next section's label sits centred on that edge. */
.ag-stillband > * { margin: 0; }
.ag-letterbox { margin: 0; width: 100%; }
.ag-letterbox { position: relative; }
/* Subtle purple grade on the still only (not the service tiles): a purple-deep multiply layer at low opacity. */
.ag-letterbox::after { content: ""; position: absolute; inset: 0; background: var(--wp--preset--color--purple-deep); mix-blend-mode: multiply; opacity: 0.35; pointer-events: none; }
.ag-letterbox img { display: block; width: 100%; height: auto; aspect-ratio: 2.39 / 1; object-fit: cover; border-radius: 0; }

/* ---------- Approach ---------- */
.ag-steps { list-style: none; margin: 0; padding: 0; }
.ag-offset__main > .ag-steps { margin-block-start: var(--wp--preset--spacing--50); }
.ag-steps > .ag-step { margin: 0; }
.ag-step {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	column-gap: var(--wp--preset--spacing--40);
	row-gap: var(--wp--preset--spacing--20);
	align-items: baseline;
	padding-block: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--border);
}
.ag-steps > .ag-step:last-child { border-bottom: 1px solid var(--wp--preset--color--border); }
.ag-step > * { margin: 0; }
.ag-step__num { grid-column: 1; font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--large); font-weight: 400; line-height: 1.2; color: var(--wp--preset--color--purple-light); font-variant-numeric: tabular-nums; }
.ag-step > h3 { grid-column: 2; }
.ag-step > p:last-child { grid-column: 2; }
@media (min-width: 768px) {
	.ag-step { grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.7fr); column-gap: var(--wp--preset--spacing--50); row-gap: 0; }
	.ag-step > p:last-child { grid-column: 3; }
}
.ag-turnaround { color: var(--wp--preset--color--contrast); font-weight: 600; }

/* ---------- Founder ---------- */
/* Heading and role line sit directly under the slugline (full row); the portrait and the bio paragraph share the row below.
   The bio wrapper is display:contents so its children join the layout grid. */
.ag-founder__layout { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--wp--preset--spacing--60); align-items: start; }
.ag-founder__layout > *, .ag-founder__bio > * { margin: 0; }
.ag-founder__bio { display: contents; }
.ag-founder__bio > h2 { order: 1; grid-column: 1 / -1; }
.ag-founder__bio > .ag-role { order: 2; grid-column: 1 / -1; margin-block-start: var(--wp--preset--spacing--30); }
.ag-founder__layout > .ag-founder__photo { order: 3; margin-block-start: var(--wp--preset--spacing--50); max-width: 22rem; }
.ag-founder__bio > p:not(.ag-role) { order: 4; margin-block-start: var(--wp--preset--spacing--50); max-width: 68ch; }
.ag-founder__photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0; }
@media (min-width: 768px) {
	.ag-founder__layout { grid-template-columns: minmax(0, min(26rem, 42%)) minmax(0, 1fr); }
	.ag-founder__layout > .ag-founder__photo { max-width: none; }
}
.ag-role { margin: 0; font-family: var(--wp--preset--font-family--mono); font-weight: 400; letter-spacing: 0.02em; }
.ag-role strong { font-weight: 400; }

/* ---------- Testimonials ---------- */
.ag-quote-grid.ag-quote-grid { grid-template-columns: 1fr; gap: var(--wp--preset--spacing--50); }
@media (min-width: 768px) { .ag-quote-grid.ag-quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ag-quote { margin: 0; padding: 0 0 0 var(--wp--preset--spacing--50); border: 0; border-left: 1px solid var(--wp--preset--color--border); border-radius: 0; }
.ag-quote p { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); line-height: 1.35; }
.ag-quote cite { color: var(--wp--preset--color--muted); font-style: normal; }

/* ---------- FAQ ---------- */
.ag-faq__list { max-width: none; }
.ag-faq__list > * { margin: 0; }
.ag-faq .wp-block-details { border-bottom: 1px solid var(--wp--preset--color--border); border-radius: 0; padding: 0; }
.ag-faq .wp-block-details:first-child { border-top: 1px solid var(--wp--preset--color--border); }
.ag-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0;
	min-height: 3.5rem;
	cursor: pointer;
	font-weight: 600;
	list-style: none;
}
.ag-faq summary::-webkit-details-marker { display: none; }
.ag-faq summary:hover { color: var(--wp--preset--color--purple-light); }
.ag-faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--purple-light); flex: none; }
.ag-faq details[open] summary::after { content: "\2212"; }
.ag-faq details > :not(summary) { padding-bottom: var(--wp--preset--spacing--40); margin: 0; }

/* ---------- Booking (photo-backed; seeded overlay is 80% purple-deep, see patterns/booking.php) ---------- */
.wp-block-cover.ag-book {
	min-height: 0;
	align-items: flex-start;
	isolation: isolate;
	background: var(--wp--preset--color--base);
	border-radius: 0;
}
/* The overlay is the Cover block's own setting (seeded: purple-deep at 80%), so the editor slider works.
   tests/contrast-pairs.json proves text contrast on #book for that default over the worst-case (white) photo pixel. */
.ag-book .wp-block-cover__inner-container { width: 100%; max-width: none; margin: 0; }
.ag-book .ag-offset { max-width: var(--wp--style--global--wide-size); margin-inline: auto; }
.ag-book__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--wp--preset--spacing--50); align-items: start; }
.ag-book__cols > * { margin: 0; }
.ag-book__text > * + * { margin-block-start: var(--wp--preset--spacing--40); }
.ag-book__text > h2 + * { margin-block-start: var(--wp--preset--spacing--50); }
@media (min-width: 1024px) {
	.ag-book__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--wp--preset--spacing--60); }
	.ag-book__cols > .ag-booking-embed { grid-column: 2; grid-row: 1; }
}
/* Collapsed (no box, no height) until the iframe is injected on click. */
.ag-booking-embed { display: none; }
@media (min-width: 480px) {
	.ag-booking-embed:not(:empty) {
		display: block;
		background: var(--wp--preset--color--surface);
		border: 1px solid var(--wp--preset--color--border);
		border-radius: 0;
		overflow: hidden;
	}
}
/* Google's booking page is transparent with dark text, so the frame gets Google's own page white (#fff); this is not a brand colour, so it is not a theme.json token. Pure #fff is deliberate: Google's time-slot panels are #fff, so an off-white like the contrast token would show seams. */
.ag-booking-embed iframe { display: block; width: 100%; height: 40rem; border: 0; background-color: #fff; }

/* Links inside #book stay plain contrast colour: the muted and contrast pairs are verified against the overlay (contrast-pairs.json). */
.ag-book a:not(.wp-block-button__link) { color: var(--wp--preset--color--contrast); text-decoration: underline; text-underline-offset: 0.2em; }
.ag-book a:not(.wp-block-button__link):hover { color: var(--wp--preset--color--contrast); text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */
.ag-footer { border-top: 1px solid var(--wp--preset--color--border); background: var(--wp--preset--color--purple-deep); color: var(--wp--preset--color--muted); font-size: 0.9375rem; }
.ag-footer__inner { max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--ag-gutter)); margin-inline: auto; padding-inline: var(--ag-gutter) !important; padding-block: var(--wp--preset--spacing--40) !important; }
.ag-footer__row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem 1.5rem; }
.ag-footer__row > *, .ag-footer__line > * { margin: 0; }
.ag-footer p { margin: 0; }
.ag-footer__line { display: flex; align-items: center; min-height: 2.75rem; flex-wrap: wrap; gap: 0 0.5rem; }
.ag-footer p.ag-footer__wordmark { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1rem; color: var(--wp--preset--color--muted); }
.ag-footer nav.ag-footer__nav { display: flex; flex-wrap: wrap; align-items: center; color: var(--wp--preset--color--muted); font-size: inherit; }
.ag-footer nav.ag-footer__nav .wp-block-navigation__container { column-gap: 1rem; row-gap: 0; }
.ag-footer a,
.ag-footer nav .wp-block-navigation-item__content.wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding-inline: 0.5rem;
	margin-inline: -0.5rem;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}
.ag-footer nav .wp-block-navigation-item__content.wp-block-navigation-item__content { margin-inline: 0; }
.ag-footer a:hover,
.ag-footer nav .wp-block-navigation-item__content.wp-block-navigation-item__content:hover { color: var(--wp--preset--color--purple-light); text-decoration: underline; }
@media (min-width: 1024px) {
	.ag-footer__row { flex-direction: row; align-items: center; flex-wrap: wrap; column-gap: 2rem; }
	.ag-footer nav.ag-footer__spacer { margin-inline-start: auto; }
}

/* ---------- Pages ---------- */
.ag-page { min-height: 50vh; }
.ag-page h2 { margin-top: var(--wp--preset--spacing--60); font-size: var(--wp--preset--font-size--large); }

/* ---------- Reel dialog ---------- */
.ag-reel-dialog {
	padding: 0;
	border: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	width: min(92vw, 70rem);
	max-width: none;
	max-height: 96vh;
	border-radius: 0;
	overflow: visible;
}
.ag-reel-dialog::backdrop { background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent); }
.ag-reel-frame { aspect-ratio: 16 / 9; width: 100%; background: var(--wp--preset--color--base); border-radius: 0; overflow: hidden; }
.ag-reel-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.ag-reel-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 0;
	background: color-mix(in srgb, var(--wp--preset--color--base) 80%, transparent);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}
@media (min-width: 768px) {
	.ag-reel-close { top: -3.25rem; right: 0; }
}
@media (max-width: 767.98px) {
	.ag-reel-dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; margin: 0; max-width: 100vw; }
	.ag-reel-dialog[open] { display: flex; align-items: center; }
	.ag-reel-frame { border-radius: 0; }
}
