/*
Theme Name: Money Matters Accounting
Template: twentytwentyfive
Description: Child theme of Twenty Twenty-Five for Money Matters Accounting Ltd. Colours, fonts and spacing live in theme.json (editable in Appearance → Editor → Styles). Pages are built entirely with core blocks.
Version: 1.0.0
Requires at least: 6.7
Text Domain: money-matters
*/

/* ---------- Block style variations (picked from the block sidebar → Styles) ---------- */

/* Paragraph: Eyebrow — small uppercase label above a heading */
.is-style-mm-eyebrow {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--burgundy);
}
.has-forest-background-color .is-style-mm-eyebrow,
.has-contrast-background-color .is-style-mm-eyebrow {
	color: var(--wp--preset--color--leaf);
}

/* Paragraph / heading: Handwritten */
.is-style-mm-handwritten {
	font-family: var(--wp--preset--font-family--caveat);
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.15;
}

/* Group: Card — rounded panel with a hairline border */
.wp-block-group.is-style-mm-card {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 24px;
	overflow: hidden;
}
.wp-block-group.is-style-mm-card.has-background { border-color: transparent; }

/* Group: Polaroid — white frame, soft shadow, slight tilt */
.wp-block-group.is-style-mm-polaroid {
	background: #fff;
	padding: 14px 14px 18px;
	border-radius: 4px;
	box-shadow: 0 18px 40px rgba(27, 31, 29, 0.14);
	transform: rotate(-2deg);
	position: relative;
}
.wp-block-group.is-style-mm-polaroid::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 50%;
	width: 96px;
	height: 26px;
	margin-left: -48px;
	background: rgba(214, 236, 223, 0.9);
	transform: rotate(4deg);
	border-radius: 2px;
}
.wp-block-group.is-style-mm-polaroid .wp-block-image { margin: 0; }
.wp-block-group.is-style-mm-polaroid .wp-block-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center top;
	background: var(--wp--preset--color--mint);
	border-radius: 2px;
}
/* Alternate the tilt so a row of polaroids looks hand-placed */
.wp-block-column:nth-child(even) > .is-style-mm-polaroid,
.wp-block-group > .wp-block-group:nth-child(even) > .is-style-mm-polaroid { transform: rotate(1.5deg); }

/* Group: Paper note — the "little note" letter */
.wp-block-group.is-style-mm-note {
	background: #fffefb;
	border: 1px solid #efe6d8;
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(27, 31, 29, 0.08);
	transform: rotate(0.5deg);
}

/* Group: Sticky note — small tilted stat card */
.wp-block-group.is-style-mm-sticky {
	border-radius: 4px;
	box-shadow: 0 8px 18px rgba(27, 31, 29, 0.1);
	transform: rotate(-1.5deg);
}
.wp-block-column:nth-child(2) > .is-style-mm-sticky { transform: rotate(1.5deg); }
.wp-block-column:nth-child(3) > .is-style-mm-sticky { transform: rotate(-0.75deg); }

/* List: Checklist — green tick bullets */
ul.is-style-mm-checklist {
	list-style: none;
	padding-left: 0;
}
ul.is-style-mm-checklist li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.6em;
}
ul.is-style-mm-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.15em;
	height: 1.15em;
	border-radius: 50%;
	background: var(--wp--preset--color--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23177A55' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.has-forest-background-color ul.is-style-mm-checklist li::before,
.has-contrast-background-color ul.is-style-mm-checklist li::before {
	background-color: rgba(255, 255, 255, 0.12);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%2386D9A8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Details: FAQ — accordion row with a plus/minus marker */
.wp-block-details.is-style-mm-faq {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-block: 1.4rem;
}
.wp-block-details.is-style-mm-faq summary {
	list-style: none;
	cursor: pointer;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.wp-block-details.is-style-mm-faq summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-mm-faq summary::after {
	content: "+";
	flex: none;
	font-weight: 500;
	font-size: 1.5em;
	line-height: 1;
	color: var(--wp--preset--color--green);
	transition: transform 0.25s ease;
}
.wp-block-details.is-style-mm-faq[open] summary::after { transform: rotate(45deg); }
.wp-block-details.is-style-mm-faq > :not(summary) {
	color: var(--wp--preset--color--slate);
	margin-top: 0.75rem;
}

/* Button: Outline tweak to match the pill buttons */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
}

/* Separator: short accent bar */
.wp-block-separator.is-style-mm-accent {
	width: 48px;
	border: none;
	border-top: 3px solid var(--wp--preset--color--green);
	margin-left: 0;
	opacity: 1;
}

/* Hover lift on cards that contain a link */
@media (prefers-reduced-motion: no-preference) {
	.wp-block-button__link { transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
	.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(27, 31, 29, 0.4); }
	html { scroll-behavior: smooth; }
}

/* ---------- Layout helpers ---------- */

/* Pain-point row: column dividers on desktop, stacked list on phones */
.mm-pain .wp-block-column + .wp-block-column { border-left: 1px solid var(--wp--preset--color--line); padding-left: var(--wp--preset--spacing--40); }
@media (max-width: 781px) {
	.mm-pain .wp-block-column + .wp-block-column { border-left: 0; padding-left: 0; border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--30); }
}

/* Header: keep it above content when the mobile menu opens */
.mm-header { position: relative; z-index: 50; }
.mm-header .wp-block-site-logo img { height: auto; }

/* Contact form (Fluent Forms) — match theme */
.mm-form .ff-el-form-control {
	font: inherit;
	border-radius: 12px;
	border: 1.5px solid var(--wp--preset--color--line);
	padding: 14px 16px;
	background: #fff;
}
.mm-form .ff-el-form-control:focus { border-color: var(--wp--preset--color--green); box-shadow: none; }
.mm-form .ff-el-input--label label { font-weight: 600; }
.mm-form .ff-btn-submit {
	background: var(--wp--preset--color--green) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 16px 32px !important;
	font: inherit !important;
	font-weight: 700 !important;
	cursor: pointer;
}
.mm-form .ff-btn-submit:hover { background: var(--wp--preset--color--forest) !important; }
.has-forest-background-color .mm-form label,
.has-contrast-background-color .mm-form label { color: #fff; }

/* Designed pages: full-width sections sit flush against each other */
.mm-designed .wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }

/* Header call-to-action hides on small phones; the menu has a Contact link */
@media (max-width: 600px) { .mm-header-cta { display: none !important; } }
.mm-header .wp-block-navigation__responsive-container.is-menu-open { padding: var(--wp--preset--spacing--40); }
.mm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { font-size: 1.25rem; gap: 1rem; }

/* Footer links */
.mm-footer a { text-decoration: none; }
.mm-footer a:hover { text-decoration: underline; }

/* Cards in a row stretch to the same height */
.mm-equal > .wp-block-column { display: flex; flex-direction: column; }
.mm-equal > .wp-block-column > .wp-block-group { flex: 1 1 auto; }
.has-green-background-color .is-style-mm-eyebrow { color: var(--wp--preset--color--mint); }
.wp-block-group.is-style-mm-polaroid { max-width: 380px; margin-inline: auto; }
.wp-block-group.is-style-mm-polaroid .is-style-mm-handwritten { margin-top: 0.75rem; margin-bottom: 0; color: var(--wp--preset--color--forest); }
.mm-member .is-style-mm-polaroid { max-width: 320px; margin-inline: 0; }

/* Right-aligned button groups start from the left once columns stack */
@media (max-width: 781px) {
	.wp-block-buttons.is-content-justification-right { justify-content: flex-start; }
}

/* Services overview: three steps rising from the section floor, heading in the space above */
.mm-stairs-section { overflow: clip; }
.mm-stairs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: auto 6rem 6rem 6rem auto;
	column-gap: 14px;
}
.mm-stairs > * { margin: 0 !important; }
.mm-stairs-head {
	grid-column: 1 / 3;
	grid-row: 1 / 4;
	align-self: start;
	max-width: 36rem;
	padding-bottom: var(--wp--preset--spacing--50);
}
.mm-stairs-head h2 { margin-block: 0.5rem 1.25rem; }
.mm-stairs-head > p:last-child { margin-top: 1.5rem; }
.mm-step-1 { grid-column: 1; grid-row: 5; }
.mm-step-2 { grid-column: 2; grid-row: 4 / 6; }
.mm-step-3 { grid-column: 3; grid-row: 3 / 6; position: relative; z-index: 1; }

/* Ghost fourth step: a dashed outline continuing the stairs up and off to the right */
.mm-ghost-step {
	grid-column: 3;
	grid-row: 2 / 6;
	translate: calc(55% + 14px) 0;
	border: 2px dashed rgba(23, 122, 85, 0.45);
	border-bottom: 0;
	border-radius: 28px 28px 0 0;
	background: linear-gradient(rgba(229, 243, 235, 0.55), rgba(229, 243, 235, 0));
}
.mm-stairs-note {
	grid-column: 3;
	grid-row: 2;
	align-self: center;
	justify-self: start;
	color: var(--wp--preset--color--green);
	line-height: 1;
	white-space: nowrap;
	rotate: -4deg;
}
.mm-stairs-note::after {
	content: "";
	display: inline-block;
	width: 44px;
	height: 34px;
	margin-left: 6px;
	vertical-align: -6px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 34' fill='none' stroke='%23177A55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 24c10 4 24 2 34-14'/%3E%3Cpath d='M29 9l8 1 1 8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mm-step {
	display: flex;
	flex-direction: column;
	padding: clamp(1.75rem, 3vw, 2.75rem);
	padding-bottom: clamp(2.25rem, 4vw, 3.5rem);
	border-radius: 28px 28px 0 0;
}
.mm-step > * { margin-block: 0; }
.mm-step-1 { box-shadow: inset 0 1px 0 var(--wp--preset--color--line), inset 1px 0 0 var(--wp--preset--color--line), inset -1px 0 0 var(--wp--preset--color--line); }
.mm-step-3 { box-shadow: 0 30px 60px -30px rgba(15, 76, 56, 0.55); }

.mm-step .is-style-mm-eyebrow { color: var(--wp--preset--color--green); margin-bottom: 0.5rem; }
.mm-step-3.mm-step .is-style-mm-eyebrow { color: var(--wp--preset--color--leaf); }
.mm-step h3 { margin-bottom: 0.9rem; }
.mm-step h3 + p { margin-bottom: 1.5rem; }

ul.mm-plain-list {
	list-style: none;
	padding: 0;
	font-weight: 500;
	margin-bottom: 2rem;
}
ul.mm-plain-list li { padding-block: 0.65rem; border-top: 1px solid var(--wp--preset--color--line); }
.mm-step-2 ul.mm-plain-list li { border-color: rgba(23, 122, 85, 0.16); }
.mm-step-3 ul.mm-plain-list li { border-color: rgba(255, 255, 255, 0.14); }


/* Benefit line pinned to the floor of each step, so taller steps feel full rather than empty */
.mm-step-foot {
	margin-top: auto !important;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--line);
	font-family: var(--wp--preset--font-family--caveat);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--green);
}
.mm-step .mm-arrow-link { margin-bottom: 2.5rem !important; }

/* Small line illustrations that take up the extra height of the taller steps */
.mm-step-art {
	flex: 1 1 0;
	min-height: 40px;
	max-height: 150px;
	margin-bottom: 2rem !important;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 244 40' fill='none' stroke='%23177A55' stroke-width='1.5'%3E%3Cpath d='M8 14h220' stroke-opacity='.35'/%3E%3Ccircle cx='8' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='28' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='48' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='68' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='88' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='108' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='128' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='148' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='168' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='188' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='208' cy='14' r='4' fill='%23E5F3EB'/%3E%3Ccircle cx='228' cy='14' r='10' stroke-opacity='.4'/%3E%3Ccircle cx='228' cy='14' r='5' fill='%23177A55'/%3E%3Cg fill='%23177A55' stroke='none' font-family='sans-serif' font-size='8' font-weight='700' letter-spacing='.8'%3E%3Ctext x='2' y='38'%3EJAN%3C/text%3E%3Ctext x='242' y='38' text-anchor='end'%3EYEAR-END%3C/text%3E%3C/g%3E%3C/svg%3E") left center / contain no-repeat;
}
.mm-step-art { margin-top: auto !important; }
.mm-step-art + .mm-step-foot { margin-top: 0 !important; }
.mm-art-year { flex: none; aspect-ratio: 244 / 40; height: auto; min-height: 0; max-height: none; margin-block: auto !important; }
.mm-art-trend { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 110' fill='none' stroke='%2386D9A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 96h232' stroke-opacity='.2' stroke-width='1'/%3E%3Cpath d='M4 88l30-10 28 6 30-22 28 8 30-26'/%3E%3Cpath d='M150 44l28-12 30-6 28-18' stroke-dasharray='4 6'/%3E%3Ccircle cx='150' cy='44' r='4' fill='%2386D9A8'/%3E%3Ccircle cx='236' cy='8' r='3.5'/%3E%3C/svg%3E"); background-position: left bottom; }
.mm-step-2 .mm-step-foot { border-color: rgba(23, 122, 85, 0.16); }
.mm-step-3 .mm-step-foot { border-color: rgba(255, 255, 255, 0.14); color: var(--wp--preset--color--leaf); }
.mm-arrow-link a {
	font-weight: 700;
	color: var(--wp--preset--color--green);
	text-decoration: none;
}
.mm-step-3 .mm-arrow-link a { color: var(--wp--preset--color--leaf); }
.mm-arrow-link a::after { content: "→"; display: inline-block; margin-left: 0.4em; transition: transform 0.2s ease; }
.mm-arrow-link a:hover::after { transform: translateX(4px); }
.mm-arrow-link a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* Steps rise into place as the section scrolls in */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.mm-step {
			animation: mm-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 70%;
		}
		.mm-step-2 { animation-range: entry 5% entry 80%; }
		.mm-step-3 { animation-range: entry 10% entry 90%; }
	}
}
@keyframes mm-rise { from { transform: translateY(48px); opacity: 0.4; } }

@media (max-width: 781px) {
	.mm-stairs-section { padding-bottom: var(--wp--preset--spacing--70) !important; }
	.mm-stairs { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 12px; }
	.mm-stairs-head,
	.mm-step-1,
	.mm-step-2,
	.mm-step-3 { grid-column: 1; grid-row: auto; }
	.mm-ghost-step,
	.mm-stairs-note { display: none; }
	.mm-step { border-radius: 24px; }
	.mm-step-1 { box-shadow: inset 0 0 0 1px var(--wp--preset--color--line); }
}

/* Process: sticky heading beside a vertical timeline of numbered steps */
.mm-process-head h2 { margin-block: 0.5rem 1.25rem; }
.mm-process-head .wp-block-buttons { margin-top: var(--wp--preset--spacing--40); }
.mm-timeline {
	position: relative;
	counter-reset: mm-tl;
	padding-left: 4.5rem;
}
/* The line fades in from grey (stressed) to green (calm) */
.mm-timeline::before {
	content: "";
	position: absolute;
	left: 21px;
	top: 22px;
	bottom: 22px;
	width: 2px;
	background: linear-gradient(var(--wp--preset--color--line), var(--wp--preset--color--green));
}
.mm-timeline > * { margin-block: 0; }
.mm-tl-step {
	position: relative;
	counter-increment: mm-tl;
	padding-bottom: var(--wp--preset--spacing--60);
}
.mm-tl-step::before {
	content: counter(mm-tl);
	position: absolute;
	left: -4.5rem;
	top: 0;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--green);
	color: var(--wp--preset--color--green);
	font-weight: 700;
	font-size: 1.05rem;
}
.mm-tl-label {
	margin: 0 0 0.25rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--green);
	line-height: 44px;
}
.mm-tl-step h3 { margin-block: 0 0.6rem; font-size: var(--wp--preset--font-size--x-large); }
.mm-tl-step p:last-child { margin: 0; max-width: 34rem; }
.mm-tl-end {
	position: relative;
	color: var(--wp--preset--color--forest);
	line-height: 44px;
}
.mm-tl-end::before {
	content: "";
	position: absolute;
	left: -4.5rem;
	top: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--wp--preset--color--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z' fill='%2386D9A8'/%3E%3C/svg%3E") center / 22px no-repeat;
	box-shadow: 0 0 0 6px var(--wp--preset--color--mint);
}
@media (min-width: 782px) {
	.mm-process-cols { align-items: flex-start !important; }
	.mm-process-head { position: sticky; top: 140px; }
}
@media (max-width: 781px) {
	.mm-timeline { padding-left: 3.75rem; margin-top: var(--wp--preset--spacing--40); }
	.mm-timeline::before { left: 19px; }
	.mm-tl-step::before,
	.mm-tl-end::before { left: -3.75rem; width: 40px; height: 40px; }
	.mm-tl-label, .mm-tl-end { line-height: 40px; }
}
