/**
 * TutsVela Theme: V4 design details that no Kadence control can express. Each section is applied by adding the class
 * in a block's Advanced › Additional CSS class(es) field, so the owner can switch it on or off in the editor.
 * Pattern and glow colours switch with the Theme Kit Pro Color Switch (dark palette on body.color-switch-dark).
 * Record: docs/v4/custom-code-audit.md (T15 to T26).
 */

/* Pattern and glow colours (V4 tokens --grid-dot and --glow): translucent tints of palette slots, so they follow the
 * Customizer. Light: palette 4 (#333333) at 10%; dark: palette 3 (#FFFFFF) at 8%, the V4 values. */
:root {
	--tv-grid-dot: color-mix(in srgb, var(--global-palette4) 10%, transparent);
	--tv-glow: color-mix(in srgb, var(--global-palette1) 20%, transparent);
	/* T26. Button shadow tints. The Customizer button shadows (Buttons and Header Button) keep their offsets and blur
	 * in Kadence; their colour field holds var(--tv-brand-shadow) or var(--tv-brand-shadow-hover), so the tint follows
	 * palette1. Why: Kadence's colour output rewrites any value containing "palette" (render_color), so a translucent
	 * palette colour cannot be entered in the Customizer itself. */
	--tv-brand-shadow: color-mix(in srgb, var(--global-palette1) 70%, transparent);
	--tv-brand-shadow-hover: color-mix(in srgb, var(--global-palette1) 80%, transparent);
}

body.color-switch-dark {
	--tv-grid-dot: color-mix(in srgb, var(--global-palette3) 8%, transparent);
	--tv-glow: color-mix(in srgb, var(--global-palette1) 24%, transparent);
}

/* T15. Background patterns. Why CSS: a Row Layout background cannot mask a pattern with a radial fade or change the
 * pattern colour with the Color Switch. Classes go on the Row Layout. */
.tv-bg-blueprint,
.tv-bg-dots,
.tv-bg-status {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.tv-bg-blueprint::before,
.tv-bg-dots::before,
.tv-bg-status::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}

/* V4 About hero (.svc-hero .blueprint.fade-mask): 40px line grid fading from the top. */
.tv-bg-blueprint::before {
	background-image: linear-gradient(var(--tv-grid-dot) 1px, transparent 1px), linear-gradient(90deg, var(--tv-grid-dot) 1px, transparent 1px);
	background-size: 40px 40px;
	-webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 75%);
	mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 75%);
}

/* V4 page header (.phead::before): 22px dot grid fading from the top right. */
.tv-bg-dots::before {
	background-image: radial-gradient(var(--tv-grid-dot) 1px, transparent 1.4px);
	background-size: 22px 22px;
	-webkit-mask-image: radial-gradient(80% 100% at 80% 0%, #000 20%, transparent 70%);
	mask-image: radial-gradient(80% 100% at 80% 0%, #000 20%, transparent 70%);
}

/* V4 Templates status pages (.ts-hero::before): 40px grid at 60% opacity, fading from the top centre. */
.tv-bg-status::before {
	background-image: linear-gradient(var(--tv-grid-dot) 1px, transparent 1px), linear-gradient(90deg, var(--tv-grid-dot) 1px, transparent 1px);
	background-size: 40px 40px;
	opacity: .6;
	-webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000 30%, transparent 75%);
	mask-image: radial-gradient(70% 90% at 50% 0%, #000 30%, transparent 75%);
}

/* T16. Glows (V4 .glow, .phead::after, .ts-hero::after). Soft orange light behind the hero, drawn as a pseudo-element
 * so it never affects layout. The About glow drifts slowly (V4 .glow animation drift 14s). */
.tv-bg-blueprint::after,
.tv-bg-dots::after,
.tv-bg-status::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
	border-radius: 50%;
}

.tv-bg-blueprint::after {
	width: 520px;
	height: 420px;
	right: -120px;
	top: -160px;
	background: var(--tv-glow);
	filter: blur(70px);
}

.tv-bg-dots::after {
	width: 520px;
	height: 420px;
	right: -120px;
	top: -200px;
	background: var(--tv-glow);
	filter: blur(80px);
}

.tv-bg-status::after {
	width: 620px;
	height: 420px;
	left: 50%;
	top: -240px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, color-mix(in srgb, var(--global-palette1) 20%, transparent), transparent);
}

/* T17. Section label rule (V4 .secno::after: a 48px hairline after "01 The founder"). Kadence Advanced Text has no
 * trailing rule. Class goes on the label's Advanced Text block. The highlighted word keeps its width
 * (flex: none) so a long label wraps between words on phones instead of breaking inside the highlight. */
.tv-secno {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tv-secno .kt-highlight {
	flex: none;
}

.tv-secno::after {
	content: "";
	flex: 0 0 48px;
	height: 1px;
	background: var(--global-palette6);
}

.tv-secno.tv-center {
	justify-content: center;
}

/* T18. Breadcrumbs (V4 .crumbs: 14px, muted, no underline, centred in page headers). The core Breadcrumbs block has no
 * alignment control. */
.wp-block-breadcrumbs.tv-crumbs {
	font-size: 14px;
	color: var(--global-palette5);
}

.wp-block-breadcrumbs.tv-crumbs ol {
	padding-left: 0;
	margin-left: 0;
}

.wp-block-breadcrumbs.tv-crumbs a {
	color: var(--global-palette5);
	text-decoration: none;
}

.wp-block-breadcrumbs.tv-crumbs a:hover {
	color: var(--global-palette10);
	text-decoration: underline;
}

.wp-block-breadcrumbs.tv-crumbs-center ol {
	justify-content: center;
}

/* T19. Hover motion (V4 a.card:hover lift 4px with the large shadow; primary button lift 1px; arrow nudge 3px).
 * Kadence has hover colours and borders (used) but no hover transforms. */
.tv-lift {
	transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s, border-color .2s;
}

.tv-lift:hover,
.tv-lift:focus-within {
	transform: translateY(calc(-1 * var(--tv-lift-distance, 4px)));
	box-shadow: 0 2px 4px rgba(20, 20, 20, .04), 0 24px 60px -16px rgba(20, 20, 20, .22);
}

.wp-block-kadence-singlebtn:not([class*="kb-preset--"]),
.wp-block-kadence-singlebtn.kb-preset--large {
	transition: transform .2s, box-shadow .2s, background-color .2s;
}

.wp-block-kadence-singlebtn:not([class*="kb-preset--"]):hover,
.wp-block-kadence-singlebtn.kb-preset--large:hover {
	transform: translateY(-1px);
}

.wp-block-kadence-singlebtn .kb-svg-icon-wrap {
	transition: transform .2s;
}

.wp-block-kadence-singlebtn:hover .kb-svg-icon-wrap {
	transform: translateX(3px);
}

/* T21. Timeline (V4 .tl2: orange centre line through the dot column; years at 55% opacity). The line runs through the
 * middle column of each timeline row; a column background cannot be limited to a 2px stripe on wider screens only. */
@media (min-width: 768px) {
	.tv-tl-line > .kt-row-column-wrap {
		background: linear-gradient(90deg, transparent calc(50% - 1px), var(--global-palette1) calc(50% - 1px), var(--global-palette1) calc(50% + 1px), transparent calc(50% + 1px));
	}
}

.tv-faint {
	opacity: .55;
}

/* T22. Archive source pills (V4 .tl-src: bordered pill link with the history icon). The pill is a link inside an
 * Advanced Text block; Advanced Text cannot draw an inline pill with an icon. */
.tv-src a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--global-palette7);
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--global-palette3);
	text-decoration: none;
	transition: border-color .15s;
}

.tv-src a::before {
	content: "";
	width: 14px;
	height: 14px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v4l3 2M3 12a9 9 0 1 0 3-6.7L3 8M3 3v5h5'/%3E%3C/svg%3E") center / 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='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v4l3 2M3 12a9 9 0 1 0 3-6.7L3 8M3 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tv-src a:hover {
	border-color: var(--global-palette6);
}

/* T23. Mobile timeline (V4 .tl2 at 760px and below: dot column 32px beside each card, line at 15px, years hidden).
 * Kadence stacks columns on mobile and cannot place two of three columns side by side. */
@media (max-width: 767px) {
	.tv-tl-line > .kt-row-column-wrap {
		display: grid;
		grid-template-columns: 32px minmax(0, 1fr) !important;
		column-gap: 14px;
		align-items: start;
		background: linear-gradient(90deg, transparent 14px, var(--global-palette1) 14px, var(--global-palette1) 16px, transparent 16px);
	}

	.tv-tl-line .tv-tl-dotcol {
		grid-column: 1;
		grid-row: 1;
		padding-top: 22px;
	}

	.tv-tl-line .tv-tl-dotcol .wp-block-kadence-column {
		margin: 0 0 0 6px;
		margin-bottom: 0 !important;
	}

	.tv-tl-line .tv-tl-cardcol {
		grid-column: 2;
		grid-row: 1;
	}

	.tv-tl-line .tv-tl-yearcol {
		display: none;
	}
}

/* T24. Sticky founder column only from 961px (V4 .split-sticky > :first-child, static below 960px). Kadence's Section
 * sticky setting has no device option. */
@media (max-width: 960px) {
	.tv-sticky-desktop,
.tv-sticky-desktop > .kt-inside-inner-col {
		position: static;
		top: auto;
	}
}

/* T20. Scroll reveal (V4 .reveal: rises 32px and fades in while it enters the viewport, linked to the scroll position).
 * Owner decision 20 Nov 2026: exact V4 behaviour rather than Kadence Animate on Scroll. Progressive: browsers without
 * scroll timelines show the content as is, and nothing is ever hidden without the animation running. */
@media (prefers-reduced-motion: no-preference) {
	.tv-bg-blueprint::after {
		animation: tv-drift 14s ease-in-out infinite alternate;
	}

	@keyframes tv-drift {
		to {
			transform: translate(40px, 30px) scale(1.12);
		}
	}

	@supports (animation-timeline: view()) {
		.tv-reveal {
			animation: tv-reveal linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 35%;
		}

		@keyframes tv-reveal {
			from {
				opacity: 0;
				transform: translateY(var(--tv-reveal-distance, 32px));
			}
			to {
				opacity: 1;
				transform: none;
			}
		}
}
}

@media (prefers-reduced-motion: reduce) {
	.tv-lift,
.tv-lift:hover,
.wp-block-kadence-singlebtn:hover,
.wp-block-kadence-singlebtn:hover .kb-svg-icon-wrap {
		transition: none;
		transform: none;
	}
}

/* T25. V4 font stack (tv.css --font: "Century Gothic", CenturyGothic, "Jost", "Didact Gothic", AppleGothic, sans-serif).
 * V4 renders in Century Gothic where it is installed on the visitor's device and in Jost elsewhere. Century Gothic is a
 * licensed font, so no font file is served: only the visitor's local copy is used. The Customizer keeps Jost as the
 * loaded web font (the approved fallback). Kadence's font controls accept one family, not a stack. */
:root:root {
	--global-body-font-family: "Century Gothic", CenturyGothic, Jost, "Didact Gothic", AppleGothic, sans-serif;
	--global-heading-font-family: "Century Gothic", CenturyGothic, Jost, "Didact Gothic", AppleGothic, sans-serif;
	--global-primary-nav-font-family: "Century Gothic", CenturyGothic, Jost, "Didact Gothic", AppleGothic, sans-serif;
}

/* T27. Closing band (V4 .cta-final, tv.css 1045-1056), shared by the homepage and the service pages (moved from
   home.css H12 and H16 on 21 Nov 2026). Why CSS: the logo mark in the corner of the orange band at 10%, and the 30px
   round step numbers (Advanced Text has no fixed width or height). */
.tv-cta-final > .kt-inside-inner-col { position: relative; overflow: hidden; isolation: isolate; }
.tv-cta-final > .kt-inside-inner-col::after { content: ""; position: absolute; right: -110px; bottom: -150px; width: 440px; aspect-ratio: 246 / 193; opacity: .1; z-index: -1; pointer-events: none; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 246 193'%3E%3Cpath fill='%231A1A1A' d='M88.7 45C98.2 47.5 106.4 53.8 111.4 62.4L134.3 102.1L82.3 102.1L49.4 45L0 45L0 0L139.6 0L139.6 45Z'/%3E%3Cpath fill='%231A1A1A' d='M245.2 0L134.3 192.1L108.3 147.1L134.3 102.1L193.2 0Z'/%3E%3C/svg%3E"); }
.tv-cta-final .tv-tag { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; }

/* T28. Row gap for wrapping pill rows (V4 .chips: gap 8px both ways). Why CSS: a horizontal Kadence Section prints no
 * row gap when its children are Advanced Text pills rather than Sections (computed row-gap: normal), so wrapped pills
 * touched (Partnerships "Content areas", homepage problem deliverables, Recommended Tools labels on phones). Only
 * horizontal, wrapping Sections that hold tv-tag pills directly; single-line rows and vertical stacks are unchanged. */
.kb-section-dir-horizontal > .kt-inside-inner-col:has(> .tv-tag) { row-gap: 8px; }
@media (max-width: 1024px) { .kb-section-md-dir-vertical > .kt-inside-inner-col:has(> .tv-tag) { row-gap: normal; } }
@media (max-width: 767px) { .kb-section-sm-dir-vertical > .kt-inside-inner-col:has(> .tv-tag) { row-gap: normal; } }

/* T29. Sticky filter bar (V4 Library .fbar: sticky under the 72 px header, frosted, static below 760 px). Why CSS:
 * Kadence's Section sticky option sticks the Section's inner column inside the Section itself, so a filter bar above
 * a query cannot follow the list; the bar itself needs position: sticky. Used on the Tutorials library filter. */
/* The frosted layer is a full-width pseudo-element behind the bar (owner, 21 Nov 2026: the blur should run edge to edge,
 * not stop at the 1220 px container); the controls stay in the container. clip-path keeps it from adding page width. */
.tv-fbar { position: sticky; top: 73px; z-index: 20; isolation: isolate; }
.tv-fbar::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: color-mix(in srgb, var(--global-palette9) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); border-bottom: 1px solid color-mix(in srgb, var(--global-palette7) 70%, transparent); pointer-events: none; }
html:has(.tv-fbar) body { overflow-x: clip; }
body.admin-bar .tv-fbar { top: 105px; }
@media (max-width: 760px) { .tv-fbar { position: static; } .tv-fbar::before { content: none; } }

/* T30. Space between a form's submit button and the note under it (owner, 21 Nov 2026). Kadence's content typography
 * gives every form inside .single-content a bottom margin of --global-md-spacing (32 px), added to Fluent Forms' own
 * 20 px under the submit button, so privacy notes sat 52 px below the button. No Customizer or Fluent Forms setting
 * targets that margin; Fluent Forms' 20 px group spacing stays, so the gap is 20 px on every form. */
.single-content .fluentform form.frm-fluent-form { margin-bottom: 0; }

/* T31. Open FAQ item reads as one rounded card (owner, 21 Nov 2026). The answer panel's background, border and bottom
 * radius are Kadence Accordion settings (Help and FAQ, Partnerships). Kadence has a title radius but no separate
 * radius for the open title, so the open question kept round bottom corners above a square-topped answer. Only the
 * open title's bottom corners are squared here (one class more specific than Kadence's own title rule, no !important). */
.kt-accordion-wrap > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* T32 Tutorial coupon box (Single Tutorial Element, Section .tv-coupon). Why CSS: the "Copy code" button only works with
   the theme script, so it stays hidden until the script marks the page (Kadence has no "show only with JavaScript" setting);
   the coupon code itself is always visible and selectable. */
html:not(.tv-js-copy) .tv-coupon .tv-copy { display: none; }
.tv-coupon .tv-coupon-code { user-select: all; }

/* T33 Text selection (V4 tv.css 463: rgba(240,90,53,.28)). Why CSS: Kadence has no setting for the selection colour.
   Uses the palette orange so it follows the Customizer in light and dark; the text keeps its own colour. */
::selection { background: color-mix(in srgb, var(--global-palette1) 28%, transparent); }

/* T34 Cookie notice (Complianz 7.5.7 banner) in the V4 ".cookie" style (Main.dc.html "Cookies on TutsVela", tv.css .cookie,
   .switch, .btn-sm, .btn-dark, .btn-ghost). Why CSS: Complianz stores one fixed hex colour set, so its banner would stay
   light in dark mode; here its own CSS variables are pointed at the Kadence palette, so a Customizer change and the
   dark palette reach the banner. Complianz has no settings for the left-aligned bold title, the V4 spacing and shadow, or
   button weight; the few layout rules below add one "body" to outrank Complianz's file, which loads after the theme.
   Text, buttons, categories and position stay in Complianz › Consent Banner. */
.cmplz-cookiebanner {
	--cmplz_banner_background_color: var(--global-palette9);
	--cmplz_banner_border_color: var(--global-palette7);
	--cmplz_text_color: var(--global-palette4);
	--cmplz_hyperlink_color: var(--global-palette10);
	--cmplz_button_accept_background_color: var(--global-palette3);
	--cmplz_button_accept_border_color: var(--global-palette3);
	--cmplz_button_accept_text_color: var(--global-palette9);
	--cmplz_button_deny_background_color: var(--global-palette3);
	--cmplz_button_deny_border_color: var(--global-palette3);
	--cmplz_button_deny_text_color: var(--global-palette9);
	--cmplz_button_settings_background_color: transparent;
	--cmplz_button_settings_border_color: var(--global-palette6);
	--cmplz_button_settings_text_color: var(--global-palette3);
	--cmplz_slider_active_color: var(--global-palette11);
	--cmplz_slider_inactive_color: var(--global-palette6);
	--cmplz_category_header_always_active_color: var(--global-palette11);
}
body .cmplz-cookiebanner.cmplz-show { left: 16px; bottom: 16px; width: min(460px, calc(100% - 32px)); padding: 20px; gap: 0; box-shadow: 0 2px 4px rgba(20, 20, 20, .04), 0 24px 60px -16px rgba(20, 20, 20, .22); }
body .cmplz-cookiebanner .cmplz-header { display: block; margin: 0; }
body .cmplz-cookiebanner .cmplz-header .cmplz-title { display: block; width: auto; margin: 0; justify-self: start; font-size: 19px; line-height: 1.3; font-weight: 700; color: var(--global-palette3); text-align: left; }
body .cmplz-cookiebanner .cmplz-message { margin: 8px 0 0; font-size: 15px; line-height: 1.55; }
body .cmplz-cookiebanner .cmplz-categories { margin-top: 12px; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category { background: var(--global-palette8); border-radius: 12px; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header { background: transparent; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-title { font-size: 15px; font-weight: 700; color: var(--global-palette3); }
body .cmplz-cookiebanner .cmplz-description { color: var(--global-palette5); }
body .cmplz-cookiebanner .cmplz-buttons { margin-top: 16px; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn { flex: 0 0 auto; width: auto; min-height: 40px; height: auto; padding: 0 16px; font-size: 15px; font-weight: 700; border-width: 1px; box-shadow: none; }
body .cmplz-cookiebanner .cmplz-links.cmplz-documents { margin-top: 16px; justify-content: flex-start; font-size: 13.5px; }
body .cmplz-cookiebanner .cmplz-links.cmplz-documents ul { justify-content: flex-start; margin: 0; padding: 0; }
body .cmplz-cookiebanner .cmplz-link.privacy-statement { display: none; }
body.color-switch-dark .cmplz-cookiebanner.cmplz-show { box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .75); }
@media (max-width: 767px) { body .cmplz-cookiebanner.cmplz-show { left: 8px; bottom: 8px; width: calc(100% - 16px); } }
