/* FLUXION menus, light version: stages on the left, one card on the right.
   Brand colours only. Each stage / sector sits on a brand ground (data-t = ink | blue | warm); dots, signal and button flip to match. */
.mega[data-t="ink"]  { --mg-bg: #0B0E14; --mg-a: #0278FD; --mg-s: #FAFAF8; --mg-fg: #FAFAF8; --mg-b: #0278FD; --mg-bf: #FAFAF8; }
.mega[data-t="blue"] { --mg-bg: #0278FD; --mg-a: #FAFAF8; --mg-s: #0B0E14; --mg-fg: #FAFAF8; --mg-b: #FAFAF8; --mg-bf: #0B0E14; }
.mega[data-t="warm"] { --mg-bg: #F1EEE8; --mg-a: #0B0E14; --mg-s: #0278FD; --mg-fg: #0B0E14; --mg-b: #0B0E14; --mg-bf: #FAFAF8; }
/* frosted glass that unrolls like silk: clip-path reveal (never opacity on the glass itself, so the blur never flickers) */
.mega { position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0 auto; width: calc(min(100%, var(--max)) - 2 * var(--gut)); z-index: 2; visibility: hidden; overflow: hidden;
  background: #FAFAF8; border: 1px solid rgba(17,17,16,.12);   /* client: flat colours, no gradients, no glass */
  clip-path: inset(0 0 100% 0); transition: clip-path .45s cubic-bezier(.4,0,.2,1), visibility 0s linear .45s; }
.mega.open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .9s cubic-bezier(.16,1,.3,1), visibility 0s; }
.mega > .c { position: relative; z-index: 1; }
/* content settles one beat after the glass */
.mega .mg-row, .mega .mg-card { opacity: 0; transform: translateY(10px); filter: blur(6px);
  transition: opacity .3s ease, transform .3s ease, filter .3s ease; }
.mega.open .mg-row, .mega.open .mg-card { opacity: 1; transform: none; filter: none;
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1), filter .7s ease, background .25s ease; }
.mega.open .mg-row:nth-child(1) { transition-delay: .12s; } .mega.open .mg-row:nth-child(2) { transition-delay: .17s; }
.mega.open .mg-row:nth-child(3) { transition-delay: .22s; } .mega.open .mg-row:nth-child(4) { transition-delay: .27s; }
.mega.open .mg-row:nth-child(5) { transition-delay: .32s; } .mega.open .mg-row:nth-child(6) { transition-delay: .37s; }
.mega.open .mg-card { transition-delay: .2s; }
.mg-veil { position: fixed; inset: 64px 0 0; z-index: 1; background: rgba(11,14,20,.10); opacity: 0; pointer-events: none; transition: opacity .6s cubic-bezier(.16,1,.3,1); }
.nav.mg-on .mg-veil { opacity: 1; }
.nav.mg-on { box-shadow: 0 1px 0 rgba(17,17,16,.06); }
.dd > a .dd-chev { transition: transform .3s var(--ease-x); }
.dd.open > a { color: var(--ink); background-size: 100% 1px; } .dd.open > a .dd-chev { transform: rotate(180deg); }

.nav .mega .c { height: auto; display: block; }   /* the nav bar's own .c rule (64px flex) must not reach the panels */
.nav .mega .mg-g { display: grid; grid-template-columns: 320px 1fr; gap: 32px; max-width: none; padding-left: 24px; padding-right: 24px; padding-top: 28px; padding-bottom: 28px; }

/* left: stage rows */
.mg-rows { position: relative; display: flex; flex-direction: column; justify-content: center; }
.mg-row { position: relative; z-index: 1; display: grid; grid-template-columns: 30px 1fr 14px; gap: 12px; align-items: center; padding: 11px 14px;
  transition: background .25s var(--ease-hover); }
.mg-row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--brand); transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .35s var(--ease-x), background .4s ease; }
.mg-row span { min-width: 0; }
.mg-row em { font-style: normal; font-family: var(--f-mono); font-size: 11px; color: var(--faint); transition: color .3s ease; }
.mg-row b { display: block; font-weight: 500; font-size: 15px; color: var(--ink); line-height: 1.3; }
.mg-row small { display: block; font-size: 12.5px; color: var(--faint); line-height: 1.4; }
.mg-row > :last-child { color: var(--faint); opacity: 0; transform: translate(-4px, 4px); transition: opacity .25s, transform .3s var(--ease-x), color .3s; }
.mg-row::before { display: none; }
/* one highlight that glides between rows */
.mg-hl { position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: var(--hh, 0px); transform: translateY(var(--hy, 0px)); pointer-events: none;
  background: #F1EEE8; opacity: 0;
  transition: transform .6s cubic-bezier(.16,1,.3,1), height .6s cubic-bezier(.16,1,.3,1), opacity .4s ease, background .3s ease; }
.mg-hl::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--brand); }
.mega.open .mg-hl { opacity: 1; transition-delay: 0s, 0s, .3s, 0s; }
.mg-row.on em, .mg-row.on > :last-child { color: var(--brand); } .mg-row.on > :last-child { opacity: 1; transform: none; }
.mg-row:hover > :last-child { opacity: .5; transform: none; }

/* right: the coloured card */
.mg-card { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px; min-height: 344px; padding: 32px 48px;
  background: var(--mg-bg); color: var(--mg-fg); overflow: hidden; transition: background .5s var(--ease-x), color .4s ease; }
.mg-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(color-mix(in srgb, var(--mg-fg) 16%, transparent) 1px, transparent 1.2px); background-size: 6px 6px; }
.mg-dots { position: relative; z-index: 1; display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.mg-dots circle { fill: color-mix(in srgb, var(--mg-fg) 12%, transparent); r: 1.4px; transform-box: fill-box; transform-origin: center;
  transition: r .45s cubic-bezier(.34,1.56,.64,1) calc(var(--i) * 14ms), fill .4s ease calc(var(--i) * 14ms), transform .35s cubic-bezier(.2,.8,.2,1) 0s; }
.mg-dots circle.on { fill: var(--mg-a); r: 3.6px; }
.mg-dots circle.s { fill: var(--mg-s); r: 4.8px; }
.mg-text { position: relative; z-index: 1; padding-left: 12px; }
.mg-say[hidden] { display: none; }
.mg-say { animation: mg-in .45s var(--ease-x) both; }
.mg-eb { display: flex; gap: 10px; margin: 0 0 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--mg-fg) 62%, transparent); }
.mg-eb em { font-style: normal; color: var(--mg-fg); font-weight: 600; }
.mg-big { margin: 0; font-size: 32px; line-height: 1.18; letter-spacing: -.02em; font-weight: 500; text-wrap: balance; }
.mg-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 22px; }
.mg-meta span { padding: 4px 10px; font-family: var(--f-mono); font-size: 11px; color: color-mix(in srgb, var(--mg-fg) 82%, transparent); border: 1px solid color-mix(in srgb, var(--mg-fg) 22%, transparent); }
.mg-go { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; background: var(--mg-b); color: var(--mg-bf); font-size: 14px; font-weight: 500;
  transition: background .4s ease, gap .25s var(--ease-x); }
.mg-go:hover { gap: 12px; }
@keyframes mg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* industries: the photo fills the card, the sector colour is the dot screen */
.mg-card-photo { display: block; padding: 0; }
.mg-card-photo::before, .mg-card-photo::after { display: none; }
.mg-pic { position: absolute; inset: 0; }
.mg-pic .photo { filter: grayscale(1) contrast(1.05) brightness(.7); transform: scale(1.06) translate(calc(var(--px, 0) * -12px), calc(var(--py, 0) * -8px)); transition: transform .9s cubic-bezier(.16,1,.3,1); }
.mg-pic .photo-slot { display: none; }
.mg-pic .photo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(#0278FD 1px, transparent 1.3px); background-size: 6px 6px; opacity: .4; mix-blend-mode: screen; }
/* flat colour only: the sector colour is a solid panel, the photo shows beside it */
.mg-ov { position: absolute; inset: 0 auto 0 0; width: 56%; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
  background: var(--mg-bg); }
.mg-ov { padding: 32px 48px; }
.mg-ov .mg-big { max-width: 460px; }
.mg-ov .mg-go { align-self: flex-start; }

@media (max-width: 1023px) { .mega, .mg-veil { display: none; } }
@media (prefers-reduced-motion: reduce) { .mega, .mg-say, .mg-card, .mg-row, .mg-dots circle { animation: none !important; transition: none !important; filter: none; } }

/* nav blur lives on a layer, not on .nav itself, so the menu glass below can blur the page */
.nav { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: transparent !important; }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(250,250,248,.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* surfaces the client can compare: ?surface=frost (default) | paper | ink */
.nav[data-surface="paper"] .mega { background: #F1EEE8; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: rgba(17,17,16,.08); outline: 0; }
.nav[data-surface="paper"] .mega::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(rgba(11,14,20,.08) 1px, transparent 1.2px); background-size: 8px 8px; }
.nav[data-surface="paper"] .mg-hl { background: #FAFAF8; }
.nav[data-surface="ink"] .mega { background: rgba(11,14,20,.97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-color: rgba(250,250,248,.08); outline: 0; box-shadow: 0 40px 80px -30px rgba(11,14,20,.6); }
.nav[data-surface="ink"] .mg-row b { color: #FAFAF8; }
.nav[data-surface="ink"] .mg-row small, .nav[data-surface="ink"] .mg-row em { color: rgba(250,250,248,.5); }
.nav[data-surface="ink"] .mg-row.on em { color: var(--brand); }
.nav[data-surface="ink"] .mg-hl { background: rgba(250,250,248,.07); box-shadow: 0 1px 0 rgba(250,250,248,.08) inset; }
.nav[data-surface="ink"] .mega[data-t="ink"] .mg-card { box-shadow: 0 0 0 1px rgba(250,250,248,.1); }

/* 10-14 LEGEND: industries card = flat sector panel + photo fitted in its own panel, blended on flat blue, logo arrows faded (same grammar as .sd-mid-art) */
.mg-pic .mg-ph { position: absolute; inset: 0 0 0 auto; width: 44%; overflow: hidden; background: #0278FD; }
.mg-ph .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  filter: grayscale(1) contrast(1.1) brightness(1.35); mix-blend-mode: multiply; transform: scale(1.04); transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.mg-ph::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(250,250,248,.22) 1px, transparent 1.3px); background-size: 8px 8px; }
.mg-ar { position: absolute; height: auto; max-width: none; pointer-events: none; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.mg-ph .a1 { width: 52%; right: -10%; top: -12%; opacity: .26; }
.mg-ph .a2 { width: 30%; left: -8%; bottom: -16%; opacity: .16; }
.mg-ph .a3 { width: 10%; left: 10%; top: 12%; opacity: .22; }
.mg-ov { width: 56%; overflow: hidden; }
.mg-ov::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(color-mix(in srgb, var(--mg-fg) 16%, transparent) 1px, transparent 1.2px); background-size: 6px 6px; }
.mg-ov > :not(.mg-ar) { position: relative; z-index: 1; }
.mg-ov .a4 { width: 38%; right: -6%; top: -18%; opacity: .07; }
/* blue sector: the photo panel turns ink so the two halves never melt into one blue */
.mega[data-t="blue"] .mg-ph { background: #0B0E14; }
.mega[data-t="blue"] .mg-ph .bg { mix-blend-mode: screen; filter: grayscale(1) contrast(1.05) brightness(.8); opacity: .75; }
.mega.open .mg-say:not([hidden]) .mg-ph .bg { transform: none; }
.mg-card-photo:hover .mg-ar { transform: translate(6px, -6px); }
@media (prefers-reduced-motion: reduce) { .mg-ph .bg, .mg-ar { transition: none; } }
/* blue sector, take 2: photo as a blue-on-ink duotone (lights blue, shadows ink), still flat colour */
.mega[data-t="blue"] .mg-ph .bg { opacity: 1; filter: grayscale(1) contrast(1.15) brightness(.95); }
.mega[data-t="blue"] .mg-ph::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #0278FD; mix-blend-mode: multiply; pointer-events: none; }
.mg-ph .mg-ar { z-index: 2; }

/* Mobile ink menu; the repeating SVG is a flat dot screen. */
.mnav[hidden], .mnav-groups[hidden] { display: none; }
.mnav { display: none; }
@media (max-width: 1023px) {
  .nav-burger { min-width: 44px; min-height: 44px; position: relative; z-index: 5; }
  .mnav { display: block; position: fixed; inset: 64px 0 0; height: calc(100dvh - 64px); z-index: 4; background-color: #0B0E14; color: #FAFAF8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23FAFAF8' fill-opacity='.08'/%3E%3C/svg%3E"); animation: mnav-in 360ms cubic-bezier(.16,1,.3,1); }
  .mnav-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 24px max(var(--gut), env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
  .mnav nav { display: block; }
  .mnav nav > a, .mnav-services { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; color: #FAFAF8; padding: 8px 0; border: 0; border-bottom: 1px solid rgba(250,250,248,.16); background: transparent; font: 500 clamp(23px, 6vw, 36px)/1.2 var(--f-sans); text-align: left; }
  .mnav-services span { color: #0278FD; }
  .mnav-services[aria-expanded="true"] span { transform: rotate(45deg); }
  .mnav-groups { padding: 8px 0 16px; }
  .mnav-groups a { display: flex; align-items: center; gap: 16px; min-height: 44px; font-size: 18px; color: #FAFAF8; }
  .mnav-groups a span { color: #0278FD; font: 12px var(--f-mono); }
  .mnav-bottom { margin-top: auto; padding-top: 28px; }
  .mnav-cta { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 20px; background: #0278FD; color: #FAFAF8; font-size: 16px; }
  .mnav-contact { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 16px; }
  .mnav-contact a { display: flex; align-items: center; min-height: 44px; color: #FAFAF8; font-size: 12px; }
  .mnav :is(a,button):focus-visible, .mnav-on .nav-burger:focus-visible { outline: 2px solid #0278FD; outline-offset: 3px; }
  .mnav :is(a,button), .nav-burger { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .mnav :is(a,button):active { opacity: .75; }
  .mnav-on { background: #0B0E14 !important; }
  .mnav-on .nav-burger { color: #FAFAF8; }
  .nav-burger svg path { transform-origin: 12px 12px; transition: transform 360ms ease, opacity 360ms ease; }
  .mnav-on .burger-top { transform: translateY(5px) rotate(45deg); }
  .mnav-on .burger-mid { opacity: 0; }
  .mnav-on .burger-bottom { transform: translateY(-5px) rotate(-45deg); }
}
@keyframes mnav-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mnav, .nav-burger svg path { animation: none; transition: none; } }

@media (max-width: 1023px) { .nav.mnav-on::before { background: #0B0E14; backdrop-filter: none; } .mnav-on .lgo-wm { fill: #FAFAF8; } }
