/* ==========================================================================
   MMSA theme styles
   Tokens (colors, fonts, sizes) come from theme.json presets.
   Decorative art is in assets/images and attached here so editors can't
   accidentally delete it; editable content stays in blocks.
   ========================================================================== */

:root {
	--mmsa-orange: var(--wp--preset--color--orange, #F04C23);
	--mmsa-green: var(--wp--preset--color--green, #00AB52);
	--mmsa-ink: var(--wp--preset--color--ink, #181818);
	--mmsa-rule: rgba(24, 24, 24, 0.3);
	--mmsa-shadow: 2px 10px 14.6px rgba(0, 0, 0, 0.15);
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

/* Visually hidden helper */
.mmsa-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Shared type helpers
   -------------------------------------------------------------------------- */
.mmsa-mono {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
}
.mmsa-script {
	font-family: var(--wp--preset--font-family--script);
	line-height: 1.2;
}
.mmsa-label {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
	text-transform: uppercase;
	color: var(--mmsa-orange);
	line-height: 1.1;
}
.mmsa-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--sticky);
	line-height: 1.2;
	margin: 0;
}

/* Hand-drawn marks behind words. Applied to <span>s inside headings. */
.mmsa-mark {
	position: relative;
	z-index: 0;
	white-space: nowrap;
}
.mmsa-mark::before {
	content: "";
	position: absolute;
	z-index: -1;
	background: no-repeat center / 100% 100%;
	pointer-events: none;
}
.mmsa-mark-hl-yellow::before {
	background-image: url("../images/hl-yellow-hero.svg");
	left: -0.13em; right: -0.33em;
	top: 0.49em; bottom: -0.05em;
}
.mmsa-mark-circle::before {
	background-image: url("../images/circle-blue-hero.svg");
	left: -0.3em; right: -0.28em;
	top: 0.02em; bottom: -0.02em;
}
.mmsa-mark-hl-blue::before {
	background-image: url("../images/hl-blue-success.svg");
	left: -0.1em; right: -0.05em;
	top: 0.5em; bottom: -0.1em;
}
.mmsa-mark-hl-yellow-wide::before {
	background-image: url("../images/hl-yellow-cta.svg");
	left: 0.2em; right: -0.08em;
	top: 0.52em; bottom: -0.06em;
}

/* Multi-line hand-drawn highlights (wrap across lines; used in body copy and
   long headings). Same art as the single-word marks above. */
.mmsa-hl {
	background: no-repeat 0 62% / 100% 0.62em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	padding-inline: 0.06em;
	margin-inline: -0.06em;
}
.mmsa-hl-yellow { background-image: url("../images/hl-yellow-hero-stretch.svg"); }
.mmsa-hl-blue { background-image: url("../images/hl-blue-success-stretch.svg"); }

/* Arrow button styles (registered as "Arrow" and "Arrow (light)" on core/button) */
.wp-block-button.is-style-arrow .wp-block-button__link,
.wp-block-button.is-style-arrow-light .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}
.wp-block-button.is-style-arrow-light .wp-block-button__link {
	background: var(--wp--preset--color--sticky);
	color: var(--mmsa-ink);
}
.wp-block-button.is-style-arrow-light .wp-block-button__link:hover {
	background: #fff;
}
.wp-block-button.is-style-arrow-light .wp-block-button__link::after,
.wp-block-button.is-style-arrow .wp-block-button__link::after {
	content: "";
	width: 28px;
	height: 19px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("../images/arrow-right.svg") no-repeat center / contain;
	mask: url("../images/arrow-right.svg") no-repeat center / contain;
	transition: transform 0.2s ease;
}
.wp-block-button.is-style-arrow .wp-block-button__link:hover::after,
.wp-block-button.is-style-arrow-light .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* Sections butt up against each other and the header/footer; spacing comes
   from each section's own padding. */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.mmsa-header {
	padding-top: clamp(1rem, 2.1vw, 36px);
	padding-bottom: clamp(1rem, 2.1vw, 36px);
}
.mmsa-header .mmsa-logo img {
	width: clamp(200px, 21vw, 363px);
	height: auto;
	display: block;
}
.mmsa-header .mmsa-logo { margin: 0; }
.mmsa-header .wp-block-navigation {
	gap: 1.1rem;
	font-size: 18px;
}
.mmsa-header .wp-block-navigation a {
	color: var(--mmsa-ink);
	text-decoration: none;
}
.mmsa-header .wp-block-navigation a:hover,
.mmsa-header .wp-block-navigation .current-menu-item > a {
	color: var(--mmsa-orange);
}
.mmsa-header__actions { gap: 2.25rem; }
/* Interior pages: rule under the header, as in the About/Services/Contact comps */
body:not(.home) .mmsa-header { border-bottom: 1px solid var(--mmsa-rule); }
/* "Partner With Us" menu item: only in the open phone menu (the orange button covers wider screens) */
.mmsa-header .wp-block-navigation .mmsa-nav-partner { display: none; }
.mmsa-header .wp-block-navigation__responsive-container.is-menu-open .mmsa-nav-partner {
	display: flex;
	margin-top: 0.75rem;
}
.mmsa-header .wp-block-navigation__responsive-container.is-menu-open .mmsa-nav-partner a {
	background: var(--mmsa-orange);
	color: #fff;
	border-radius: 6px;
	padding: 16px 24px;
	font-weight: 700;
}
.mmsa-header .wp-block-navigation__responsive-container.is-menu-open .mmsa-nav-partner a:hover {
	background: var(--mmsa-ink);
	color: #fff;
}
@media (max-width: 600px) {
	/* Mobile comps show the logo and menu toggle only */
	.mmsa-header .mmsa-logo img { width: 170px; }
	.mmsa-header .mmsa-header__cta { display: none; }
}

/* --------------------------------------------------------------------------
   Home — hero
   Positions are measured from the 1728px comp and expressed in --u, where
   1 --u = 1px of the hero at full size; everything scales with the headline.
   -------------------------------------------------------------------------- */
.mmsa-hero {
	padding-top: clamp(2.5rem, 6.4vw, 110px);
	padding-bottom: clamp(4rem, 20vw, 352px);
}
.mmsa-hero .mmsa-hero__stage {
	--u: calc(var(--wp--preset--font-size--huge) / 128);
	position: relative;
	max-width: calc(var(--u) * 830);
	margin-inline: auto !important;
}
.mmsa-hero__title {
	margin: 0;
	text-align: center;
	line-height: 1;
	position: relative;
	z-index: 1;
}
.mmsa-hero__stage::after { /* arrow down into the about section */
	content: "";
	position: absolute;
	left: calc(var(--u) * 457);
	top: calc(100% + var(--u) * 64);
	width: calc(var(--u) * 77);
	height: calc(var(--u) * 192);
	background: url("../images/arrow-down-hero.svg") no-repeat center / contain;
	pointer-events: none;
}
.mmsa-note {
	position: absolute;
	margin: 0 !important;
	font-family: var(--wp--preset--font-family--script);
	font-size: calc(var(--u) * 40);
	line-height: 1.2;
	text-align: center;
	color: #000;
	z-index: 2;
}
.mmsa-note-left {
	left: calc(var(--u) * -239);
	top: calc(var(--u) * 58);
	width: calc(var(--u) * 459);
	transform: rotate(12deg);
}
.mmsa-note-left::after { /* orange underline under "works" */
	content: "";
	position: absolute;
	left: calc(var(--u) * 168);
	top: calc(var(--u) * 132);
	width: calc(var(--u) * 93);
	height: calc(var(--u) * 24);
	background: url("../images/underline-orange-note.svg") no-repeat center / contain;
	transform: rotate(-12deg);
}
.mmsa-note-right {
	left: calc(var(--u) * 640);
	top: calc(var(--u) * 505);
	width: calc(var(--u) * 340);
	padding-left: calc(var(--u) * 40);
	text-align: left;
	font-family: "adobe-handwriting-tiffany", sans-serif;
	transform: rotate(-12deg);
}
.mmsa-note-right::before { /* curve pointing back at "together." */
	content: "";
	position: absolute;
	left: calc(var(--u) * -12);
	top: calc(var(--u) * 26);
	width: calc(var(--u) * 50);
	height: calc(var(--u) * 55);
	background: url("../images/curve-yes.svg") no-repeat center / contain;
	transform: rotate(12deg);
}

/* --------------------------------------------------------------------------
   Home — about
   Media stacks use container units: 1 --s = 1px of the comp's stack width.
   -------------------------------------------------------------------------- */
.mmsa-about { padding-bottom: clamp(3rem, 4.8vw, 82px); }
.mmsa-about__copy { max-width: 666px; }
.mmsa-about__copy > * + * { margin-block-start: 38px; }
.mmsa-about__copy h2 { margin-bottom: 0; }

.mmsa-stack {
	container-type: inline-size;
	position: relative;
	width: 100%;
	margin-inline: auto;
}
.mmsa-stack > * { position: absolute; margin: 0 !important; }
.mmsa-stack .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	box-shadow: var(--mmsa-shadow);
}

/* About stack: 543 × 813 in the comp */
.mmsa-stack-about {
	--s: calc(100cqw / 543);
	max-width: 543px;
	aspect-ratio: 543 / 813;
}
.mmsa-stack-about::after { /* looping arrow */
	content: "";
	position: absolute;
	left: calc(var(--s) * -42);
	top: calc(var(--s) * 436);
	width: calc(var(--s) * 175);
	height: calc(var(--s) * 204);
	background: url("../images/arrow-loop.svg") no-repeat center / contain;
	z-index: 3;
	pointer-events: none;
}
.mmsa-stack-about .mmsa-stack__photo {
	left: calc(var(--s) * 21);
	top: calc(var(--s) * 18);
	width: calc(var(--s) * 412);
	height: calc(var(--s) * 477);
	transform: rotate(-5.33deg);
	z-index: 1;
}
.mmsa-sticky {
	background: var(--wp--preset--color--sticky);
	box-shadow: var(--mmsa-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	z-index: 2;
}
.mmsa-stack-about .mmsa-sticky {
	left: calc(var(--s) * 160);
	top: calc(var(--s) * 450);
	width: calc(var(--s) * 297);
	height: calc(var(--s) * 265);
	padding: calc(var(--s) * 30);
	transform: rotate(12deg);
}
.mmsa-sticky p {
	margin: 0;
	font-family: var(--wp--preset--font-family--script);
	font-size: calc(var(--s) * 35);
	line-height: 1.2;
	color: #000;
}

/* --------------------------------------------------------------------------
   Rules
   -------------------------------------------------------------------------- */
.wp-block-separator.mmsa-rule {
	width: 100% !important;
	border: 0;
	border-top: 1px solid var(--mmsa-rule);
	opacity: 1;
}
.wp-block-separator.mmsa-rule.alignwide { margin-block: 0; }
.mmsa-entry .wp-block-separator.mmsa-rule { margin-block: 3rem 1.5rem; }

/* --------------------------------------------------------------------------
   Home — services
   -------------------------------------------------------------------------- */
.mmsa-services {
	padding-top: clamp(3rem, 8.6vw, 149px);
	padding-bottom: clamp(4rem, 9.5vw, 165px);
}
.mmsa-services__title { margin: 0; text-align: center; }
.mmsa-services .wp-block-columns.mmsa-cards {
	max-width: 1220px;
	margin-inline: auto !important;
	margin-top: clamp(2.5rem, 4.2vw, 72px);
	margin-bottom: clamp(2rem, 3vw, 52px);
	gap: clamp(1.5rem, 4.6vw, 80px);
}
.mmsa-card {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--mmsa-rule);
	min-height: 100%;
	padding: 64px 28px 40px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: transform 0.3s ease;
}
.mmsa-cards > .wp-block-column:nth-child(1) .mmsa-card { transform: rotate(-0.6deg); }
.mmsa-cards > .wp-block-column:nth-child(2) .mmsa-card { transform: rotate(-2.6deg); }
.mmsa-cards > .wp-block-column:nth-child(3) .mmsa-card { transform: rotate(1.7deg); }
.mmsa-cards > .wp-block-column .mmsa-card:hover { transform: rotate(0deg); }
.mmsa-card .mmsa-card__icon { margin: 0 0 28px; height: 178px; display: flex; align-items: center; }
.mmsa-card .mmsa-card__icon img { height: auto; max-height: 178px; width: auto; }
.mmsa-card .mmsa-label { font-size: var(--wp--preset--font-size--medium); margin: 0; }
/* Whole card is clickable: the label's link stretches over the card */
.mmsa-card { position: relative; cursor: pointer; }
.mmsa-card .mmsa-card__link { color: inherit; text-decoration: none; }
.mmsa-card .mmsa-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.mmsa-card .mmsa-card__link:focus-visible { outline: none; }
.mmsa-card:has(.mmsa-card__link:focus-visible) { outline: 2px solid var(--mmsa-ink); outline-offset: 4px; }
.mmsa-card:hover { box-shadow: var(--mmsa-shadow); }
.mmsa-card__text {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.2;
	margin: 0 !important;
	max-width: 266px;
}

/* --------------------------------------------------------------------------
   Home — impact (green band)
   -------------------------------------------------------------------------- */
.mmsa-impact {
	padding-top: clamp(3.5rem, 8.8vw, 152px);
	overflow: hidden;
}
.mmsa-impact .mmsa-impact__statement {
	color: #fff;
	margin-top: 0.5rem;
	margin-bottom: 0;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}
/* Third stat sits in the same box as the row above: no extra flow gap */
.mmsa-stats > .mmsa-stat { margin-top: 0 !important; }
.mmsa-stats {
	margin-top: clamp(2rem, 3.4vw, 58px) !important;
	background: var(--wp--preset--color--mint);
	border: 1px solid var(--wp--preset--color--green-dark);
}
.mmsa-stats > .wp-block-columns { margin: 0; gap: 0; }
.mmsa-stats__row {
	border-bottom: 1px solid var(--wp--preset--color--green-dark);
}
.mmsa-stats__row > .wp-block-column + .wp-block-column {
	border-left: 1px solid var(--wp--preset--color--green-dark);
}
.mmsa-stat {
	padding: clamp(1.75rem, 5vw, 88px) clamp(1.25rem, 5.2vw, 90px) clamp(1.75rem, 4vw, 70px);
}
.mmsa-stats > .mmsa-stat { padding-left: clamp(1.25rem, 4.5vw, 78px); padding-top: clamp(1.75rem, 4vw, 70px); }
.mmsa-stat h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
}
.mmsa-stat p {
	margin: 0.5rem 0 0;
	font-size: 16px;
	line-height: 1.3;
	letter-spacing: 0.11em;
	max-width: 633px;
}

.mmsa-ticker {
	margin-top: clamp(3rem, 8.1vw, 140px) !important;
	padding-bottom: clamp(2rem, 2.4vw, 42px);
	overflow: hidden;
	white-space: nowrap;
}
.mmsa-ticker p {
	display: inline-block;
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--medium);
	color: #fff;
	word-spacing: 0.1em;
	padding-right: 1.4em;
	margin: 0 !important;
}
.mmsa-ticker.is-running p {
	animation: mmsa-ticker 9s linear infinite;
}
@keyframes mmsa-ticker {
	from { transform: translateX(0); }
	to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
	.mmsa-ticker p { animation: none; }
}

/* --------------------------------------------------------------------------
   Home — call to action
   -------------------------------------------------------------------------- */
.mmsa-cta {
	padding-top: clamp(4rem, 11vw, 190px);
	padding-bottom: clamp(4rem, 9.5vw, 160px);
}
.mmsa-cta__copy { max-width: 666px; padding-left: clamp(0px, 3.6vw, 62px); }
.mmsa-cta__copy h2 { margin-bottom: 0; }
.mmsa-cta__copy > * + * { margin-block-start: 38px; }
.mmsa-cta__copy .wp-block-buttons { margin-block-start: 28px; }

/* CTA stack: 580 × 555 in the comp */
.mmsa-stack-cta {
	--s: calc(100cqw / 580);
	max-width: 580px;
	aspect-ratio: 580 / 555;
}
.mmsa-stack-cta .mmsa-stack__photo {
	left: calc(var(--s) * 21);
	top: calc(var(--s) * 18);
	width: calc(var(--s) * 412);
	height: calc(var(--s) * 477);
	transform: rotate(-5.33deg);
	z-index: 1;
}
.mmsa-stack-cta .mmsa-stack__card {
	left: calc(var(--s) * 258);
	top: calc(var(--s) * 252);
	width: calc(var(--s) * 300);
	height: calc(var(--s) * 279);
	background: #D5EBEE;
	box-shadow: var(--mmsa-shadow);
	transform: rotate(10deg);
	z-index: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.mmsa-footer {
	border-top: 1px solid rgba(24, 24, 24, 0.3);
	padding-top: clamp(3rem, 6.3vw, 109px);
	padding-bottom: 30px;
	font-size: 16px;
	line-height: 1.6;
}
.mmsa-footer .mmsa-logo { margin: 0; }
.mmsa-footer .mmsa-logo img { width: 245px; height: auto; display: block; }
.mmsa-footer__tagline { max-width: 479px; margin-top: 10px !important; }
.mmsa-footer__cols { gap: clamp(2rem, 5vw, 78px) !important; }
.mmsa-footer__label {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	margin: 0 0 4px;
}
.mmsa-footer .wp-block-navigation {
	font-size: 16px;
	gap: 0;
}
.mmsa-footer .wp-block-navigation a { color: var(--mmsa-ink); text-decoration: none; }
.mmsa-footer .wp-block-navigation a:hover { color: var(--mmsa-orange); }
.mmsa-footer__bottom {
	border-top: 1px solid rgba(24, 24, 24, 0.3);
	margin-top: clamp(2rem, 4vw, 70px) !important;
	padding-top: 18px;
}
.mmsa-footer__bottom p { margin: 0; }

/* --------------------------------------------------------------------------
   Interior pages
   -------------------------------------------------------------------------- */
.mmsa-page-header {
	padding-top: clamp(2.5rem, 7vw, 120px);
	padding-bottom: clamp(1.5rem, 3vw, 48px);
}
.mmsa-page-title {
	font-size: clamp(2.75rem, 6vw, 6rem) !important;
	line-height: 1.02;
	margin: 0;
	color: var(--mmsa-orange);
}
.mmsa-meta {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--mmsa-ink);
}
.mmsa-entry {
	padding-bottom: clamp(4rem, 9vw, 150px);
}
.mmsa-entry .wp-block-post-content > * + * { margin-block-start: 1.25em; }
.mmsa-entry .wp-block-post-content :where(h2, h3, h4) { margin-block-start: 1.6em; }
.mmsa-entry .wp-block-post-content :where(p, li) { font-size: clamp(1.125rem, 1.35vw, 1.375rem); }
.mmsa-entry blockquote {
	border-left: 4px solid var(--mmsa-orange);
	padding-left: 1.25em;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
}
.mmsa-post-list .wp-block-post {
	border-top: 1px solid var(--mmsa-rule);
	padding-block: 2rem;
}
.mmsa-post-list .wp-block-post-title a { color: var(--mmsa-ink); text-decoration: none; }
.mmsa-post-list .wp-block-post-title a:hover { color: var(--mmsa-orange); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.mmsa-note { display: none; }
	.mmsa-hero { padding-bottom: clamp(6rem, 22vw, 260px); }
}
@media (max-width: 781px) {
	.mmsa-hero__stage::after { left: 50%; margin-left: -20px; width: 40px; height: 100px; top: calc(100% + 1.5rem); }
	.mmsa-hero { padding-bottom: 9rem; }
	.mmsa-about > .wp-block-columns,
	.mmsa-cta > .wp-block-columns { gap: 3rem; }
	.mmsa-stack-about { max-width: 420px; }
	.mmsa-stack-about::after { display: none; }
	.mmsa-cards > .wp-block-column .mmsa-card { transform: none !important; }
	.mmsa-card { padding-top: 40px; }
	.mmsa-stats__row > .wp-block-column + .wp-block-column {
		border-left: 0;
		border-top: 1px solid var(--wp--preset--color--green-dark);
	}
	.mmsa-cta__copy { padding-left: 0; }
	.mmsa-stack-cta { max-width: 420px; }
	.mmsa-footer__cols { justify-content: flex-start !important; }
}

/* Editor: keep the ticker still and decorations visible but non-interactive */
.editor-styles-wrapper .mmsa-ticker p { animation: none; }
