@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Vazirmatn:wght@400;500;600;700&display=swap");

@layer reset, tokens, base, layout, components, blocks, motion;

@layer tokens {
	:root {
		--mt-ink: #0a1018;
		--mt-steel: #3d4f63;
		--mt-mist: #d5e0ea;
		--mt-surface: #eef2f6;
		--mt-accent: #0e7490;
		--mt-accent-deep: #0e7490;
		--mt-signal: #ca8a04;
		--mt-success: #0f766e;
		--mt-white: #ffffff;
		--mt-line: rgba(7, 11, 18, 0.12);
		--mt-glow: rgba(8, 145, 178, 0.4);
		--mt-header-h: 4.75rem;
		--mt-ease: cubic-bezier(0.22, 1, 0.36, 1);
		--mt-content: min(1240px, calc(100% - 2.5rem));
		--mt-radius: 0;
		--mt-panel: #ffffff;
		--mt-panel-2: #f7fafc;
		--mt-text-muted: #3d4f63;
		--mt-header-fg: #0a1018;
		--mt-header-muted: #2f3e50;
		--mt-on-accent: #ffffff;
		--mt-glass-bg: rgba(255, 255, 255, 0.42);
		--mt-glass-bg-strong: rgba(255, 255, 255, 0.58);
		--mt-glass-border: rgba(255, 255, 255, 0.62);
		--mt-glass-highlight: rgba(255, 255, 255, 0.72);
		--mt-glass-shadow: 0 10px 40px rgba(15, 23, 42, 0.1), 0 1px 0 rgba(255, 255, 255, 0.55) inset;
		--mt-glass-blur: blur(28px) saturate(185%);
		--mt-danger: #dc2626;
		--mt-danger-bg: #fef2f2;
		--mt-danger-border: #fecaca;
		--mt-warning: #b45309;
		--mt-warning-bg: #fffbeb;
		--mt-warning-border: #fde68a;
		--mt-info: #2f6fed;
		--mt-info-bg: #eff6ff;
		--mt-info-border: #bfdbfe;
		color-scheme: light;
	}

	html[data-theme="dark"],
	html.mt-theme-dark {
		--mt-ink: #f1f5f9;
		--mt-steel: #c5d0dc;
		--mt-mist: #1c2733;
		--mt-surface: #0b1220;
		--mt-accent: #22d3ee;
		--mt-accent-deep: #67e8f9;
		--mt-signal: #fbbf24;
		--mt-success: #2dd4bf;
		--mt-white: #ffffff;
		--mt-line: rgba(232, 238, 245, 0.16);
		--mt-glow: rgba(34, 211, 238, 0.35);
		--mt-panel: #121a26;
		--mt-panel-2: #182231;
		--mt-text-muted: #c5d0dc;
		--mt-header-fg: #f1f5f9;
		--mt-header-muted: #d7e0ea;
		--mt-on-accent: #041018;
		--mt-glass-bg: rgba(18, 26, 38, 0.48);
		--mt-glass-bg-strong: rgba(18, 26, 38, 0.62);
		--mt-glass-border: rgba(255, 255, 255, 0.14);
		--mt-glass-highlight: rgba(255, 255, 255, 0.18);
		--mt-glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
		--mt-danger: #f87171;
		--mt-danger-bg: rgba(248, 113, 113, 0.12);
		--mt-danger-border: rgba(248, 113, 113, 0.32);
		--mt-warning: #fbbf24;
		--mt-warning-bg: rgba(251, 191, 36, 0.12);
		--mt-warning-border: rgba(251, 191, 36, 0.32);
		--mt-info: #60a5fa;
		--mt-info-bg: rgba(96, 165, 250, 0.12);
		--mt-info-border: rgba(96, 165, 250, 0.32);
		color-scheme: dark;
	}

	@media (max-width: 640px) {
		:root {
			--mt-content: min(1240px, calc(100% - 1.25rem));
			--mt-header-h: 4.25rem;
		}
	}
}

body {
	background: var(--mt-surface);
}

@layer base {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

	html {
		scroll-behavior: smooth;
	}

	@media (prefers-reduced-motion: reduce) {
		html {
			scroll-behavior: auto;
		}

		*,
		*::before,
		*::after {
			animation-duration: 0.01ms !important;
			animation-iteration-count: 1 !important;
			transition-duration: 0.01ms !important;
		}
	}

	html {
		overflow-x: clip;
	}

	body.mechateams-theme {
		margin: 0;
		color: var(--mt-ink);
		font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
		font-weight: 400;
		line-height: 1.75;
		background: var(--mt-surface);
		overflow-x: clip;
	}

	body.mt-nav-open {
		overflow: hidden;
	}

	body.mt-rtl {
		direction: rtl;
		text-align: right;
	}

	img {
		max-width: 100%;
		height: auto;
		display: block;
	}

	a {
		color: inherit;
	}
}

@layer layout {
	.mt-site-header__inner,
	.mt-site-footer__inner,
	.mt-section__inner {
		width: var(--mt-content);
		margin-inline: auto;
	}

	.mt-section {
		padding-block: clamp(3rem, 7vw, 5.5rem);
	}
}

@layer components {
	.mt-brand {
		display: inline-flex;
		align-items: center;
		line-height: 0;
		text-decoration: none;
		color: inherit;
		flex-shrink: 0;
	}

	.mt-brand__plate {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: #0a0a0a;
		border: 1px solid rgba(255, 255, 255, 0.08);
		border-radius: 0.55rem;
		padding: 0.28rem 0.45rem;
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
		line-height: 0;
	}

	.mt-brand__mark {
		display: inline-flex;
		align-items: center;
		line-height: 0;
	}

	.mt-brand__logo {
		display: block;
		width: auto;
		height: 2.35rem;
		max-width: 8.75rem;
		object-fit: contain;
		object-position: center;
	}

	.mt-brand__logo--mark {
		height: 2.1rem;
		max-width: 7.25rem;
	}

	.mt-brand__logo--full {
		height: 3.5rem;
		max-width: 13rem;
	}

	.mt-brand--footer {
		display: inline-flex;
		flex-shrink: 0;
		line-height: 0;
	}

	.mt-brand--footer .mt-brand__mark {
		display: inline-flex;
		border-radius: 0.75rem;
		overflow: hidden;
	}

	/* Footer uses the colour logo so it reads on the dark surface; the plate wrapper the
	 * icon variant ships with is not wanted here. */
	.mt-brand--footer .mt-brand__plate {
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	.mt-brand--footer .mt-brand__logo--icon {
		width: 3.1rem;
		height: 3.1rem;
		max-width: none;
		object-fit: contain;
	}

	.mt-brand--footer .mt-brand__logo,
	.mt-brand__logo--footer {
		width: 3.5rem;
		height: 3.5rem;
		max-width: none;
		object-fit: cover;
		object-position: center;
	}


	.mt-site-header {
		position: fixed;
		inset-inline: 0;
		top: 0;
		z-index: 1000;
		padding: 0.65rem 0 0.45rem;
		background: transparent;
		border: 0;
		pointer-events: none;
	}

	.mt-site-header__inner {
		pointer-events: auto;
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		min-height: calc(var(--mt-header-h) - 0.9rem);
		padding: 0.28rem 0.55rem 0.28rem 0.85rem;
		border-radius: 999px;
		background: var(--mt-glass-bg);
		border: 1px solid var(--mt-glass-border);
		box-shadow: var(--mt-glass-shadow);
		backdrop-filter: var(--mt-glass-blur);
		-webkit-backdrop-filter: var(--mt-glass-blur);
		transition: background 0.3s var(--mt-ease), box-shadow 0.3s var(--mt-ease), border-color 0.3s var(--mt-ease);
		overflow: visible;
	}

	.mt-site-header__inner.mt-glass-bar::before,
	.mt-glass-bar::before {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: inherit;
		pointer-events: none;
		background: linear-gradient(180deg, var(--mt-glass-highlight) 0%, transparent 48%);
		opacity: 0.5;
		z-index: 0;
	}

	.mt-site-header__inner > * {
		position: relative;
		z-index: 1;
	}

	.mt-site-header.is-scrolled .mt-site-header__inner,
	.mt-site-header.is-nav-open .mt-site-header__inner,
	body.mt-header-solid .mt-site-header .mt-site-header__inner {
		background: var(--mt-glass-bg-strong);
		box-shadow: var(--mt-glass-shadow), 0 14px 36px rgba(15, 23, 42, 0.08);
	}

	.mt-site-header .mt-primary-nav {
		flex: 1 1 auto;
		min-width: 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.mt-header-actions {
		display: flex;
		flex-wrap: nowrap;
		gap: 0.35rem;
		align-items: center;
		flex: 0 0 auto;
		margin-inline-start: auto;
	}

	.mt-site-header .mt-account-menu--bar {
		border: 0;
		background: transparent;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		padding: 0;
		gap: 0.2rem;
	}

	.mt-site-header .mt-account-menu__who {
		padding: 0.1rem;
		max-width: none;
		border-radius: 999px;
	}

	.mt-site-header .mt-account-menu__avatar {
		width: 2rem;
		height: 2rem;
		border-radius: 0.45rem;
		object-fit: cover;
		display: block;
	}

	.mt-site-header .mt-account-menu__icon,
	.mt-site-header .mt-account-menu__logout {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		position: relative;
		width: 2.35rem;
		height: 2.35rem;
		border-radius: 999px;
		text-decoration: none;
		padding: 0;
	}

	.mt-site-header .mt-nav-toggle {
		border-color: color-mix(in srgb, var(--mt-header-fg) 20%, transparent);
		background: color-mix(in srgb, var(--mt-header-fg) 8%, transparent);
		color: var(--mt-header-fg);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-radius: 999px;
	}

	.mt-site-header .mt-nav-toggle__bars,
	.mt-site-header .mt-nav-toggle__bars::before,
	.mt-site-header .mt-nav-toggle__bars::after {
		background: var(--mt-header-fg);
	}

	.mt-nav {
		position: relative;
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 0.1rem;
		list-style: none;
		margin: 0;
		padding: 0;
		justify-content: center;
	}

	.mt-nav > li {
		display: flex;
	}

	.mt-nav a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		text-decoration: none;
		color: var(--mt-header-muted, var(--mt-steel));
		font-weight: 600;
		font-size: 0.86rem;
		padding: 0.48rem 0.88rem;
		border-radius: 999px;
		background: transparent;
		transition: color 0.2s ease, background 0.2s ease;
		white-space: nowrap;
		line-height: 1.2;
	}

	.mt-nav a::after {
		display: none;
	}

	.mt-nav__has-sub {
		position: relative;
		flex-direction: column;
		align-items: stretch;
	}

	.mt-nav__sub-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.3rem;
		text-decoration: none;
		color: var(--mt-header-muted, var(--mt-steel));
		font-family: inherit;
		font-weight: 600;
		font-size: 0.86rem;
		padding: 0.48rem 0.88rem;
		border-radius: 999px;
		background: transparent;
		border: 0;
		cursor: pointer;
		white-space: nowrap;
		line-height: 1.2;
		transition: color 0.2s ease, background 0.2s ease;
	}

	.mt-nav__sub-chevron {
		transition: transform 0.2s ease;
	}

	.mt-nav__has-sub.is-open .mt-nav__sub-chevron {
		transform: rotate(180deg);
	}

	.mt-nav__sub {
		list-style: none;
		margin: 0;
		padding: 0;
	}

@media (min-width: 961px) {
	.mt-site-header .mt-nav-toggle {
		display: none !important;
	}

	.mt-site-header .mt-primary-nav .mt-nav {
		display: flex;
	}

	.mt-nav__has-sub {
		flex-direction: row;
	}

	.mt-nav__sub {
		position: absolute;
		top: calc(100% + 0.4rem);
		inset-inline-start: 50%;
		transform: translateX(50%);
		min-width: 12rem;
		padding: 0.4rem;
		border-radius: 0.85rem;
		background: var(--mt-panel, #fff);
		border: 1px solid var(--mt-line);
		box-shadow: 0 16px 36px rgba(10, 16, 24, 0.14);
		opacity: 0;
		visibility: hidden;
		transform-origin: top center;
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	}

	.mt-nav__has-sub.is-open .mt-nav__sub {
		opacity: 1;
		visibility: visible;
		transform: translateX(50%) translateY(0);
	}

	.mt-nav__sub a {
		display: block;
		width: 100%;
		border-radius: 0.55rem;
		padding: 0.55rem 0.85rem;
		font-size: 0.85rem;
		color: var(--mt-ink);
		text-decoration: none;
	}

	.mt-nav__sub a:hover {
		background: var(--mt-panel-2, var(--mt-surface));
	}
}

@media (max-width: 960px) {
	.mt-nav__sub {
		max-height: 0;
		overflow: hidden;
		padding-inline-start: 0.75rem;
		transition: max-height 0.25s ease;
	}

	.mt-nav__has-sub.is-open .mt-nav__sub {
		max-height: 20rem;
	}

	.mt-nav__sub a {
		display: block;
		padding: 0.4rem 0.88rem;
		font-size: 0.84rem;
		color: var(--mt-header-muted, var(--mt-steel));
		text-decoration: none;
	}
}

@layer components {
	.mt-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.35rem;
		height: 2.3rem;
		min-height: 2.3rem;
		max-height: 2.3rem;
		padding: 0 1.05rem;
		border-radius: 0.6rem;
		border: 1px solid transparent;
		text-decoration: none;
		font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
		font-weight: 600;
		font-size: 0.85rem;
		line-height: 1;
		text-align: center;
		cursor: pointer;
		background: linear-gradient(135deg, #0e7490, #0f766e);
		color: #fff !important;
		box-shadow: 0 6px 14px rgba(14, 116, 144, 0.18);
		transition: transform 0.25s var(--mt-ease), background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease, border-color 0.25s ease, color 0.25s ease;
	}

	.mt-btn:hover {
		transform: translateY(-1px);
		filter: brightness(1.05);
		box-shadow: 0 12px 26px rgba(14, 116, 144, 0.28);
		color: #fff !important;
	}

	.mt-btn--primary {
		background: linear-gradient(135deg, #0e7490, #0f766e);
		color: #fff !important;
		box-shadow: 0 8px 18px rgba(14, 116, 144, 0.22);
		border: 0;
	}

	.mt-btn--primary:hover {
		filter: brightness(1.05);
		box-shadow: 0 12px 26px rgba(14, 116, 144, 0.28);
	}

	.mt-btn--ghost,
	.mt-btn--outline {
		background: var(--mt-panel);
		border-color: color-mix(in srgb, var(--mt-accent) 42%, transparent);
		color: var(--mt-accent) !important;
		box-shadow: none;
		border-radius: 0.65rem;
	}

	.mt-btn--outline:hover,
	.mt-btn--ghost:hover {
		background: color-mix(in srgb, var(--mt-accent) 8%, var(--mt-panel));
		border-color: var(--mt-accent);
		color: var(--mt-accent) !important;
		filter: none;
		box-shadow: 0 6px 14px rgba(14, 116, 144, 0.12);
	}

	.mt-btn--sm {
		height: 2rem;
		min-height: 2rem;
		max-height: 2rem;
		padding: 0 0.85rem;
		font-size: 0.8rem;
		border-radius: 0.5rem;
	}

	.mt-section__eyebrow {
		display: inline-block;
		color: var(--mt-accent-deep);
		font-weight: 700;
		margin: 0 0 0.65rem;
		font-size: 0.8rem;
		letter-spacing: 0.1em;
	}

	.mt-section__eyebrow--light {
		color: #fde68a !important;
	}

	.mt-section__title {
		margin: 0 0 0.85rem;
		font-size: clamp(1.75rem, 3.4vw, 2.6rem);
		letter-spacing: -0.02em;
		line-height: 1.28;
		color: var(--mt-ink);
	}

	.mt-section__lead {
		max-width: 46ch;
		color: var(--mt-text-muted);
		margin: 0 0 2rem;
		font-size: 1.05rem;
		line-height: 1.75;
		text-align: justify;
		text-justify: inter-word;
	}

	.mt-register .mt-section__lead,
	.mt-login .mt-section__lead {
		margin-inline: auto;
		text-align: center;
		max-width: none;
	}

	.mt-app-muted,
	.mt-form-section .mt-app-muted {
		line-height: 1.7;
		text-align: justify;
		text-justify: inter-word;
	}

	.mt-section__lead--light,
	.mt-muted-light {
		color: rgba(255, 255, 255, 0.9) !important;
	}

	.wp-site-blocks > footer.wp-block-template-part {
		margin-block-start: 0 !important;
	}

	/* Formal, darker footer treatment, built from the site's own dark-theme tokens (--mt-surface/
	 * --mt-panel/--mt-accent/--mt-signal — see html[data-theme="dark"] above) rather than
	 * invented colors, so it reads as "this platform's dark mode, turned up," not an unrelated
	 * palette. Depth comes from three stacked layers instead of one flat grid: a soft radial
	 * vignette (light source), a dual-scale blueprint grid with its own subtle glow blur (etched,
	 * not printed-on), and a warm signal-colored corner wash standing in for the flat hatch. */
	/* Whole footer reads as one frosted-glass surface: a translucent dark panel with a blurred
	 * backdrop, sitting over the page's own background gradient. Scoped to dark mode; see the
	 * light-mode block further below for the light-theme palette of the same layout. */
	/* Area 1 (the footer's own surface, outside the inner card) is a light 10% black wash over
	 * an otherwise transparent surface — the page still shows through, just slightly darkened.
	 * Area 2 (.mt-site-footer__inner, the card) carries the actual glass treatment via the
	 * shared --mt-glass-* tokens. */
	html[data-theme="dark"] .mt-site-footer,
	html.mt-theme-dark .mt-site-footer {
		position: relative;
		isolation: isolate;
		overflow: hidden;
		padding-block: 0;
		margin-top: 0;
		background: rgba(0, 0, 0, 0.1);
		color: #fff;
	}

	html[data-theme="dark"] .mt-site-footer__edge,
	html.mt-theme-dark .mt-site-footer__edge {
		position: absolute;
		z-index: 2;
		inset-inline: 0;
		top: 0;
		height: 1px;
		background: linear-gradient(
			90deg,
			transparent 0%,
			color-mix(in srgb, var(--mt-accent, #22d3ee) 25%, transparent) 20%,
			color-mix(in srgb, var(--mt-accent-deep, #67e8f9) 65%, transparent) 50%,
			color-mix(in srgb, var(--mt-accent, #22d3ee) 25%, transparent) 80%,
			transparent 100%
		);
		pointer-events: none;
	}

	/* Subtle depth only — a soft radial wash in the corner. No loud texture: the template's
	 * footer is a calm dark navy surface where the content is what reads. */
	html[data-theme="dark"] .mt-site-footer__mesh,
	html.mt-theme-dark .mt-site-footer__mesh {
		position: absolute;
		z-index: 0;
		inset: 0;
		background:
			radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--mt-accent, #22d3ee) 7%, transparent), transparent 60%),
			radial-gradient(70% 100% at 0% 100%, color-mix(in srgb, var(--mt-accent-deep, #67e8f9) 5%, transparent), transparent 65%);
		pointer-events: none;
	}

	html[data-theme="dark"] .mt-site-footer__glow,
	html[data-theme="dark"] .mt-site-footer__glow--soft,
	html.mt-theme-dark .mt-site-footer__glow,
	html.mt-theme-dark .mt-site-footer__glow--soft {
		display: none;
	}

	html[data-theme="dark"] .mt-site-footer .mt-brand,
	html.mt-theme-dark .mt-site-footer .mt-brand {
		color: var(--mt-white);
		margin: 0;
		display: inline-flex;
	}

	/* Glass card: same shared --mt-glass-* tokens the site header's floating pill uses (see
	 * .mt-site-header__inner), so the footer's glass matches the header's exactly per theme. */
	html[data-theme="dark"] .mt-site-footer__inner,
	html.mt-theme-dark .mt-site-footer__inner {
		position: relative;
		z-index: 1;
		display: grid;
		grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.85fr);
		align-items: start;
		gap: clamp(2rem, 5vw, 4rem);
		width: min(1440px, calc(100% - 2.5rem));
		margin-inline: auto;
		margin-block: clamp(2rem, 4vw, 3rem);
		padding: clamp(2.5rem, 5.5vw, 4rem) clamp(2rem, 5vw, 3.75rem);
		border-radius: 1.25rem;
		border: 1px solid var(--mt-glass-border);
		background: var(--mt-glass-bg);
		backdrop-filter: var(--mt-glass-blur);
		-webkit-backdrop-filter: var(--mt-glass-blur);
		box-shadow: var(--mt-glass-shadow);
	}

	/* Divider on the brand side too, mirroring the one before the contact column. */
	html[data-theme="dark"] .mt-site-footer__brand,
	html.mt-theme-dark .mt-site-footer__brand {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0.9rem;
		padding-inline-end: clamp(1rem, 2vw, 1.85rem);
		border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
	}

	html[data-theme="dark"] .mt-site-footer__brand-row,
	html.mt-theme-dark .mt-site-footer__brand-row {
		display: flex;
		align-items: center;
		gap: 0.85rem;
		margin-bottom: 0.35rem;
		max-width: none;
	}

	html[data-theme="dark"] .mt-site-footer__wordmark,
	html.mt-theme-dark .mt-site-footer__wordmark {
		display: flex;
		flex-direction: column;
		gap: 0.3rem;
		min-width: 0;
	}

	html[data-theme="dark"] .mt-site-footer__wordmark-name,
	html.mt-theme-dark .mt-site-footer__wordmark-name {
		color: #fff !important;
		-webkit-text-fill-color: #fff !important;
		font-family: "Rajdhani", var(--mt-font-display, inherit), sans-serif;
		font-size: 1.6rem;
		font-weight: 700;
		line-height: 1;
		letter-spacing: 0.01em;
	}

	html[data-theme="dark"] .mt-site-footer__wordmark-sub,
	html.mt-theme-dark .mt-site-footer__wordmark-sub {
		color: rgba(226, 236, 247, 0.62) !important;
		-webkit-text-fill-color: rgba(226, 236, 247, 0.62) !important;
		font-size: 0.76rem;
		font-weight: 400;
		line-height: 1.5;
	}

	html[data-theme="dark"] .mt-site-footer__tagline,
	html.mt-theme-dark .mt-site-footer__tagline {
		margin: 0;
		color: rgba(226, 236, 247, 0.72);
		font-size: 0.85rem;
		font-weight: 400;
		line-height: 1.9;
		text-align: start;
	}

	/* Trust badges sit in a 2x2 grid, like the reference template. */
	html[data-theme="dark"] .mt-site-footer__badges,
	html.mt-theme-dark .mt-site-footer__badges {
		list-style: none;
		margin: 0.6rem 0 0;
		padding: 0;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.15rem 1rem;
	}

	html[data-theme="dark"] .mt-site-footer__badges li,
	html.mt-theme-dark .mt-site-footer__badges li {
		display: flex;
		align-items: center;
		gap: 0.65rem;
		margin: 0;
		padding: 0;
		color: rgba(226, 236, 247, 0.86);
		font-size: 0.78rem;
		font-weight: 500;
		line-height: 1.55;
	}

	html[data-theme="dark"] .mt-site-footer__badge-icon,
	html.mt-theme-dark .mt-site-footer__badge-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		width: 2.6rem;
		height: 2.6rem;
		border-radius: 0.85rem;
		border: 1px solid rgba(255, 255, 255, 0.09);
		background: rgba(255, 255, 255, 0.045);
		color: rgba(226, 236, 247, 0.75);
	}

	html[data-theme="dark"] .mt-site-footer__badge-icon svg,
	html.mt-theme-dark .mt-site-footer__badge-icon svg {
		width: 1.15rem;
		height: 1.15rem;
	}

	/* Enamad trust-seal: the badge image itself is theme-neutral (issued as-is by
	   enamad.ir), so it gets a light backing plate to stay legible on the dark footer
	   instead of being recolored. Sizing is unscoped since it applies identically
	   in both themes. */
	.mt-site-footer__trustseal img {
		display: block;
		width: 5.5rem;
		/* Enamad's real logo is roughly square; fixing an aspect-ratio (rather than
		   height:auto) keeps the badge's footprint stable even if the image is slow
		   to load or briefly unreachable, instead of the layout collapsing to 0. */
		aspect-ratio: 1 / 1;
		height: auto;
		object-fit: contain;
	}

	html[data-theme="dark"] .mt-site-footer__trustseal,
	html.mt-theme-dark .mt-site-footer__trustseal {
		margin-top: 1.1rem;
	}

	html[data-theme="dark"] .mt-site-footer__trustseal a,
	html.mt-theme-dark .mt-site-footer__trustseal a {
		display: inline-flex;
		border-radius: 0.6rem;
		background: #fff;
		padding: 0.35rem;
		line-height: 0;
	}

	/* Standalone full-width row, below the whole 5-column nav grid and above the
	   copyright bar — its own thin divider on top, same treatment as .mt-site-footer__bar. */
	html[data-theme="dark"] .mt-site-footer__social-row,
	html.mt-theme-dark .mt-site-footer__social-row {
		position: relative;
		z-index: 1;
		border-top: 1px solid rgba(255, 255, 255, 0.07);
		background: transparent;
	}

	html[data-theme="dark"] .mt-site-footer__social-row,
	html.mt-theme-dark .mt-site-footer__social-row,
	html[data-theme="dark"] .mt-site-footer__social,
	html.mt-theme-dark .mt-site-footer__social {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 0.95rem;
	}

	html[data-theme="dark"] .mt-site-footer__social-row,
	html.mt-theme-dark .mt-site-footer__social-row {
		width: var(--mt-content);
		margin-inline: auto;
		padding-block: 1.75rem;
	}

	html[data-theme="dark"] .mt-site-footer__social-label,
	html.mt-theme-dark .mt-site-footer__social-label {
		color: rgba(226, 236, 247, 0.9);
		font-size: 0.83rem;
		font-weight: 600;
		white-space: nowrap;
	}

	html[data-theme="dark"] .mt-site-footer__social-links,
	html.mt-theme-dark .mt-site-footer__social-links {
		display: flex;
		align-items: center;
		gap: 0.7rem;
	}

	html[data-theme="dark"] .mt-site-footer__social-link,
	html.mt-theme-dark .mt-site-footer__social-link {
		display: inline-flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 2.7rem;
		height: 2.7rem;
		aspect-ratio: 1 / 1;
		border-radius: 50%;
		border: 1px solid rgba(255, 255, 255, 0.09);
		background: rgba(255, 255, 255, 0.045);
		color: rgba(226, 236, 247, 0.8) !important;
		-webkit-text-fill-color: rgba(226, 236, 247, 0.8) !important;
		transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	}

	html[data-theme="dark"] .mt-site-footer__social-link svg,
	html.mt-theme-dark .mt-site-footer__social-link svg {
		width: 1.15rem;
		height: 1.15rem;
	}

	html[data-theme="dark"] .mt-site-footer__social-link:hover,
	html.mt-theme-dark .mt-site-footer__social-link:hover {
		background: rgba(255, 255, 255, 0.09);
		border-color: rgba(255, 255, 255, 0.18);
		transform: translateY(-2px);
		opacity: 1;
	}

	/* The contact column holds unbreakable email strings, so it gets a larger share than the
	 * four plain nav-link columns. */
	html[data-theme="dark"] .mt-site-footer__cols,
	html.mt-theme-dark .mt-site-footer__cols {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.75fr);
		gap: clamp(1.1rem, 2.4vw, 2rem);
	}

	html[data-theme="dark"] .mt-site-footer__col,
	html.mt-theme-dark .mt-site-footer__col {
		display: grid;
		align-content: start;
		gap: 0.95rem;
		min-width: 0;
	}

	/* Heading with a short accent underline beneath it, as in the template. */
	html[data-theme="dark"] .mt-site-footer__col strong,
	html.mt-theme-dark .mt-site-footer__col strong {
		position: relative;
		margin-bottom: 0.85rem;
		padding-bottom: 0.7rem;
		color: #fff;
		font-size: 0.95rem;
		font-weight: 700;
		letter-spacing: 0;
	}

	html[data-theme="dark"] .mt-site-footer__col strong::after,
	html.mt-theme-dark .mt-site-footer__col strong::after {
		content: "";
		position: absolute;
		inset-inline-start: 0;
		bottom: 0;
		width: 2.1rem;
		height: 2px;
		border-radius: 2px;
		background: var(--mt-accent, #22d3ee);
	}

	html[data-theme="dark"] .mt-site-footer a,
	html.mt-theme-dark .mt-site-footer a {
		color: rgba(226, 236, 247, 0.72) !important;
		-webkit-text-fill-color: rgba(226, 236, 247, 0.72) !important;
		text-decoration: none;
		font-size: 0.85rem;
		font-weight: 400;
		width: fit-content;
		transition: color 0.2s ease, transform 0.2s ease;
	}

	html[data-theme="dark"] .mt-site-footer a:hover,
	html.mt-theme-dark .mt-site-footer a:hover {
		color: #fff !important;
		-webkit-text-fill-color: #fff !important;
		transform: translateX(-2px);
	}

	/* Contact column is set apart by a vertical rule, like the template. */
	html[data-theme="dark"] .mt-site-footer__col--contact,
	html.mt-theme-dark .mt-site-footer__col--contact {
		gap: 1.15rem;
		padding-inline-start: clamp(1rem, 2vw, 1.85rem);
		border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
	}

	html[data-theme="dark"] .mt-site-footer__contact-row,
	html.mt-theme-dark .mt-site-footer__contact-row {
		display: flex;
		align-items: center;
		gap: 0.55rem;
		font-size: 0.74rem;
		width: 100% !important;
		min-width: 0;
	}

	html[data-theme="dark"] .mt-site-footer__contact-row span:last-child,
	html.mt-theme-dark .mt-site-footer__contact-row span:last-child {
		min-width: 0;
		white-space: nowrap;
		direction: ltr;
		text-align: start;
	}

	html[data-theme="dark"] .mt-site-footer__contact-icon,
	html.mt-theme-dark .mt-site-footer__contact-icon {
		display: inline-flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 1.9rem;
		height: 1.9rem;
		aspect-ratio: 1 / 1;
		border-radius: 50%;
		border: 1px solid rgba(255, 255, 255, 0.09);
		background: rgba(255, 255, 255, 0.045);
		color: rgba(226, 236, 247, 0.75);
	}

	html[data-theme="dark"] .mt-site-footer__contact-item,
	html.mt-theme-dark .mt-site-footer__contact-item {
		display: grid;
		gap: 0.45rem;
	}

	html[data-theme="dark"] .mt-site-footer__contact-label,
	html.mt-theme-dark .mt-site-footer__contact-label {
		color: rgba(226, 236, 247, 0.55) !important;
		-webkit-text-fill-color: rgba(226, 236, 247, 0.55) !important;
		font-size: 0.74rem;
		font-weight: 500;
	}

	html[data-theme="dark"] .mt-site-footer__contact-icon svg,
	html.mt-theme-dark .mt-site-footer__contact-icon svg {
		width: 0.85rem;
		height: 0.85rem;
	}

	html[data-theme="dark"] .mt-site-footer__mail,
	html.mt-theme-dark .mt-site-footer__mail {
		color: #fff !important;
		-webkit-text-fill-color: #fff !important;
		font-weight: 600;
	}

	html[data-theme="dark"] .mt-site-footer__bar,
	html.mt-theme-dark .mt-site-footer__bar {
		position: relative;
		z-index: 1;
		border-top: 1px solid rgba(255, 255, 255, 0.07);
		background: transparent;
	}

	html[data-theme="dark"] .mt-site-footer__bar-inner,
	html.mt-theme-dark .mt-site-footer__bar-inner {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 0.65rem 1.5rem;
		width: var(--mt-content);
		margin-inline: auto;
		padding-block: 1.5rem 1.65rem;
	}

	html[data-theme="dark"] .mt-site-footer__copy,
	html[data-theme="dark"] .mt-site-footer__made,
	html.mt-theme-dark .mt-site-footer__copy,
	html.mt-theme-dark .mt-site-footer__made {
		margin: 0;
		color: rgba(226, 236, 247, 0.6);
		font-size: 0.8rem;
		line-height: 1.6;
	}

	html[data-theme="dark"] .mt-site-footer__copy-mark,
	html.mt-theme-dark .mt-site-footer__copy-mark {
		margin-inline-end: 0.15rem;
		color: rgba(226, 236, 247, 0.6);
	}

	html[data-theme="dark"] .mt-site-footer__made,
	html.mt-theme-dark .mt-site-footer__made {
		color: rgba(226, 236, 247, 0.6);
	}

	/* Light-mode counterpart of the dark footer above — identical layout/markup, colors adapted
	 * to the theme's light-mode tokens (--mt-surface/--mt-panel/--mt-accent/--mt-ink, see the
	 * default :root block near the top of this file). Area 1 (this rule) is a light 10% black
	 * wash over an otherwise transparent surface; area 2 (.mt-site-footer__inner) carries the
	 * actual glass card via --mt-glass-* tokens. */
	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer {
		position: relative;
		isolation: isolate;
		overflow: hidden;
		padding-block: 0;
		margin-top: 0;
		background: rgba(0, 0, 0, 0.1);
		color: var(--mt-ink, #0a1018);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__edge {
		position: absolute;
		z-index: 2;
		inset-inline: 0;
		top: 0;
		height: 1px;
		background: linear-gradient(
			90deg,
			transparent 0%,
			color-mix(in srgb, var(--mt-accent, #0e7490) 30%, transparent) 20%,
			color-mix(in srgb, var(--mt-accent-deep, #0e7490) 65%, transparent) 50%,
			color-mix(in srgb, var(--mt-accent, #0e7490) 30%, transparent) 80%,
			transparent 100%
		);
		pointer-events: none;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__mesh {
		position: absolute;
		z-index: 0;
		inset: 0;
		background:
			radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--mt-accent, #0e7490) 6%, transparent), transparent 60%),
			radial-gradient(70% 100% at 0% 100%, color-mix(in srgb, var(--mt-signal, #ca8a04) 5%, transparent), transparent 65%);
		pointer-events: none;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__glow,
	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__glow--soft {
		display: none;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer .mt-brand {
		color: var(--mt-ink, #0a1018);
		margin: 0;
		display: inline-flex;
	}

	/* Glass card: same shared --mt-glass-* tokens the site header's floating pill uses (see
	 * .mt-site-header__inner), so the footer's glass matches the header's exactly per theme. */
	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__inner {
		position: relative;
		z-index: 1;
		display: grid;
		grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.85fr);
		align-items: start;
		gap: clamp(2rem, 5vw, 4rem);
		width: min(1440px, calc(100% - 2.5rem));
		margin-inline: auto;
		margin-block: clamp(2rem, 4vw, 3rem);
		padding: clamp(2.5rem, 5.5vw, 4rem) clamp(2rem, 5vw, 3.75rem);
		border-radius: 1.25rem;
		border: 1px solid var(--mt-glass-border);
		background: var(--mt-glass-bg);
		backdrop-filter: var(--mt-glass-blur);
		-webkit-backdrop-filter: var(--mt-glass-blur);
		box-shadow: var(--mt-glass-shadow);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__brand {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0.9rem;
		padding-inline-end: clamp(1rem, 2vw, 1.85rem);
		border-inline-end: 1px solid rgba(10, 16, 24, 0.1);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__brand-row {
		display: flex;
		align-items: center;
		gap: 0.85rem;
		margin-bottom: 0.35rem;
		max-width: none;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__wordmark {
		display: flex;
		flex-direction: column;
		gap: 0.3rem;
		min-width: 0;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__wordmark-name {
		color: var(--mt-ink, #0a1018) !important;
		-webkit-text-fill-color: var(--mt-ink, #0a1018) !important;
		font-family: "Rajdhani", var(--mt-font-display, inherit), sans-serif;
		font-size: 1.6rem;
		font-weight: 700;
		line-height: 1;
		letter-spacing: 0.01em;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__wordmark-sub {
		color: rgba(10, 16, 24, 0.62) !important;
		-webkit-text-fill-color: rgba(10, 16, 24, 0.62) !important;
		font-size: 0.76rem;
		font-weight: 400;
		line-height: 1.5;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__tagline {
		margin: 0;
		color: rgba(10, 16, 24, 0.72);
		font-size: 0.85rem;
		font-weight: 400;
		line-height: 1.9;
		text-align: start;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__badges {
		list-style: none;
		margin: 0.6rem 0 0;
		padding: 0;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.15rem 1rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__badges li {
		display: flex;
		align-items: center;
		gap: 0.65rem;
		margin: 0;
		padding: 0;
		color: rgba(10, 16, 24, 0.86);
		font-size: 0.78rem;
		font-weight: 500;
		line-height: 1.55;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__badge-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		width: 2.6rem;
		height: 2.6rem;
		border-radius: 0.85rem;
		border: 1px solid rgba(10, 16, 24, 0.09);
		background: rgba(10, 16, 24, 0.035);
		color: var(--mt-accent, #0e7490);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__badge-icon svg {
		width: 1.15rem;
		height: 1.15rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__trustseal {
		margin-top: 1.1rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__trustseal a {
		display: inline-flex;
		border-radius: 0.6rem;
		background: #fff;
		padding: 0.35rem;
		line-height: 0;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-row {
		position: relative;
		z-index: 1;
		border-top: 1px solid rgba(10, 16, 24, 0.08);
		background: transparent;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-row,
	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 0.95rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-row {
		width: var(--mt-content);
		margin-inline: auto;
		padding-block: 1.75rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-label {
		color: rgba(10, 16, 24, 0.9);
		font-size: 0.83rem;
		font-weight: 600;
		white-space: nowrap;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-links {
		display: flex;
		align-items: center;
		gap: 0.7rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-link {
		display: inline-flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 2.7rem;
		height: 2.7rem;
		aspect-ratio: 1 / 1;
		border-radius: 50%;
		border: 1px solid rgba(10, 16, 24, 0.09);
		background: rgba(10, 16, 24, 0.035);
		color: rgba(10, 16, 24, 0.8) !important;
		-webkit-text-fill-color: rgba(10, 16, 24, 0.8) !important;
		transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-link svg {
		width: 1.15rem;
		height: 1.15rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__social-link:hover {
		background: rgba(10, 16, 24, 0.07);
		border-color: rgba(10, 16, 24, 0.18);
		transform: translateY(-2px);
		opacity: 1;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__cols {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.75fr);
		gap: clamp(1.1rem, 2.4vw, 2rem);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__col {
		display: grid;
		align-content: start;
		gap: 0.95rem;
		min-width: 0;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__col strong {
		position: relative;
		margin-bottom: 0.85rem;
		padding-bottom: 0.7rem;
		color: var(--mt-ink, #0a1018);
		font-size: 0.95rem;
		font-weight: 700;
		letter-spacing: 0;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__col strong::after {
		content: "";
		position: absolute;
		inset-inline-start: 0;
		bottom: 0;
		width: 2.1rem;
		height: 2px;
		border-radius: 2px;
		background: var(--mt-accent, #0e7490);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a {
		color: rgba(10, 16, 24, 0.72) !important;
		-webkit-text-fill-color: rgba(10, 16, 24, 0.72) !important;
		text-decoration: none;
		font-size: 0.85rem;
		font-weight: 400;
		width: fit-content;
		transition: color 0.2s ease, transform 0.2s ease;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a:hover {
		color: var(--mt-ink, #0a1018) !important;
		-webkit-text-fill-color: var(--mt-ink, #0a1018) !important;
		transform: translateX(-2px);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__col--contact {
		gap: 1.15rem;
		padding-inline-start: clamp(1rem, 2vw, 1.85rem);
		border-inline-start: 1px solid rgba(10, 16, 24, 0.1);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__contact-row {
		display: flex;
		align-items: center;
		gap: 0.55rem;
		font-size: 0.74rem;
		width: 100% !important;
		min-width: 0;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__contact-row span:last-child {
		min-width: 0;
		white-space: nowrap;
		direction: ltr;
		text-align: start;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__contact-icon {
		display: inline-flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 1.9rem;
		height: 1.9rem;
		aspect-ratio: 1 / 1;
		border-radius: 50%;
		border: 1px solid rgba(10, 16, 24, 0.09);
		background: rgba(10, 16, 24, 0.035);
		color: var(--mt-accent, #0e7490);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__contact-item {
		display: grid;
		gap: 0.45rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__contact-label {
		color: rgba(10, 16, 24, 0.55) !important;
		-webkit-text-fill-color: rgba(10, 16, 24, 0.55) !important;
		font-size: 0.74rem;
		font-weight: 500;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__contact-icon svg {
		width: 0.85rem;
		height: 0.85rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__mail {
		color: var(--mt-ink, #0a1018) !important;
		-webkit-text-fill-color: var(--mt-ink, #0a1018) !important;
		font-weight: 600;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__bar {
		position: relative;
		z-index: 1;
		border-top: 1px solid rgba(10, 16, 24, 0.08);
		background: transparent;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__bar-inner {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 0.65rem 1.5rem;
		width: var(--mt-content);
		margin-inline: auto;
		padding-block: 1.5rem 1.65rem;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__copy,
	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__made {
		margin: 0;
		color: rgba(10, 16, 24, 0.6);
		font-size: 0.8rem;
		line-height: 1.6;
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__copy-mark {
		margin-inline-end: 0.15rem;
		color: rgba(10, 16, 24, 0.6);
	}

	html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer__made {
		color: rgba(10, 16, 24, 0.6);
	}

	@media (prefers-reduced-motion: reduce) {
		.mt-site-footer__cta,
		.mt-site-footer__cta-arrow,
		.mt-site-footer a {
			transition: none;
		}

		.mt-site-footer__cta:hover,
		.mt-site-footer a:hover {
			transform: none;
		}
	}

	.mt-form,
	.mt-panel {
		background: color-mix(in srgb, var(--mt-panel) 90%, transparent);
		border: 1px solid var(--mt-line);
		padding: 1.5rem;
	}

	.mt-form label {
		display: block;
		font-weight: 600;
		margin-bottom: 0.35rem;
	}

	.mt-form input,
	.mt-form select,
	.mt-form textarea {
		width: 100%;
		padding: 0.7rem 0.85rem;
		border: 1px solid var(--mt-line);
		border-radius: var(--mt-radius);
		font: inherit;
		margin-bottom: 1rem;
		background: var(--mt-panel);
		color: var(--mt-ink);
	}

	.mt-form textarea {
		min-height: 140px;
		resize: vertical;
	}

	.mt-table {
		width: 100%;
		border-collapse: collapse;
	}

	.mt-table th,
	.mt-table td {
		padding: 0.75rem;
		border-bottom: 1px solid var(--mt-line);
		text-align: start;
	}

	.mt-badge {
		display: inline-block;
		padding: 0.15rem 0.55rem;
		background: var(--mt-mist);
		color: var(--mt-steel);
		font-size: 0.8rem;
		font-weight: 600;
	}

	.mt-dashboard {
		display: grid;
		gap: 1.25rem;
		grid-template-columns: minmax(200px, 240px) 1fr;
	}

	.mt-grid {
		display: grid;
		gap: 1.25rem;
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	}

	.mt-tile {
		padding: 1.25rem;
		border: 1px solid var(--mt-line);
		background: var(--mt-panel);
	}

	.mt-tile h3 {
		margin: 0 0 0.4rem;
		color: var(--mt-ink);
	}

	.mt-tile p {
		margin: 0;
		color: var(--mt-steel);
	}

	/* Legacy pattern sections */
	.mt-hero {
		position: relative;
		min-height: min(92vh, 880px);
		display: grid;
		align-items: end;
		overflow: hidden;
		color: #fff;
	}

	.mt-hero__media {
		position: absolute;
		inset: 0;
		background:
			linear-gradient(105deg, rgba(7, 11, 18, 0.88) 0%, rgba(7, 11, 18, 0.45) 55%, rgba(7, 11, 18, 0.25) 100%),
			url("../images/hero-workshop.jpg") center / cover no-repeat;
	}

	.mt-hero__content {
		position: relative;
		z-index: 1;
		width: var(--mt-content);
		margin-inline: auto;
		padding-block: clamp(5rem, 12vw, 7.5rem) clamp(3.5rem, 8vw, 5.5rem);
	}

	.mt-hero__brand {
		font-size: clamp(3.2rem, 9vw, 6.4rem);
		line-height: 0.9;
		margin: 0 0 1.15rem;
		color: #fff;
	}

	.mt-hero__title {
		max-width: 18ch;
		font-size: clamp(1.4rem, 2.6vw, 2.05rem);
		font-weight: 600;
		margin: 0 0 0.85rem;
	}

	.mt-hero__lead {
		max-width: 38ch;
		color: rgba(255, 255, 255, 0.84);
		margin: 0 0 2rem;
	}

	.mt-hero__actions {
		display: flex;
		flex-wrap: wrap;
		gap: 0.85rem;
	}
}

@layer blocks {
	/* —— Editable homepage (Gutenberg) —— */
	.mt-hero-cover.wp-block-cover {
		min-height: 92vh !important;
	}

	.mt-hero-cover .wp-block-cover__image-background {
		transform: scale(1.02);
		animation: mt-kenburns 28s var(--mt-ease) infinite alternate;
	}

	.mt-hero-cover__inner {
		width: min(1240px, calc(100% - 2.5rem));
		margin-inline: auto;
		padding-block: clamp(4.5rem, 11vw, 7rem) clamp(3.5rem, 8vw, 5.5rem);
		padding-inline: 0;
	}

	.mt-hero-cover__brand {
		font-family: "Rajdhani", "Vazirmatn", sans-serif !important;
		font-size: clamp(3.4rem, 10vw, 7rem) !important;
		font-weight: 700 !important;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		line-height: 0.88 !important;
		margin: 0 0 1.1rem !important;
		color: #fff !important;
		text-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
	}

	.mt-hero-cover__title {
		max-width: 16ch;
		font-size: clamp(1.45rem, 2.7vw, 2.15rem) !important;
		font-weight: 600 !important;
		line-height: 1.4 !important;
		margin: 0 0 0.9rem !important;
		color: #fff !important;
	}

	.mt-hero-cover__lead {
		max-width: 36ch;
		font-size: clamp(1.02rem, 1.5vw, 1.15rem) !important;
		color: rgba(255, 255, 255, 0.86) !important;
		margin: 0 0 2rem !important;
	}

	.mt-block-section {
		padding-block: clamp(3.75rem, 8vw, 6.5rem) !important;
		padding-inline: 1.25rem;
	}

	.mt-block-section--band {
		background:
			linear-gradient(180deg, rgba(213, 224, 234, 0.55), rgba(238, 242, 246, 0.2));
		border-block: 1px solid var(--mt-line);
	}

	.mt-media-split {
		gap: 2.5rem !important;
		align-items: center !important;
	}

	.mt-photo img,
	.mt-photo .wp-block-image img,
	figure.mt-photo img {
		width: 100%;
		aspect-ratio: 4 / 3;
		object-fit: cover;
		filter: saturate(1.05) contrast(1.04);
	}

	.mt-photo--frame img {
		aspect-ratio: 5 / 6;
		box-shadow:
			0 24px 60px rgba(7, 11, 18, 0.18),
			0 0 0 1px rgba(7, 11, 18, 0.06);
	}

	.mt-photo figcaption,
	.mt-photo .wp-element-caption {
		margin-top: 0.85rem !important;
		font-size: 0.95rem;
		color: var(--mt-steel);
		text-align: right;
	}

	.mt-photo-grid {
		gap: 1.35rem !important;
		margin-bottom: 1.35rem !important;
	}

	.mt-photo-grid .mt-photo img {
		aspect-ratio: 3 / 4;
		transition: transform 0.6s var(--mt-ease), filter 0.4s ease;
	}

	.mt-photo-grid .wp-block-column:hover .mt-photo img {
		transform: scale(1.03);
		filter: saturate(1.12) contrast(1.06);
	}

	.mt-checklist {
		list-style: none;
		margin: 0;
		padding: 0;
		border-top: 1px solid var(--mt-line);
	}

	.mt-checklist li {
		padding: 1rem 0;
		border-bottom: 1px solid var(--mt-line);
		color: var(--mt-steel);
		font-size: 1.02rem;
	}

	.mt-checklist li strong {
		color: var(--mt-ink);
		display: inline-block;
		min-width: 7.5rem;
	}

	.mt-role-card {
		background: var(--mt-glass-bg-strong, rgba(255, 255, 255, 0.78)) !important;
		border: 1px solid var(--mt-line);
		padding: 1.5rem 1.35rem !important;
		transition: transform 0.3s var(--mt-ease), box-shadow 0.3s ease, background 0.25s ease;
	}

	.mt-role-card:hover {
		transform: translateY(-3px);
		background: var(--mt-panel) !important;
		box-shadow: 0 18px 44px rgba(7, 11, 18, 0.1);
	}

	.mt-role-card h3 {
		margin: 0 0 0.4rem !important;
		color: var(--mt-ink) !important;
		font-size: 1.08rem !important;
	}

	.mt-role-card p {
		margin: 0 !important;
		color: var(--mt-steel);
		font-size: 0.95rem;
	}

	.mt-trust-cover,
	.mt-cta-cover {
		margin-block: 0 !important;
	}

	.mt-btn-block .wp-block-button__link {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 2.55rem !important;
		background: linear-gradient(135deg, #0e7490, #0f766e) !important;
		color: #fff !important;
		border: 0 !important;
		border-radius: 0.65rem !important;
		padding: 0.7rem 1.2rem !important;
		font-family: "Vazirmatn", Tahoma, Arial, sans-serif !important;
		font-size: 0.9rem !important;
		font-weight: 600 !important;
		line-height: 1.2 !important;
		box-shadow: 0 8px 18px rgba(14, 116, 144, 0.22) !important;
	}

	.mt-btn-block-ghost .wp-block-button__link {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 2.55rem !important;
		background: var(--mt-panel) !important;
		color: var(--mt-accent) !important;
		border: 1px solid color-mix(in srgb, var(--mt-accent) 42%, transparent) !important;
		border-radius: 0.65rem !important;
		padding: 0.7rem 1.2rem !important;
		font-weight: 600 !important;
		box-shadow: none !important;
	}

	.mt-block-section .mt-btn-block-ghost .wp-block-button__link,
	.mt-cta-cover .mt-btn-block-ghost .wp-block-button__link {
		background: transparent !important;
		border-color: rgba(255, 255, 255, 0.55) !important;
		color: #fff !important;
	}

	body .wp-block-button__link {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 2.55rem;
		border-radius: 0.65rem !important;
		font-family: "Vazirmatn", Tahoma, Arial, sans-serif !important;
		font-weight: 600 !important;
		line-height: 1.2 !important;
		transition: transform 0.25s var(--mt-ease), background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
	}

	body .wp-block-button__link:hover {
		transform: translateY(-1px);
		filter: brightness(1.05);
	}

	.has-white-color {
		color: #fff !important;
	}
}

@layer motion {
	@keyframes mt-kenburns {
		from {
			transform: scale(1.02) translate3d(0, 0, 0);
		}
		to {
			transform: scale(1.08) translate3d(-1.5%, 1%, 0);
		}
	}

	@keyframes mt-rise {
		from {
			opacity: 0;
			transform: translateY(18px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.mt-animate-on-scroll {
		opacity: 0;
		transform: translateY(18px);
		transition: opacity 0.7s var(--mt-ease), transform 0.7s var(--mt-ease);
	}

	.mt-animate-on-scroll.is-visible {
		opacity: 1;
		transform: none;
	}

	.mt-animate {
		animation: mt-rise 0.85s var(--mt-ease) both;
	}

	.mt-animate-delay {
		animation-delay: 0.12s;
	}

	.mt-animate-delay-2 {
		animation-delay: 0.24s;
	}

	.mt-animate-delay-3 {
		animation-delay: 0.36s;
	}
}

@media (max-width: 960px) {
	.mt-site-header__inner {
		flex-wrap: wrap;
		align-items: center;
		row-gap: 0.45rem;
		border-radius: 1.25rem;
		padding: 0.35rem 0.45rem;
	}

	.mt-site-header .mt-primary-nav {
		flex: 1 1 auto;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.mt-header-actions {
		flex: 0 0 auto;
		margin-inline-start: 0;
	}

	.mt-nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.6rem;
		height: 2.6rem;
		border: 1px solid var(--mt-line);
		background: var(--mt-panel);
		cursor: pointer;
		padding: 0;
		flex-shrink: 0;
	}

	.mt-nav-toggle__bars,
	.mt-nav-toggle__bars::before,
	.mt-nav-toggle__bars::after {
		display: block;
		width: 1.15rem;
		height: 2px;
		background: var(--mt-ink);
		position: relative;
		transition: transform 0.2s ease;
	}

	.mt-nav-toggle__bars::before,
	.mt-nav-toggle__bars::after {
		content: "";
		position: absolute;
		inset-inline-start: 0;
	}

	.mt-nav-toggle__bars::before {
		top: -6px;
	}

	.mt-nav-toggle__bars::after {
		top: 6px;
	}

	.mt-site-header.is-nav-open .mt-nav-toggle__bars {
		background: transparent;
	}

	.mt-site-header.is-nav-open .mt-nav-toggle__bars::before {
		top: 0;
		transform: rotate(45deg);
	}

	.mt-site-header.is-nav-open .mt-nav-toggle__bars::after {
		top: 0;
		transform: rotate(-45deg);
	}

	.mt-site-header .mt-primary-nav .mt-nav {
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0.2rem;
		width: 100%;
		flex-basis: 100%;
		background: transparent;
		border: 0;
		padding: 0.35rem 0.15rem 0.45rem;
		margin: 0;
		justify-content: stretch;
	}

	.mt-site-header.is-nav-open .mt-primary-nav .mt-nav {
		display: flex;
	}

	.mt-nav > li {
		display: block;
		width: 100%;
	}

	.mt-nav a {
		display: block;
		width: 100%;
		padding: 0.7rem 0.85rem;
		font-size: 0.95rem;
		box-sizing: border-box;
	}

	.mt-header-actions {
		flex: 0 0 auto;
		order: 0;
		margin-inline-start: auto;
	}

	.mt-header-actions .mt-btn,
	.mt-account-menu {
		flex: 0 1 auto;
	}

	.mt-account-menu--bar {
		justify-content: flex-end;
		flex-wrap: nowrap;
		border-radius: 0.75rem;
		padding: 0.1rem 0.15rem;
	}

	.mt-account-menu__who {
		max-width: none;
		flex: 0 0 auto;
	}

	.mt-media-split {
		flex-direction: column-reverse !important;
	}

	.mt-section {
		padding-block: clamp(2.25rem, 6vw, 4rem);
	}

	.wp-block-columns {
		flex-wrap: wrap !important;
	}

	.wp-block-column {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}
	.mt-btn {
		height: 2.3rem;
		min-height: 2.3rem;
		max-height: 2.3rem;
		padding: 0 1rem;
		font-size: 0.85rem;
		line-height: 1;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	.mt-hero-cover.wp-block-cover {
		min-height: 68vh !important;
	}

	.mt-section__title,
	.wp-block-heading {
		overflow-wrap: anywhere;
	}

	.mt-site-footer__inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.mt-site-footer__cols {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mt-site-footer__col--contact {
		grid-column: 1 / -1;
	}

	.mt-site-footer__bar-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.wp-block-buttons {
		flex-wrap: wrap !important;
	}

	.wp-block-button,
	.wp-block-button__link {
		width: 100%;
		max-width: 100%;
	}

	.alignwide,
	.alignfull {
		max-width: 100%;
	}

	.screen-reader-text {
		border: 0;
		clip: rect(1px, 1px, 1px, 1px);
		clip-path: inset(50%);
		height: 1px;
		margin: -1px;
		overflow: hidden;
		padding: 0;
		position: absolute;
		width: 1px;
		word-wrap: normal !important;
	}
}

@media (max-width: 640px) {
	.mt-site-footer__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mt-site-footer__col--contact {
		grid-column: 1 / -1;
	}

	.mt-site-footer__social {
		flex-wrap: wrap;
	}
}


/* —— Cinematic reveals —— */
.mt-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.85s var(--mt-ease), transform 0.85s var(--mt-ease);
	will-change: opacity, transform;
}
.mt-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Marketplace panel must never stay hidden by scroll-reveal. */
body.mt-app-ui .mt-reveal,
body.mt-app-ui .mt-section.mt-reveal,
body.mt-app-ui .mt-app .mt-reveal {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
	will-change: auto;
}
.mt-reveal--delay-1 { transition-delay: 0.08s; }
.mt-reveal--delay-2 { transition-delay: 0.16s; }
.mt-reveal--delay-3 { transition-delay: 0.24s; }

.mt-parallax-media {
	overflow: hidden;
}
.mt-parallax-media img,
.mt-parallax-media .wp-block-cover__image-background {
	transform: scale(1.08);
	transition: transform 1.2s var(--mt-ease), opacity 0.9s var(--mt-ease);
	opacity: 0.72;
}
.mt-parallax-media.is-visible img,
.mt-parallax-media.is-visible .wp-block-cover__image-background {
	transform: scale(1);
	opacity: 1;
}

.mt-media-sticky {
	display: grid;
	gap: 1.5rem;
}
@media (min-width: 961px) {
	.mt-media-sticky {
		grid-template-columns: 1.05fr 0.95fr;
		align-items: start;
		gap: 2.5rem;
	}
	.mt-media-sticky__media {
		position: sticky;
		top: calc(var(--mt-header-h) + 1rem);
	}
	.mt-media-sticky__media img {
		width: 100%;
		height: min(72vh, 560px);
		object-fit: cover;
		clip-path: inset(8% 8% 8% 8%);
		transition: clip-path 1s var(--mt-ease), filter 1s var(--mt-ease);
		filter: saturate(0.85) contrast(1.05);
	}
	.mt-media-sticky.is-visible .mt-media-sticky__media img {
		clip-path: inset(0 0 0 0);
		filter: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mt-reveal,
	.mt-parallax-media img,
	.mt-media-sticky__media img {
		opacity: 1 !important;
		transform: none !important;
		clip-path: none !important;
		transition: none !important;
		filter: none !important;
	}
}

@media (max-width: 960px) {
	.mt-parallax-media img {
		transform: none;
		opacity: 1;
	}

	.mt-site-header.is-nav-open .mt-site-header__inner {
		background: var(--mt-glass-bg-strong);
		--mt-header-fg: var(--mt-ink);
		--mt-header-muted: var(--mt-text-muted);
	}

	body.mt-is-home:not(.mt-header-solid) .mt-site-header.is-nav-open .mt-site-header__inner {
		--mt-header-fg: var(--mt-ink);
		--mt-header-muted: var(--mt-text-muted);
		background: rgba(255, 255, 255, 0.72);
		border-color: rgba(255, 255, 255, 0.7);
	}
}

/* Unlayered: beat WP theme.json link colors + guarantee fixed header */
body.mechateams-theme {
	padding-top: var(--mt-header-h);
}

/* Headings stay pure white (dark mode) / pure ink (light mode); supporting text and links use
 * a muted tone from the same palette. Scoped per theme so light mode isn't forced to white-on-white. */
html[data-theme="dark"] .mt-site-footer,
html[data-theme="dark"] .mt-site-footer strong,
html.mt-theme-dark .mt-site-footer,
html.mt-theme-dark .mt-site-footer strong {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

html[data-theme="dark"] .mt-site-footer p,
html[data-theme="dark"] .mt-site-footer span,
html[data-theme="dark"] .mt-site-footer li,
html.mt-theme-dark .mt-site-footer p,
html.mt-theme-dark .mt-site-footer span,
html.mt-theme-dark .mt-site-footer li {
	color: rgba(226, 236, 247, 0.72) !important;
	-webkit-text-fill-color: rgba(226, 236, 247, 0.72) !important;
}

html[data-theme="dark"] .mt-site-footer a,
html[data-theme="dark"] .mt-site-footer a:link,
html[data-theme="dark"] .mt-site-footer a:visited,
html[data-theme="dark"] .mt-site-footer a:active,
html[data-theme="dark"] .mt-site-footer a:focus,
html.mt-theme-dark .mt-site-footer a,
html.mt-theme-dark .mt-site-footer a:link,
html.mt-theme-dark .mt-site-footer a:visited,
html.mt-theme-dark .mt-site-footer a:active,
html.mt-theme-dark .mt-site-footer a:focus {
	color: rgba(226, 236, 247, 0.72) !important;
	-webkit-text-fill-color: rgba(226, 236, 247, 0.72) !important;
	text-decoration: none;
}

html[data-theme="dark"] .mt-site-footer a:hover,
html.mt-theme-dark .mt-site-footer a:hover {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	text-decoration: none;
}

html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer,
html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer strong {
	color: var(--mt-ink, #0a1018) !important;
	-webkit-text-fill-color: var(--mt-ink, #0a1018) !important;
}

html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer p,
html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer span,
html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer li {
	color: rgba(10, 16, 24, 0.72) !important;
	-webkit-text-fill-color: rgba(10, 16, 24, 0.72) !important;
}

html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a,
html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a:link,
html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a:visited,
html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a:active,
html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a:focus {
	color: rgba(10, 16, 24, 0.72) !important;
	-webkit-text-fill-color: rgba(10, 16, 24, 0.72) !important;
	text-decoration: none;
}

html:not([data-theme="dark"]):not(.mt-theme-dark) .mt-site-footer a:hover {
	color: var(--mt-ink, #0a1018) !important;
	-webkit-text-fill-color: var(--mt-ink, #0a1018) !important;
	text-decoration: none;
}

.mt-site-header {
	position: fixed !important;
	inset-inline: 0;
	top: 0;
	z-index: 1000;
	width: 100%;
	pointer-events: none;
}

.mt-site-header .mt-site-header__inner,
.mt-site-header .mt-nav-toggle,
.mt-site-header .mt-nav a,
.mt-site-header .mt-header-actions,
.mt-site-header .mt-account-menu {
	pointer-events: auto;
}

/* Guest auth control — plain text link, same rhythm as nav items */
.mt-header-actions {
	gap: 0.35rem;
	padding-inline-end: 0.85rem;
	margin-inline-end: 0.15rem;
}

.mt-header-auth {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	height: auto;
	padding: 0.4rem 0.35rem;
	margin-inline-end: 0.25rem;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	color: var(--mt-ink) !important;
	font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none !important;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.mt-header-auth__icon {
	flex: 0 0 auto;
	display: block;
	opacity: 0.92;
}

/* Theme toggle — sliding switch, sun/moon track icons + moving thumb */
.mt-theme-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	margin-inline-end: 0.35rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.mt-theme-toggle:focus-visible .mt-theme-toggle__track {
	outline: 2px solid var(--mt-accent);
	outline-offset: 2px;
}

.mt-theme-toggle__track {
	position: relative;
	display: inline-flex;
	align-items: center;
	width: 3.1rem;
	height: 1.7rem;
	border: 1px solid var(--mt-line);
	border-radius: 999px;
	background: var(--mt-panel-2);
	box-shadow: inset 0 1px 3px rgba(10, 16, 24, 0.12);
	transition: background-color 0.25s var(--mt-ease), border-color 0.25s var(--mt-ease);
}

.mt-theme-toggle:hover .mt-theme-toggle__track {
	border-color: color-mix(in srgb, var(--mt-accent) 40%, var(--mt-line));
}

.mt-theme-toggle__track-icon {
	position: relative;
	z-index: 1;
	flex: 1 1 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.25s var(--mt-ease), opacity 0.25s var(--mt-ease);
}

.mt-theme-toggle__track-icon--sun {
	color: #ca8a04;
}

.mt-theme-toggle__track-icon--moon {
	color: #64748b;
	opacity: 0.6;
}

html[data-theme="dark"] .mt-theme-toggle__track-icon--sun {
	color: #94a3b8;
	opacity: 0.55;
}

html[data-theme="dark"] .mt-theme-toggle__track-icon--moon {
	color: #67e2f2;
	opacity: 1;
}

.mt-theme-toggle__thumb {
	position: absolute;
	inset-inline-start: 0.15rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.3rem;
	height: 1.3rem;
	border-radius: 50%;
	background: var(--mt-panel);
	box-shadow: 0 2px 6px rgba(10, 16, 24, 0.25);
	transition: inset-inline-start 0.25s var(--mt-ease), background-color 0.25s var(--mt-ease);
}

html[data-theme="dark"] .mt-theme-toggle__thumb {
	inset-inline-start: calc(100% - 1.3rem - 0.15rem);
	background: #1c2733;
}

body.mt-is-home:not(.mt-header-solid) .mt-theme-toggle__track {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.32);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
}

body.mt-is-home:not(.mt-header-solid) .mt-theme-toggle:hover .mt-theme-toggle__track {
	border-color: rgba(255, 255, 255, 0.55);
}

body.mt-is-home:not(.mt-header-solid) .mt-theme-toggle__thumb {
	background: #fff;
}

body.mt-is-home:not(.mt-header-solid) .mt-theme-toggle__track-icon--sun {
	color: #fde68a;
}

body.mt-is-home:not(.mt-header-solid) .mt-theme-toggle__track-icon--moon {
	color: #e0f2fe;
}

.mt-header-auth:hover {
	color: var(--mt-accent-deep) !important;
	filter: none;
	transform: none;
}

body.mt-is-home:not(.mt-header-solid) .mt-header-auth {
	color: #fff !important;
}

body.mt-is-home:not(.mt-header-solid) .mt-header-auth:hover {
	color: #fff !important;
	opacity: 0.78;
}

.mt-site-header .mt-nav a,
.mt-site-header .mt-account-menu__icon,
.mt-site-header .mt-account-menu__logout,
.mt-site-header .mt-account-menu__switch summary {
	color: var(--mt-ink) !important;
}

.mt-site-header .mt-nav a:hover,
.mt-site-header .mt-nav a:focus-visible,
.mt-site-header .mt-account-menu__icon:hover,
.mt-site-header .mt-account-menu__logout:hover {
	color: var(--mt-ink) !important;
	background: rgba(10, 16, 24, 0.08);
}

body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-nav a,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-account-menu__icon,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-account-menu__logout,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-account-menu__switch summary {
	color: #ffffff !important;
}

body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-nav a:hover,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-nav a:focus-visible,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-account-menu__icon:hover,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-account-menu__logout:hover {
	color: #ffffff !important;
	background: rgba(255, 255, 255, 0.16);
}

body.mt-header-solid .mt-site-header .mt-nav a,
body.mt-header-solid .mt-site-header .mt-account-menu__icon,
body.mt-header-solid .mt-site-header .mt-account-menu__logout,
body.mt-header-solid .mt-site-header .mt-account-menu__switch summary {
	color: var(--mt-ink) !important;
}

body.mt-header-solid .mt-site-header .mt-nav a:hover,
body.mt-header-solid .mt-site-header .mt-nav a:focus-visible,
body.mt-header-solid .mt-site-header .mt-account-menu__icon:hover,
body.mt-header-solid .mt-site-header .mt-account-menu__logout:hover {
	color: var(--mt-ink) !important;
	background: rgba(10, 16, 24, 0.08);
}

/* Dropdown submenu panel always has an opaque light surface, regardless of
   scroll/homepage state — its links must stay dark, unlike the top-level
   nav links which flip to white over the dark hero. */
.mt-site-header .mt-nav__sub a,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-nav__sub a,
body.mt-header-solid .mt-site-header .mt-nav__sub a {
	color: var(--mt-ink) !important;
}

.mt-site-header .mt-nav__sub a:hover,
body.mt-is-home:not(.mt-header-solid) .mt-site-header .mt-nav__sub a:hover,
body.mt-header-solid .mt-site-header .mt-nav__sub a:hover {
	color: var(--mt-ink) !important;
	background: var(--mt-panel-2, var(--mt-surface));
}

body.mt-header-solid .mt-site-header .mt-nav-toggle__bars,
body.mt-header-solid .mt-site-header .mt-nav-toggle__bars::before,
body.mt-header-solid .mt-site-header .mt-nav-toggle__bars::after {
	background: var(--mt-ink);
}


/* Header glass flyouts (inbox / notifications) */
.mt-header-flyout {
	position: relative;
}
.mt-header-flyout > summary {
	list-style: none;
	cursor: pointer;
}
.mt-header-flyout > summary::-webkit-details-marker { display: none; }

/* Default: light panel — readable over grey dashboard / solid chrome */
.mt-header-flyout__panel {
	position: absolute;
	top: calc(100% + 0.55rem);
	inset-inline-end: 0;
	width: min(22rem, calc(100vw - 1.5rem));
	max-height: min(70vh, 28rem);
	overflow: auto;
	z-index: 80;
	padding: 0.75rem 0.8rem 0.85rem;
	border-radius: 1rem;
	border: 1px solid rgba(10, 16, 24, 0.12);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(14px) saturate(1.15);
	-webkit-backdrop-filter: blur(14px) saturate(1.15);
	box-shadow: 0 16px 36px rgba(10, 16, 24, 0.14);
	color: var(--mt-ink, #0a1018);
}
.mt-header-flyout__panel.mt-glass-panel {
	background: rgba(255, 255, 255, 0.96);
}

html[data-theme="dark"] .mt-header-flyout__panel,
html.mt-theme-dark .mt-header-flyout__panel,
html[data-theme="dark"] .mt-header-flyout__panel.mt-glass-panel,
html.mt-theme-dark .mt-header-flyout__panel.mt-glass-panel {
	border-color: rgba(232, 238, 245, 0.14);
	background: rgba(18, 26, 38, 0.96);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .mt-header-flyout__list li a,
html[data-theme="dark"] .mt-header-flyout__item,
html.mt-theme-dark .mt-header-flyout__list li a,
html.mt-theme-dark .mt-header-flyout__item {
	background: rgba(232, 238, 245, 0.05);
}

html[data-theme="dark"] .mt-header-flyout__list li.is-unread a,
html[data-theme="dark"] .mt-header-flyout__list li.is-unread .mt-header-flyout__item,
html.mt-theme-dark .mt-header-flyout__list li.is-unread a,
html.mt-theme-dark .mt-header-flyout__list li.is-unread .mt-header-flyout__item {
	background: rgba(34, 211, 238, 0.1);
	border-color: rgba(34, 211, 238, 0.28);
}
.mt-header-flyout__head,
.mt-header-flyout__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.55rem;
}
.mt-header-flyout__foot { margin: 0.55rem 0 0; }
.mt-header-flyout__head a,
.mt-header-flyout__foot a,
.mt-header-flyout__actions a,
.mt-header-flyout__actions button,
.mt-header-flyout__mark button {
	color: var(--mt-accent, #0e7490);
	background: transparent;
	border: 0;
	font: inherit;
	font-size: 0.78rem;
	cursor: pointer;
	text-decoration: none;
	padding: 0;
}
.mt-header-flyout__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}
.mt-header-flyout__list li a,
.mt-header-flyout__item {
	display: grid;
	gap: 0.15rem;
	padding: 0.55rem 0.6rem;
	border-radius: 0.65rem;
	background: rgba(10, 16, 24, 0.04);
	color: var(--mt-ink, #0a1018);
	text-decoration: none;
}
.mt-header-flyout__list li.is-unread a,
.mt-header-flyout__list li.is-unread .mt-header-flyout__item {
	background: rgba(14, 116, 144, 0.1);
	border: 1px solid rgba(14, 116, 144, 0.22);
}
.mt-header-flyout__title {
	font-size: 0.86rem;
	font-weight: 600;
	color: inherit;
}
.mt-header-flyout__title em {
	font-style: normal;
	font-size: 0.72rem;
	background: #ef4444;
	color: #fff;
	border-radius: 999px;
	padding: 0.05rem 0.4rem;
	margin-inline-start: 0.25rem;
}
.mt-header-flyout__text {
	font-size: 0.78rem;
	color: var(--mt-steel, #3d4f63);
	line-height: 1.45;
}
.mt-header-flyout__time {
	font-size: 0.72rem;
	color: var(--mt-steel, #3d4f63);
	opacity: 0.85;
}
.mt-header-flyout__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 0.2rem;
}
.mt-header-flyout__empty {
	padding: 0.85rem 0.4rem;
	text-align: center;
	color: var(--mt-steel, #3d4f63);
	font-size: 0.84rem;
}
.mt-header-flyout__list > li {
	transform-origin: top center;
	transition:
		opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		height 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		margin 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		padding 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		filter 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.mt-header-flyout__list > li.is-dismissing {
	opacity: 0;
	transform: translateX(-0.85rem) scale(0.96);
	filter: blur(1.5px);
	pointer-events: none;
}

/* Home hero (transparent header): dark glass flyout over imagery */
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__panel,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__panel.mt-glass-panel {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(18, 28, 40, 0.78);
	backdrop-filter: blur(18px) saturate(1.25);
	-webkit-backdrop-filter: blur(18px) saturate(1.25);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
	color: #f8fafc;
}
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__head a,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__foot a,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__actions a,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__actions button,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__mark button {
	color: #67e8f9;
}
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__list li a,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__item {
	background: rgba(255, 255, 255, 0.04);
	color: #f8fafc;
}
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__list li.is-unread a,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__list li.is-unread .mt-header-flyout__item {
	background: rgba(34, 211, 238, 0.12);
	border-color: rgba(34, 211, 238, 0.2);
}
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__text,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__time,
body.mt-is-home:not(.mt-header-solid) .mt-header-flyout__empty {
	color: rgba(248, 250, 252, 0.86);
	opacity: 1;
}
body.mt-is-home:not(.mt-header-solid) .mt-account-menu__switch-form button {
	background: rgba(255, 255, 255, 0.04);
	color: #f8fafc;
}
body.mt-is-home:not(.mt-header-solid) .mt-account-menu__switch-form button:hover {
	background: rgba(255, 255, 255, 0.1);
}
body.mt-is-home:not(.mt-header-solid) .mt-account-menu__switch-form button.is-active {
	background: rgba(34, 211, 238, 0.12);
	border-color: rgba(34, 211, 238, 0.2);
	font-weight: 600;
}

/* Role switch list (light chrome) */
.mt-account-menu__switch-form button {
	background: rgba(10, 16, 24, 0.04);
	color: var(--mt-ink, #0a1018);
	font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
	font-size: 0.86rem;
	font-weight: 500;
	line-height: 1.45;
}
.mt-account-menu__switch-form button:hover {
	background: rgba(10, 16, 24, 0.08);
}
.mt-account-menu__switch-form button.is-active {
	background: rgba(14, 116, 144, 0.1);
	border-color: rgba(14, 116, 144, 0.22);
	font-weight: 600;
}

.mt-cs-hero {
	position: relative;
	margin-block-start: calc(-1 * var(--mt-header-h)) !important;
	padding-top: calc(var(--mt-header-h) + clamp(5rem, 12vw, 8.5rem));
	padding-bottom: clamp(3.5rem, 7vw, 5rem);
	overflow: hidden;
	background:
		radial-gradient(900px 480px at 18% -10%, rgba(34, 211, 238, 0.22), transparent 60%),
		radial-gradient(760px 440px at 88% 8%, rgba(202, 138, 4, 0.14), transparent 58%),
		radial-gradient(1000px 600px at 50% 100%, rgba(14, 116, 144, 0.18), transparent 65%),
		linear-gradient(180deg, #060a12, #0b1220 55%, #0e1728);
}

.mt-cs-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(148, 197, 219, 0.09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(148, 197, 219, 0.09) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(900px 520px at 50% 20%, #000 0%, transparent 80%);
	pointer-events: none;
}

.mt-cs-hero::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.4), transparent);
}

.mt-cs-hero .mt-cs-hero__title,
.mt-cs-hero .mt-cs-hero__lead {
	color: #f1f5f9 !important;
}

.mt-cs-hero .mt-cs-hero__lead {
	color: rgba(226, 236, 245, 0.72) !important;
}

.mt-cs-hero .mt-cs-hero__stat {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.14);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.mt-cs-hero .mt-cs-hero__stat strong {
	color: #f8fafc;
}

.mt-cs-hero .mt-cs-hero__stat span {
	color: rgba(226, 236, 245, 0.65);
}

.mt-cs-hero__inner {
	position: relative;
	width: var(--mt-content);
	margin-inline: auto;
	text-align: center;
}

.mt-cs-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mt-accent-deep);
	background: color-mix(in srgb, var(--mt-accent) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--mt-accent) 26%, transparent);
	border-radius: 999px;
	padding: 0.4rem 0.95rem 0.4rem 0.7rem;
	margin: 0 0 1.5rem;
}

.mt-cs-hero__eyebrow svg {
	width: 14px;
	height: 14px;
}

.mt-cs-hero__title {
	margin: 0 auto 1.1rem;
	max-width: 22ch;
	font-family: "Rajdhani", "Vazirmatn", sans-serif;
	font-size: clamp(2.4rem, 5.2vw, 3.75rem);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--mt-ink);
}

.mt-cs-hero__title em {
	font-style: normal;
	background: linear-gradient(95deg, var(--mt-accent-deep), var(--mt-accent) 60%, var(--mt-signal));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.mt-cs-hero__lead {
	margin: 0 auto 2.25rem;
	max-width: 44rem;
	font-size: clamp(1.02rem, 1.6vw, 1.2rem);
	line-height: 1.8;
	color: var(--mt-text-muted);
}

.mt-cs-hero__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.85rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mt-cs-hero__stat {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 1.25rem;
	border-radius: 1rem;
	background: var(--mt-glass-bg);
	border: 1px solid var(--mt-glass-border);
	backdrop-filter: var(--mt-glass-blur);
	-webkit-backdrop-filter: var(--mt-glass-blur);
	box-shadow: var(--mt-glass-shadow);
	text-align: center;
}

.mt-cs-hero__stat strong {
	font-family: "Rajdhani", "Vazirmatn", sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--mt-ink);
	line-height: 1;
}

.mt-cs-hero__stat span {
	font-size: 0.82rem;
	color: var(--mt-text-muted);
	font-weight: 500;
}
}

/* ==========================================================================
   Blog — archive/listing ([mechateams_blog]) + single-post enhancements.
   Local --mt-blog-* tokens defined once at the block root and redefined
   under the dark-theme selector pair, same convention as .mt-projdir in
   projects-catalog.css — every color-bearing rule below resolves through
   one of these tokens, so nothing needs its own dark/light pair.
   ========================================================================== */
@layer components {
.mt-blog {
	--mt-blog-ink: var(--mt-ink);
	--mt-blog-muted: var(--mt-text-muted);
	--mt-blog-line: var(--mt-line);
	--mt-blog-accent: var(--mt-accent);
	--mt-blog-accent-deep: var(--mt-accent-deep);
	--mt-blog-panel: var(--mt-panel);
	--mt-blog-panel-2: var(--mt-panel-2);
	box-sizing: border-box;
	width: var(--mt-content, min(1240px, calc(100% - 2.5rem)));
	max-width: var(--mt-content, min(1240px, calc(100% - 2.5rem)));
	margin-inline: auto;
	padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
}

html[data-theme="dark"] .mt-blog,
html.mt-theme-dark .mt-blog {
	--mt-blog-ink: var(--mt-ink);
	--mt-blog-muted: var(--mt-text-muted);
	--mt-blog-line: var(--mt-line);
	--mt-blog-accent: var(--mt-accent);
	--mt-blog-accent-deep: var(--mt-accent-deep);
	--mt-blog-panel: var(--mt-panel);
	--mt-blog-panel-2: var(--mt-panel-2);
}

.mt-blog__hero {
	max-width: 44rem;
	margin-bottom: 2rem;
}

.mt-blog__eyebrow {
	margin: 0;
	color: var(--mt-blog-accent);
	font-size: 0.82rem;
	font-weight: 700;
}

.mt-blog__title {
	/* !important: unlayered WP global-styles "h1,h2,...{color:...}" rule outranks
	   this @layer components rule regardless of specificity — see the longer note
	   on .mt-blog-single .wp-block-post-title below. */
	margin: 0.35rem 0 0.6rem;
	color: var(--mt-blog-ink) !important;
	font-size: clamp(1.6rem, 3.2vw, 2.35rem);
	font-weight: 800;
	line-height: 1.3;
}

.mt-blog__lead {
	margin: 0;
	color: var(--mt-blog-muted);
	font-size: 0.95rem;
	line-height: 1.75;
}

/* Filter bar: search + category select + submit, wraps to multiple rows on mobile. */
.mt-blog__filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 1.25rem;
	padding: 0.85rem;
	border: 1px solid var(--mt-blog-line);
	border-radius: 0.85rem;
	background: var(--mt-blog-panel);
}

.mt-blog__filter-search {
	flex: 1 1 14rem;
	min-width: 0;
}

.mt-blog__filter-cat {
	flex: 0 1 12rem;
	min-width: 0;
}

.mt-blog__filter-bar input[type="search"],
.mt-blog__filter-bar select {
	box-sizing: border-box;
	width: 100%;
	height: 2.5rem;
	padding: 0.3rem 0.85rem;
	border: 1px solid var(--mt-blog-line);
	border-radius: 0.55rem;
	background: var(--mt-blog-panel-2);
	color: var(--mt-blog-ink);
	font: inherit;
	font-size: 0.86rem;
}

.mt-blog__filter-bar input[type="search"]:focus,
.mt-blog__filter-bar select:focus {
	outline: none;
	border-color: color-mix(in srgb, var(--mt-blog-accent) 45%, transparent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mt-blog-accent) 14%, transparent);
}

.mt-blog__filter-bar .mt-btn {
	flex: 0 0 auto;
}

/* View toggle: two icon buttons, active one styled like .mt-projdir__page.is-active. */
.mt-blog__view-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin-inline-start: auto;
	padding: 0.2rem;
	border: 1px solid var(--mt-blog-line);
	border-radius: 0.6rem;
	background: var(--mt-blog-panel-2);
}

.mt-blog__view-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.2rem;
	height: 2.2rem;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 0.45rem;
	background: transparent;
	color: var(--mt-blog-muted);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mt-blog__view-btn:hover {
	color: var(--mt-blog-ink);
	background: color-mix(in srgb, var(--mt-blog-accent) 8%, transparent);
}

.mt-blog__view-btn[aria-pressed="true"] {
	border-color: color-mix(in srgb, var(--mt-blog-accent) 40%, transparent);
	background: color-mix(in srgb, var(--mt-blog-accent) 12%, transparent);
	color: var(--mt-blog-accent-deep);
}

.mt-blog__count {
	margin: 0 0 1.1rem;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--mt-blog-line);
	border-radius: 0.5rem;
	background: var(--mt-blog-panel);
	color: var(--mt-blog-muted);
	font-size: 0.82rem;
	font-weight: 600;
	display: inline-block;
}

.mt-blog__empty {
	padding: 2.5rem 1rem;
	text-align: center;
	color: var(--mt-blog-muted);
	border: 1px dashed var(--mt-blog-line);
	border-radius: 0.85rem;
}

/* Grid view (default): 3 columns desktop → 2 → 1. */
.mt-blog__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.75rem;
}

@media (max-width: 900px) {
	.mt-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mt-blog__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.mt-blog__card {
	position: relative;
	background: var(--mt-blog-panel);
	border: 1px solid var(--mt-blog-line);
	border-radius: 1.1rem;
	overflow: hidden;
	transition: transform 0.3s var(--mt-ease, ease), box-shadow 0.3s var(--mt-ease, ease), border-color 0.3s var(--mt-ease, ease);
}

.mt-blog__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 40px -14px rgba(11, 18, 32, 0.22);
	border-color: color-mix(in srgb, var(--mt-blog-accent) 25%, transparent);
}

.mt-blog__card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	/* !important: this rule lives inside @layer components, and WordPress's own global-styles
	   output (theme.json's "a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--accent-deep) }")
	   is NOT inside any @layer — unlayered CSS always outranks layered CSS regardless of selector
	   specificity, so without !important every card's excerpt/title/meta text (all of which inherit
	   color from this anchor) renders in the teal accent color instead of the card's own ink tone,
	   identically in both themes. Same root cause documented elsewhere in this file (.wp-block-post-title). */
	color: inherit !important;
	text-decoration: none;
}

.mt-blog__card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--mt-blog-panel-2);
}

.mt-blog__card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s var(--mt-ease, ease);
}

.mt-blog__card:hover .mt-blog__card-media img {
	transform: scale(1.06);
}

.mt-blog__card-media-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--mt-blog-muted);
	opacity: 0.4;
}

.mt-blog__card-media-placeholder svg {
	width: 2.25rem;
	height: 2.25rem;
}

.mt-blog__card-badge {
	position: absolute;
	z-index: 1;
	inset-block-start: 0.75rem;
	inset-inline-start: 0.75rem;
	background: rgba(10, 16, 24, 0.68); /* intentionally fixed: overlay badge on image media, same as .mt-portfolio-showcase__badge */
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--mt-white, #fff);
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0.32rem 0.75rem;
	border-radius: 999px;
	line-height: 1.4;
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.mt-blog__card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 0.5rem;
	padding: 1.15rem 1.25rem 1.35rem;
}

.mt-blog__card-title {
	/* !important: same unlayered-global-styles override issue as .mt-blog__title. */
	margin: 0;
	color: var(--mt-blog-ink) !important;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.45;
	transition: color 0.25s ease;
}

.mt-blog__card:hover .mt-blog__card-title {
	color: var(--mt-blog-accent-deep) !important;
}

.mt-blog__card-excerpt {
	margin: 0;
	flex: 1 1 auto;
	color: var(--mt-blog-muted);
	font-size: 0.86rem;
	line-height: 1.7;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mt-blog__card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.35rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--mt-blog-line);
	font-size: 0.76rem;
}

.mt-blog__card-author {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	color: var(--mt-blog-ink);
	font-weight: 700;
}

.mt-blog__card-date {
	color: var(--mt-blog-muted);
	font-weight: 500;
}

.mt-blog__card-views {
	color: var(--mt-blog-muted);
	font-weight: 500;
	font-size: 0.72rem;
}

.mt-blog__card-read {
	flex-shrink: 0;
	color: var(--mt-blog-accent-deep);
	font-weight: 700;
	white-space: nowrap;
}

/* List view: single-column horizontal rows. Uses logical properties so it
   respects RTL automatically (image on the visual right in this RTL theme). */
.mt-blog__grid.is-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.mt-blog__grid.is-list .mt-blog__card {
	border-radius: 0.85rem;
}

.mt-blog__grid.is-list .mt-blog__card-link {
	flex-direction: row;
}

.mt-blog__grid.is-list .mt-blog__card-media {
	flex: 0 0 clamp(9rem, 22vw, 14rem);
	aspect-ratio: auto;
}

.mt-blog__grid.is-list .mt-blog__card-body {
	flex: 1 1 auto;
	justify-content: center;
}

.mt-blog__grid.is-list .mt-blog__card-excerpt {
	-webkit-line-clamp: 2;
}

@media (max-width: 640px) {
	.mt-blog__grid.is-list .mt-blog__card-link {
		flex-direction: column;
	}

	.mt-blog__grid.is-list .mt-blog__card-media {
		flex: none;
		aspect-ratio: 16 / 10;
	}
}

/* Pagination — mirrors .mt-projdir__pager / .mt-projdir__page exactly. */
.mt-blog__pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.3rem;
	margin-top: 2rem;
}

.mt-blog__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.1rem;
	height: 2.1rem;
	padding: 0 0.5rem;
	border: 1px solid var(--mt-blog-line);
	border-radius: 0.45rem;
	background: var(--mt-blog-panel);
	color: var(--mt-blog-ink);
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
}

.mt-blog__page.is-active,
.mt-blog__page:hover {
	border-color: color-mix(in srgb, var(--mt-blog-accent) 40%, transparent);
	background: color-mix(in srgb, var(--mt-blog-accent) 10%, transparent);
	color: var(--mt-blog-accent-deep);
}

.mt-blog__page--gap {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

.mt-blog__page--gap:hover {
	border-color: transparent;
	background: transparent;
	color: var(--mt-blog-ink);
}

.mt-blog__page--nav {
	font-size: 1.05rem;
	font-weight: 400;
}

/* Single-post enhancements: meta row + related-posts section, appended around
   the_content by Blog\Module::render_single_content(), plus the featured-image
   wrapper class applied in templates/single.html. */
.mt-blog-single {
	--mt-blog-ink: var(--mt-ink);
	--mt-blog-muted: var(--mt-text-muted);
	--mt-blog-line: var(--mt-line);
	--mt-blog-accent: var(--mt-accent);
	--mt-blog-accent-deep: var(--mt-accent-deep);
	--mt-blog-panel: var(--mt-panel);
	--mt-blog-panel-2: var(--mt-panel-2);
}

html[data-theme="dark"] .mt-blog-single,
html.mt-theme-dark .mt-blog-single {
	--mt-blog-ink: var(--mt-ink);
	--mt-blog-muted: var(--mt-text-muted);
	--mt-blog-line: var(--mt-line);
	--mt-blog-accent: var(--mt-accent);
	--mt-blog-accent-deep: var(--mt-accent-deep);
	--mt-blog-panel: var(--mt-panel);
	--mt-blog-panel-2: var(--mt-panel-2);
}

.mt-blog-single .wp-block-post-featured-image {
	margin-bottom: 1.5rem;
}

.mt-blog-single .wp-block-post-featured-image img {
	border-radius: 1.25rem;
	display: block;
	width: 100%;
	height: auto;
	max-height: 26rem;
	object-fit: cover;
}

.mt-blog-single .wp-block-post-title {
	/* !important: this rule lives inside @layer components, and WordPress's own
	   global-styles block (theme.json's bare "h1, h2, h3, h4, h5, h6 { color: ... }"
	   rule) is NOT inside any @layer — unlayered CSS always outranks layered CSS
	   regardless of selector specificity, so without !important this heading stays
	   the fixed light-mode ink color even in dark mode. Same root cause documented
	   elsewhere in this codebase for other bare headings. */
	color: var(--mt-blog-ink) !important;
	font-size: clamp(1.5rem, 3vw, 2.15rem);
	line-height: 1.4;
}

.mt-blog-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0.5rem 0 1.75rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--mt-blog-line);
	color: var(--mt-blog-muted);
	font-size: 0.85rem;
}

.mt-blog-single__chip {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--mt-blog-accent) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--mt-blog-accent) 30%, transparent);
	color: var(--mt-blog-accent-deep);
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
}

.mt-blog-single__meta-item {
	position: relative;
	padding-inline-start: 0.75rem;
}

.mt-blog-single__meta-item::before {
	content: "·";
	position: absolute;
	inset-inline-start: 0;
	color: var(--mt-blog-muted);
	font-weight: 700;
}

.mt-blog-single__chip + .mt-blog-single__meta-item {
	padding-inline-start: 0;
}

.mt-blog-single__chip + .mt-blog-single__meta-item::before {
	content: none;
}

/* the_content body typography — match the site's existing prose scale. */
.mt-blog-single .entry-content,
.mt-blog-single .wp-block-post-content {
	color: var(--mt-blog-ink);
	font-size: 1rem;
	line-height: 1.9;
}

.mt-blog-single .wp-block-post-content > * + * {
	margin-top: 1.25em;
}

.mt-blog-single .wp-block-post-content h2,
.mt-blog-single .wp-block-post-content h3,
.mt-blog-single .wp-block-post-content h4 {
	/* !important: same unlayered-global-styles-vs-@layer issue as .wp-block-post-title above. */
	color: var(--mt-blog-ink) !important;
	font-weight: 800;
	line-height: 1.45;
}

.mt-blog-single .wp-block-post-content a {
	color: var(--mt-blog-accent-deep);
}

.mt-blog-single .wp-block-post-content img {
	border-radius: 0.85rem;
	max-width: 100%;
	height: auto;
}

.mt-blog-single .wp-block-post-content blockquote {
	margin: 0;
	padding-inline-start: 1.1rem;
	border-inline-start: 3px solid var(--mt-blog-accent);
	color: var(--mt-blog-muted);
	font-style: italic;
}

.mt-blog-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem;
	margin-top: clamp(2rem, 5vw, 3rem);
	padding-top: clamp(1.25rem, 3vw, 1.75rem);
	border-top: 1px solid var(--mt-blog-line);
	position: relative;
}

.mt-blog-share__label {
	color: var(--mt-blog-muted);
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
}

.mt-blog-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mt-blog-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 999px;
	border: 1px solid var(--mt-blog-line);
	background: var(--mt-blog-panel);
	color: var(--mt-blog-muted);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.mt-blog-share__btn:hover,
.mt-blog-share__btn:focus-visible {
	color: var(--mt-blog-accent);
	border-color: var(--mt-blog-accent);
	background: var(--mt-blog-panel-2);
}

.mt-blog-share__btn svg {
	pointer-events: none;
}

.mt-blog-share__copied {
	position: absolute;
	inset-inline-start: 0;
	inset-inline-end: 0;
	top: 100%;
	margin-top: 0.5rem;
	max-width: 22rem;
	padding: 0.4rem 0.75rem;
	border-radius: 0.5rem;
	background: var(--mt-blog-accent-deep);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(-4px);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.mt-blog-share__copied.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.mt-blog-single__related {
	margin-top: clamp(2.5rem, 6vw, 4rem);
	padding-top: clamp(1.75rem, 4vw, 2.5rem);
	border-top: 1px solid var(--mt-blog-line);
}

.mt-blog-single__related-title {
	margin: 0 0 1.5rem;
	color: var(--mt-blog-ink);
	font-size: 1.3rem;
	font-weight: 800;
}

.mt-blog-single__related .mt-blog__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
	.mt-blog-single__related .mt-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mt-blog-single__related .mt-blog__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

}

/*
 * Deliberately OUTSIDE every @layer below. WordPress's own block-theme global-styles output
 * (theme.json's styles.elements.heading, injected as an inline, unlayered <style> tag) sets
 * `h1,h2,h3,h4,h5,h6 { color: var(--wp--preset--color--ink) }` using a preset custom property that
 * is only ever defined once, from theme.json's light-mode palette — it has no dark-mode variant.
 * Any same rule placed inside this file's @layer components loses to that unlayered rule
 * regardless of selector specificity, because CSS Cascade Layers give ANY unlayered rule priority
 * over ALL layered rules. The 404 page is a full-bleed photo cover (white text over a dark
 * overlay, like the homepage hero) so this mostly doesn't bite here the way it would for plain
 * dark-ink text — kept unlayered anyway so every rule below reliably wins outright.
 */
.mt-error-404-cover .wp-block-cover__inner-container {
	width: 100%;
}

.mt-error-404__wrap {
	width: min(640px, calc(100% - 2.5rem));
	margin-inline: auto;
	text-align: center;
	padding-block: clamp(3rem, 8vw, 5rem);
}

.mt-error-404__eyebrow {
	margin: 0 0 0.6rem;
	font-family: "Rajdhani", "Vazirmatn", sans-serif;
	font-size: clamp(0.85rem, 1.4vw, 1rem);
	font-weight: 700;
	letter-spacing: 0.32em;
	color: #67e8f9;
	text-transform: uppercase;
}

.mt-error-404__code {
	margin: 0 0 0.75rem;
	font-family: "Rajdhani", "Vazirmatn", sans-serif;
	font-size: clamp(5.5rem, 16vw, 9.5rem);
	font-weight: 700;
	line-height: 0.85;
	letter-spacing: 0.02em;
	color: #fff;
	text-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

.mt-error-404__title {
	margin: 0 0 1rem;
	font-size: clamp(1.5rem, 3.2vw, 2.25rem);
	font-weight: 700;
	line-height: 1.42;
	color: #fff;
}

.mt-error-404__lead {
	max-width: 42ch;
	margin: 0 auto 2rem;
	font-size: clamp(1rem, 1.5vw, 1.1rem);
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.82);
}

.mt-error-404__actions {
	display: flex;
	justify-content: center;
	margin-bottom: clamp(3rem, 7vw, 4.5rem);
}

.mt-btn--lg {
	padding-block: 0.95rem;
	padding-inline: 2.1rem;
	font-size: 0.98rem;
}

.mt-error-404__popular {
	padding-top: clamp(2rem, 5vw, 2.75rem);
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.mt-error-404__popular-label {
	margin: 0 0 1.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}

.mt-error-404__popular-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
	text-align: start;
}

@media (max-width: 640px) {
	.mt-error-404__popular-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.mt-error-404__popular-card {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.95rem 1.15rem;
	border-radius: 0.9rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.055);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #fff;
	text-decoration: none;
	transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.mt-error-404__popular-card:hover {
	border-color: rgba(103, 232, 249, 0.55);
	background: rgba(34, 211, 238, 0.1);
	transform: translateY(-2px);
}

.mt-error-404__popular-num {
	flex: none;
	font-family: "Rajdhani", "Vazirmatn", sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	color: rgba(103, 232, 249, 0.85);
	letter-spacing: 0.02em;
}

.mt-error-404__popular-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.92rem;
	font-weight: 600;
}

.mt-error-404__popular-arrow {
	flex: none;
	opacity: 0.55;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.mt-error-404__popular-card:hover .mt-error-404__popular-arrow {
	opacity: 1;
	transform: translateX(-3px);
}

