/* =========================================================
   Magnetas – site-wide header (same look/behaviour as Home v2)
   Markup lives in the Elementor "Magnetas Header (v2)" template.
   Everything is prefixed .mgh so the old theme CSS can't touch it.
   ========================================================= */
:root {
	--mgh-bg: #030605;
	--mgh-ink: #eef3f0;
	--mgh-mut: #8e9893;
	--mgh-line: rgba(255, 255, 255, .08);
	--mgh-g: #00ec85;
	--mgh-g-2: #5dffb4;
	--mgh-g-ink: #02140b;
	--mgh-pad: clamp(20px, 4vw, 58px);
	--mgh-h: 86px;
	--mgh-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--mgh-ease: cubic-bezier(.16, 1, .3, 1);
}
/* Elementor wrapper takes no space: the bar is fixed */
.elementor-location-header:has(.mgh) .elementor-section,
.elementor-location-header:has(.mgh) .elementor-container,
.elementor-location-header:has(.mgh) .elementor-column,
.elementor-location-header:has(.mgh) .elementor-widget-wrap,
.elementor-location-header:has(.mgh) .elementor-widget { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }

.mgh, .mgh * { box-sizing: border-box; }
.mgh {
	position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
	display: flex; align-items: center; gap: 56px; height: var(--mgh-h); padding: 0 var(--mgh-pad);
	font-family: "gilroy-medium", "Gilroy", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; color: var(--mgh-ink);
	border-bottom: 1px solid transparent;
	transition: transform .45s var(--mgh-ease), background-color .3s, border-color .3s, height .3s var(--mgh-ease);
}
.mgh.is-stuck, .mgh.is-solid { background: rgba(3, 6, 5, .84); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom-color: var(--mgh-line); }
.mgh.is-hidden { transform: translateY(-101%); }
.admin-bar .mgh { top: 32px; }
@media (max-width: 782px) { .admin-bar .mgh { top: 46px; } }

.mgh a { text-decoration: none; }
.mgh__logo { position: relative; z-index: 2; display: block; line-height: 0; }
.mgh__logo img { width: 142px; height: auto; max-width: none; }
.mgh__links { display: flex; gap: 32px; font-size: 15px; }
.mgh__links a { position: relative; color: #a9b4ae; transition: color .16s var(--mgh-ease); }
.mgh__links a::after { content: ""; position: absolute; left: 50%; top: calc(100% + 6px); width: 4px; height: 4px; margin-left: -2px; background: var(--mgh-g); scale: 0; transition: scale .16s steps(2, end); }
.mgh__links a:is(:hover, :focus-visible, [aria-current="page"]) { color: var(--mgh-ink); }
.mgh__links a:is(:hover, :focus-visible, [aria-current="page"])::after { scale: 1; }
.mgh__right { position: relative; z-index: 2; margin-left: auto; display: flex; align-items: center; gap: 18px; }

/* primary button: pixel-notched corners + 4-step dither fill (as v2) */
.mgh-btn {
	position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 12px;
	font: 600 14px/1 "gilroy-bold", "Gilroy", sans-serif; white-space: nowrap; letter-spacing: 0;
	padding: 12px 17px; border-radius: 0; background: var(--mgh-g); color: var(--mgh-g-ink) !important;
	clip-path: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));
}
.mgh-btn::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: conic-gradient(var(--mgh-g-2) 25%, transparent 0), conic-gradient(var(--mgh-g-2) 25%, transparent 0);
	background-position: 0 0, 2px 2px; background-size: 4px 4px; opacity: 0; transition: opacity .32s steps(4, end);
}
.mgh-btn:is(:hover, :focus-visible)::after { opacity: 1; }
.mgh-btn:hover { color: var(--mgh-g-ink) !important; }

/* burger + label */
.mgh__toggle {
	display: none; position: relative; height: 44px; min-width: 44px; padding: 0 14px 0 44px; margin: 0;
	color: var(--mgh-ink) !important; background: transparent !important; border: 1px solid var(--mgh-line) !important; border-radius: 4px !important;
	cursor: pointer; box-shadow: none !important;
}
.mgh__tlabel { font: 700 12px/42px var(--mgh-mono); letter-spacing: .14em; text-transform: uppercase; }
.mgh__toggle span[aria-hidden] { position: absolute; left: 14px; width: 18px; height: 2px; background: var(--mgh-ink); transition: transform .25s; }
.mgh__toggle span[aria-hidden]:nth-of-type(2) { top: 17px; }
.mgh__toggle span[aria-hidden]:nth-of-type(3) { top: 25px; }
.mgh__toggle[aria-expanded="true"] span[aria-hidden]:nth-of-type(2) { transform: translateY(4px) rotate(45deg); }
.mgh__toggle[aria-expanded="true"] span[aria-hidden]:nth-of-type(3) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- fullscreen menu ---------- */
html.mgh-lock, html.mgh-lock body { overflow: hidden !important; }
/* with the menu open the bar must not be transformed/filtered, or the fixed menu would be trapped inside it */
html.mgh-lock .mgh { transform: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--mgh-line); }
.mgh-menu { position: fixed; inset: 0; z-index: 1; visibility: hidden; }
.mgh-menu.is-open, .mgh-menu.is-closing { visibility: visible; }
.mgh-menu[hidden] { display: none; }
.mgh-menu__cols { position: absolute; inset: 0; display: flex; pointer-events: none; }
.mgh-menu__cols span { flex: 1; margin-right: -1px; position: relative; background: #050a08; transform: scaleY(0); transform-origin: 50% 0; transition: transform .52s cubic-bezier(.7, 0, .2, 1) calc((7 - var(--c)) * 22ms); }
.mgh-menu__cols span::after { content: ""; position: absolute; left: 0; right: 1px; bottom: 0; height: 3px; background: var(--mgh-g); opacity: 0; }
.mgh-menu.is-open .mgh-menu__cols span { transform: scaleY(1); transition-delay: calc(var(--c) * 34ms); }
.mgh-menu.is-open .mgh-menu__cols span::after { animation: mgh-edge .8s calc(var(--c) * 34ms) both; }
@keyframes mgh-edge { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.mgh-menu.is-closing .mgh-menu__cols span { transform-origin: 50% 100%; transition-delay: calc(.12s + (7 - var(--c)) * 22ms); }
.mgh-menu__inner { position: absolute; inset: 72px 0 0 0; z-index: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 32px; display: flex; flex-direction: column; border-top: 1px solid transparent; transition: border-color .3s .4s; }
.mgh-menu.is-open .mgh-menu__inner { border-top-color: var(--mgh-line); }
.mgh-menu__list { display: grid; }
.mgh-menu__item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 22px 0 24px; color: var(--mgh-ink) !important; }
.mgh-menu__item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(255, 255, 255, .12); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--mgh-ease); }
.mgh-menu__t { grid-column: 1; grid-row: 1; display: block; overflow: hidden; font-family: "gilroy-bold", "Gilroy", sans-serif; font-size: clamp(40px, 11vw, 56px); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; }
.mgh-menu__t > span { display: inline-block; transform: translateY(105%); transition: transform .6s var(--mgh-ease), color .2s; white-space: nowrap; }
.mgh-menu__n { grid-column: 2; grid-row: 1; align-self: start; padding-top: 8px; font: 500 12px var(--mgh-mono); color: var(--mgh-g); opacity: 0; transition: opacity .3s; }
.mgh-menu__d { grid-column: 1 / -1; font-size: 16px; line-height: 1.5; color: var(--mgh-mut); max-width: 32ch; opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .55s var(--mgh-ease); }
.mgh-menu__item:is(:hover, :focus-visible, [aria-current="page"]) .mgh-menu__t > span { color: var(--mgh-g); }
.mgh-menu__item:focus-visible { outline: 2px solid var(--mgh-g); outline-offset: 4px; }
.mgh-menu__foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; padding-bottom: env(safe-area-inset-bottom); opacity: 0; transform: translateY(14px); transition: opacity .45s, transform .55s var(--mgh-ease); }
.mgh-menu__chip { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; font: 700 12px var(--mgh-mono); letter-spacing: .12em; text-transform: uppercase; color: #cfd8d3 !important; border: 1px solid rgba(255, 255, 255, .16); }
.mgh-menu__chip:hover { border-color: var(--mgh-g); color: var(--mgh-g) !important; }
.mgh-menu__chip i { width: 8px; height: 8px; background: var(--mgh-g); }
.mgh-menu__foot .mgh-btn { height: 46px; }
/* staggered entrance */
.mgh-menu.is-open .mgh-menu__item::after { transform: scaleX(1); transition-delay: calc(.32s + var(--i) * 80ms); }
.mgh-menu.is-open .mgh-menu__t > span { transform: none; transition-delay: calc(.28s + var(--i) * 80ms), 0s; }
.mgh-menu.is-open .mgh-menu__n { opacity: 1; transition-delay: calc(.45s + var(--i) * 80ms); }
.mgh-menu.is-open .mgh-menu__d { opacity: 1; transform: none; transition-delay: calc(.38s + var(--i) * 80ms); }
.mgh-menu.is-open .mgh-menu__foot { opacity: 1; transform: none; transition-delay: .7s; }
/* quick exit */
.mgh-menu.is-closing :is(.mgh-menu__t > span, .mgh-menu__d, .mgh-menu__foot, .mgh-menu__n) { transition-duration: .22s; transition-delay: 0s; opacity: 0; }

@media (max-width: 1100px) { .mgh { gap: 30px; } }
@media (max-width: 860px) {
	.mgh { --mgh-h: 72px; }
	.mgh__links, .mgh__right .mgh-btn { display: none; }
	.mgh__toggle { display: block; }
}
@media (min-width: 861px) { .mgh-menu { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
	.mgh, .mgh-menu *, .mgh-menu *::after { transition: none !important; animation: none !important; }
}

/* blog / post / archive heroes were spaced for the old 50px white bar: clear the taller bar */
:is(body.blog, body.archive, body.single-post, body.search) :is([data-elementor-type="archive"], [data-elementor-type="single-post"]) > .elementor-element:first-child { padding-top: calc(var(--mgh-h) + 36px) !important; }

/* =========================================================
   Site footer ("Magnetas Footer (v2)" Elementor template)
   ========================================================= */
.elementor-location-footer:has(.mgf) .elementor-section,
.elementor-location-footer:has(.mgf) .elementor-container,
.elementor-location-footer:has(.mgf) .elementor-column,
.elementor-location-footer:has(.mgf) .elementor-widget-wrap,
.elementor-location-footer:has(.mgf) .elementor-widget { padding: 0 !important; margin: 0 !important; background: none !important; }
.mgf, .mgf * { box-sizing: border-box; }
.mgf { position: relative; z-index: 1; background: #030605; color: var(--mgh-ink); font-family: "Gilroy", "gilroy-medium", system-ui, sans-serif; font-weight: 500; -webkit-font-smoothing: antialiased; }
.mgf a { text-decoration: none; }
.mgf-hello { max-width: 1440px; margin: 0 auto; padding: clamp(90px, 11vw, 150px) var(--mgh-pad); }
.mgf-label { font: 500 12px/1.4 var(--mgh-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mgh-mut); margin: 0 0 22px; }
.mgf-label span { color: var(--mgh-g); margin-right: 10px; }
.mgf-hello__title { font-family: "Gilroy", "gilroy-bold", sans-serif; font-size: clamp(64px, 12vw, 190px); font-weight: 700; letter-spacing: -.06em; line-height: .9; margin: 0; color: var(--mgh-ink); }
.mgf-hello__title span { color: var(--mgh-g); }
.mgf-hello__intro { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; color: #b4beb9; margin: 22px 0 0; max-width: 620px; }
.mgf-hello__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.mgf .mgh-btn { padding: 16px 22px; font-size: 15px; }
.mgf-ghost { display: inline-flex; align-items: center; padding: 15px 22px; font: 600 15px/1 "Gilroy", "gilroy-bold", sans-serif; color: var(--mgh-ink) !important; border: 1px solid rgba(255, 255, 255, .22); transition: border-color .16s, color .16s, background-color .16s; }
.mgf-ghost:hover { border-color: var(--mgh-g); color: var(--mgh-g) !important; background: rgba(0, 236, 133, .06); }
.mgf-foot { border-top: 1px solid var(--mgh-line); padding: 64px var(--mgh-pad) 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 50px; max-width: 1440px; margin: 0 auto; }
.mgf-brand img { width: 142px; height: auto; display: block; }
.mgf-brand p { color: #8e9893; line-height: 1.55; max-width: 300px; margin: 18px 0 0; font-size: 15px; }
.mgf-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mgf-cols div { display: grid; gap: 10px; align-content: start; }
.mgf-cols p { font: 500 11px var(--mgh-mono); letter-spacing: .14em; text-transform: uppercase; color: #6f7b75; margin: 0 0 6px; }
.mgf-cols a { justify-self: start; color: #a9b4ae; font-size: 15px; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 1px; padding-bottom: 2px; transition: background-size .32s var(--mgh-ease), color .16s var(--mgh-ease); }
.mgf-cols a:hover { color: var(--mgh-ink); background-size: 100% 1px; }
.mgf-bar { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--mgh-line); padding-top: 22px; font: 500 12px var(--mgh-mono); color: #6f7b75; text-transform: uppercase; letter-spacing: .08em; }
.mgf-bar a { color: #8e9893; }
.mgf-bar a:hover { color: var(--mgh-g); }
/* the contact page is already the "say hello" */
.page-template-contact .mgf-hello { display: none; }
@media (max-width: 860px) {
	.mgf-foot { grid-template-columns: 1fr; gap: 36px; }
	.mgf-cols { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
}
