@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* MGC Bridge site chrome: header + footer. Plain CSS (no Tailwind rebuild needed). Prefix: sx- */
:root {
  --sx-navy: #0a2150; --sx-deep: #06142f; --sx-blue: #1b4bb8; --sx-sky: #eef3fc; --sx-line: #d9e2f3;
  --sx-ink: #14213d; --sx-muted: #566586; --sx-yellow: #f5b301; --sx-yellow-soft: #ffd96a;
  --sx-head: "Poppins", Calibri, "Segoe UI", system-ui, sans-serif;
  --sx-body: "Inter", Calibri, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
[x-cloak] { display: none !important; }
.sx-wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: 1rem; }
.sx-header, .sx-footer { font-family: var(--sx-body); }
.sx-header *, .sx-header *::before, .sx-header *::after,
.sx-footer *, .sx-footer *::before, .sx-footer *::after { box-sizing: border-box; }
.sx-header a:focus-visible, .sx-header button:focus-visible, .sx-footer a:focus-visible { outline: 3px solid var(--sx-yellow); outline-offset: 2px; border-radius: 6px; }

/* ---------- Header ---------- */
.sx-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; }
.sx-header[data-state="scrolled"] { border-color: var(--sx-line); box-shadow: 0 8px 24px rgba(10,33,80,.10); }

.sx-util { background: var(--sx-deep); color: rgba(255,255,255,.85); font-size: .82rem; max-height: 3rem; overflow: hidden; transition: max-height .25s, opacity .25s; }
.sx-header[data-state="scrolled"] .sx-util { max-height: 0; opacity: 0; }
.sx-util-inner { display: none; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.4rem; }
@media (min-width: 900px) { .sx-util-inner { display: flex; } }
.sx-util a { color: inherit; text-decoration: none; }
.sx-util a:hover { color: var(--sx-yellow); }
.sx-util-left { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.sx-util-left strong { color: var(--sx-yellow); font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.sx-util-left span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-util-right { display: flex; align-items: center; gap: 1.2rem; }

.sx-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.3rem; }
.sx-brand { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; text-decoration: none; color: var(--sx-navy); }
.sx-brand img { width: 3rem; height: 3rem; object-fit: contain; }
.sx-brand-text { display: none; flex-direction: column; line-height: 1.15; }
@media (min-width: 480px) { .sx-brand-text { display: flex; } }
.sx-brand-text strong { font-family: var(--sx-head); font-size: 1.05rem; font-weight: 700; letter-spacing: .01em; }
.sx-brand-text small { color: var(--sx-muted); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* Desktop navigation */
.sx-nav { display: none; flex: 1; justify-content: center; }
@media (min-width: 1100px) { .sx-nav { display: flex; } }
.sx-menu { display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.sx-item { position: relative; }
.sx-link {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .5rem .8rem; border: 0; background: none;
  color: var(--sx-navy); font: 600 .95rem var(--sx-body); text-decoration: none; cursor: pointer; border-radius: 8px; position: relative; transition: color .2s, background .2s;
}
.sx-link:hover { background: var(--sx-sky); }
.sx-link::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 4px; height: 3px; border-radius: 3px; background: var(--sx-yellow); transform: scaleX(0); transition: transform .25s; }
.sx-link.is-active::after, .sx-item:hover > .sx-link::after, .sx-item:focus-within > .sx-link::after { transform: scaleX(1); }
.sx-link svg { width: .8rem; height: .8rem; transition: transform .2s; }
.sx-item:hover > .sx-link svg, .sx-item:focus-within > .sx-link svg { transform: rotate(180deg); }

.sx-panel {
  position: absolute; top: calc(100% + 6px); left: 50%; z-index: 60; width: 17rem; padding: .5rem; margin: 0; list-style: none;
  background: #fff; border: 1px solid var(--sx-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(10,33,80,.18);
  visibility: hidden; opacity: 0; pointer-events: none; transform: translate(-50%, 6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.sx-panel--wide { width: 34rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0 .25rem; }
.sx-panel::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.sx-item:hover > .sx-panel, .sx-item:focus-within > .sx-panel { visibility: visible; opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.sx-panel a { display: block; padding: .6rem .8rem; border-radius: 10px; text-decoration: none; color: var(--sx-navy); transition: background .15s; }
.sx-panel a:hover, .sx-panel a:focus-visible { background: var(--sx-sky); }
.sx-panel a b { display: block; font-size: .95rem; font-weight: 600; }
.sx-panel a small { display: block; margin-top: .1rem; color: var(--sx-muted); font-size: .8rem; line-height: 1.35; }
.sx-panel a.is-current b { color: var(--sx-blue); }

/* Right-hand actions */
.sx-actions { display: flex; align-items: center; gap: .5rem; }
.sx-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--sx-line); border-radius: 10px; background: #fff; color: var(--sx-navy); cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s; }
.sx-icon-btn:hover { background: var(--sx-sky); border-color: var(--sx-blue); }
.sx-icon-btn svg { width: 1.25rem; height: 1.25rem; }
.sx-search { display: none; }
@media (min-width: 640px) { .sx-search { display: inline-grid; } }
.sx-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1.25rem; border-radius: 10px; background: var(--sx-yellow); color: var(--sx-navy); font: 700 .95rem var(--sx-body); text-decoration: none; transition: background .2s, box-shadow .2s; white-space: nowrap; }
.sx-cta:hover { background: var(--sx-yellow-soft); box-shadow: 0 6px 16px rgba(245,179,1,.4); }
.sx-toggle { display: inline-grid; }
@media (min-width: 1100px) { .sx-toggle { display: none; } }

/* Mobile drawer */
.sx-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(6,20,47,.55); }
.sx-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(24rem, 92vw); display: flex; flex-direction: column; background: #fff; box-shadow: -18px 0 40px rgba(6,20,47,.3); overscroll-behavior: contain; }
@media (min-width: 1100px) { .sx-drawer, .sx-backdrop { display: none !important; } }
.sx-tr { transition: transform .25s ease, opacity .25s ease; }
.sx-from { transform: translateX(100%); opacity: .6; }
.sx-to { transform: none; opacity: 1; }
.sx-drawer-top { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; background: var(--sx-navy); }
.sx-drawer-top .sx-brand { color: #fff; }
.sx-drawer-top .sx-brand-text { display: flex; }
.sx-drawer-top .sx-brand-text small { color: var(--sx-yellow); }
.sx-drawer-top .sx-icon-btn { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.sx-drawer-body { flex: 1; overflow-y: auto; padding: .75rem; -webkit-overflow-scrolling: touch; }
.sx-m-list { margin: 0; padding: 0; list-style: none; }
.sx-m-link, .sx-m-acc { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: .6rem .85rem; border: 0; border-radius: 10px; background: none; color: var(--sx-navy); font: 700 1rem var(--sx-body); text-align: left; text-decoration: none; cursor: pointer; }
.sx-m-link:hover, .sx-m-acc:hover { background: var(--sx-sky); }
.sx-m-link.is-active { background: #fff4cc; }
.sx-m-acc svg { width: 1rem; height: 1rem; transition: transform .2s; }
.sx-m-acc[aria-expanded="true"] svg { transform: rotate(180deg); }
.sx-m-sub { margin: .1rem 0 .4rem .85rem; padding: 0 0 0 .6rem; list-style: none; border-left: 3px solid var(--sx-yellow); }
.sx-m-sub a { display: block; min-height: 44px; padding: .6rem .8rem; border-radius: 8px; color: var(--sx-ink); font-weight: 500; text-decoration: none; }
.sx-m-sub a:hover { background: var(--sx-sky); }
.sx-drawer-foot { padding: .9rem; border-top: 1px solid var(--sx-line); background: var(--sx-sky); display: grid; gap: .6rem; padding-bottom: calc(.9rem + env(safe-area-inset-bottom, 0px)); }
.sx-drawer-foot .sx-cta { width: 100%; min-height: 50px; }
.sx-drawer-foot-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sx-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .4rem .8rem; border: 1px solid var(--sx-line); border-radius: 10px; background: #fff; color: var(--sx-navy); font-weight: 700; text-decoration: none; }
.sx-ghost:hover { background: var(--sx-sky); }
.sx-m-contact { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .88rem; color: var(--sx-muted); }
.sx-m-contact a { color: var(--sx-navy); font-weight: 600; text-decoration: none; }

/* ---------- Footer ---------- */
.sx-footer { margin-top: 4rem; color: rgba(255,255,255,.78); background: var(--sx-deep); }
.sx-foot-cta { background: linear-gradient(135deg, var(--sx-navy), #123a8f); border-bottom: 4px solid var(--sx-yellow); }
.sx-foot-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: clamp(1.6rem, 4vw, 2.4rem); }
.sx-foot-cta h2 { margin: 0; color: #fff; font-family: var(--sx-head); font-size: clamp(1.3rem, 3.2vw, 1.9rem); font-weight: 700; line-height: 1.2; }
.sx-foot-cta p { margin: .3rem 0 0; color: rgba(255,255,255,.8); }
.sx-foot-cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.sx-foot-cta .sx-ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.sx-foot-cta .sx-ghost:hover { background: rgba(255,255,255,.12); }

.sx-foot-grid { display: grid; gap: 2.2rem; grid-template-columns: minmax(0,1fr); padding-block: clamp(2.2rem, 5vw, 3.4rem); }
@media (min-width: 640px)  { .sx-foot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1000px) { .sx-foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2.5rem; } }
.sx-footer h3 { margin: 0 0 1rem; color: #fff; font-family: var(--sx-head); font-size: .9rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.sx-footer h3::after { content: ""; display: block; width: 28px; height: 3px; margin-top: .5rem; border-radius: 3px; background: var(--sx-yellow); }
.sx-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.sx-footer a { color: inherit; text-decoration: none; transition: color .2s; }
.sx-footer a:hover { color: var(--sx-yellow); }
/* Footer CTA must keep navy text on yellow: 8.4:1 (was 1.6:1) */
.sx-footer .sx-cta { color: var(--sx-navy); }
.sx-footer .sx-cta:hover { color: var(--sx-navy); }
.sx-foot-links a { display: inline-block; padding: .3rem 0; font-size: .95rem; }
.sx-foot-logo { width: 4.5rem; height: 4.5rem; padding: .4rem; border-radius: 14px; background: rgba(255,255,255,.95); object-fit: contain; }
.sx-footer address { margin-top: 1rem; font-style: normal; font-size: .93rem; line-height: 1.6; }
.sx-footer address strong { display: block; color: #fff; }
.sx-foot-about { max-width: 34ch; margin: 1rem 0 0; font-size: .93rem; line-height: 1.65; }
.sx-foot-contact { display: grid; gap: .35rem; margin-top: 1rem; font-size: .95rem; }
.sx-foot-contact a { text-decoration: underline; text-underline-offset: 3px; }
.sx-social { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.sx-social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.sx-social a:hover { border-color: var(--sx-yellow); background: rgba(245,179,1,.1); }
.sx-affil-label { display: block; color: rgba(255,255,255,.5); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.sx-affil a { color: #fff; font-weight: 600; }
.sx-foot-sub { margin-top: 1.6rem; }
.sx-foot-bottom { display: flex; flex-direction: column; gap: .8rem; padding-block: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
@media (min-width: 700px) { .sx-foot-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.sx-foot-bottom p { margin: 0; }
.sx-foot-legal { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  .sx-header *, .sx-footer * { transition: none !important; }
}
@media print { .sx-header, .sx-footer { display: none !important; } }

/* =====================================================================
   v2 refinements: no sideways scroll, compact mobile footer, logo motion
   ===================================================================== */
.sx-header, .sx-footer { max-width: 100vw; }
.sx-footer { overflow-x: clip; }
.sx-footer a, .sx-footer p, .sx-footer address, .sx-footer li { overflow-wrap: anywhere; }
.sx-foot-grid > * { min-width: 0; }

/* Footer grid: minmax(0, ...) stops long emails from stretching a column and causing sideways scroll */
@media (min-width: 700px)  { .sx-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sx-foot-ident { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .sx-foot-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); } .sx-foot-ident { grid-column: auto; } }

/* Collapsible footer columns (phones). On 700px+ the buttons are disabled and everything is open. */
.sx-col-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; cursor: default; }
.sx-col-btn:disabled { opacity: 1; color: inherit; }
.sx-col-chev { display: none; width: 1.1rem; height: 1.1rem; transition: transform .2s; }
@media (max-width: 699px) {
  .sx-foot-grid { gap: 0; padding-block: 1.6rem 1rem; }
  .sx-foot-ident { padding-bottom: 1.6rem; }
  .sx-col { border-top: 1px solid rgba(255,255,255,.12); }
  .sx-col h3 { margin: 0; }
  .sx-col h3::after { display: none; }
  .sx-col-btn { min-height: 52px; cursor: pointer; }
  .sx-col-chev { display: block; }
  .sx-col-btn[aria-expanded="true"] .sx-col-chev { transform: rotate(180deg); }
  .sx-col .sx-foot-links, .sx-col .sx-foot-sub { padding-bottom: 1rem; }
  .sx-foot-sub h3 { margin: 1rem 0 .8rem; }
  .sx-foot-sub h3::after { display: block; }
  .sx-foot-cta-actions { width: 100%; }
  .sx-foot-cta-actions > * { flex: 1 1 10rem; }
}

/* Back to top */
.sx-top { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 45; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--sx-yellow); color: var(--sx-navy); box-shadow: 0 10px 24px rgba(6,20,47,.35); cursor: pointer; transition: background .2s, transform .2s; }
.sx-top:hover { background: var(--sx-yellow-soft); transform: translateY(-3px); }
.sx-top svg { width: 1.5rem; height: 1.5rem; }
.sx-pop-from { opacity: 0; transform: scale(.6) translateY(10px); }
.sx-pop-to { opacity: 1; transform: none; }

/* Logo motion: header crest pops in, glows softly, tilts on hover */
@keyframes sx-pop  { from { opacity: 0; transform: scale(.7) rotate(-10deg); } to { opacity: 1; transform: none; } }
@keyframes sx-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(245,179,1,0)); } 50% { filter: drop-shadow(0 0 9px rgba(245,179,1,.8)); } }
.sx-logo { transform-origin: center; animation: sx-pop .7s cubic-bezier(.2,.9,.3,1.2) backwards, sx-glow 5s ease-in-out 1.6s infinite; transition: transform .35s cubic-bezier(.2,.9,.3,1.2); }
.sx-brand:hover .sx-logo, .sx-brand:focus-visible .sx-logo { transform: rotate(-6deg) scale(1.1); }

/* Footer logo: white chip with a slowly rotating gold ring */
@keyframes sx-spin { to { transform: rotate(360deg); } }
.sx-logo-ring { position: relative; display: inline-block; width: 5.2rem; height: 5.2rem; padding: 3px; overflow: hidden; border-radius: 22px; isolation: isolate; }
.sx-logo-ring::before { content: ""; position: absolute; inset: -60%; z-index: -1; background: conic-gradient(from 0deg, var(--sx-yellow), transparent 28%, var(--sx-yellow-soft) 52%, transparent 78%, var(--sx-yellow)); animation: sx-spin 6s linear infinite; }
.sx-logo-ring img { display: block; width: 100%; height: 100%; padding: .4rem; border-radius: 19px; background: #fff; object-fit: contain; transition: transform .35s; }
.sx-logo-ring:hover img { transform: scale(1.06) rotate(-3deg); }

/* Between 1100px and 1279px the wordmark text hides so the menu never feels cramped */
@media (min-width: 1100px) and (max-width: 1279px) { .sx-header .sx-bar-inner .sx-brand-text { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .sx-logo, .sx-logo-ring::before { animation: none !important; }
  .sx-top, .sx-logo, .sx-logo-ring img { transition: none !important; }
}
