/* =========================================================
   Magnetas – Home v2 (pixel-portrait hero)
   ========================================================= */
@font-face { font-family: "Gilroy"; src: url("../../fonts/Gilroy-Bold.woff2") format("woff2"), url("../../fonts/gilroy-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../../fonts/Gilroy-Medium.woff2") format("woff2"), url("../../fonts/gilroy-medium.woff") format("woff"); font-weight: 500; font-display: swap; }

:root {
	--mg-bg: #030605;
	--mg-ink: #eef3f0;
	--mg-mut: #8e9893;
	--mg-line: rgba(255, 255, 255, .08);
	--mg-g: #00ec85;
	--mg-g-2: #5dffb4;
	--mg-g-ink: #02140b;
	--mg-pad: clamp(20px, 4vw, 58px);
	--mg-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--mg-pixel: "VT323", var(--mg-mono);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.mg2 {
	margin: 0; background: var(--mg-bg); color: var(--mg-ink);
	font-family: "Gilroy", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500;
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.mg2 *, .mg2 *::before, .mg2 *::after { box-sizing: border-box; }
.mg2 a { color: inherit; }
.mg2 img { max-width: 100%; display: block; }
.mg-mono { font-family: var(--mg-mono); }
.mg-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mg-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--mg-g); color: var(--mg-g-ink); padding: 10px 14px; font-weight: 700; }
.mg-skip:focus { left: 8px; }
.mg2 .elementor-location-popup { display: none !important; }
.mg2 :focus-visible { outline: 2px solid var(--mg-g); outline-offset: 3px; }
:where(.mg2) button { -webkit-appearance: none; appearance: none; margin: 0; font: inherit; text-transform: none; letter-spacing: inherit; box-shadow: none; border-radius: 0; background: none; color: inherit; line-height: 1.2; border: 0; padding: 0; }
main, .mg-nav { position: relative; z-index: 1; }

/* page-wide dust */
.mg-field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; image-rendering: pixelated; }

/* ---------- buttons ---------- */
.mg-btn {
	display: inline-flex; align-items: center; gap: 12px;
	font: 600 15px/1 "Gilroy", sans-serif; text-decoration: none; white-space: nowrap;
	padding: 15px 22px; border-radius: 3px; background: var(--mg-g); color: var(--mg-g-ink) !important;
	transition: background-color .2s ease, transform .2s ease;
}
.mg-btn:hover { background: var(--mg-g-2); }
.mg-btn--sm { padding: 12px 17px; font-size: 14px; }
.mg-btn--primary { margin-top: 36px; padding: 16px 24px; font-size: 16px; }
.mg-btn--primary span { transition: transform .2s ease; }
.mg-btn--primary:hover span { transform: translateX(4px); }

/* ---------- nav ---------- */
.mg-nav { position: absolute; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 56px; height: 86px; padding: 0 var(--mg-pad); }
.mg-nav__logo img { width: 142px; height: auto; }
.mg-nav__links { display: flex; gap: 32px; font-size: 15px; }
.mg-nav__links a { text-decoration: none; color: #d4dbd7; transition: color .2s; }
.mg-nav__links a:hover { color: var(--mg-g); }
.mg-nav__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.mg-nav__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--mg-line) !important; border-radius: 4px !important; cursor: pointer; position: relative; }
.mg-nav__toggle span[aria-hidden] { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--mg-ink); transition: transform .25s; }
.mg-nav__toggle span[aria-hidden]:nth-of-type(2) { top: 17px; }
.mg-nav__toggle span[aria-hidden]:nth-of-type(3) { top: 25px; }
.mg-nav__toggle[aria-expanded="true"] span[aria-hidden]:nth-of-type(2) { transform: translateY(4px) rotate(45deg); }
.mg-nav__toggle[aria-expanded="true"] span[aria-hidden]:nth-of-type(3) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */
.mg-hero { position: relative; overflow: hidden; height: max(700px, 100vh); height: max(700px, 100svh); }
.mg-hero__floor { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mg-hint {
	position: absolute; z-index: 6; left: 14px; top: 104px;
	border-left: 2px solid var(--mg-g) !important; padding: 4px 0 4px 10px !important;
	font-family: var(--mg-mono); font-size: 13px; font-weight: 700; color: #f2f6f4; cursor: pointer;
}
.mg-hint span { color: var(--mg-g); margin-left: 4px; }

.mg-art { position: absolute; z-index: 2; left: 0; bottom: 0; width: 56%; height: calc(100% - 96px); }
.mg-art__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: manipulation; }
.mg-art__canvas { -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%); }
.mg-art__tag {
	position: absolute; z-index: 3; transform: translate(-50%, 0);
	font-size: 12px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap;
	border-left: 2px solid var(--mg-g); padding: 4px 10px; background: rgba(3, 6, 5, .55);
	opacity: 0; transition: opacity .3s ease;
}
.mg-art__tag.is-on { opacity: 1; }
.mg-art__tag span:first-child { color: var(--mg-g); }

.mg-hero__copy { position: absolute; z-index: 4; left: 55.5%; right: var(--mg-pad); top: 50%; transform: translateY(-48%); }
.mg-kicker { font-size: 12.5px; letter-spacing: .1em; color: #a6b2ac; margin: 0 0 30px; font-weight: 600; }
.mg-kicker b { color: #fff; font-weight: 800; }
.mg-title { margin: 0; font-weight: 400; line-height: 1; }
.mg-say {
	display: block; font-family: var(--mg-pixel); font-size: clamp(40px, 3.6vw, 56px); color: #8f9c96; letter-spacing: .02em;
	opacity: 0; min-height: 1em;
}
.mg-say.is-on { opacity: 1; }
.mg-say__cur { display: inline-block; width: .44em; height: .66em; margin-left: .06em; background: var(--mg-g); vertical-align: -.02em; }
.mg-ai { display: block; position: relative; width: min(100%, 470px); aspect-ratio: 470 / 230; margin-top: 4px; }
.mg-ai canvas { position: absolute; left: -56px; top: -56px; width: calc(100% + 112px); height: calc(100% + 112px); pointer-events: none; }
.mg-ai { cursor: pointer; }
.mg-sub { margin: 34px 0 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: #b5bfba; }

.mg-scroll { position: absolute; z-index: 5; left: calc(var(--mg-pad) + 50px); bottom: 26px; font-size: 11.5px; letter-spacing: .2em; color: #a0aba6; text-decoration: none; text-transform: uppercase; display: inline-flex; align-items: center; gap: 12px; }
.mg-scroll i { width: 4px; height: 20px; background: #13221b; position: relative; overflow: hidden; }
.mg-scroll i::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; background: var(--mg-g); animation: mgScroll 1.8s ease-in-out infinite; }
@keyframes mgScroll { 0% { transform: translateY(-100%); } 100% { transform: translateY(340%); } }
.mg-ctrl { position: absolute; z-index: 5; right: var(--mg-pad); bottom: 22px; display: flex; align-items: center; gap: 18px; }
.mg-count { font-size: 12px; letter-spacing: .14em; color: #a0aba6; }
.mg-pause { width: 50px; height: 50px; border: 1px solid #27322d !important; background: rgba(3, 6, 5, .5) !important; color: #e8eeeb; display: grid !important; place-items: center; cursor: pointer; }
.mg-pause:hover { border-color: var(--mg-g) !important; color: var(--mg-g); }
.mg-pause svg { fill: currentColor; }
.mg-pause .i-play { display: none; }
.mg-paused .mg-pause .i-play { display: block; }
.mg-paused .mg-pause .i-pause { display: none; }
.mg-paused .mg-scroll i::after { animation-play-state: paused; }

/* =========================================================
   Sections
   ========================================================= */
.mg-sec { position: relative; padding: clamp(90px, 12vw, 160px) var(--mg-pad) 0; max-width: 1440px; margin: 0 auto; }
.mg-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #8e9893; margin: 0 0 22px; }
.mg-label span { color: var(--mg-g); margin-right: 10px; }
.mg-h2 { font-size: clamp(40px, 5.4vw, 76px); font-weight: 700; letter-spacing: -.045em; line-height: .98; margin: 0; }
.mg-intro { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; color: #b4beb9; margin: 22px 0 0; max-width: 620px; }
.mg-link { display: inline-flex; gap: 8px; align-items: center; color: var(--mg-g) !important; font-weight: 600; text-decoration: none; font-size: 15px; }
.mg-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.mg-btn--ghost { background: transparent !important; border: 1px solid rgba(255, 255, 255, .22); color: var(--mg-ink) !important; }
.mg-btn--ghost:hover { border-color: var(--mg-g); color: var(--mg-g) !important; }

/* scroll reveal */
.mg-js .mg-rv { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--rd, 0s); }
.mg-js .mg-rv.is-in { opacity: 1; transform: none; }

/* ---------- 01 ask ---------- */
.mg-ask { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 110px); align-items: end; }
.mg-askbox { margin-top: 40px; display: flex; align-items: center; gap: 12px; border: 1px solid #22302a; background: rgba(8, 14, 11, .85); border-radius: 4px; padding: 8px 8px 8px 18px; transition: border-color .2s; }
.mg-askbox:focus-within { border-color: var(--mg-g); }
.mg-askbox__caret { color: var(--mg-g); font-size: 18px; }
.mg-askbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--mg-ink); font: 500 18px/1.4 "Gilroy", sans-serif; padding: 12px 0; }
.mg-askbox input::placeholder { color: #66726c; }
.mg-askbox button { background: var(--mg-g) !important; color: var(--mg-g-ink) !important; font-weight: 700; font-size: 13px; padding: 12px 18px !important; border-radius: 3px !important; cursor: pointer; }
.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.mg-chips > span { color: #6f7b75; margin-right: 6px; }
.mg-chips button { border: 1px solid #22302a !important; padding: 8px 12px !important; color: #c9d2cd; cursor: pointer; transition: border-color .2s, color .2s; }
.mg-chips button:hover { border-color: var(--mg-g) !important; color: var(--mg-g); }
.mg-answer { margin-top: 22px; border-left: 2px solid var(--mg-g); padding: 4px 0 4px 20px; animation: mgFade .45s ease; }
.mg-answer h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.mg-answer p { margin: 0; color: #b4beb9; line-height: 1.55; }
.mg-answer .mg-link { margin-top: 12px; }
@keyframes mgFade { from { opacity: 0; transform: translateY(6px); } }
.mg-note { font-size: 11px; color: #66726c; margin: 18px 0 0; letter-spacing: .04em; }
.mg-lede { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.5; color: #e6ece9; margin: 0; }
.mg-loc { font-size: 12px; letter-spacing: .1em; color: #8e9893; margin-top: 22px; text-transform: uppercase; }

/* ---------- 02 work ---------- */


/* ---------- 03 services ---------- */

/* ---------- 04 proof ---------- */
.mg-marquee { margin: 56px calc(var(--mg-pad) * -1) 0; overflow: hidden; border-top: 1px solid var(--mg-line); border-bottom: 1px solid var(--mg-line); padding: 34px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.mg-marquee__track { display: flex; gap: 46px; align-items: center; width: max-content; animation: mgMarq 32s linear infinite; }
.mg-marquee__track span { font-size: clamp(30px, 3.6vw, 52px); font-weight: 700; letter-spacing: -.035em; white-space: nowrap; color: #e9efec; }
.mg-marquee__track span.is-nda { color: #5d6964; font-family: var(--mg-mono); font-size: clamp(18px, 1.8vw, 26px); letter-spacing: 0; font-weight: 600; }
.mg-marquee__track i { font-style: normal; color: var(--mg-g); font-size: 20px; }
@keyframes mgMarq { to { transform: translateX(-50%); } }
.mg-paused .mg-marquee__track { animation-play-state: paused; }

/* ---------- 05 lab ---------- */
.mg-labgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.mg-labcard { display: block; text-decoration: none; border: 1px solid var(--mg-line); background: rgba(8, 13, 11, .7); padding: 16px 16px 26px; border-radius: 6px; transition: border-color .25s; }
.mg-labcard:hover { border-color: rgba(0, 236, 133, .45); }
.mg-labcard__stage { aspect-ratio: 1 / .78; border-radius: 4px; overflow: hidden; background: #0a0f0d; position: relative; }
.mg-labcard__stage canvas, .mg-labcard__stage img { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: pixelated; }
.mg-labcard h3 { font-size: 22px; letter-spacing: -.02em; margin: 20px 4px 8px; }
.mg-labcard > p:not(.mg-link) { color: #a8b2ad; line-height: 1.55; margin: 0 4px; font-size: 15px; }
.mg-labcard .mg-link { margin: 16px 4px 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.mg-seg { display: flex; gap: 0; margin: 14px 4px 0; border: 1px solid #22302a; width: max-content; }
.mg-seg button { padding: 8px 12px !important; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #a8b2ad; cursor: pointer; }
.mg-seg button + button { border-left: 1px solid #22302a !important; }
.mg-seg button[aria-pressed="true"] { background: var(--mg-g) !important; color: var(--mg-g-ink); font-weight: 700; }
.mg-range { display: grid; gap: 8px; margin: 14px 4px 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #a8b2ad; }
.mg-range b { color: var(--mg-g); }
.mg-range input { width: 100%; accent-color: var(--mg-g); }

/* dark-mode email demo */
.mg-mail { display: grid; place-items: center; padding: 18px; background: #e9edf1; transition: background-color .4s; }
.mg-mail__body { width: 78%; background: #ffffff; padding: 16px 16px 18px; border-radius: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-family: Arial, sans-serif; transition: filter .4s, background-color .4s; }
.mg-mail__logo { display: inline-block; padding: 4px 6px; border-radius: 4px; }
.mg-mail__hero { height: 64px; margin: 10px 0 12px; border-radius: 3px; background: linear-gradient(120deg, #14b39a, #0b6f8f); }
.mg-mail__h { margin: 0; font-size: 15px; font-weight: 700; color: #111; }
.mg-mail__p { margin: 6px 0 12px; font-size: 11px; line-height: 1.45; color: #4b5560; }
.mg-mail__btn { display: inline-block; background: #111; color: #fff; font-size: 11px; font-weight: 700; padding: 8px 14px; border-radius: 3px; }
/* Gmail-style full inversion: page + text flip, the image (logo) does not */
.mg-mail[data-mode="broken"], .mg-mail[data-mode="fixed"] { background: #121212; }
.mg-mail[data-mode="broken"] .mg-mail__body, .mg-mail[data-mode="fixed"] .mg-mail__body { filter: invert(1) hue-rotate(180deg); }
.mg-mail[data-mode="broken"] .mg-mail__logo svg, .mg-mail[data-mode="fixed"] .mg-mail__logo, .mg-mail[data-mode="broken"] .mg-mail__hero, .mg-mail[data-mode="fixed"] .mg-mail__hero { filter: invert(1) hue-rotate(180deg); }
.mg-mail[data-mode="fixed"] .mg-mail__logo { background: #ffffff; }
/* (broken) the transparent logo keeps its black text, which now sits on a dark email body */

/* ---------- say hello ---------- */
.mg-hello { padding-bottom: clamp(90px, 12vw, 160px); }
.mg-hello__title { font-size: clamp(64px, 12vw, 190px); font-weight: 700; letter-spacing: -.06em; line-height: .9; margin: 0; }
.mg-hello__title span { color: var(--mg-g); }
.mg-hello__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* ---------- footer ---------- */
.mg-foot { position: relative; z-index: 1; border-top: 1px solid var(--mg-line); padding: 64px var(--mg-pad) 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 50px; background: rgba(3, 6, 5, .85); }
.mg-foot__brand img { width: 142px; }
.mg-foot__brand p { color: #8e9893; line-height: 1.55; max-width: 300px; margin: 18px 0 0; font-size: 15px; }
.mg-foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mg-foot__cols div { display: grid; gap: 10px; align-content: start; }
.mg-foot__cols p { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6f7b75; margin: 0 0 6px; }
.mg-foot__cols a { text-decoration: none; color: #d4dbd7; font-size: 15px; }
.mg-foot__cols a:hover { color: var(--mg-g); }
.mg-foot__bar { grid-column: 1 / -1; display: flex; justify-content: space-between; border-top: 1px solid var(--mg-line); padding-top: 22px; font-size: 12px; color: #6f7b75; }
.mg-foot__bar a { color: #8e9893; text-decoration: none; }

@media (max-width: 1000px) {
	.mg-labgrid { grid-template-columns: 1fr 1fr; }
	.mg-foot { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.mg-ask { grid-template-columns: 1fr; gap: 36px; }
	.mg-askbox input { font-size: 16px; }
	.mg-labgrid { grid-template-columns: 1fr; }
	.mg-foot__cols { grid-template-columns: 1fr 1fr; }
	.mg-foot__bar { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.mg-rv { opacity: 1; transform: none; transition: none; }
	.mg-marquee__track { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.mg-nav { gap: 30px; }
	.mg-art { width: 54%; }
	.mg-hero__copy { left: 52%; }
}
@media (max-width: 860px) {
	.mg-nav__links, .mg-nav__right .mg-btn { display: none; }
	.mg-nav__toggle { display: block; }
	.mg-nav { height: 72px; }
	.mg-hero { height: auto; padding-bottom: 110px; }
	.mg-hint { top: 82px; }
	.mg-art { position: relative; width: 100%; height: min(70svh, 560px); margin-top: 112px; }
	.mg-hero__copy { position: relative; left: auto; right: auto; top: auto; transform: none; padding: 0 20px; margin-top: 8px; }
	.mg-kicker { font-size: 11px; margin-bottom: 18px; }
	.mg-ai { width: min(100%, 360px); }
	.mg-scroll { left: 20px; }
	.mg-ctrl { right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.mg-say { transition: none; }
	.mg-scroll i::after { animation: none; }
}

/* ---------- 02 work: feature zoom + stills (laptop scenes) ---------- */
.mg-work { --work-end: calc(100vw - var(--mg-pad) * 2); --work-aspect: 1.7778; --ptr-travel: 14px; --photo-travel: 60px; padding-left: 0 !important; padding-right: 0 !important; max-width: none !important; }
.mg-work > .mg-rv { padding: 0 var(--mg-pad); }
.mg-work__title { font-size: clamp(56px, 14.6vw, 214px); line-height: .9; letter-spacing: -.055em; font-weight: 700; margin: 18px 0 0; }

.mg-feat {
	--stage: min(100svh, calc(var(--work-end) / var(--work-aspect) + 128px));
	--overhang: max(0px, calc(var(--work-end) / var(--work-aspect) - var(--stage)));
	position: relative; height: var(--stage); margin: 34px 0 var(--overhang);
}
.mg-feat__stage { position: sticky; top: calc((100svh - var(--stage)) / 2); height: var(--stage); display: grid; place-items: center; }
.mg-feat__panel { display: block; position: relative; text-decoration: none; transform: translateY(calc(48px * (1 - var(--entry, 0)))); will-change: transform; }
.mg-frame { position: relative; display: block; overflow: hidden; border-radius: 4px; background: #0a0f0c; container-type: inline-size; aspect-ratio: var(--work-aspect); }
.mg-frame--feat {
	--inset: clamp(24px, 16.8vw, 240px);
	--rest: min(calc(100vw - var(--inset) * 2), calc((var(--stage) - 80px) * var(--work-aspect)));
	--cur: calc(var(--rest) + (var(--work-end) - var(--rest)) * var(--p, 0));
	width: var(--cur); height: calc(var(--cur) / var(--work-aspect)); aspect-ratio: auto;
}
.mg-frame__media {
	position: absolute; left: calc(var(--ptr-travel) * -1); top: calc((var(--photo-travel) * .5 + var(--ptr-travel)) * -1);
	width: calc(100% + var(--ptr-travel) * 2); height: calc(100% + var(--photo-travel) + var(--ptr-travel) * 2);
	transform: translate3d(calc(var(--ptr-travel) * var(--ptr-x, 0)), calc(var(--photo-travel) * (.5 - var(--img-p, .5)) + var(--ptr-travel) * var(--ptr-y, 0)), 0) scale(calc(1 + .1 * (1 - var(--p, 1))));
	will-change: transform;
}
.mg-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px var(--mg-line); border-radius: inherit; z-index: 3; }
@media (hover: hover) and (pointer: fine) { .mg-frame { cursor: none; } }

/* laptop photos (screens baked in) */
.mg-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transition: scale .9s cubic-bezier(.16, 1, .3, 1); }
html:not(.mg-scrolling) .mg-frame:hover .mg-photo { scale: 1.035; }

/* captions */
.mg-cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 24px clamp(32px, 5vw, 72px); padding: clamp(40px, 5vw, 64px) calc(var(--mg-pad) + clamp(0px, 1.6vw, 24px)) clamp(72px, 9vw, 130px); }
.mg-cap__title { flex: none; margin: 0; font-size: clamp(26px, 2.6vw, 40px); letter-spacing: -.035em; line-height: 1.05; font-weight: 700; transition: color .16s cubic-bezier(.16, 1, .3, 1); }
.mg-feat:has(a:hover) + .mg-cap .mg-cap__title { color: var(--mg-g-2); }
.mg-cap__line { flex: 1 1 20ch; max-width: 48ch; margin: 0; color: #a9b4ae; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; text-wrap: pretty; }
.mg-cap__facts { flex: none; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.mg-cap__meta { display: flex; flex-wrap: wrap; gap: 8px 44px; margin: 0; font-size: 12px; }
.mg-cap__meta dt { color: #5f6b65; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .12em; }
.mg-cap__meta dd { margin: 0; color: #b4beb9; }
.mg-cap__view { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-size: 16px; color: var(--mg-ink); }

/* follow cursor */
.mg-cursor { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 10px;
	background: var(--mg-g); color: var(--mg-g-ink); font-size: 16px; font-weight: 700; white-space: nowrap;
	translate: calc(var(--x, -200px) - 50%) calc(var(--y, -200px) - 50%); rotate: var(--rot, 0deg); scale: calc(var(--in, .86) * var(--press, 1)); opacity: var(--o, 0); filter: blur(var(--bl, 5px));
	transition: opacity .2s cubic-bezier(.2, 0, 0, 1), scale .2s cubic-bezier(.2, 0, 0, 1), filter .2s cubic-bezier(.2, 0, 0, 1); will-change: opacity, scale, rotate, filter; }
.mg-cursor[data-on] { --o: 1; --in: 1; --bl: 0px; }
.mg-cursor[data-press] { --press: .92; transition-duration: .2s, 90ms, .2s; }
@media (hover: none), (pointer: coarse) { .mg-cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
	.mg-feat { height: auto; margin-bottom: 0; }
	.mg-feat__stage { position: static; height: auto; padding: 64px 0; }
	.mg-feat__panel, .mg-frame__media { transform: none !important; will-change: auto; }
	.mg-frame--feat { --p: 1; }
}
@media (max-width: 860px) {
	.mg-work { --ptr-travel: 0px; --photo-travel: 36px; }
	.mg-feat__stage { place-items: start center; padding-top: 48px; }
	.mg-cap { flex-direction: column; align-items: stretch; }
	.mg-cap__line { flex: none; }
}

/* =========================================================
   Hover + motion polish (ported behaviours)
   ========================================================= */
@property --mg-fill { syntax: "<integer>"; inherits: true; initial-value: 0; }
:root { --mg-ease: cubic-bezier(.16, 1, .3, 1); }

/* primary buttons: pixel-notched corners, 4-step dither fill, magnetic pull */
.mg-btn:not(.mg-btn--ghost) {
	position: relative; isolation: isolate; border-radius: 0; background: var(--mg-g);
	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));
	translate: var(--mg-mx, 0px) var(--mg-my, 0px);
	transition: translate .32s var(--mg-ease), --mg-fill .32s steps(4, end);
}
.mg-btn:not(.mg-btn--ghost):hover { background: var(--mg-g); }
.mg-btn:not(.mg-btn--ghost)::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: conic-gradient(var(--mg-g-2) 25%, transparent 0), conic-gradient(var(--mg-g-2) 25%, transparent 0), conic-gradient(var(--mg-g-2) 25%, transparent 0), conic-gradient(var(--mg-g-2) 25%, transparent 0);
	background-position: 0 0, 2px 2px, 2px 0, 0 2px;
	background-size: calc(4px * clamp(0, var(--mg-fill), 1)) calc(4px * clamp(0, var(--mg-fill), 1)),
		calc(4px * clamp(0, var(--mg-fill) - 1, 1)) calc(4px * clamp(0, var(--mg-fill) - 1, 1)),
		calc(4px * clamp(0, var(--mg-fill) - 2, 1)) calc(4px * clamp(0, var(--mg-fill) - 2, 1)),
		calc(4px * clamp(0, var(--mg-fill) - 3, 1)) calc(4px * clamp(0, var(--mg-fill) - 3, 1));
	background-repeat: repeat;
}
.mg-btn:not(.mg-btn--ghost):is(:hover, :focus-visible) { --mg-fill: 4; }
.mg-btn span, .mg-arrow { display: inline-block; transition: translate .32s var(--mg-ease); }
.mg-btn--primary span { transition: translate .32s var(--mg-ease); transform: none !important; }
.mg-btn:is(:hover, :focus-visible) span[aria-hidden], .mg-btn--primary:hover span { translate: 4px 0; }
.mg-btn--ghost { transition: border-color .16s var(--mg-ease), color .16s var(--mg-ease), background-color .16s var(--mg-ease); }
.mg-btn--ghost:hover { background: rgba(0, 236, 133, .06) !important; }

/* text links: faint rule always there, bright line wipes over it */
.mg-link, .mg-cap__view, .mg-answer a { text-decoration: none !important; }
.mg-link > :first-child:not(svg), .mg-cap__view > span:first-child, .mg-answer a {
	background-image: linear-gradient(currentColor, currentColor), linear-gradient(rgba(142, 152, 147, .45), rgba(142, 152, 147, .45));
	background-repeat: no-repeat; background-position: 0 100%, 0 100%; background-size: 0% 1px, 100% 1px; padding-bottom: .12em;
	transition: background-size .32s var(--mg-ease), color .16s var(--mg-ease); -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.mg-link:is(:hover, :focus-visible) > :first-child:not(svg), .mg-cap__view:is(:hover, :focus-visible) > span:first-child, .mg-answer a:is(:hover, :focus-visible) { background-size: 100% 1px, 100% 1px; }
.mg-link:is(:hover, :focus-visible), .mg-answer a:hover { color: var(--mg-g-2) !important; }
.mg-link span[aria-hidden], .mg-cap__view span[aria-hidden] { transition: translate .32s var(--mg-ease); }
.mg-link:is(:hover, :focus-visible) span[aria-hidden], .mg-cap__view:hover span[aria-hidden], .mg-labcard:hover .mg-link span[aria-hidden] { translate: 4px -4px; }
.mg-cap__view span:first-child::after { display: none; }

/* nav: colour + a 4px pixel under the hovered link */
.mg-nav__links a { position: relative; color: #a9b4ae; transition: color .16s var(--mg-ease); }
.mg-nav__links a::after { content: ""; position: absolute; left: 50%; top: calc(100% + 6px); width: 4px; height: 4px; margin-left: -2px; background: var(--mg-g); scale: 0; transition: scale .16s steps(2, end); }
.mg-nav__links a:is(:hover, :focus-visible) { color: var(--mg-ink); }
.mg-nav__links a:is(:hover, :focus-visible)::after { scale: 1; }

/* footer links: quiet wipe */
.mg-foot__cols a { justify-self: start; color: #a9b4ae; 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(--mg-ease), color .16s var(--mg-ease); }
.mg-foot__cols a:hover { color: var(--mg-ink); background-size: 100% 1px; }

/* chips */
.mg-chips button { transition: color .16s var(--mg-ease), background-color .16s var(--mg-ease), border-color .16s var(--mg-ease); }
.mg-chips button:hover { color: var(--mg-ink); background: #0b1410; border-color: #2c4136 !important; }

/* services list: hairlines, description opens on hover */
.mg-list { list-style: none; margin: 56px 0 0; padding: 0; box-shadow: inset 0 -1px 0 var(--mg-line); max-width: 1100px; margin-left: auto; }
.mg-list__item { box-shadow: inset 0 1px 0 var(--mg-line); }
.mg-list__link { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; column-gap: 24px; align-items: baseline; padding: 26px 4px 26px 0; color: #a9b4ae; text-decoration: none; }
.mg-list__num { font-size: 20px; line-height: 1.2; letter-spacing: .02em; color: #6f7b75; transition: color .16s var(--mg-ease); }
.mg-list__name { font-size: clamp(24px, 2.2vw, 34px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; color: var(--mg-ink); }
.mg-list__link .mg-arrow { grid-area: 1 / 3; align-self: center; width: 14px; height: 10px; color: var(--mg-g); opacity: 0; transition: opacity .16s var(--mg-ease), translate .32s var(--mg-ease); }
.mg-list__desc { display: grid; grid-column: 2; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--mg-ease); }
.mg-list__inner { min-height: 0; overflow: hidden; }
.mg-list__inner > span { display: block; max-width: 60ch; padding-top: 12px; font-size: 16.5px; line-height: 1.55; }
.mg-list__link:is(:hover, :focus-visible) .mg-list__desc { grid-template-rows: 1fr; }
.mg-list__link:is(:hover, :focus-visible) .mg-list__num { color: var(--mg-g); }
.mg-list__link:is(:hover, :focus-visible) .mg-arrow { opacity: 1; translate: 4px 0; }
@media (hover: none), (prefers-reduced-motion: reduce) { .mg-list__desc { grid-template-rows: 1fr; } .mg-list__link .mg-arrow { opacity: 1; } }
@media (max-width: 760px) { .mg-list__link { grid-template-columns: 2.5rem minmax(0, 1fr) auto; column-gap: 12px; } .mg-list__num { font-size: 15px; } }

/* proof marquee pauses under the pointer */
.mg-marquee:is(:hover, :focus-within) .mg-marquee__track { animation-play-state: paused; }
.mg-marquee__track span { opacity: .8; transition: opacity .16s var(--mg-ease), color .16s var(--mg-ease); }
.mg-marquee__track span:hover { opacity: 1; color: var(--mg-g-2); }

/* lab cards */
.mg-labcard h3 { transition: color .16s var(--mg-ease); }
.mg-labcard:is(:hover, :focus-within) h3 { color: var(--mg-g-2); }

/* headings rise word by word */
.mg-rise__w { display: inline-block; clip-path: inset(-.4em -.3em -.35em); }
.mg-rise__i { display: inline-block; }
.mg-js .is-rise-pending .mg-rise__i { translate: 0 calc(100% + .7em); }

/* pixel resolve canvases */
.mg-resolve { position: absolute; pointer-events: none; image-rendering: pixelated; z-index: 2; }
.mg-js img[data-mg-wait] { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .mg-btn:not(.mg-btn--ghost) { translate: none; } .mg-js img[data-mg-wait] { opacity: 1; } }

/* ---------- nav: fixed, hides on scroll down, returns on scroll up ---------- */
.mg-nav { position: fixed; transition: transform .45s var(--mg-ease, ease), background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.mg-nav.is-stuck { background: rgba(3, 6, 5, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom-color: var(--mg-line); }
.mg-nav.is-hidden { transform: translateY(-101%); }
.mg-menu-lock, .mg-menu-lock body { overflow: hidden; }
/* with the menu open the bar must not be transformed/filtered, or the fixed menu would be trapped inside it */
.mg-menu-lock .mg-nav { transform: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--mg-line); }
.mg-nav__logo, .mg-nav__right { position: relative; z-index: 2; }

/* ---------- fullscreen mobile menu ---------- */
.mg-nav__toggle { width: auto; min-width: 44px; padding: 0 14px 0 44px; color: var(--mg-ink); background: transparent; }
.mg-nav__tlabel { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 42px; }
.mg-nav__toggle span[aria-hidden] { left: 14px; right: auto; width: 18px; }
.mg-menu { position: fixed; inset: 0; z-index: 1; display: block; padding: 0; margin: 0; background: none; border: 0; border-radius: 0; visibility: hidden; }
.mg-menu.is-open, .mg-menu.is-closing { visibility: visible; }
.mg-menu[hidden] { display: none; }
.mg-menu__cols { position: absolute; inset: 0; display: flex; pointer-events: none; }
.mg-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); }
.mg-menu__cols span::after { content: ""; position: absolute; left: 0; right: 1px; bottom: 0; height: 3px; background: var(--mg-g); opacity: 0; transition: opacity .2s calc(var(--c) * 34ms + .15s); }
.mg-menu.is-open .mg-menu__cols span { transform: scaleY(1); transition-delay: calc(var(--c) * 34ms); }
.mg-menu.is-open .mg-menu__cols span::after { opacity: 1; animation: mg-menu-edge .5s calc(var(--c) * 34ms + .3s) forwards; }
@keyframes mg-menu-edge { to { opacity: 0; } }
.mg-menu.is-closing .mg-menu__cols span { transform-origin: 50% 100%; }
.mg-menu__inner { position: relative; z-index: 1; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 96px 24px 32px; display: flex; flex-direction: column; }
.mg-menu__list { display: grid; }
.mg-menu__item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 22px 0 24px; text-decoration: none; color: var(--mg-ink); border: 0 !important; }
.mg-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(--mg-ease, ease); }
.mg-menu__t { grid-column: 1; grid-row: 1; display: block; overflow: hidden; font-size: clamp(40px, 11vw, 56px); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; }
.mg-menu__t > span { display: inline-block; transform: translateY(105%); transition: transform .6s var(--mg-ease, ease), color .2s; white-space: nowrap; }
.mg-menu__n { grid-column: 2; grid-row: 1; align-self: start; padding-top: 8px; font-size: 12px; color: var(--mg-g); opacity: 0; transition: opacity .3s; }
.mg-menu__d { grid-column: 1 / -1; font-size: 16px; line-height: 1.5; color: var(--mg-mut); max-width: 32ch; opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .55s var(--mg-ease, ease); }
.mg-menu__item:is(:hover, :focus-visible) .mg-menu__t > span { color: var(--mg-g); }
.mg-menu__item:focus-visible { outline: 2px solid var(--mg-g); outline-offset: 4px; }
.mg-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(--mg-ease, ease); }
.mg-menu__chip { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #cfd8d3; background: transparent; border: 1px solid rgba(255, 255, 255, .16) !important; border-radius: 0 !important; cursor: pointer; }
.mg-menu__pi { width: 10px; height: 12px; border-left: 3px solid var(--mg-g); border-right: 3px solid var(--mg-g); }
.mg-menu__chip[aria-pressed="true"] .mg-menu__pi { width: 0; height: 0; border: 0; border-left: 10px solid var(--mg-g); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.mg-menu__foot .mg-btn { height: 46px; display: inline-flex; align-items: center; }
/* staggered entrance (open) */
.mg-menu.is-open .mg-menu__item::after { transform: scaleX(1); transition-delay: calc(.32s + var(--i) * 80ms); }
.mg-menu.is-open .mg-menu__t > span { transform: none; transition-delay: calc(.28s + var(--i) * 80ms), 0s; }
.mg-menu.is-open .mg-menu__n { opacity: 1; transition-delay: calc(.45s + var(--i) * 80ms); }
.mg-menu.is-open .mg-menu__d { opacity: 1; transform: none; transition-delay: calc(.38s + var(--i) * 80ms); }
.mg-menu.is-open .mg-menu__foot { opacity: 1; transform: none; transition-delay: .7s; }
/* quick exit (close): content first, then columns lift */
.mg-menu.is-closing .mg-menu__t > span, .mg-menu.is-closing .mg-menu__d, .mg-menu.is-closing .mg-menu__foot, .mg-menu.is-closing .mg-menu__n { transition-duration: .22s; transition-delay: 0s; opacity: 0; }
.mg-menu.is-closing .mg-menu__cols span { transition-delay: calc(.12s + (7 - var(--c)) * 22ms); }
@media (min-width: 861px) { .mg-menu { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
	.mg-nav, .mg-menu *, .mg-menu *::after { transition: none !important; animation: none !important; }
}
/* menu list scrolls inside its own area below the bar, never under the logo/close */
.mg-menu__inner { position: absolute; inset: 72px 0 0 0; height: auto; padding: 18px 24px 32px; border-top: 1px solid transparent; transition: border-color .3s .4s; }
.mg-menu.is-open .mg-menu__inner { border-top-color: var(--mg-line); }
