/* ============================================================
   AvestaTech — core liquid glass, RTL
   Tokens, base canvas, the shared glass recipe, header, buttons.
   Section layouts live in sections.css; the services window in
   services.css and its previews in scenes.css.
   Light default, dark option.
   ============================================================ */

:root {
	--avesta-blur: 26px;
	--avesta-radius: 1.65rem;
	--avesta-radius-sm: 1.1rem;
	--avesta-hairline: rgba(25, 28, 39, 0.08);

	/* macOS-style glass recipe */
	--avesta-glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.42));
	--avesta-glass-bg-strong: rgba(255, 255, 255, 0.8);
	--avesta-glass-border: rgba(255, 255, 255, 0.75);
	--avesta-glass-ring: rgba(25, 28, 39, 0.07);
	--avesta-glass-top: rgba(255, 255, 255, 0.95);

	--avesta-highlight-bg: rgba(110, 102, 222, 0.3);
	--avesta-marker-bg: rgba(47, 97, 255, 0.22);
	--avesta-shadow: 0 18px 40px -14px rgba(76, 70, 196, 0.26), 0 2px 6px rgba(25, 28, 39, 0.05);
	--avesta-shadow-hover: 0 28px 56px -16px rgba(76, 70, 196, 0.38), 0 3px 8px rgba(25, 28, 39, 0.06);
	--avesta-duration: 220ms;
	--avesta-ease: cubic-bezier(0.16, 1, 0.3, 1);
	/* css-liquid-glass hover curve — springy overshoot, tamed a little */
	--avesta-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.7);

	/* How far above the hero the desktop wallpaper reaches, so it also
	   paints behind the floating header pill (homepage only). */
	--avesta-header-zone: 12rem;

	/* Liquid-glass optics: a bent-light edge ring + a pooled specular highlight */
	--avesta-glass-specular: rgba(255, 255, 255, 0.95);
	--avesta-glass-edge: conic-gradient(from 220deg at 28% -10%,
		rgba(255, 255, 255, 0.95),
		rgba(255, 255, 255, 0) 26%,
		rgba(255, 255, 255, 0) 64%,
		rgba(255, 255, 255, 0.6) 100%);

	/* Liquid-glass buttons (layered recipe: effect / tint / shine).
	   Both buttons are CLEAR glass — that is what sells the material. The
	   primary CTA differs by brand "ink" pooled inside the glass, a colored
	   glow, and a colored label; not by an opaque fill. */
	--avesta-btn-glass: rgba(255, 255, 255, 0.22);
	--avesta-btn-ink: color-mix(in srgb, var(--wp--preset--color--primary) 62%, transparent);
	--avesta-btn-ink-soft: color-mix(in srgb, var(--wp--preset--color--primary) 24%, transparent);
	--avesta-btn-text: var(--wp--preset--color--primary-deep);
	--avesta-btn-shine-hi: rgba(255, 255, 255, 0.55);
	--avesta-btn-shine-lo: rgba(255, 255, 255, 0.35);
	--avesta-btn-shadow: 0 6px 6px rgba(25, 28, 39, 0.1), 0 0 20px rgba(25, 28, 39, 0.06);
	--avesta-btn-shadow-hover: 0 10px 10px rgba(25, 28, 39, 0.12), 0 0 26px rgba(25, 28, 39, 0.08), 0 22px 40px -14px rgba(96, 100, 200, 0.28);
	--avesta-btn-glow: 0 12px 26px -10px color-mix(in srgb, var(--wp--preset--color--primary) 55%, transparent);
	--avesta-btn-glow-hover: 0 20px 38px -12px color-mix(in srgb, var(--wp--preset--color--primary) 65%, transparent);
}

html[data-theme="dark"] {
	--wp--preset--color--base: #0C0F1D;
	--wp--preset--color--surface: #141829;
	--wp--preset--color--contrast: #ECEEF8;
	--wp--preset--color--muted: #9AA1C0;
	--wp--preset--color--primary: #4D85F6;
	--wp--preset--color--primary-deep: #85ADF9;
	--wp--preset--color--on-primary: #0C0F1D;
	--wp--preset--color--border: #262C4A;

	--avesta-hairline: rgba(236, 238, 248, 0.12);
	--avesta-glass-bg: linear-gradient(180deg, rgba(34, 40, 70, 0.62), rgba(18, 22, 40, 0.48));
	--avesta-glass-bg-strong: rgba(12, 15, 29, 0.8);
	--avesta-glass-border: rgba(255, 255, 255, 0.14);
	--avesta-glass-ring: rgba(0, 0, 0, 0.45);
	--avesta-glass-top: rgba(255, 255, 255, 0.16);

	--avesta-highlight-bg: rgba(157, 151, 240, 0.24);
	--avesta-marker-bg: rgba(94, 140, 255, 0.28);
	--avesta-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
	--avesta-shadow-hover: 0 28px 56px -16px rgba(155, 166, 242, 0.2), 0 3px 8px rgba(0, 0, 0, 0.35);

	--avesta-glass-specular: rgba(255, 255, 255, 0.1);
	--avesta-glass-edge: conic-gradient(from 220deg at 28% -10%,
		rgba(255, 255, 255, 0.32),
		rgba(255, 255, 255, 0) 16%,
		rgba(255, 255, 255, 0) 64%,
		rgba(255, 255, 255, 0.16) 100%);

	--avesta-btn-tint: color-mix(in srgb, var(--wp--preset--color--primary) 58%, transparent);
	--avesta-btn-tint-hover: color-mix(in srgb, var(--wp--preset--color--primary-deep) 66%, transparent);
	--avesta-btn-tint-ghost: rgba(255, 255, 255, 0.09);
	--avesta-btn-tint-ghost-hover: color-mix(in srgb, var(--wp--preset--color--primary) 20%, rgba(255, 255, 255, 0.1));
	--avesta-btn-shine-hi: rgba(255, 255, 255, 0.38);
	--avesta-btn-shine-lo: rgba(255, 255, 255, 0.18);
	--avesta-btn-shadow: none;
	--avesta-btn-shadow-hover: none;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 7rem;
	color-scheme: light;
}

html[data-theme="dark"] {
	color-scheme: dark;
}

body {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	transition: background-color var(--avesta-duration) var(--avesta-ease),
		color var(--avesta-duration) var(--avesta-ease);
	position: relative;
	/* z-index (even 0) forces body to establish its own stacking context, so
	   its negative z-index pseudo-elements (aurora, grain) paint above its
	   own background instead of escaping to the root context and getting
	   painted over by it. */
	z-index: 0;
	/* clip, not hidden: hidden would turn body into a scroll container */
	overflow-x: clip;
}

/* Paper grain, above the site-wide aurora (see .avesta-aurora in sections.css). */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	opacity: 0.03;
	pointer-events: none;
}

/* ---------- Liquid glass recipe (shared) ---------- */

.glass-card,
.glass-panel,
.avesta-stat,
.avesta-step,
.avesta-hero-window,
.avesta-notif {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--avesta-glass-bg);
	-webkit-backdrop-filter: blur(var(--avesta-blur)) saturate(180%);
	backdrop-filter: blur(var(--avesta-blur)) saturate(180%);
	border: 1px solid var(--avesta-glass-border);
	border-radius: var(--avesta-radius);
	box-shadow:
		0 0 0 1px var(--avesta-glass-ring),
		var(--avesta-shadow),
		inset 0 1px 0 var(--avesta-glass-top);
	transition: box-shadow var(--avesta-duration) var(--avesta-ease),
		border-color var(--avesta-duration) var(--avesta-ease),
		rotate var(--avesta-duration) var(--avesta-ease),
		translate var(--avesta-duration) var(--avesta-ease);
}

/* Pooled specular highlight — light gathering top-left, like a curved glass surface */
.glass-card::after,
.glass-panel::after,
.avesta-stat::after,
.avesta-step::after,
.avesta-hero-window::after,
.avesta-notif::after {
	content: "";
	position: absolute;
	inset-block-start: -35%;
	inset-inline-start: 4%;
	inline-size: 55%;
	block-size: 55%;
	background: radial-gradient(closest-side, var(--avesta-glass-specular), transparent 72%);
	filter: blur(16px);
	opacity: 0.5;
	pointer-events: none;
	z-index: -1;
}

/* Light mode: the hero macOS window doesn't need the pooled specular glow
   (the wallpaper behind it already reads as the light source) — it just
   looks like a stray hollow circle at the top of the window. */
html:not([data-theme="dark"]) .avesta-hero-window::after {
	display: none;
}

.glass-card:hover {
	translate: 0 -3px;
	box-shadow:
		0 0 0 1px var(--avesta-glass-ring),
		var(--avesta-shadow-hover),
		inset 0 1px 0 var(--avesta-glass-top);
}

.avesta-stat:hover,
.avesta-step:hover {
	translate: 0 -3px;
}

.glass-panel {
	background: var(--avesta-glass-bg-strong);
}

/* Refracted edge ring, shared by every glass surface including the header pill */
.glass-card::before,
.glass-panel::before,
.avesta-stat::before,
.avesta-step::before,
.avesta-hero-window::before,
.avesta-notif::before,
.avesta-header-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	padding: 1px;
	background: var(--avesta-glass-edge);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0.7;
	pointer-events: none;
}

/* ---------- Header: floating liquid-glass capsule ---------- */

/* The WP "header" template-part area renders as an outer <header> that wraps
   tightly to this pill's height, giving `position: sticky` zero room to
   stick within — it just scrolls away with the rest of the page. `fixed`
   sidesteps that; the outer wrapper below reserves the equivalent flow
   space so nothing jumps when the pill leaves the document flow. */
header.wp-block-template-part {
	min-block-size: 5.75rem;
}

.avesta-header {
	position: fixed;
	left: 0;
	right: 0;
	top: 1.5rem;
	z-index: 50;
	background: transparent;
}

.avesta-header-inner {
	position: relative;
	background: var(--avesta-glass-bg);
	-webkit-backdrop-filter: blur(var(--avesta-blur)) saturate(180%);
	backdrop-filter: blur(var(--avesta-blur)) saturate(180%);
	border: 1px solid var(--avesta-glass-border);
	border-radius: 999px;
	box-shadow:
		0 0 0 1px var(--avesta-glass-ring),
		var(--avesta-shadow),
		inset 0 1px 0 var(--avesta-glass-top);
	padding-block: 0.55rem;
	padding-inline: 1.25rem;
	margin-block-start: 0;
	transition: padding var(--avesta-duration) var(--avesta-ease),
		background var(--avesta-duration) var(--avesta-ease),
		box-shadow var(--avesta-duration) var(--avesta-ease);
}

.avesta-header .wp-block-navigation a {
	position: relative;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	padding: 0.4rem 0.6rem;
	transition: color 200ms ease;
}

.avesta-header .wp-block-navigation a::after {
	content: "";
	position: absolute;
	inset-inline: 0.9rem;
	inset-block-end: 0.05rem;
	block-size: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--primary);
	scale: 0 1;
	transform-origin: center;
	transition: scale 240ms var(--avesta-bounce);
}

.avesta-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--contrast);
}

.avesta-header .wp-block-navigation a:hover::after {
	scale: 1 1;
}

/* Dark-mode toggle */
.avesta-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 44px;
	block-size: 44px;
	border-radius: 50%;
	border: 1px solid var(--avesta-glass-border);
	background: var(--avesta-glass-bg);
	box-shadow: 0 0 0 1px var(--avesta-glass-ring), inset 0 1px 0 var(--avesta-glass-top);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.avesta-theme-toggle:hover {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.avesta-theme-toggle svg {
	inline-size: 20px;
	block-size: 20px;
}

.avesta-theme-toggle .icon-sun { display: none; }
.avesta-theme-toggle .icon-moon { display: block; }

html[data-theme="dark"] .avesta-theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .avesta-theme-toggle .icon-moon { display: none; }

/* ---------- Mobile nav toggle: liquid-glass hamburger ----------
   Same glass-circle recipe as the theme toggle, with a custom "liquid"
   icon (three tapered droplet bars) instead of the default square WP bars,
   morphing into an X while the overlay is open. */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 44px;
	block-size: 44px;
	border-radius: 50%;
	border: 1px solid var(--avesta-glass-border);
	background: var(--avesta-glass-bg);
	box-shadow: 0 0 0 1px var(--avesta-glass-ring), inset 0 1px 0 var(--avesta-glass-top);
	color: var(--wp--preset--color--contrast);
	transition: background-color 200ms ease, border-color 200ms ease;
}

.wp-block-navigation__responsive-container-open:hover,
.wp-block-navigation__responsive-container-close:hover {
	border-color: var(--wp--preset--color--primary);
}

/* Core hides the hamburger on desktop; keep that behavior (our display rule
   above would otherwise win the cascade). */
@media (min-width: 600px) {
	.wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}
}

.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	display: none;
}

.wp-block-navigation__responsive-container-open::before,
.wp-block-navigation__responsive-container-close::before {
	content: "";
	inline-size: 18px;
	block-size: 12px;
	background:
		linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) center / 70% 2px no-repeat,
		linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat;
	border-radius: 2px;
	transition: transform 260ms var(--avesta-bounce), background 260ms var(--avesta-bounce);
}

.wp-block-navigation__responsive-container-close::before {
	background:
		linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
	border-radius: 2px;
	transform: rotate(45deg);
}

.wp-block-navigation__responsive-container-close::after {
	content: "";
	position: absolute;
	inline-size: 18px;
	block-size: 2px;
	background: currentColor;
	transform: rotate(-45deg);
}

.wp-block-navigation__responsive-container-close {
	position: relative;
}

/* ---------- Mobile menu overlay: frosted desktop, not a plain sheet ----------
   The overlay is reparented to <body> while open (interactions.js), so these
   selectors are scoped to .is-menu-open alone, never through .avesta-nav. */

.wp-block-navigation__responsive-container.is-menu-open {
	background: color-mix(in srgb, var(--wp--preset--color--base) 72%, transparent);
	-webkit-backdrop-filter: blur(36px) saturate(180%);
	backdrop-filter: blur(36px) saturate(180%);
	padding: 6rem 2rem 3rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	block-size: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.65rem;
	text-align: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: inline-block;
	font-size: 1.65rem;
	font-weight: 800;
	color: var(--wp--preset--color--contrast);
	padding: 0.55rem 1.6rem;
	border-radius: 999px;
	transition: color 200ms ease, background-color 200ms ease;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--primary);
	background-color: var(--avesta-highlight-bg);
}

/* Items rise in one after another, same language as the hero copy. */
@keyframes avesta-menu-rise {
	from {
		opacity: 0;
		translate: 0 18px;
	}
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	animation: avesta-menu-rise 420ms var(--avesta-ease) backwards;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(1) { animation-delay: 60ms; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: 130ms; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: 200ms; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: 270ms; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: 340ms; }

/* "Start project" CTA: hidden in the desktop nav row, a solid primary pill
   inside the open overlay. Two classes to out-rank core's item display rule. */
.wp-block-navigation .avesta-menu-cta,
.wp-block-navigation__responsive-container .avesta-menu-cta {
	display: none;
}

.wp-block-navigation__responsive-container.is-menu-open .avesta-menu-cta {
	display: block;
	margin-block-start: 1.4rem;
}

.wp-block-navigation__responsive-container.is-menu-open .avesta-menu-cta .wp-block-navigation-item__content {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	font-size: 1.15rem;
	padding: 0.85rem 2.4rem;
	box-shadow: var(--avesta-btn-glow);
}

.wp-block-navigation__responsive-container.is-menu-open .avesta-menu-cta .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--primary-deep);
	color: var(--wp--preset--color--on-primary);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		animation: none;
	}
}

/* ---------- Buttons: solid color, not glass ----------
   Primary is a flat brand-color pill; secondary is a flat neutral pill with
   a border. Both lift and deepen their shadow on hover — the glass rig
   (blur/refraction/cursor specular) lives only on the dock and windows now. */

.wp-block-button__link {
	cursor: pointer;
	position: relative;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-weight: 700;
	box-shadow: var(--avesta-btn-shadow);
	transition:
		background-color 250ms ease,
		box-shadow 400ms var(--avesta-bounce),
		translate 400ms var(--avesta-bounce),
		scale 160ms var(--avesta-ease);
}

.wp-block-button__link:hover {
	background: var(--wp--preset--color--primary-deep);
	color: #fff;
	translate: 0 -2px;
	box-shadow: var(--avesta-btn-shadow-hover);
}

.wp-block-button__link:active {
	translate: 0 0;
	scale: 0.96;
	box-shadow: var(--avesta-btn-shadow);
}

/* Secondary CTA — flat neutral surface, brand border/text on hover. */
.is-style-outline .wp-block-button__link {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--avesta-glass-border);
	box-shadow: none;
}

.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	box-shadow: none;
}

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
.avesta-theme-toggle:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ---------- Type details ---------- */

.avesta-display {
	letter-spacing: -0.02em;
	line-height: 1.22 !important;
	font-weight: 900 !important;
}

/* Section kicker — a short accent bar + label sitting above section
   headings. Same font as the heading it introduces (no monospace mixing,
   no baseline mismatch) so it reads as one aligned unit, not a stray tag. */
.avesta-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-block-end: 0.75rem;
	line-height: 1;
}

.avesta-eyebrow::before {
	content: "";
	display: inline-block;
	inline-size: 1.6rem;
	block-size: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--primary);
	flex: 0 0 auto;
}

.avesta-eyebrow i {
	font-style: normal;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--primary);
}

/* Home page section titles, centered — testimonials and about keep their
   original (copy-column) alignment, so they're excluded here. The eyebrow
   above each title uses .avesta-eyebrow-flanked (self-centering) instead
   of the plain .avesta-eyebrow used in about/testimonials. */
#services > .wp-block-heading,
#projects > .wp-block-heading,
#process > .wp-block-heading,
.avesta-articles-teaser > .wp-block-heading {
	text-align: center;
}

/* Marker-style highlight on key title words — an organic "highlighter swipe"
   instead of a flat rounded box: an irregular blob sits behind the text via
   ::before so the ink reads as hand-drawn rather than a plain tag. */
.avesta-highlight {
	position: relative;
	z-index: 0;
	display: inline-block;
	padding: 0.08em 0.16em;
	font-size: 0.88em;
}

.avesta-highlight::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -0.07em -0.07em;
	border-radius: 0.4em;
	rotate: -0.6deg;
	background: linear-gradient(90deg,
		color-mix(in srgb, #0046DA 34%, transparent),
		color-mix(in srgb, #3B7BFF 36%, transparent),
		color-mix(in srgb, #0046DA 34%, transparent));
	background-size: 220% 100%;
	transform-origin: right center;
	/* Default: fully drawn, static. No-JS/crawler renders this — content and
	   its decoration are visible immediately, only the reveal animation
	   (below) is an enhancement layered on top when JS + scroll agree. */
	scale: 1 1;
	opacity: 1;
	background-position: 0% 50%;
}

/* Scroll-triggered reveal: JS marks the word pending until its section
   scrolls into view (see scroll-reveal.js), then plays the draw + shimmer.
   Gated behind html.js so nothing ever depends on JS to be visible. */
html.js .avesta-highlight::before {
	scale: 0 1;
	opacity: 0;
}

html.js .avesta-highlight.is-visible::before {
	animation:
		avesta-highlight-draw 1500ms var(--avesta-ease) 400ms forwards,
		avesta-highlight-shimmer 7s ease-in-out 1150ms infinite;
}

@keyframes avesta-highlight-draw {
	0% {
		scale: 0 1;
		opacity: 0;
	}
	45% {
		opacity: 1;
	}
	100% {
		scale: 1 1;
		opacity: 1;
	}
}

@keyframes avesta-highlight-shimmer {
	0%, 100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.js .avesta-highlight::before,
	html.js .avesta-highlight.is-visible::before {
		animation: none;
		scale: 1 1;
		opacity: 1;
		background-position: 0% 50%;
	}
}

.avesta-muted {
	color: var(--wp--preset--color--muted);
}

/* ---------- Safari theme-switch repaint nudge ----------
   WebKit caches backdrop-filter layers and fixed pseudo backgrounds; an
   identity transform for two frames forces them to re-rasterize. */

html.avesta-repaint body::before,
html.avesta-repaint .avesta-header-inner,
html.avesta-repaint .glass-card,
html.avesta-repaint .glass-panel,
html.avesta-repaint .avesta-stat,
html.avesta-repaint .avesta-step,
html.avesta-repaint .avesta-hero-window,
html.avesta-repaint .avesta-notif,
html.avesta-repaint .avesta-wallpaper,
html.avesta-repaint .avesta-footer {
	transform: translateZ(0);
}

/* ---------- Scroll reveal ----------
   .avesta-reveal-m: pre-hide state managed by Motion (JS adds and removes it,
   so no-JS never blanks the page). .avesta-reveal: CSS-transition fallback. */

.avesta-reveal-m {
	opacity: 0;
}

html.js .avesta-reveal {
	opacity: 0;
	transform: translateY(36px);
	transition: opacity 700ms var(--avesta-ease), transform 700ms var(--avesta-ease);
	transition-delay: var(--reveal-delay, 0ms);
	will-change: opacity, transform;
}

html.js .avesta-reveal.is-visible {
	opacity: 1;
	transform: none;
	will-change: auto;
}

/* ---------- Reduced motion (core) ---------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	html.js .avesta-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
