/* ==========================================================================
   Glass 4 Me: core
   1. Tokens per palette (one source for every colour, rim and shadow)
   2. Wallpaper layer (landscape and portrait files, focal point, dim, blur, grid)
   3. Vaso lens hygiene
   4. Gradient light rim shared by every glass surface
   5. .g4m-glass-yes surfaces (Elementor panel and [g4m_glass] shortcode)
   6. Scroll reveal, Elementor editor and reduced motion
   ========================================================================== */

/* Registered so the rim colours and light angle animate smoothly on hover. */
@property --g4m-light {
	syntax: "<angle>";
	inherits: true;
	initial-value: -45deg;
}

@property --g4m-rim-peak {
	syntax: "<color>";
	inherits: true;
	initial-value: rgb(255 255 255 / 92%);
}

@property --g4m-rim-accent {
	syntax: "<color>";
	inherits: true;
	initial-value: rgb(255 255 255 / 45%);
}

@property --g4m-rim-low {
	syntax: "<color>";
	inherits: true;
	initial-value: rgb(255 255 255 / 16%);
}

/* --------------------------------------------------------------------------
   1. Tokens. Default: Warm Editorial.
   -------------------------------------------------------------------------- */
:root {
	--g4m-ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
	--g4m-ease-gentle: cubic-bezier(0.25, 1, 0.5, 1);
	--g4m-dur-fast: 160ms;
	--g4m-dur-mid: 260ms;
	--g4m-dur-slow: 420ms;
	--g4m-radius-vessel: 30px;
	--g4m-radius-hero: 36px;
	--g4m-rim-width: 1.25px;
	--g4m-rim-intensity: 0.8;
	--g4m-depth: 0.6;

	--g4m-page-base: #F4EFE6;
	--g4m-surface: rgb(255 253 249 / 40%);
	--g4m-surface-sheen: rgb(255 255 255 / 52%);
	--g4m-surface-strong: rgb(255 253 249 / 80%);
	--g4m-header: rgb(255 252 246 / 54%);
	--g4m-pill: rgb(255 246 232 / 50%);
	--g4m-accent-surface: linear-gradient(155deg, rgb(244 218 194 / 62%) 0%, rgb(235 203 174 / 42%) 100%);
	--g4m-dark-surface:
		radial-gradient(85% 95% at 100% 0%, rgb(205 134 80 / 26%) 0%, transparent 65%),
		radial-gradient(60% 70% at 0% 100%, rgb(225 194 122 / 14%) 0%, transparent 65%),
		rgb(26 58 49 / 84%);
	--g4m-footer: rgb(26 58 49 / 90%);

	--g4m-ink: #3E352B;
	--g4m-ink-2: #5C5242;
	--g4m-ink-on-dark: #FFFDF9;
	--g4m-ink-on-dark-2: #EFE9DF;
	--g4m-link: #A8612F;
	--g4m-accent: #CD8650;

	--g4m-primary: linear-gradient(135deg, rgb(186 108 54) 0%, rgb(152 82 36) 100%);
	--g4m-primary-solid: #B46834;
	--g4m-primary-ink: #FFFFFF;
	--g4m-primary-glow: rgb(168 97 47 / 48%);
	--g4m-outline-bg: rgb(255 253 249 / 66%);
	--g4m-outline-ink: #4A4136;
	--g4m-outline-hover-bg: rgb(74 65 54 / 88%);
	--g4m-outline-hover-ink: #FFFDF9;
	--g4m-field-bg: rgb(255 253 249 / 62%);
	--g4m-field-ink: inherit;
	--g4m-field-border: rgb(205 134 80 / 28%);
	--g4m-focus: rgb(205 134 80 / 26%);

	--g4m-rim-peak: rgb(255 255 255 / 92%);
	--g4m-rim-accent: rgb(205 134 80 / 40%);
	--g4m-rim-low: rgb(255 255 255 / 16%);
	--g4m-rim-peak-hover: rgb(255 255 255 / 100%);
	--g4m-rim-accent-hover: rgb(205 134 80 / 78%);
	--g4m-rim-low-hover: rgb(255 255 255 / 30%);

	--g4m-shadow:
		0 2px 6px -1px rgb(74 65 54 / 6%),
		0 14px 36px -12px rgb(74 65 54 / 12%),
		0 28px 60px -24px rgb(168 97 47 / 14%);
	--g4m-shadow-hover:
		0 4px 10px -2px rgb(74 65 54 / 8%),
		0 20px 44px -12px rgb(74 65 54 / 18%),
		0 34px 68px -22px rgb(168 97 47 / 24%);

	/* Inner depth: a crisp top highlight, light pooling under the top edge, warm shade
	   gathering at the bottom and a faint caustic line along the bottom edge. Inset only,
	   so it reads as thickness, never as a border. Scaled by the Inner depth setting. */
	--g4m-volume:
		inset 0 1px 1px lab(100% 0 0 / calc(0.8 * var(--g4m-depth))),
		inset 0 16px 28px -20px lab(100% 0 0 / calc(0.7 * var(--g4m-depth))),
		inset 0 -16px 26px -18px lab(40% 14 26 / calc(0.24 * var(--g4m-depth))),
		inset 0 -1px 1px lab(100% 4 10 / calc(0.5 * var(--g4m-depth)));
	--g4m-volume-dark:
		inset 0 1px 1px lab(100% 0 5 / calc(0.4 * var(--g4m-depth))),
		inset 0 16px 28px -20px lab(90% 2 14 / calc(0.22 * var(--g4m-depth))),
		inset 0 -18px 28px -18px lab(4% -4 0 / calc(0.5 * var(--g4m-depth))),
		inset 0 -1px 1px lab(86% 8 30 / calc(0.4 * var(--g4m-depth)));
}

body.g4m-theme-crystal-neutral {
	--g4m-page-base: #F2F5FA;
	--g4m-surface: rgb(255 255 255 / 44%);
	--g4m-surface-sheen: rgb(255 255 255 / 62%);
	--g4m-surface-strong: rgb(255 255 255 / 84%);
	--g4m-header: rgb(252 254 255 / 58%);
	--g4m-pill: rgb(246 250 255 / 56%);
	--g4m-accent-surface: linear-gradient(155deg, rgb(218 232 250 / 66%) 0%, rgb(196 216 242 / 46%) 100%);
	--g4m-field-border: rgb(120 160 210 / 32%);
	--g4m-focus: rgb(120 160 210 / 28%);
	--g4m-rim-accent: rgb(120 164 214 / 42%);
	--g4m-rim-accent-hover: rgb(110 160 220 / 80%);
	--g4m-volume:
		inset 0 1px 1px lab(100% 0 0 / calc(0.85 * var(--g4m-depth))),
		inset 0 16px 28px -20px lab(100% 0 0 / calc(0.75 * var(--g4m-depth))),
		inset 0 -16px 26px -18px lab(46% -4 -24 / calc(0.2 * var(--g4m-depth))),
		inset 0 -1px 1px lab(100% -4 -10 / calc(0.55 * var(--g4m-depth)));
	--g4m-shadow:
		0 2px 6px -1px rgb(40 60 90 / 6%),
		0 14px 36px -12px rgb(40 60 90 / 12%),
		0 28px 60px -24px rgb(90 130 190 / 14%);
	--g4m-shadow-hover:
		0 4px 10px -2px rgb(40 60 90 / 8%),
		0 20px 44px -12px rgb(40 60 90 / 18%),
		0 34px 68px -22px rgb(90 130 190 / 24%);
}

body.g4m-theme-iridia-liquid-light {
	--g4m-page-base: #070910;
	--g4m-surface: rgb(18 24 40 / 60%);
	--g4m-surface-sheen: rgb(186 214 255 / 10%);
	--g4m-surface-strong: rgb(11 15 26 / 92%);
	--g4m-header: rgb(11 15 26 / 74%);
	--g4m-pill: rgb(22 30 52 / 74%);
	--g4m-accent-surface:
		radial-gradient(95% 110% at 100% 0%, rgb(56 216 255 / 32%) 0%, transparent 65%),
		radial-gradient(85% 95% at 0% 100%, rgb(214 88 255 / 20%) 0%, transparent 65%),
		rgb(18 28 52 / 78%);
	--g4m-dark-surface:
		radial-gradient(85% 95% at 100% 0%, rgb(50 217 255 / 22%) 0%, transparent 62%),
		radial-gradient(75% 85% at 0% 100%, rgb(214 88 255 / 18%) 0%, transparent 65%),
		rgb(11 16 30 / 86%);
	--g4m-footer: rgb(6 8 15 / 92%);

	--g4m-ink: #F4F7FF;
	--g4m-ink-2: #BCC8E2;
	--g4m-link: #7CE2FF;
	--g4m-accent: #38D6FF;

	--g4m-primary: linear-gradient(135deg, #F5F9FF 0%, #CAE9FF 52%, #E8D5FF 100%);
	--g4m-primary-solid: #CAE9FF;
	--g4m-primary-ink: #070B14;
	--g4m-primary-glow: rgb(56 214 255 / 55%);
	--g4m-outline-bg: rgb(22 29 48 / 74%);
	--g4m-outline-ink: #F4F7FF;
	--g4m-outline-hover-bg: rgb(36 48 78 / 88%);
	--g4m-outline-hover-ink: #FFFFFF;
	--g4m-field-bg: rgb(10 14 25 / 72%);
	--g4m-field-ink: #F4F7FF;
	--g4m-field-border: rgb(186 214 255 / 24%);
	--g4m-focus: rgb(70 216 255 / 24%);

	--g4m-rim-peak: rgb(222 238 255 / 72%);
	--g4m-rim-accent: rgb(120 222 255 / 42%);
	--g4m-rim-low: rgb(170 200 255 / 14%);
	--g4m-rim-peak-hover: rgb(240 248 255 / 95%);
	--g4m-rim-accent-hover: rgb(120 222 255 / 88%);
	--g4m-rim-low-hover: rgb(190 214 255 / 28%);

	--g4m-volume:
		inset 0 1px 1px lab(96% -4 -12 / calc(0.45 * var(--g4m-depth))),
		inset 0 16px 30px -20px lab(80% -26 -32 / calc(0.2 * var(--g4m-depth))),
		inset 0 -18px 30px -18px lab(0% 0 0 / calc(0.55 * var(--g4m-depth))),
		inset 0 -1px 1px lab(78% -30 -36 / calc(0.45 * var(--g4m-depth)));
	--g4m-volume-dark: var(--g4m-volume);
	--g4m-shadow: 0 22px 50px -18px rgb(0 0 0 / 74%), 0 2px 14px -4px rgb(54 140 255 / 14%);
	--g4m-shadow-hover: 0 28px 60px -18px rgb(0 0 0 / 84%), 0 0 28px -6px rgb(76 202 255 / 26%);
	color: var(--g4m-ink);
	background-color: var(--g4m-page-base);
}

/* A light palette over a dark wallpaper (or the reverse) needs denser glass to keep text readable. */
body.g4m-wall-dark:not(.g4m-theme-iridia-liquid-light) {
	--g4m-surface: rgb(255 253 249 / 76%);
	--g4m-surface-sheen: rgb(255 255 255 / 40%);
	--g4m-header: rgb(255 252 246 / 80%);
	--g4m-pill: rgb(255 248 238 / 80%);
}

body.g4m-wall-light.g4m-theme-iridia-liquid-light {
	--g4m-surface: rgb(16 21 36 / 82%);
	--g4m-header: rgb(11 15 26 / 86%);
	--g4m-pill: rgb(22 30 52 / 86%);
}

/* --------------------------------------------------------------------------
   2. Wallpaper layer
   -------------------------------------------------------------------------- */
@keyframes g4m-mesh-drift {
	0%,
100% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	50% {
		transform: translate3d(2%, -1.5%, 0) scale(1.04);
	}
}

body.g4m-backdrop-active {
	position: relative;
	background-color: var(--g4m-page-base);
}

body.g4m-backdrop-active:not(.elementor-editor-active):not(.elementor-editor-preview)::before {
	content: "";
	position: fixed;
	inset: -6%;
	z-index: -2;
	pointer-events: none;
	background:
		radial-gradient(46rem 34rem at 14% 16%, rgb(205 134 80 / 28%), transparent 64%),
		radial-gradient(40rem 36rem at 86% 20%, rgb(225 194 122 / 34%), transparent 62%),
		radial-gradient(44rem 38rem at 78% 72%, rgb(40 78 67 / 18%), transparent 64%),
		radial-gradient(42rem 32rem at 22% 84%, rgb(235 178 130 / 26%), transparent 62%),
		radial-gradient(60rem 44rem at 50% 48%, rgb(255 251 242 / 70%), transparent 70%);
	animation: g4m-mesh-drift 20s ease-in-out infinite;
}

body.g4m-backdrop-active.g4m-theme-crystal-neutral:not(.g4m-backdrop-photo):not(.elementor-editor-active):not(.elementor-editor-preview)::before {
	background:
		radial-gradient(46rem 34rem at 14% 16%, rgb(164 198 232 / 26%), transparent 64%),
		radial-gradient(40rem 36rem at 86% 20%, rgb(228 214 188 / 30%), transparent 62%),
		radial-gradient(44rem 38rem at 78% 72%, rgb(118 164 152 / 18%), transparent 64%),
		radial-gradient(42rem 32rem at 22% 84%, rgb(210 226 244 / 28%), transparent 62%),
		radial-gradient(60rem 44rem at 50% 48%, rgb(255 255 255 / 72%), transparent 70%);
}

body.g4m-backdrop-active.g4m-theme-iridia-liquid-light:not(.g4m-backdrop-photo):not(.elementor-editor-active):not(.elementor-editor-preview)::before {
	background:
		radial-gradient(64% 62% at 14% 12%, rgb(74 86 116 / 46%) 0%, transparent 66%),
		radial-gradient(50% 48% at 84% 22%, rgb(61 126 255 / 28%) 0%, transparent 70%),
		radial-gradient(54% 50% at 72% 76%, rgb(214 88 255 / 22%) 0%, transparent 72%),
		radial-gradient(46% 42% at 24% 84%, rgb(255 140 66 / 18%) 0%, transparent 68%),
		linear-gradient(155deg, #06080F 0%, #0D1220 52%, #070A13 100%);
}

/* Photo wallpaper: the dim layer uses the page colour so text contrast holds; blur is optional. */
body.g4m-backdrop-active.g4m-backdrop-photo:not(.elementor-editor-active):not(.elementor-editor-preview)::before {
	inset: calc(var(--g4m-bg-blur, 0px) * -2);
	background-color: var(--g4m-page-base);
	background-image:
		linear-gradient(color-mix(in srgb, var(--g4m-page-base) calc(var(--g4m-bg-dim, 0.1) * 100%), transparent), color-mix(in srgb, var(--g4m-page-base) calc(var(--g4m-bg-dim, 0.1) * 100%), transparent)),
		var(--g4m-bg-image, none);
	background-size: 100% 100%, cover;
	background-position: center, var(--g4m-bg-position, center center);
	background-repeat: no-repeat;
	filter: blur(var(--g4m-bg-blur, 0px));
	animation: none;
}

/* Tall screens (phones, portrait tablets) load the portrait file instead, so ribbons stay in view. */
@media (max-aspect-ratio: 4/5) {
	body.g4m-backdrop-active.g4m-backdrop-photo:not(.elementor-editor-active):not(.elementor-editor-preview)::before {
		background-image:
			linear-gradient(color-mix(in srgb, var(--g4m-page-base) calc(var(--g4m-bg-dim, 0.1) * 100%), transparent), color-mix(in srgb, var(--g4m-page-base) calc(var(--g4m-bg-dim, 0.1) * 100%), transparent)),
			var(--g4m-bg-image-portrait, var(--g4m-bg-image, none));
	}
}

body.g4m-backdrop-active.g4m-grid:not(.elementor-editor-active):not(.elementor-editor-preview)::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image:
		linear-gradient(to right, rgb(74 65 54 / 3%) 1px, transparent 1px),
		linear-gradient(to bottom, rgb(74 65 54 / 3%) 1px, transparent 1px);
	background-size: 32px 32px;
	-webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, #000 45%, transparent 100%);
	mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, #000 45%, transparent 100%);
}

body.g4m-backdrop-active.g4m-grid.g4m-wall-dark:not(.elementor-editor-active):not(.elementor-editor-preview)::after {
	background-image:
		linear-gradient(to right, rgb(206 224 255 / 3%) 1px, transparent 1px),
		linear-gradient(to bottom, rgb(206 224 255 / 3%) 1px, transparent 1px);
}

/* --------------------------------------------------------------------------
   3. Vaso lens hygiene: never put a backdrop root on [data-vaso-root].
   The lens paints the tint only; the edge light comes from the rim (section 4).
   -------------------------------------------------------------------------- */
[data-vaso-root] {
	position: relative;
	transform: none;
	will-change: auto;
}

[data-vaso-root] > [data-vaso] {
	z-index: 0 !important;
	pointer-events: none;
	border: 0 !important;
	border-radius: inherit;
	background: var(--g4m-surface);
	box-shadow: var(--g4m-volume) !important;
}

/* Dark vessels use the dark depth set. */
body.g4m-sitewide :is(.tsp-card--featured, .tsp-stat--dark, .tsp-dl-box, .tsp-code-card, .tsp-hero[style*="--tsp-dark"], .g4m-card--featured, .g4m-stat--dark, .g4m-dl-box, .g4m-hero.g4m-hero--dark),
.g4m-glass-yes.g4m-preset-botanical {
	--g4m-volume: var(--g4m-volume-dark);
}

[data-vaso-root] > :not([data-vaso]):not(svg[aria-hidden="true"]) {
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   4. Gradient light rim
   A thin ring cut out with a mask: brightest where the light falls (top left by
   default, or toward the pointer), a tinted reflection on the far side, faint
   in between. Hover brightens it and lets the accent tint come through, instead
   of swapping to a flat single colour border.
   -------------------------------------------------------------------------- */
.g4m-glass-yes.g4m-rim-yes,
body.g4m-sitewide.g4m-rim-on :is(.tsp-hero, .tsp-pill, .tsp-card, .tsp-stat, .tsp-form-card, .tsp-support-card, .tsp-shot, .tsp-author, .tsp-faq details, .tsp-dl-box, .tsp-code-card, .b-tile, .tsp-btn-outline, .t4m-btn--outline, .elementor-button, .g4m-hero, .g4m-pill, .g4m-card, .g4m-stat, .g4m-panel--form, .g4m-shot, .g4m-faq details, .g4m-dl-box, .g4m-btn-outline):not(.g4m-rim-no) {
	position: relative;
}

.g4m-glass-yes.g4m-rim-yes::after,
body.g4m-sitewide.g4m-rim-on :is(.site-header, .tsp-hero, .tsp-pill, .tsp-card, .tsp-stat, .tsp-form-card, .tsp-support-card, .tsp-shot, .tsp-author, .tsp-faq details, .tsp-dl-box, .tsp-code-card, .b-tile, .tsp-btn-outline, .t4m-btn--outline, .elementor-button, .g4m-hero, .g4m-pill, .g4m-card, .g4m-stat, .g4m-panel--form, .g4m-shot, .g4m-faq details, .g4m-dl-box, .g4m-btn-outline):not(.g4m-rim-no)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	box-sizing: border-box;
	padding: var(--g4m-rim-width);
	border-radius: inherit;
	pointer-events: none;
	background: conic-gradient(
		from var(--g4m-light),
		var(--g4m-rim-peak) 0deg,
		var(--g4m-rim-low) 72deg,
		var(--g4m-rim-low) 112deg,
		var(--g4m-rim-accent) 180deg,
		var(--g4m-rim-low) 248deg,
		var(--g4m-rim-low) 288deg,
		var(--g4m-rim-peak) 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);
	opacity: var(--g4m-rim-intensity);
	transition:
		opacity var(--g4m-dur-mid) var(--g4m-ease-spring),
		--g4m-light 0.3s var(--g4m-ease-spring),
		--g4m-rim-peak var(--g4m-dur-mid) ease,
		--g4m-rim-accent var(--g4m-dur-mid) ease,
		--g4m-rim-low var(--g4m-dur-mid) ease;
}

.g4m-glass-yes.g4m-rim-yes:is(:hover, :focus-within),
body.g4m-sitewide.g4m-rim-on :is(.tsp-card, .tsp-stat, .tsp-shot, .tsp-faq details, .tsp-dl-box, .b-tile, .tsp-pill, .tsp-btn-outline, .t4m-btn--outline, .elementor-button, .g4m-card, .g4m-stat, .g4m-shot, .g4m-faq details, .g4m-dl-box, .g4m-pill, .g4m-btn-outline):not(.g4m-rim-no):is(:hover, :focus-within) {
	--g4m-rim-peak: var(--g4m-rim-peak-hover);
	--g4m-rim-accent: var(--g4m-rim-accent-hover);
	--g4m-rim-low: var(--g4m-rim-low-hover);
}

.g4m-glass-yes.g4m-rim-yes:is(:hover, :focus-within)::after,
body.g4m-sitewide.g4m-rim-on :is(.tsp-card, .tsp-stat, .tsp-shot, .tsp-faq details, .tsp-dl-box, .b-tile, .tsp-pill, .tsp-btn-outline, .t4m-btn--outline, .elementor-button, .g4m-card, .g4m-stat, .g4m-shot, .g4m-faq details, .g4m-dl-box, .g4m-pill, .g4m-btn-outline):not(.g4m-rim-no):is(:hover, :focus-within)::after {
	opacity: 1;
}

/* Dark vessels on a light palette reflect white, not the warm accent. */
body.g4m-sitewide:not(.g4m-theme-iridia-liquid-light) :is(.tsp-card--featured, .tsp-stat--dark, .tsp-dl-box, .tsp-code-card, .tsp-hero[style*="--tsp-dark"], .g4m-card--featured, .g4m-stat--dark, .g4m-dl-box, .g4m-hero.g4m-hero--dark) {
	--g4m-rim-peak: rgb(255 253 249 / 55%);
	--g4m-rim-accent: rgb(225 194 122 / 40%);
	--g4m-rim-low: rgb(255 253 249 / 12%);
	--g4m-rim-peak-hover: rgb(255 253 249 / 85%);
	--g4m-rim-accent-hover: rgb(235 203 174 / 80%);
	--g4m-rim-low-hover: rgb(255 253 249 / 24%);
}

/* --------------------------------------------------------------------------
   5. .g4m-glass-yes surfaces (Elementor panel and shortcode)
   -------------------------------------------------------------------------- */
:where(.g4m-glass-yes) {
	border-radius: 24px;
}

:where(.g4m-glass-yes:not(.elementor-element)) {
	padding: 24px 28px;
}

.g4m-glass-yes {
	position: relative;
	--g4m-blur: var(--g4m-global-blur, 20px);
	--g4m-sat: 1.45;
	--g4m-tint: var(--g4m-surface);
	--g4m-tint-secondary: var(--g4m-surface-sheen);
	--g4m-refraction-px: var(--g4m-global-refraction, 9);
	--g4m-dispersion: 0.35;
	--g4m-light-mode: "pointer";
	box-shadow: var(--g4m-volume), var(--g4m-shadow);
}

.g4m-glass-yes.g4m-preset-frosted {
	--g4m-tint: rgb(246 250 255 / 44%);
	--g4m-tint-secondary: rgb(255 255 255 / 64%);
}

.g4m-glass-yes.g4m-preset-apricot {
	--g4m-tint: rgb(235 203 174 / 46%);
	--g4m-tint-secondary: rgb(244 218 194 / 62%);
}

.g4m-glass-yes.g4m-preset-botanical {
	--g4m-tint: rgb(26 58 49 / 82%);
	--g4m-tint-secondary: rgb(205 134 80 / 20%);
	--g4m-rim-peak: rgb(255 253 249 / 55%);
	--g4m-rim-accent: rgb(225 194 122 / 40%);
	color: var(--g4m-ink-on-dark);
}

.g4m-glass-yes.g4m-preset-botanical :is(h1, h2, h3, h4, h5, h6, .elementor-heading-title) {
	color: var(--g4m-ink-on-dark);
}

.g4m-glass-yes.g4m-preset-botanical :is(p, li, .elementor-text-editor) {
	color: var(--g4m-ink-on-dark-2);
}

.g4m-glass-yes.g4m-preset-custom {
	--g4m-tint-secondary: transparent;
}

body.g4m-theme-iridia-liquid-light .g4m-glass-yes:is(.g4m-preset-liquid, .g4m-preset-frosted, .g4m-preset-apricot) {
	--g4m-tint: var(--g4m-surface);
	--g4m-tint-secondary: var(--g4m-surface-sheen);
	color: var(--g4m-ink);
}

/* CSS frost before Vaso mounts, or when the CSS engine is chosen. */
.g4m-glass-yes:not([data-vaso-root]) {
	-webkit-backdrop-filter: blur(var(--g4m-blur)) saturate(var(--g4m-sat));
	backdrop-filter: blur(var(--g4m-blur)) saturate(var(--g4m-sat));
	background-color: var(--g4m-tint);
	background-image: linear-gradient(155deg, var(--g4m-tint-secondary) 0%, transparent 65%);
}

/* Without the rim, a soft top highlight keeps the edge readable. */
.g4m-glass-yes:not(.g4m-rim-yes):not([data-vaso-root]) {
	box-shadow: inset 0 1px 0 var(--g4m-rim-peak), var(--g4m-volume), var(--g4m-shadow);
}

.g4m-glass-yes[data-vaso-root] {
	background: transparent !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

.g4m-glass-yes[data-vaso-root] > [data-vaso] {
	background: var(--g4m-tint);
}

/* Accents mode: a large lens refracts only while hovered or focused; at rest it is plain frost.
   Keeps scrolling and hover smooth on pages with several big optical panels. */
body.g4m-refract-accents .g4m-lens-large[data-vaso-root]:not(:hover):not(:focus-within) > [data-vaso] {
	-webkit-backdrop-filter: blur(var(--g4m-blur, 20px)) saturate(var(--g4m-sat, 1.4)) !important;
	backdrop-filter: blur(var(--g4m-blur, 20px)) saturate(var(--g4m-sat, 1.4)) !important;
}

.g4m-glass-yes.g4m-fluidity-yes {
	transition:
		transform var(--g4m-dur-mid) var(--g4m-ease-spring),
		box-shadow var(--g4m-dur-mid) var(--g4m-ease-spring);
}

.g4m-glass-yes.g4m-fluidity-yes:hover {
	box-shadow: var(--g4m-volume), var(--g4m-shadow-hover);
}

/* Lift only before Vaso mounts: a transform on a Vaso root would break its backdrop sampling. */
.g4m-glass-yes.g4m-fluidity-yes:not([data-vaso-root]):hover {
	transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   6. Scroll reveal, editor isolation, reduced motion
   -------------------------------------------------------------------------- */
html.g4m-motion-ready:not(.g4m-motion-reduced) .g4m-reveal-item {
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity var(--g4m-dur-slow) var(--g4m-ease-gentle),
		transform var(--g4m-dur-slow) var(--g4m-ease-spring);
	transition-delay: var(--g4m-stagger-delay, 0ms);
}

html.g4m-motion-ready:not(.g4m-motion-reduced) .g4m-reveal-item.g4m-is-revealed {
	opacity: 1;
	transform: none;
}

body.elementor-editor-active [data-vaso],
body.elementor-editor-preview [data-vaso],
body.elementor-editor-active::before,
body.elementor-editor-active::after,
body.elementor-editor-preview::before,
body.elementor-editor-preview::after {
	display: none !important;
}

body:is(.elementor-editor-active, .elementor-editor-preview) .g4m-reveal-item,
html.g4m-motion-reduced .g4m-reveal-item {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	body.g4m-backdrop-active::before {
		animation: none !important;
	}

	.g4m-glass-yes,
.g4m-glass-yes *,
.g4m-glass-yes::after,
body.g4m-sitewide *::after {
		transition-duration: 0.001ms !important;
	}
}
