/* Fathom: deep water and an aqua glow.  A blueprint grid on the dark sections,
   glass header, pill eyebrows with a live dot, cards lit along their top edge.
   Dark by default (mode.offer "button"); every rule here reads the theme's
   tokens, so the light palette (colorsAlt) follows without a second sheet. */

/* The primary, brightened, for anything on a dark section or on the header
   while it lies over a dark hero.  Dark sections stay dark in light mode, where
   the primary is a deep blue that would sink into them. */
:root { --fathom-on-dark: color-mix(in srgb, var(--mg-primary) 70%, #fff); }

/* ---- Header: glass over the page, nav in small caps with a drawn underline ---- */
.mg-masthead.is-sticky .mg-header { background: rgba(var(--mg-header-bg-rgb), .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(var(--mg-primary-rgb), .14); }
.mg-masthead.is-sticky.is-scrolled .mg-header { background: rgba(var(--mg-header-bg-rgb), .97); box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.mg-wordmark { font-weight: 800; letter-spacing: -.02em; }
/* Syne is a wide face: on a phone a long site name would push the menu button
   off the screen, so the name gets smaller and, at worst, trails off */
@media (max-width: 575.98px) {
	.mg-core .mg-header .mg-logo { min-width: 0; flex-shrink: 1; overflow: hidden; }
	.mg-wordmark { display: block; font-size: 1rem; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.mg-core .mg-header .mg-nav-wrap .nav-link { font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; position: relative; }
.mg-core .mg-header .mg-nav-wrap .navbar-nav > .nav-item > .nav-link::after { content: ""; position: absolute; left: var(--bs-navbar-nav-link-padding-x, .5rem); right: 100%; bottom: .3rem; height: 1px; background: var(--mg-primary); transition: right .25s ease; }
.mg-core .mg-header .mg-nav-wrap .navbar-nav > .nav-item > .nav-link:is(:hover, :focus-visible)::after { right: var(--bs-navbar-nav-link-padding-x, .5rem); }
.mg-core .mg-header .mg-nav-wrap .navbar-nav > .nav-item > .nav-link.dropdown-toggle::after { display: none; }
.mg-core .mg-header .dropdown-menu { background: var(--mg-surface); border: 1px solid rgba(var(--mg-primary-rgb), .16); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
/* The header's call to action is outlined, filling on hover */
.mg-core .mg-header .mg-header-cta { background: transparent; color: var(--mg-primary); border: 1px solid var(--mg-primary); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
.mg-core .mg-header .mg-header-cta:is(:hover, :focus-visible) { background: var(--mg-primary); color: var(--mg-bg); }
html.mg-hero-overlay .mg-masthead.can-overlay:not(.is-scrolled) .mg-header .mg-header-cta { color: var(--fathom-on-dark); border-color: var(--fathom-on-dark); }
html.mg-hero-overlay .mg-masthead.can-overlay:not(.is-scrolled) .mg-header .mg-header-cta:is(:hover, :focus-visible) { background: var(--fathom-on-dark); color: #040f1e; }
.mg-mode-toggle { border-color: rgba(var(--mg-primary-rgb), .3) !important; }

/* ---- Type ---- */
.mg-core h1, .mg-core .mg-layout .mg-heading--display { font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.mg-core h2 { letter-spacing: -.02em; line-height: 1.15; }

/* ---- Buttons: lift and glow ---- */
.mg-core .btn { --bs-btn-padding-y: .8rem; --bs-btn-padding-x: 2rem; font-weight: 600; letter-spacing: .02em; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
.mg-core .btn-sm { --bs-btn-padding-y: .45rem; --bs-btn-padding-x: 1.2rem; }
.mg-core .btn-primary:is(:hover, :focus-visible) { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(var(--mg-primary-rgb), .32); }
.mg-core .mg-layout .btn-outline-primary { --bs-btn-color: var(--mg-heading); --bs-btn-border-color: color-mix(in srgb, var(--mg-heading) 22%, transparent); --bs-btn-hover-bg: transparent; --bs-btn-hover-color: var(--mg-primary); --bs-btn-hover-border-color: var(--mg-primary); }

/* ---- Eyebrows: a pill with a live dot ---- */
.mg-core .mg-layout .mg-eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem 1rem; border-radius: 999px; font-size: .74rem; font-weight: 500; letter-spacing: .12em; background: color-mix(in srgb, currentColor 9%, transparent); border: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.mg-core .mg-layout .mg-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.mg-core .mg-layout .mg-on-dark .mg-eyebrow { color: var(--fathom-on-dark); }
.mg-core .mg-layout .mg-on-dark :is(.mg-stat-value, .mg-icon-list-icon) { color: var(--fathom-on-dark); }
.mg-core .mg-layout .mg-on-dark .mg-icon-list-icon { background: color-mix(in srgb, var(--fathom-on-dark) 12%, transparent); border-color: color-mix(in srgb, var(--fathom-on-dark) 35%, transparent); }

/* ---- Dark sections: the blueprint grid and two soft glows ---- */
.mg-core .mg-layout .mg-bg-dark,
.mg-core .mg-layout .mg-bg-gradient {
	background:
		radial-gradient(ellipse 70% 60% at 62% 38%, rgba(var(--mg-primary-rgb), .11), transparent 70%),
		radial-gradient(ellipse 42% 50% at 18% 72%, rgba(var(--mg-secondary-rgb), .13), transparent 62%),
		var(--mg-dark);
}
.mg-core .mg-layout .mg-bg-gradient {
	background:
		radial-gradient(ellipse 60% 70% at 70% 30%, rgba(var(--mg-primary-rgb), .26), transparent 70%),
		radial-gradient(ellipse 50% 60% at 15% 80%, rgba(var(--mg-secondary-rgb), .3), transparent 65%),
		var(--mg-dark);
}
.mg-core .mg-layout :is(.mg-bg-dark, .mg-bg-gradient)::before {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background-image: linear-gradient(rgba(var(--mg-primary-rgb), .05) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--mg-primary-rgb), .05) 1px, transparent 1px);
	background-size: 60px 60px;
	-webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 40%, transparent 100%);
	mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 40%, transparent 100%);
}
/* Plain and surface sections are divided by a faint aqua rule */
.mg-core .mg-layout .mg-bg-surface { border-top: 1px solid rgba(var(--mg-primary-rgb), .08); border-bottom: 1px solid rgba(var(--mg-primary-rgb), .08); }

/* ---- Cards: tinted glass, a light along the top edge on hover ---- */
.mg-core .mg-layout :is(.mg-card--boxed, .mg-card--elevated) { position: relative; overflow: hidden; background: var(--mg-surface); border: 1px solid rgba(var(--mg-primary-rgb), .12); box-shadow: none; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.mg-core .mg-layout .mg-bg-surface :is(.mg-card--boxed, .mg-card--elevated) { background: var(--mg-bg); border-color: rgba(var(--mg-primary-rgb), .12); }
.mg-core .mg-layout :is(.mg-card--boxed, .mg-card--elevated)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--mg-primary), transparent); opacity: 0; transition: opacity .3s ease; }
.mg-core .mg-layout :is(.mg-card--boxed, .mg-card--elevated):hover { border-color: rgba(var(--mg-primary-rgb), .32); box-shadow: 0 20px 60px rgba(0, 0, 0, .28); }
.mg-core .mg-layout .mg-card--elevated:hover { transform: translateY(-6px); }
.mg-core .mg-layout :is(.mg-card--boxed, .mg-card--elevated):hover::before { opacity: 1; }
.mg-core .mg-layout .mg-card-icon { width: 3.5rem; height: 3.5rem; border-radius: 12px; background: rgba(var(--mg-primary-rgb), .09); border: 1px solid rgba(var(--mg-primary-rgb), .2); color: var(--mg-primary); }
.mg-core .mg-layout .mg-card-title { letter-spacing: -.01em; overflow-wrap: anywhere; }
.mg-core .mg-layout .mg-card-link { font-weight: 500; letter-spacing: .03em; }

/* ---- Figures: each in its own lit tile ---- */
.mg-core .mg-layout .mg-stat { padding: 1.2rem 1.4rem; border-radius: 8px; background: rgba(var(--mg-primary-rgb), .045); border: 1px solid rgba(var(--mg-primary-rgb), .12); }
.mg-core .mg-layout .mg-stat-value { font-weight: 800; }
.mg-core .mg-layout .mg-stat-label { font-size: .85rem; letter-spacing: .04em; }

/* ---- Lists, quotes, FAQs ---- */
.mg-core .mg-layout .mg-icon-list-icon { background: rgba(var(--mg-primary-rgb), .1); border: 1px solid rgba(var(--mg-primary-rgb), .3); color: var(--mg-primary); }
.mg-core .mg-layout .mg-testimonial--boxed { background: var(--mg-surface); border: 1px solid rgba(var(--mg-primary-rgb), .12); }
.mg-core .mg-layout .mg-bg-surface .mg-testimonial--boxed { background: var(--mg-bg); }
.mg-core .mg-layout .accordion-item { background: transparent; border-color: rgba(var(--mg-primary-rgb), .14); }

/* ---- Forms: tinted fields that light up on focus ---- */
.mg-core .mgcontent :is(input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=number], select, textarea).form-control,
.mg-core .mgcontent :is(.form-control, .form-select) { background-color: rgba(var(--mg-primary-rgb), .04); border-color: rgba(var(--mg-primary-rgb), .18); color: var(--mg-heading); }
.mg-core .mgcontent :is(.form-control, .form-select):focus { background-color: rgba(var(--mg-primary-rgb), .07); border-color: rgba(var(--mg-primary-rgb), .55); box-shadow: 0 0 0 .2rem rgba(var(--mg-primary-rgb), .18); }
.mg-core .mgcontent .form-label, .mg-core .mgcontent .mg-form label { font-size: .8rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--mg-muted); }
.mg-core select option { background: var(--mg-surface); color: var(--mg-text); }

/* ---- Page titles: a band on the grid ---- */
html.mg-title-band .mgcontent > h1:first-of-type,
html.mg-title-band .mgcontent h1.departmentheadline, html.mg-title-band .mgcontent h1.articleheadline {
	border-left: 0; color: var(--mg-heading);
	background: linear-gradient(rgba(var(--mg-primary-rgb), .06) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(var(--mg-primary-rgb), .06) 1px, transparent 1px) 0 0 / 40px 40px, radial-gradient(ellipse 60% 120% at 80% 0%, rgba(var(--mg-primary-rgb), .14), transparent 70%), var(--mg-surface);
	border-bottom: 1px solid rgba(var(--mg-primary-rgb), .14);
}

/* ---- Content listings and sidebars ---- */
.mg-item a.mg-item-link { border: 1px solid rgba(var(--mg-primary-rgb), .12) !important; background: var(--mg-surface); }
.mg-item a.mg-item-link:hover { border-color: rgba(var(--mg-primary-rgb), .32) !important; box-shadow: 0 20px 50px rgba(0, 0, 0, .3) !important; }
.mg-item .mg-item-type { color: var(--mg-primary); letter-spacing: .14em; }
.mg-core .mg-sidebar .mgcategory { background: var(--mg-surface); border-color: rgba(var(--mg-primary-rgb), .14); }
.mg-core .mg-sidebar .catheader { background: transparent; color: var(--mg-primary); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid rgba(var(--mg-primary-rgb), .14); }

/* ---- Footer ---- */
.mg-footer { border-top: 1px solid rgba(var(--mg-primary-rgb), .1); }
.mg-footer-bottom { border-color: rgba(var(--mg-primary-rgb), .1); }
.mg-footer a:not(.btn):hover { color: var(--mg-primary); }

/* ---- Motion: blocks rise into view as the page scrolls, where the browser
   can tie an animation to scrolling.  Elsewhere, and for anyone who asks for
   less motion, everything is simply there. ---- */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.mg-core .mg-layout > .mg-section:not(:first-of-type) .mg-blocks > * {
			animation: fathom-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 35%;
		}
	}
	.mg-core .mg-layout .mg-eyebrow::before { animation: fathom-pulse 2s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
	.mg-core .mg-layout :is(.mg-card--boxed, .mg-card--elevated):hover, .mg-core .btn-primary:hover { transform: none; }
}
@keyframes fathom-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fathom-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
