/*
Theme Name: Maemura
Theme URI: https://maemura.com
Author: Bay Area Web Solutions
Description: Editorial-luxury child theme of Twenty Twenty-Five for Maemura & Co. CPAs LLP. Built from the approved Claude Design handoff.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maemura
*/

/* =========================================================================
   1. TOKENS
   Single source of truth. Re-theming is a change here, nowhere else.
   ========================================================================= */

:root {
	--mae-navy-ink:    #101d2c;
	--mae-navy-deep:   #16283c;
	--mae-navy:        #1c3350;
	--mae-body:        #22303e;
	--mae-slate:       #5f6b78;

	/* Accessibility deviation from the handoff, deliberate:
	   the design's #8b96a2 scores 2.76:1 on paper and 3.01:1 on white and
	   carries 11px captions, card numbers and people titles. Darkened to
	   4.60:1 / 5.02:1. Reads as the same muted grey, just not faint. */
	--mae-gray-mid:    #68707a;
	--mae-gray-mid-decorative: #8b96a2; /* placeholder-plate labels only */

	--mae-gray-on-dark: #8b9bad;   /* 5.27:1 on navy-deep — passes as-is */
	--mae-gray-light:  #aab6c3;    /* 8.26:1 on navy-ink — passes as-is */
	--mae-flyout-bg:   #aab4bf;
	--mae-mist:        #ccd5df;
	--mae-line:        #d8dce1;
	--mae-line-dark:   rgba(255, 255, 255, 0.16);
	--mae-paper:       #f6f5f2;
	--mae-white:       #ffffff;

	/* Text that sits ON a dark or saturated surface. Never reuse --mae-body
	   or --mae-navy for this — that is the bug that shipped on two prior builds. */
	--mae-on-navy:     #ffffff;
	--mae-on-flyout:   #22303e;

	/* Design #6e7c8b = 3.99:1 on navy-ink at 13px. Lightened to 4.50:1. */
	--mae-footer-legal: #768595;
	/* Design #4a5866 = 3.47:1 on the flyout panel at 11px. Darkened to 4.50:1. */
	--mae-flyout-eyebrow: #3c4753;
	/* Design hover for flyout links/items is #ffffff = 2.10:1 on #aab4bf,
	   which fails AA in every size class. Darkening instead. */
	--mae-flyout-hover: #101d2c;

	--mae-nav-hover:   #b9c4d0;

	--mae-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--mae-ui: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;

	--mae-wrap: 1360px;
	--mae-pad-x: 48px;
	--mae-header-h: 110px;

	--mae-ease: cubic-bezier(0.76, 0, 0.24, 1);

	--mae-plate: repeating-linear-gradient(45deg, #e6e7e6 0 12px, #efefec 12px 24px);
	--mae-plate-dark: repeating-linear-gradient(45deg, #1a2e44 0 12px, #203752 12px 24px);
}

/* =========================================================================
   2. NEUTRALISE TWENTY TWENTY-FIVE'S LAYOUT DEFAULTS
   Every rule here exists because of a specific bug that shipped before.
   ========================================================================= */

/* TT5's parent theme.json puts padding on the root and it merges into the
   child even with useRootPaddingAwareAlignments:false — every "full-bleed"
   band ends up inset. Zero it at the element too. */
body {
	padding: 0 !important;
	margin: 0;
	background: var(--mae-paper);
	font-family: var(--mae-ui);
	font-size: 18px;
	line-height: 1.6;
	color: var(--mae-body);
	-webkit-font-smoothing: antialiased;
}

/* TT5 ships blockGap as a margin on every direct child of main. This is the
   single cause of the mystery white seams on every previous build. */
main.wp-block-group > *,
.wp-site-blocks > *,
.entry-content > *,
.mae-page > * {
	margin-block: 0 !important;
}

/* Our sections own their own max-width. Free them from the constrained-layout
   cap and from core's auto-centering of any child with an explicit max-width. */
.entry-content > *,
.wp-site-blocks > * {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

::selection { background: var(--mae-navy); color: var(--mae-white); }

img { max-width: 100%; height: auto; display: block; }

/* Every box that declares both a max-width and horizontal padding.
   content-box is the browser default and adds the padding on top of the
   max-width — the single most-repeated defect across prior builds. */
.mae-wrap,
.mae-section,
.mae-section__inner,
.mae-header__inner,
.mae-footer__inner,
.mae-footer__legal {
	box-sizing: border-box;
}
*, *::before, *::after { box-sizing: border-box; }

/* =========================================================================
   3. SHARED PRIMITIVES
   ========================================================================= */

.mae-wrap {
	max-width: var(--mae-wrap);
	margin-inline: auto;
	width: 100%;
}

.mae-section { padding-inline: var(--mae-pad-x); }

.mae-eyebrow {
	font-family: var(--mae-ui);
	font-size: 11px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--mae-slate);
	margin: 0;
}

.mae-caption {
	font-family: var(--mae-ui);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--mae-gray-mid);
	margin-top: 16px;
}

/* Outer section shells. Every section is a full-width band whose inner
   .mae-wrap holds the 1360px content column, so every content column on the
   site shares one left edge. Never put max-width and padding-inline on the
   same element and rely on box-sizing to sort it out. */
.mae-overview-sec { padding-block: 140px; }
.mae-intro-sec { padding-block: 120px 100px; }

/* Section header: h2 left, eyebrow right, aligned on the baseline. */
.mae-sechead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 80px;
}
.mae-sechead h2 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 52px;
	line-height: 1.12;
	color: var(--mae-navy);
	margin: 0;
}
.mae-sechead--tight { margin-bottom: 40px; }
.mae-sechead--people { margin-bottom: 70px; }

/* Placeholder photo plates. Every one is a real <img> in the media library so
   the client can swap it in wp-admin without touching markup. */
.mae-plate {
	background: var(--mae-plate);
	display: block;
	width: 100%;
	overflow: hidden;
}
.mae-plate img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mae-plate--portrait { aspect-ratio: 3 / 4; }
.mae-plate--landscape { aspect-ratio: 16 / 10; }
.mae-plate--four-three { aspect-ratio: 4 / 3; }

/* The label is HTML text sitting over the plate, never baked into an image.
   When the client supplies a real photo, drop an <img> inside the plate and
   delete the label — no regenerated asset, no mismatched caption burned in. */
.mae-plate {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.mae-plate__label {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	letter-spacing: 0.08em;
	color: var(--mae-gray-mid);
	text-align: center;
	padding: 12px;
}
.mae-plate:has(img) .mae-plate__label { display: none; }
.mae-plate img { position: absolute; inset: 0; }

/* Buttons — pill only, no radius anywhere else, no shadows. */
.mae-btn {
	display: inline-block;
	text-decoration: none;
	font-family: var(--mae-ui);
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border-radius: 999px;
	transition: all 0.3s ease;
	white-space: nowrap;
}
.mae-btn--primary {
	background: var(--mae-navy);
	color: var(--mae-on-navy);
	padding: 17px 38px;
	border: 1px solid var(--mae-navy);
}
.mae-btn--primary:hover,
.mae-btn--primary:focus-visible {
	background: var(--mae-navy-deep);
	border-color: var(--mae-navy-deep);
	color: var(--mae-on-navy);
}
.mae-btn--hero {
	background: var(--mae-white);
	color: #14202e;
	padding: 16px 34px;
	border: 1px solid var(--mae-white);
}
.mae-btn--hero:hover,
.mae-btn--hero:focus-visible { background: var(--mae-mist); border-color: var(--mae-mist); color: #14202e; }
.mae-btn--outline {
	font-size: 12.5px;
	color: var(--mae-navy);
	border: 1px solid var(--mae-navy);
	padding: 13px 28px;
	background: transparent;
}
.mae-btn--outline:hover,
.mae-btn--outline:focus-visible { background: var(--mae-navy); color: var(--mae-on-navy); }

.mae-readmore {
	font-family: var(--mae-ui);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mae-navy);
	text-decoration: none;
	border-bottom: 1px solid var(--mae-navy);
	padding-bottom: 3px;
	transition: color 0.3s ease, border-color 0.3s ease;
}
.mae-readmore:hover,
.mae-readmore:focus-visible { color: var(--mae-slate); border-bottom-color: var(--mae-slate); }

/* Focus states. TT5's are too weak for a site this low-contrast. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--mae-navy);
	outline-offset: 3px;
}
.mae-header a:focus-visible,
.mae-header button:focus-visible,
.mae-footer a:focus-visible,
.mae-cases a:focus-visible,
.mae-hero a:focus-visible {
	outline-color: var(--mae-white);
}

.mae-skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 200;
	background: var(--mae-white);
	color: var(--mae-navy);
	padding: 12px 20px;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* =========================================================================
   4. HEADER
   ========================================================================= */

.mae-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 22px clamp(20px, 3vw, 48px);
	background: var(--mae-navy-ink);
	transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

/* Homepage only: transparent over the hero, frosted navy after 60px scroll. */
body.home .mae-header {
	background: transparent;
	backdrop-filter: none;
}
body.home .mae-header.is-scrolled {
	background: rgba(16, 29, 44, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.mae-header__logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.mae-header__logo img {
	height: 52px;
	width: auto;
	max-width: none;
	display: block;
}

.mae-nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	row-gap: 8px;
	gap: clamp(14px, 2.2vw, 40px);
	min-width: 0;
}
.mae-nav__item {
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--mae-ui);
	font-size: 12.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mae-white);
	padding: 4px 0;
	white-space: nowrap;
	text-decoration: none;
	transition: color 0.3s ease;
}
.mae-nav__item:hover,
.mae-nav__item:focus-visible { color: var(--mae-nav-hover); }

.mae-nav__cta {
	text-decoration: none;
	font-family: var(--mae-ui);
	font-size: 12.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mae-white);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 999px;
	padding: 12px 24px;
	white-space: nowrap;
	transition: all 0.3s ease;
}
.mae-nav__cta:hover,
.mae-nav__cta:focus-visible { background: var(--mae-white); color: var(--mae-navy); }

/* Internal pages carry a solid band under the fixed header (client decision:
   header imagery is homepage-only). */
.mae-header-spacer {
	background: var(--mae-navy-ink);
	height: var(--mae-header-h);
}

.mae-nav__toggle { display: none; }

/* =========================================================================
   5. NAV FLYOUT — the signature interaction
   ========================================================================= */

.mae-flyout {
	position: fixed;
	inset: 0;
	z-index: 100;
}
.mae-flyout[hidden] { display: none; }

.mae-flyout__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 18, 28, 0.4);
	opacity: 0;
	transition: opacity 0.55s ease;
	border: none;
	padding: 0;
	cursor: pointer;
	width: 100%;
}
.mae-flyout.is-open .mae-flyout__backdrop { opacity: 1; }

.mae-flyout__panel {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: 34% 66%;
	transform: translateX(100%);
	transition: transform 0.65s var(--mae-ease);
}
.mae-flyout.is-open .mae-flyout__panel { transform: none; }
.mae-flyout--curtain .mae-flyout__panel { transform: translateY(-100%); }
.mae-flyout--curtain.is-open .mae-flyout__panel { transform: none; }

.mae-flyout__left {
	background: var(--mae-navy-deep);
	padding: 48px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}
.mae-flyout__left img { height: 48px; width: auto; max-width: none; }
.mae-flyout__title {
	font-family: var(--mae-display);
	font-weight: 400;
	font-size: 74px;
	line-height: 1.05;
	color: var(--mae-white);
	margin: 90px 0 0;
}
.mae-flyout__photo {
	height: 34vh;
	background: var(--mae-plate-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
	text-align: center;
	padding: 12px;
	flex: 0 0 auto;
}

.mae-flyout__right {
	background: var(--mae-flyout-bg);
	padding: 48px 64px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow-y: auto;
}
.mae-flyout__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 100px;
	flex-wrap: wrap;
	row-gap: 16px;
}
.mae-flyout__others { display: flex; gap: 48px; flex-wrap: wrap; row-gap: 12px; }
.mae-flyout__other {
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--mae-ui);
	font-size: 12.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mae-on-flyout);
	padding: 4px 0;
	transition: color 0.25s ease;
	white-space: nowrap;
}
.mae-flyout__other:hover,
.mae-flyout__other:focus-visible { color: var(--mae-flyout-hover); }

.mae-flyout__close {
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--mae-ui);
	font-size: 12.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mae-on-flyout);
	display: flex;
	align-items: center;
	gap: 12px;
	transition: color 0.25s ease;
}
.mae-flyout__close:hover,
.mae-flyout__close:focus-visible { color: var(--mae-flyout-hover); }
.mae-flyout__close span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 15px;
}

.mae-flyout__eyebrow {
	font-family: var(--mae-ui);
	font-size: 11px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--mae-flyout-eyebrow);
	margin-bottom: 34px;
}
.mae-flyout__links {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
}
.mae-flyout__links a {
	font-family: var(--mae-display);
	font-size: 42px;
	font-weight: 400;
	color: var(--mae-on-flyout);
	text-decoration: none;
	line-height: 1.35;
	transition: color 0.25s ease;
}
.mae-flyout__links a:hover,
.mae-flyout__links a:focus-visible { color: var(--mae-flyout-hover); }

body.mae-flyout-open { overflow: hidden; }

/* =========================================================================
   6. HERO
   ========================================================================= */

.mae-hero {
	position: relative;
	height: 100vh;
	min-height: 640px;
	background: repeating-linear-gradient(45deg, #16283c 0 14px, #1a2e44 14px 28px);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}
.mae-hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}
.mae-hero__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(12, 22, 34, 0.35) 0%, rgba(12, 22, 34, 0.1) 40%, rgba(12, 22, 34, 0.65) 100%);
}
.mae-hero__note {
	position: absolute;
	top: 30%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.55);
	border: 1px dashed rgba(255, 255, 255, 0.35);
	padding: 10px 18px;
	text-align: center;
}
.mae-hero__content {
	position: relative;
	z-index: 2;
	padding: 0 48px 88px;
	max-width: 980px;
}
.mae-hero__content h1 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 82px;
	line-height: 1.05;
	letter-spacing: 0.01em;
	color: var(--mae-white);
	margin: 0 0 26px;
	text-wrap: pretty;
}
.mae-hero__sub {
	font-size: 19px;
	color: var(--mae-mist);
	margin: 0 0 36px;
	max-width: 560px;
}

/* =========================================================================
   7. OVERVIEW — the two-photo editorial stagger
   The 135px / 215px / -101px offsets are the design's signature moment.
   ========================================================================= */

.mae-overview {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
}
.mae-overview h2 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 58px;
	line-height: 1.1;
	color: var(--mae-navy);
	margin: 0 0 64px;
}
.mae-overview__portrait {
	max-width: 560px;
	margin-top: 135px;
}
.mae-overview__right {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	padding-top: 14px;
}
.mae-overview__right > .mae-eyebrow {
	white-space: nowrap;
	padding-top: 8px;
	flex: 0 0 auto;
}
.mae-overview__body { min-width: 0; }
.mae-overview__lede {
	font-family: var(--mae-display);
	font-size: 28px;
	line-height: 1.45;
	color: var(--mae-body);
	margin: 0 0 34px;
	text-wrap: pretty;
}
.mae-overview__landscape {
	margin-top: 215px;
	margin-left: -101px;
}

/* =========================================================================
   8. SERVICES
   ========================================================================= */

.mae-services { background: var(--mae-white); padding-block: 130px; }
.mae-services--page { padding-block: 110px 130px; }

.mae-services__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 72px 64px;
}
.mae-service {
	border-top: 1px solid var(--mae-line);
	padding-top: 26px;
}
.mae-service__num {
	font-family: var(--mae-ui);
	font-size: 11px;
	letter-spacing: 0.2em;
	color: var(--mae-gray-mid);
	margin-bottom: 14px;
}
.mae-service h3 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 30px;
	line-height: 1.2;
	color: var(--mae-navy);
	margin: 0 0 14px;
}
.mae-service p {
	font-size: 16.5px;
	line-height: 1.6;
	color: var(--mae-slate);
	margin: 0 0 18px;
	text-wrap: pretty;
}

/* =========================================================================
   9. SPECIALTIES
   ========================================================================= */

.mae-specialties { padding-block: 130px; }
.mae-specialties--page { padding-block: 110px 130px; }

.mae-specialties__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 56px 40px;
}
.mae-specialty { display: block; text-decoration: none; }
.mae-specialty .mae-plate {
	margin-bottom: 20px;
	transition: opacity 0.3s ease;
}
.mae-specialty:hover .mae-plate,
.mae-specialty:focus-visible .mae-plate { opacity: 0.85; }
.mae-specialty h3 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 27px;
	line-height: 1.2;
	color: var(--mae-navy);
	margin: 0;
}

/* =========================================================================
   10. CASE STUDIES
   ========================================================================= */

.mae-cases { background: var(--mae-navy-deep); padding-block: 130px; }
.mae-cases .mae-sechead h2 { color: var(--mae-on-navy); }
.mae-cases .mae-eyebrow { color: var(--mae-gray-on-dark); }
.mae-cases__list { display: flex; flex-direction: column; }
.mae-case {
	text-decoration: none;
	display: grid;
	grid-template-columns: 200px 1fr auto;
	gap: 40px;
	align-items: baseline;
	padding: 38px 0;
	border-top: 1px solid var(--mae-line-dark);
	transition: opacity 0.3s ease;
}
.mae-case:hover,
.mae-case:focus-visible { opacity: 0.7; }
.mae-case__tag {
	font-family: var(--mae-ui);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--mae-gray-on-dark);
}
.mae-case__title {
	font-family: var(--mae-display);
	font-size: 30px;
	line-height: 1.3;
	color: var(--mae-on-navy);
}
.mae-case__arrow { font-size: 20px; color: var(--mae-gray-on-dark); }

/* =========================================================================
   11. CTA
   ========================================================================= */

.mae-cta { padding-block: 150px; text-align: center; }
.mae-cta h2 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 58px;
	line-height: 1.15;
	color: var(--mae-navy);
	margin: 0 auto 40px;
	max-width: 760px;
	text-wrap: pretty;
}

/* =========================================================================
   12. FOOTER
   ========================================================================= */

.mae-footer {
	background: var(--mae-navy-ink);
	color: var(--mae-gray-light);
	padding: 90px 48px 40px;
}
.mae-footer__inner {
	max-width: var(--mae-wrap);
	margin-inline: auto;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 56px;
}
.mae-footer__logo img {
	height: 58px;
	width: auto;
	max-width: none;
	margin-bottom: 30px;
}
.mae-footer__address {
	font-size: 15.5px;
	line-height: 1.8;
	margin: 0;
	color: var(--mae-gray-light);
}
.mae-footer__address a { color: var(--mae-mist); text-decoration: none; }
.mae-footer__address a:hover,
.mae-footer__address a:focus-visible { color: var(--mae-white); }
.mae-footer__head {
	font-family: var(--mae-ui);
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--mae-white);
	margin-bottom: 24px;
}
.mae-footer__links {
	display: flex;
	flex-direction: column;
	gap: 14px;
	font-size: 15.5px;
}
.mae-footer__links a {
	color: var(--mae-gray-light);
	text-decoration: none;
	transition: color 0.3s ease;
}
.mae-footer__links a:hover,
.mae-footer__links a:focus-visible { color: var(--mae-white); }

.mae-footer__legal {
	max-width: var(--mae-wrap);
	margin: 70px auto 0;
	padding-top: 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	display: flex;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--mae-footer-legal);
}
.mae-footer__legal a { color: var(--mae-footer-legal); text-decoration: none; }
.mae-footer__legal a:hover,
.mae-footer__legal a:focus-visible { color: var(--mae-white); }
.mae-footer__legal span { display: flex; gap: 28px; flex-wrap: wrap; }

/* =========================================================================
   13. INTERNAL PAGES
   ========================================================================= */

.mae-intro {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
}
.mae-intro h1 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 64px;
	line-height: 1.08;
	color: var(--mae-navy);
	margin: 0;
}
.mae-intro__right {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	padding-top: 14px;
}
.mae-intro__right > .mae-eyebrow {
	white-space: nowrap;
	padding-top: 8px;
	flex: 0 0 auto;
}
.mae-intro__lede {
	font-family: var(--mae-display);
	font-size: 27px;
	line-height: 1.45;
	color: var(--mae-body);
	margin: 0;
	text-wrap: pretty;
}

.mae-values { background: var(--mae-white); padding-block: 110px; }
.mae-values .mae-eyebrow { margin-bottom: 60px; }
.mae-values__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 64px;
}
.mae-value {
	border-top: 1px solid var(--mae-line);
	padding-top: 26px;
}
.mae-value h3 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 29px;
	line-height: 1.2;
	color: var(--mae-navy);
	margin: 0 0 12px;
}
.mae-value p {
	font-size: 16.5px;
	line-height: 1.6;
	color: var(--mae-slate);
	margin: 0;
}

.mae-people { padding-block: 120px; }
.mae-people__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 48px;
}
.mae-person .mae-plate { margin-bottom: 20px; }
.mae-person h3 {
	font-family: var(--mae-display);
	font-weight: 500;
	font-size: 27px;
	line-height: 1.2;
	color: var(--mae-navy);
	margin: 0 0 4px;
}
.mae-person__title {
	font-family: var(--mae-ui);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--mae-gray-mid);
	margin-bottom: 12px;
}
.mae-person p {
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--mae-slate);
	margin: 0;
}

/* =========================================================================
   14. RESPONSIVE
   Below ~1100px is not designed. Sensible stacking, offsets released.
   ========================================================================= */

@media (max-width: 1100px) {
	:root { --mae-pad-x: 32px; }

	.mae-hero__content h1 { font-size: 60px; }
	.mae-hero__content { padding: 0 32px 72px; }

	.mae-overview,
	.mae-intro { grid-template-columns: 1fr; gap: 56px; }
	.mae-overview-sec { padding-block: 96px; }
	.mae-intro-sec { padding-block: 96px 80px; }
	.mae-overview h2 { font-size: 44px; margin-bottom: 40px; }
	.mae-overview__portrait { margin-top: 0; }
	/* The stagger offsets only work in a two-column grid. Release them. */
	.mae-overview__landscape { margin-top: 56px; margin-left: 0; }
	.mae-intro h1 { font-size: 48px; }

	.mae-sechead h2 { font-size: 40px; }
	.mae-sechead { margin-bottom: 56px; }

	.mae-services__grid,
	.mae-specialties__grid,
	.mae-values__grid,
	.mae-people__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 56px 40px;
	}

	.mae-cta { padding-block: 110px; }
	.mae-cta h2 { font-size: 44px; }

	.mae-footer__inner { grid-template-columns: 1fr 1fr; gap: 48px; }

	.mae-flyout__panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
	.mae-flyout__left { padding: 32px; }
	.mae-flyout__title { font-size: 44px; margin-top: 32px; }
	.mae-flyout__photo { display: none; }
	.mae-flyout__right { padding: 32px; }
	.mae-flyout__top { margin-bottom: 40px; }
	.mae-flyout__links a { font-size: 30px; }
}

@media (max-width: 860px) {
	.mae-nav__item { display: none; }
	.mae-nav__toggle {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		background: none;
		border: none;
		cursor: pointer;
		font-family: var(--mae-ui);
		font-size: 12.5px;
		letter-spacing: 0.18em;
		text-transform: uppercase;
		color: var(--mae-white);
		padding: 8px 0;
		min-height: 24px;
	}
	.mae-nav__toggle svg { width: 22px; height: 12px; }
}

@media (max-width: 700px) {
	:root { --mae-pad-x: 20px; --mae-header-h: 88px; }

	.mae-header { padding: 16px 20px; }
	.mae-header__logo img { height: 40px; }
	.mae-nav__cta { padding: 10px 18px; font-size: 11.5px; }

	.mae-hero { min-height: 560px; }
	.mae-hero__content { padding: 0 20px 56px; }
	.mae-hero__content h1 { font-size: 42px; }
	.mae-hero__sub { font-size: 17px; }
	.mae-hero__note { display: none; }

	.mae-overview-sec { padding-block: 72px; }
	.mae-intro-sec { padding-block: 72px 56px; }
	.mae-overview__right,
	.mae-intro__right { flex-direction: column; gap: 20px; }
	.mae-overview__right > .mae-eyebrow,
	.mae-intro__right > .mae-eyebrow { padding-top: 0; }
	.mae-overview__lede { font-size: 22px; }
	.mae-intro__lede { font-size: 22px; }
	.mae-intro h1 { font-size: 38px; }

	.mae-sechead { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 40px; }
	.mae-sechead h2 { font-size: 34px; }

	.mae-services,
	.mae-services--page,
	.mae-specialties,
	.mae-specialties--page,
	.mae-cases,
	.mae-values,
	.mae-people { padding-block: 72px; }

	.mae-services__grid,
	.mae-specialties__grid,
	.mae-values__grid,
	.mae-people__grid { grid-template-columns: 1fr; gap: 48px; }

	.mae-case { grid-template-columns: 1fr auto; gap: 8px 20px; padding: 26px 0; }
	.mae-case__tag { grid-column: 1 / -1; }
	.mae-case__title { font-size: 24px; }

	.mae-cta { padding-block: 80px; }
	.mae-cta h2 { font-size: 34px; }

	.mae-footer { padding: 64px 20px 32px; }
	.mae-footer__inner { grid-template-columns: 1fr; gap: 40px; }
	.mae-footer__legal { flex-direction: column; gap: 12px; margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================================
   15. LATE OVERRIDES
   Anything that must beat a WordPress core block-library rule goes HERE,
   at the end of the file, after every media query. Placing a rule with
   !important above a breakpoint is how the hamburger bug shipped twice.
   ========================================================================= */

/* Core sizes the site-logo block's img to 120px via a two-class selector
   (.wp-block-site-logo.is-default-size img) which outranks any one-class rule. */
.mae-header__logo img,
.mae-footer__logo img,
.mae-flyout__left img {
	width: auto !important;
	max-width: none !important;
}

/* Core auto-centers any constrained-layout child that has an explicit
   max-width. Our sections are left-anchored blocks with a measure cap. */
.mae-hero__content,
.mae-hero__sub {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* =========================================================================
   16. SCROLL REVEALS
   Hidden only when the JS flag is present AND reduced motion is not asked
   for. If the script never runs, nothing is ever hidden. The selector list
   is mirrored in flyout.js - keep the two in step.
   ========================================================================= */

@media (prefers-reduced-motion: no-preference) {
	.mae-js .mae-overview h2,
	.mae-js .mae-overview__portrait,
	.mae-js .mae-overview__lede,
	.mae-js .mae-overview__landscape,
	.mae-js .mae-overview .mae-caption,
	.mae-js .mae-sechead,
	.mae-js .mae-intro h1,
	.mae-js .mae-intro__lede,
	.mae-js .mae-cta h2,
	.mae-js .mae-cta .mae-btn,
	.mae-js .mae-services__grid > *,
	.mae-js .mae-specialties__grid > *,
	.mae-js .mae-cases__list > *,
	.mae-js .mae-values__grid > *,
	.mae-js .mae-people__grid > * {
		opacity: 0;
		transform: translateY(20px);
		transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
		transition-delay: var(--mae-reveal-delay, 0ms);
	}

	.mae-js .is-in {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ---- MAE-ANCHOR-OFFSET (§15) -------------------------------------------
   Nav sub-links now target in-page sections. The header is fixed, so give
   every anchor target room to clear it. Must stay after all media queries. */
.mae-section[id],
.mae-service[id],
.mae-specialty[id] {
	scroll-margin-top: 110px;
}

@media (max-width: 860px) {
	.mae-section[id],
	.mae-service[id],
	.mae-specialty[id] {
		scroll-margin-top: 84px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* ---- MAE-PROSE (§15) ----------------------------------------------------
   Body copy migrated from the firm's existing site. §2 strips TT5's blockGap
   margins, so spacing has to be restated here. Keep after all media queries. */
.mae-detail .mae-wrap {
	display: block;
}

.mae-prose {
	max-width: 68ch;
}

.mae-prose > * + * {
	margin-top: 1.15em;
}

.mae-prose h2,
.mae-prose h3,
.mae-prose h4,
.mae-prose h5 {
	margin-top: 2.1em;
	margin-bottom: 0.55em;
	line-height: 1.25;
}

.mae-prose h4 {
	font-size: 1.18em;
}

.mae-prose h5 {
	font-size: 1.05em;
}

.mae-prose p {
	line-height: 1.7;
}

.mae-prose ul,
.mae-prose ol {
	padding-left: 1.45em;
	list-style-position: outside;
}

.mae-prose ul {
	list-style-type: disc;
}

.mae-prose ol {
	list-style-type: decimal;
}

.mae-prose li + li {
	margin-top: 0.4em;
}

.mae-prose li {
	line-height: 1.7;
}

.mae-prose a {
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.mae-prose strong {
	font-weight: 600;
}

@media (max-width: 860px) {
	.mae-prose {
		max-width: none;
	}
}


/* ---- MAE-TRANSLATE (§15) ---------------------------------------------
   GTranslate flags carried over from the firm's current site
   (zh-CN, en, fr, ja). Keep after all media queries. */
.mae-translate {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.mae-translate__label {
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mae-footer-legal, #768595);
}

.mae-translate__widget {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.mae-translate__widget a.glink {
	display: inline-flex;
	align-items: center;
	margin-right: 8px;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.mae-translate__widget a.glink:hover,
.mae-translate__widget a.glink:focus-visible {
	opacity: 1;
}

.mae-translate__widget a.glink img {
	display: block;
	width: 24px;
	height: auto;
}

/* Google's injected banner shifts the whole page down. */
.skiptranslate iframe,
iframe.skiptranslate {
	display: none !important;
}

body {
	top: 0 !important;
}

/* =========================================================================
   MAE-HERO-VIDEO (2026-10-05) - background video pause control
   ========================================================================= */
.mae-hero__toggle {
	position: absolute;
	right: 32px;
	bottom: 32px;
	z-index: 3;
	width: 44px;
	height: 44px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 50%;
	background: rgba(12, 22, 34, 0.35);
	color: #ffffff;
	cursor: pointer;
	transition: background 0.2s ease;
}
.mae-hero__toggle:hover { background: rgba(12, 22, 34, 0.65); }
.mae-hero__toggle:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.mae-hero__toggle-icon {
	display: block;
	box-sizing: border-box;
	width: 12px;
	height: 14px;
	border-left: 4px solid currentColor;
	border-right: 4px solid currentColor;
}
.mae-hero__toggle[aria-pressed="true"] .mae-hero__toggle-icon {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent currentColor;
}
@media (max-width: 860px) {
	.mae-hero__toggle { right: 16px; bottom: 16px; }
}
/* =========================================================================
   MAE-OCT5 (2026-10-05): bigger home logo, hero slogan, resources, detail images
   ========================================================================= */
.mae-header__logo img { transition: height 0.3s ease; }
body.home .mae-header:not(.is-scrolled) .mae-header__logo img { height: 68px; }
.mae-hero__slogan span { display: block; opacity: 0; transform: translateY(14px); animation: mae-slogan-in 1.1s cubic-bezier(.22,.61,.36,1) forwards; }
.mae-hero__slogan span:nth-child(1) { animation-delay: 0.5s; }
.mae-hero__slogan span:nth-child(2) { animation-delay: 1.9s; }
.mae-hero__slogan span:nth-child(3) { animation-delay: 3.3s; }
.mae-hero .mae-hero__sub, .mae-hero .mae-btn--hero { opacity: 0; animation: mae-fade-in 0.9s ease 4.5s forwards; }
@keyframes mae-slogan-in { to { opacity: 1; transform: none; } }
@keyframes mae-fade-in { to { opacity: 1; } }
.mae-resources .mae-value h3 a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.mae-resources .mae-value h3 a:hover { text-decoration-thickness: 2px; }
.mae-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#resources { scroll-margin-top: 110px; }
.mae-prose .mae-detail__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 0 40px; }
@media (max-width: 860px) { #resources { scroll-margin-top: 84px; } }
@media (max-width: 700px) { body.home .mae-header:not(.is-scrolled) .mae-header__logo img { height: 50px; } }
@media (prefers-reduced-motion: reduce) {
	.mae-hero__slogan span, .mae-hero .mae-hero__sub, .mae-hero .mae-btn--hero { opacity: 1; transform: none; animation: none; }
	.mae-header__logo img { transition: none; }
}
/* =========================================================================
   MAE-GF (2026-10-05): Schedule a Consultation page + Gravity Forms styling
   ========================================================================= */
.mae-consult__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.mae-consult__info { border-top: 1px solid currentColor; padding-top: 20px; font-size: 15px; line-height: 1.7; }
.mae-consult__info a { color: inherit; }
.mae-consult .gform_wrapper.gravity-theme .gfield_label, .mae-consult .gform_wrapper .gform-field-label { font-family: inherit; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.mae-consult .gform_wrapper input[type="text"], .mae-consult .gform_wrapper input[type="email"], .mae-consult .gform_wrapper input[type="tel"], .mae-consult .gform_wrapper select, .mae-consult .gform_wrapper textarea { font: inherit; font-size: 16px; border: 1px solid #b9c1cb; border-radius: 0; padding: 12px 14px; background: #fff; }
.mae-consult .gform_wrapper input:focus-visible, .mae-consult .gform_wrapper select:focus-visible, .mae-consult .gform_wrapper textarea:focus-visible { outline: 2px solid #101d2c; outline-offset: 1px; }
.mae-consult .gform_wrapper .gform_footer input[type="submit"], .mae-consult .gform_wrapper .gform_footer button { font: inherit; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; background: #101d2c; color: #fff; border: 0; border-radius: 999px; padding: 16px 32px; cursor: pointer; }
.mae-consult .gform_wrapper .gform_footer input[type="submit"]:hover { background: #22364d; }
@media (max-width: 860px) { .mae-consult__grid { grid-template-columns: 1fr; gap: 48px; } }
/* MAE-GF-FIX */
section.mae-consult .mae-wrap.mae-consult__grid { display: grid !important; }
@media (max-width: 860px) { section.mae-consult .mae-wrap.mae-consult__grid { grid-template-columns: 1fr; } }

/* =========================================================================
   MAE-DETAIL (2026-10-06): Services / Specialties detail pages
   ========================================================================= */
.mae-backlink { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.mae-backlink:hover { color: var(--mae-navy); }
section.mae-detail .mae-wrap.mae-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 96px; align-items: start; }
.mae-detail__grid > .mae-prose { grid-column: 1; grid-row: 1; max-width: 68ch; }
.mae-detail__grid > .mae-side { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--mae-header-h, 96px) + 32px); }

/* Prose */
.mae-detail__grid .mae-prose > p:first-of-type { font-family: var(--mae-display); font-size: 27px; line-height: 1.45; color: var(--mae-navy); margin-bottom: 1.4em; text-wrap: pretty; }
.mae-detail__grid .mae-prose h2, .mae-detail__grid .mae-prose h3, .mae-detail__grid .mae-prose h4 { font-family: var(--mae-display); font-weight: 500; font-size: 30px; line-height: 1.2; color: var(--mae-navy); margin-top: 2.2em; margin-bottom: 0.6em; padding-top: 28px; border-top: 1px solid rgba(16, 29, 44, 0.14); }
.mae-detail__grid .mae-prose ul { list-style: none; padding-left: 0; }
.mae-detail__grid .mae-prose ul li { position: relative; padding-left: 30px; }
.mae-detail__grid .mae-prose ul li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 16px; height: 1px; background: var(--mae-navy); }
.mae-detail__grid .mae-prose a { color: var(--mae-navy); text-underline-offset: 4px; }
.mae-detail__grid .mae-detail__img { margin-bottom: 48px; }

/* Sidebar */
.mae-side__nav .mae-eyebrow { margin-bottom: 16px; }
.mae-side__nav ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(16, 29, 44, 0.14); }
.mae-side__nav li { border-bottom: 1px solid rgba(16, 29, 44, 0.14); }
.mae-side__nav a { display: block; padding: 14px 0 14px 18px; position: relative; font-size: 15px; color: var(--mae-slate); text-decoration: none; transition: color 0.2s ease, padding 0.2s ease; }
.mae-side__nav a:hover { color: var(--mae-navy); padding-left: 24px; }
.mae-side__nav li.is-current a { color: var(--mae-navy); font-weight: 600; }
.mae-side__nav li.is-current a::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 1px; background: var(--mae-navy); }
.mae-side__card { margin-top: 40px; background: var(--mae-navy); color: #fff; padding: 32px 28px; }
.mae-side__card p { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.mae-side__card .mae-side__title { font-family: var(--mae-display); font-size: 28px; line-height: 1.15; color: #fff; margin-bottom: 12px; }
.mae-side__btn { display: inline-block; background: #fff; color: var(--mae-navy); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding: 14px 22px; border-radius: 999px; transition: background 0.2s ease; }
.mae-side__btn:hover { background: #e6e9ee; }
.mae-side__tel { display: block; margin-top: 18px; color: #fff; font-size: 15px; text-decoration: none; }
.mae-side__tel:hover { text-decoration: underline; }
.mae-side a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Previous / next */
.mae-pn { border-top: 1px solid rgba(16, 29, 44, 0.14); border-bottom: 1px solid rgba(16, 29, 44, 0.14); margin-top: 40px; }
.mae-pn__grid { display: grid; grid-template-columns: 1fr 1fr; }
.mae-pn__link { display: flex; flex-direction: column; gap: 10px; padding: 44px 0; text-decoration: none; color: var(--mae-navy); }
.mae-pn__next { text-align: right; align-items: flex-end; border-left: 1px solid rgba(16, 29, 44, 0.14); }
.mae-pn__title { font-family: var(--mae-display); font-size: 32px; line-height: 1.15; transition: opacity 0.2s ease; }
.mae-pn__link:hover .mae-pn__title { opacity: 0.65; }
.mae-pn__prev .mae-pn__title::before { content: "\2190\00a0"; }
.mae-pn__next .mae-pn__title::after { content: "\00a0\2192"; }

@media (max-width: 1000px) {
	section.mae-detail .mae-wrap.mae-detail__grid { grid-template-columns: 1fr; }
	.mae-detail__grid > .mae-prose { grid-row: 1; }
	.mae-detail__grid > .mae-side { grid-column: 1; grid-row: 2; position: static; margin-top: 72px; }
}
@media (max-width: 700px) {
	.mae-detail__grid .mae-prose > p:first-of-type { font-size: 22px; }
	.mae-detail__grid .mae-prose h2, .mae-detail__grid .mae-prose h3, .mae-detail__grid .mae-prose h4 { font-size: 25px; }
	.mae-pn__grid { grid-template-columns: 1fr; }
	.mae-pn__next { border-left: 0; border-top: 1px solid rgba(16, 29, 44, 0.14); }
	.mae-pn__link { padding: 28px 0; }
	.mae-pn__title { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
	.mae-side__nav a, .mae-pn__title { transition: none; }
}
/* MAE-DETAIL-FIX */
.mae-side__btn { display: block; text-align: center; white-space: nowrap; font-size: 11px; letter-spacing: 0.1em; padding: 14px 12px; }

/* Multi-paragraph bios (2026-11-11) */
.mae-person p + p { margin-top: 0.75em !important; }

/* Translate flags in the footer bottom bar (2026-11-11) */
.mae-footer__legal { align-items: center !important; }
.mae-footer__legal .mae-translate { margin-bottom: 0 !important; }

/* Flyout photo plates with real images (2026-11-11) */
.mae-flyout__photo.has-img { padding: 0; background: none; overflow: hidden; }
.mae-flyout__left .mae-flyout__photo.has-img img { display: block; width: 100% !important; max-width: none !important; height: 100% !important; object-fit: cover; object-position: center 45%; }
.mae-flyout__photo.is-empty { visibility: hidden; }