/*
Theme Name:        Mamun Sarkar Child
Theme URI:         https://mamunsarkar.com
Description:       Kadence child theme for mamunsarkar.com. Brand colours (black, charcoal, gold), Garamond typography and layout styles.
Author:            Mamun Sarkar
Template:          kadence
Version:           0.2.6
Requires at least: 6.5
Requires PHP:      8.1
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       mamunsarkar-child
*/

/* ── Fonts (self-hosted, SIL OFL — see assets/fonts/OFL.txt) ── */
@font-face {
	font-family: "EB Garamond";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("assets/fonts/eb-garamond-latin.woff2") format("woff2");
}
@font-face {
	font-family: "EB Garamond";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("assets/fonts/eb-garamond-latin-italic.woff2") format("woff2");
}

/* ── Brand tokens (from the brand guideline) ──
   This file loads after Kadence, so these override the Customizer palette. */
:root {
	--ms-gold: #f5d270;        /* Hierarchy */
	--ms-gold-deep: #c9a640;
	--ms-charcoal: #2a2a2a;    /* Secondary */
	--ms-black: #000000;       /* Primary */
	--ms-ink: #111111;
	--ms-grey: #e2e2e2;        /* Accent */
	--ms-white: #ffffff;       /* Default */
	--ms-muted: #5c5c5c;
	--ms-surface: #f6f5f1;

	--ms-font-serif: "EB Garamond", Garamond, "Times New Roman", serif;
	--ms-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--ms-radius: 6px;
	--ms-inner: 1180px;
	--ms-gutter: clamp(1.25rem, 4vw, 2rem);
	--ms-space: clamp(3.5rem, 8vw, 6.5rem);
	--ms-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.07);

	/* Kadence palette: 1–2 accent, 3–5 text, 6–8 borders/backgrounds, 9 base. */
	--global-palette1: var(--ms-black);
	--global-palette2: var(--ms-charcoal);
	--global-palette3: var(--ms-black);
	--global-palette4: var(--ms-charcoal);
	--global-palette5: #3d3d3d;
	--global-palette6: var(--ms-muted);
	--global-palette7: var(--ms-grey);
	--global-palette8: var(--ms-surface);
	--global-palette9: var(--ms-white);

	--global-body-font-family: var(--ms-font-serif);
	--global-heading-font-family: var(--ms-font-serif);
	--global-content-edge-padding: var(--ms-gutter);
}

/* ── Base typography ── */
body {
	font-family: var(--ms-font-serif);
	font-size: 1.1875rem; /* 19px: Garamond runs small */
	line-height: 1.65;
	color: var(--ms-charcoal);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.site-title {
	font-family: var(--ms-font-serif);
	font-weight: 700;
	color: var(--ms-black);
	letter-spacing: -0.01em;
	line-height: 1.15;
	text-wrap: balance;
}
.entry-content h2 {
	font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}
.entry-content h3 {
	font-size: clamp(1.3rem, 2vw, 1.5rem);
}

.entry-content a:not(.wp-block-button__link):not(.ms-button),
.ms-regulatory a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--ms-gold-deep);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}
.entry-content a:not(.wp-block-button__link):not(.ms-button):hover,
.ms-regulatory a:hover {
	text-decoration-color: currentColor;
}

/* Small UI text reads better in a sans face. */
.main-navigation,
.mobile-navigation,
.header-button,
.ms-eyebrow,
.ms-button,
.wp-block-button__link,
.ms-field label,
.ms-contact__notice,
.ms-footer,
.ms-regulatory {
	font-family: var(--ms-font-sans);
}

/* Visible focus for keyboard users everywhere. */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--ms-gold);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--ms-black);
}

/* ── Header ── */
#masthead .site-main-header-wrap .site-header-row-container-inner {
	border-bottom: 1px solid var(--ms-grey);
}
#masthead .site-branding .custom-logo {
	padding-block: 0.4rem;
}
#masthead .item-is-fixed .site-main-header-inner-wrap,
#masthead .item-is-fixed {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.main-navigation .primary-menu-container > ul > li.menu-item > a {
	padding-inline: 0.9em;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ms-charcoal);
}
.main-navigation .primary-menu-container > ul > li.menu-item > a:hover,
.main-navigation .primary-menu-container > ul > li.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a {
	color: var(--ms-black);
	box-shadow: inset 0 -2px 0 var(--ms-gold-deep);
}
.main-navigation .primary-menu-container ul ul {
	min-width: 15rem;
	border-top: 3px solid var(--ms-gold);
	background: var(--ms-black);
}
.main-navigation .primary-menu-container ul ul li.menu-item > a {
	padding-block: 0.8em;
	font-size: 0.875rem;
	color: var(--ms-grey);
}
.main-navigation .primary-menu-container ul ul li.menu-item > a:hover {
	color: var(--ms-gold);
	background: transparent;
}
#masthead .header-button {
	padding: 0.7em 1.4em;
	border: 2px solid var(--ms-black);
	border-radius: var(--ms-radius);
	background: var(--ms-black);
	color: var(--ms-white);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	box-shadow: none;
}
#masthead .header-button:hover {
	border-color: var(--ms-gold);
	background: var(--ms-gold);
	color: var(--ms-black);
}
.menu-toggle-open .menu-toggle-icon {
	color: var(--ms-black);
}

/* Mobile menu drawer. */
#mobile-drawer .drawer-inner {
	background: var(--ms-black);
}
#mobile-drawer .mobile-navigation ul li a {
	padding-block: 1em;
	font-size: 1rem;
	color: var(--ms-white);
}
#mobile-drawer .mobile-navigation ul li.current-menu-item > a,
#mobile-drawer .mobile-navigation ul li a:hover {
	color: var(--ms-gold);
}

/* ── Buttons ── */
.ms-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 3rem;
	padding: 0.8em 1.7em;
	border: 2px solid var(--ms-black);
	border-radius: var(--ms-radius);
	background: var(--ms-black);
	color: var(--ms-white);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ms-button:hover,
.wp-block-button__link:hover {
	border-color: var(--ms-charcoal);
	background: var(--ms-charcoal);
	color: var(--ms-white);
	transform: translateY(-1px);
}
.ms-button--gold {
	border-color: var(--ms-gold);
	background: var(--ms-gold);
	color: var(--ms-black);
}
.ms-button--gold:hover {
	border-color: var(--ms-white);
	background: var(--ms-white);
	color: var(--ms-black);
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	background: transparent;
	color: var(--ms-black);
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover {
	background: var(--ms-black);
	color: var(--ms-white);
}
.wp-block-buttons {
	gap: 0.75rem;
}
/* Phones: buttons stack full width so they are easy to tap. */
@media (max-width: 520px) {
	.entry-content .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}
	.entry-content .wp-block-buttons > .wp-block-button {
		width: 100%;
	}
	.entry-content .wp-block-buttons .wp-block-button__link {
		width: 100%;
	}
}

/* ── Section bands ──
   Full-width bands keep their content in a centred column with side gutters. */
.entry-content .wp-block-group.ms-hero,
.entry-content .wp-block-group.ms-section,
.entry-content .wp-block-group.ms-cta {
	padding-inline: max(var(--ms-gutter), calc((100% - var(--ms-inner)) / 2));
}
.entry-content .wp-block-group.ms-hero > *,
.entry-content .wp-block-group.ms-section > *,
.entry-content .wp-block-group.ms-cta > * {
	margin-inline: 0;
	max-width: none;
}
.entry-content .wp-block-group.ms-cta > * {
	margin-inline: auto;
}

.ms-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.9rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ms-muted);
}
.ms-eyebrow::before {
	content: "";
	width: 2rem;
	height: 2px;
	background: var(--ms-gold-deep);
}
.ms-lead {
	max-width: 36em;
	font-size: clamp(1.15rem, 2vw, 1.35rem);
	line-height: 1.55;
}
.ms-intro {
	max-width: 40em;
	color: var(--ms-muted);
}
.ms-section {
	padding-block: var(--ms-space);
}
.ms-section--tint {
	background: var(--ms-surface);
}
.ms-section--dark {
	background: var(--ms-ink);
	color: var(--ms-grey);
}
.ms-section--dark h2,
.ms-section--dark h3 {
	color: var(--ms-white);
}
.ms-section--tight {
	padding-block: calc(var(--ms-space) * 0.6);
}

/* ── Hero ── */
.entry-content .wp-block-group.ms-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(4rem, 10vw, 8rem);
	background-color: var(--ms-black);
	background-image:
		radial-gradient(ellipse at 85% 20%, rgba(245, 210, 112, 0.12), transparent 55%),
		linear-gradient(180deg, #050505 0%, #111 100%);
	color: var(--ms-white);
}
/* Faint gavel watermark until a photo is added. */
.ms-hero::after {
	content: "";
	position: absolute;
	right: max(-4rem, calc((100% - var(--ms-inner)) / 2 - 6rem));
	bottom: -2rem;
	width: min(46vw, 560px);
	aspect-ratio: 4 / 3;
	background: url("assets/images/gavel-white.png") no-repeat center / contain;
	opacity: 0.07;
	pointer-events: none;
}
.ms-hero > * {
	position: relative;
	z-index: 1;
}
.ms-hero h1 {
	max-width: 15em;
	margin-block: 0 1.25rem;
	color: var(--ms-white);
	font-size: clamp(2.5rem, 6.4vw, 4.6rem);
	line-height: 1.04;
}
.ms-hero .ms-eyebrow {
	color: var(--ms-gold);
}
.ms-hero .ms-eyebrow::before {
	background: var(--ms-gold);
}
.ms-hero .ms-lead {
	color: #d6d6d6;
}
.ms-hero .wp-block-buttons {
	margin-top: 2rem;
}
.ms-hero .wp-block-button__link {
	border-color: var(--ms-gold);
	background: var(--ms-gold);
	color: var(--ms-black);
}
.ms-hero .wp-block-button__link:hover {
	border-color: var(--ms-white);
	background: var(--ms-white);
	color: var(--ms-black);
}
.ms-hero .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	border-color: rgba(255, 255, 255, 0.7);
	background: transparent;
	color: var(--ms-white);
}
.ms-hero .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover {
	border-color: var(--ms-white);
	background: var(--ms-white);
	color: var(--ms-black);
}
/* Short reassurance points under the hero buttons. */
ul.ms-points {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 2rem;
	margin: 2.5rem 0 0;
	padding: 1.5rem 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	list-style: none;
	font-family: var(--ms-font-sans);
	font-size: 0.875rem;
	color: #cfcfcf;
}
ul.ms-points li {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
}
ul.ms-points li::before {
	content: "";
	flex: none;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--ms-gold);
}
/* Inner-page heroes are shorter. */
.entry-content .wp-block-group.ms-hero--page {
	padding-block: clamp(3.25rem, 7vw, 5.5rem);
}
.ms-hero--page h1 {
	font-size: clamp(2.3rem, 5vw, 3.6rem);
}
/* Photos, when added (see functions.php ms_child_images). */
.ms-has-hero-image .entry-content .wp-block-group.ms-hero--home {
	background-image:
		linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.78) 45%, rgba(0, 0, 0, 0.35) 100%),
		var(--ms-hero-image);
	background-size: cover;
	background-position: center right;
}
.ms-has-page-image .entry-content .wp-block-group.ms-hero--page {
	background-image:
		linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.8) 55%, rgba(0, 0, 0, 0.55) 100%),
		var(--ms-page-image);
	background-size: cover;
	background-position: center;
}
.ms-has-hero-image .ms-hero--home::after,
.ms-has-page-image .ms-hero--page::after {
	display: none;
}

/* ── Section headings ── */
.ms-section-head {
	max-width: 44rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}
.ms-section-head > :last-child,
.ms-section-head .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}
.ms-section-head h2 {
	margin-top: 0;
}
.ms-section--dark .ms-eyebrow,
.ms-cta .ms-eyebrow {
	color: #c9c9c9;
}
.ms-section-head--center {
	margin-inline: auto !important;
	text-align: center;
}

/* ── Icons (CSS masks, colour follows the theme) ── */
.ms-practice-card--immigration { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18%22/%3E%3C/svg%3E"); }
.ms-practice-card--family-litigation { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%228%22 cy=%227%22 r=%223%22/%3E%3Ccircle cx=%2216.5%22 cy=%228.5%22 r=%222.5%22/%3E%3Cpath d=%22M2.5 20a5.5 5.5 0 0 1 11 0M13 20a4 4 0 0 1 8 0%22/%3E%3C/svg%3E"); }
.ms-practice-card--civil-litigation { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3v18M7 21h10M4 7h16M4 7l-2.5 6a2.5 2.5 0 0 0 5 0zM20 7l-2.5 6a2.5 2.5 0 0 0 5 0z%22/%3E%3C/svg%3E"); }
.ms-practice-card--conveyancing { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 11l9-7 9 7%22/%3E%3Cpath d=%22M5 9.5V20h14V9.5%22/%3E%3Cpath d=%22M10 20v-6h4v6%22/%3E%3C/svg%3E"); }
.ms-icon--chat { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 11.5a8.5 8.5 0 0 1-12.4 7.6L3 20.5l1.4-5A8.5 8.5 0 1 1 21 11.5z%22/%3E%3Cpath d=%22M8 10h8M8 13.5h5%22/%3E%3C/svg%3E"); }
.ms-icon--user { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21a8 8 0 0 1 16 0%22/%3E%3C/svg%3E"); }
.ms-icon--pound { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M16.5 6.5A4 4 0 0 0 9 8.5v4c0 3-1.2 5.3-3 6.5h12%22/%3E%3Cpath d=%22M6.5 12.5h8%22/%3E%3C/svg%3E"); }
.ms-icon--shield { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l8 3v6c0 5-3.4 8-8 9-4.6-1-8-4-8-9V6z%22/%3E%3Cpath d=%22M8.8 12.2l2.2 2.2 4.2-4.4%22/%3E%3C/svg%3E"); }
.ms-icon--scale { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3v18M7 21h10M4 7h16M4 7l-2.5 6a2.5 2.5 0 0 0 5 0zM20 7l-2.5 6a2.5 2.5 0 0 0 5 0z%22/%3E%3C/svg%3E"); }
.ms-icon--clock { --ms-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 7v5l3 2%22/%3E%3C/svg%3E"); }
.ms-practice-card::before,
.ms-feature::before {
	content: "";
	display: block;
	width: 3rem;
	height: 3rem;
	margin-bottom: 1.25rem;
	border-radius: 50%;
	background: var(--ms-gold);
}
.ms-practice-card::after,
.ms-feature::after {
	content: "";
	position: absolute;
	top: calc(var(--ms-card-pad) + 0.75rem);
	left: calc(var(--ms-card-pad) + 0.75rem);
	width: 1.5rem;
	height: 1.5rem;
	background: var(--ms-black);
	-webkit-mask: var(--ms-icon, none) no-repeat center / contain;
	mask: var(--ms-icon, none) no-repeat center / contain;
}

/* ── Practice area cards ([ms_practice_areas]) ── */
ul.ms-practice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ms-practice-card {
	--ms-card-pad: 1.75rem;
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: var(--ms-card-pad);
	border: 1px solid var(--ms-grey);
	border-radius: var(--ms-radius);
	background: var(--ms-white);
	box-shadow: var(--ms-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ms-practice-card:hover,
.ms-practice-card:focus-within {
	border-color: var(--ms-gold-deep);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
	transform: translateY(-3px);
}
.ms-practice-card.has-image::before,
.ms-practice-card.has-image::after {
	display: none;
}
.ms-practice-card__media {
	margin: calc(var(--ms-card-pad) * -1) calc(var(--ms-card-pad) * -1) 1.5rem;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--ms-radius) var(--ms-radius) 0 0;
	background: var(--ms-surface);
}
.ms-practice-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.ms-practice-card:hover .ms-practice-card__media img {
	transform: scale(1.04);
}
.entry-content .ms-practice-card__title {
	margin: 0 0 0.6rem;
	font-size: 1.5rem;
}
.entry-content .ms-practice-card .ms-practice-card__title a {
	color: inherit;
	text-decoration: none;
}
/* Whole card is clickable through the title link. */
.ms-practice-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.ms-practice-card__excerpt {
	margin: 0 0 1.5rem;
	color: var(--ms-muted);
	font-size: 1.05rem;
	line-height: 1.55;
}
.ms-practice-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid var(--ms-grey);
	font-family: var(--ms-font-sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ms-black);
}

/* Kadence is a classic theme, so WordPress wraps group content in an inner
   container. Let grid children skip it so they become the grid items. */
.wp-block-group.ms-features > .wp-block-group__inner-container,
.wp-block-group.ms-steps > .wp-block-group__inner-container {
	display: contents;
}

/* ── Feature tiles (why choose us / values) ── */
.entry-content .wp-block-group.ms-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
	gap: 1.25rem;
}
.entry-content .wp-block-group.ms-features > * {
	margin: 0;
}
.wp-block-group.ms-feature {
	--ms-card-pad: 1.75rem;
	position: relative;
	padding: var(--ms-card-pad);
	border-radius: var(--ms-radius);
	background: var(--ms-white);
	box-shadow: var(--ms-shadow);
}
.ms-section--dark .wp-block-group.ms-feature {
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	box-shadow: none;
}
.ms-feature h3 {
	margin: 0 0 0.5rem;
	font-size: 1.35rem;
}
.ms-feature p {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--ms-muted);
}
.ms-section--dark .ms-feature p {
	color: #bdbdbd;
}

/* ── Steps (how it works) ── */
.entry-content .wp-block-group.ms-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 2rem;
	counter-reset: ms-step;
}
.entry-content .wp-block-group.ms-steps > * {
	margin: 0;
}
.wp-block-group.ms-step {
	position: relative;
	padding-top: 4.25rem;
	counter-increment: ms-step;
}
.wp-block-group.ms-step::before {
	content: counter(ms-step, decimal-leading-zero);
	position: absolute;
	top: 0;
	left: 0;
	font-family: var(--ms-font-serif);
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
	color: var(--ms-gold-deep);
}
.wp-block-group.ms-step::after {
	content: "";
	position: absolute;
	top: 1.5rem;
	left: 4.5rem;
	right: 0;
	height: 1px;
	background: var(--ms-grey);
}
.ms-step h3 {
	margin: 0 0 0.5rem;
	font-size: 1.4rem;
}
.ms-step p {
	margin: 0;
	color: var(--ms-muted);
	font-size: 1.05rem;
}

/* ── Split layouts (text + card) ── */
.entry-content .wp-block-columns.ms-split {
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: flex-start;
}
.ms-quote-card {
	position: relative;
	padding: clamp(2rem, 4vw, 3rem) !important;
	border-radius: var(--ms-radius);
	background: var(--ms-black);
	color: var(--ms-grey);
}
.ms-quote-card::before {
	content: "\201C";
	display: block;
	height: 3.25rem;
	font-family: var(--ms-font-serif);
	font-size: 6rem;
	line-height: 1;
	color: var(--ms-gold);
}
.ms-quote-card p {
	font-size: clamp(1.25rem, 2.2vw, 1.55rem);
	line-height: 1.45;
	color: var(--ms-white);
}
.ms-quote-card .ms-quote-card__by {
	margin: 1.5rem 0 0;
	font-family: var(--ms-font-sans);
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ms-gold);
}
.ms-portrait img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--ms-radius);
	box-shadow: 18px 18px 0 var(--ms-gold);
}

/* Side card on service and contact pages. */
.wp-block-group.ms-sidecard {
	padding: clamp(1.5rem, 3vw, 2rem);
	border-top: 4px solid var(--ms-gold);
	border-radius: var(--ms-radius);
	background: var(--ms-surface);
}
@media (min-width: 782px) {
	.wp-block-group.ms-sidecard {
		position: sticky;
		top: 7rem;
	}
}
.ms-sidecard h3 {
	margin-top: 0;
	font-size: 1.4rem;
}
.ms-sidecard p,
.ms-sidecard li {
	font-size: 1.02rem;
}
.ms-sidecard .wp-block-buttons {
	margin-block: 1.25rem;
}
.ms-sidecard .wp-block-button,
.ms-sidecard .wp-block-button__link {
	width: 100%;
}
.ms-sidecard ul,
.ms-sidecard ol {
	padding-left: 1.2em;
}
.ms-sidecard .ms-small {
	margin-bottom: 0;
	font-family: var(--ms-font-sans);
	font-size: 0.8125rem;
	color: var(--ms-muted);
}

/* Long-form content on service pages. */
.ms-prose {
	max-width: 44rem;
}
.ms-prose h2 {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--ms-grey);
	font-size: clamp(1.6rem, 3vw, 2rem);
}
.ms-prose > h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}
.ms-prose h3 {
	margin-top: 1.5rem;
	font-size: 1.25rem;
}
.ms-prose ul {
	padding-left: 0;
	list-style: none;
}
.ms-prose ul li {
	position: relative;
	margin-bottom: 0.55rem;
	padding-left: 1.75rem;
}
.ms-prose ul li::before {
	content: "";
	position: absolute;
	top: 0.6em;
	left: 0;
	width: 0.7rem;
	height: 0.7rem;
	border: 2px solid var(--ms-gold-deep);
	border-radius: 50%;
}

/* ── Call to action band ── */
.entry-content .wp-block-group.ms-cta {
	position: relative;
	padding-block: clamp(3.5rem, 8vw, 5.5rem);
	background-color: var(--ms-charcoal);
	background-image: radial-gradient(ellipse at 50% 0%, rgba(245, 210, 112, 0.14), transparent 60%);
	color: var(--ms-grey);
	text-align: center;
}
.ms-has-cta-image .entry-content .wp-block-group.ms-cta {
	background-image: linear-gradient(rgba(17, 17, 17, 0.86), rgba(17, 17, 17, 0.86)), var(--ms-cta-image);
	background-size: cover;
	background-position: center;
}
.ms-cta h2 {
	color: var(--ms-white);
	font-size: clamp(2rem, 4.5vw, 3rem);
}
.ms-cta p {
	max-width: 34em;
	margin-inline: auto;
	font-size: 1.2rem;
}
.ms-cta .wp-block-button__link {
	border-color: var(--ms-gold);
	background: var(--ms-gold);
	color: var(--ms-black);
}
.ms-cta .wp-block-button__link:hover {
	border-color: var(--ms-white);
	background: var(--ms-white);
	color: var(--ms-black);
}

/* ── Contact form ([ms_contact_form]) ── */
.ms-contact {
	max-width: 42rem;
}
.ms-contact__notice {
	margin-bottom: 1.75rem;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--ms-gold-deep);
	background: var(--ms-surface);
	font-size: 0.9375rem;
	line-height: 1.55;
}
.ms-contact__notice p {
	margin: 0;
}
.ms-contact__status {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: var(--ms-radius);
	font-family: var(--ms-font-sans);
	font-size: 0.9375rem;
}
.ms-contact__status--success {
	background: #e8f3ea;
	color: #1d4d27;
}
.ms-contact__status--error {
	background: #fbeaea;
	color: #8a1f1f;
}
.ms-contact__form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1.25rem;
}
.ms-contact__form > .ms-field,
.ms-contact__form > .ms-contact__submit {
	grid-column: 1 / -1;
}
@media (min-width: 640px) {
	.ms-contact__form > .ms-field:has(#ms_email),
	.ms-contact__form > .ms-field:has(#ms_phone) {
		grid-column: auto;
	}
}
.ms-field {
	margin: 0 0 1.25rem;
}
.ms-field label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ms-black);
}
.ms-field input[type="text"],
.ms-field input[type="email"],
.ms-field input[type="tel"],
.ms-field select,
.ms-field textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid #8a8a8a;
	border-radius: var(--ms-radius);
	background: var(--ms-white);
	font-family: var(--ms-font-sans);
	font-size: 1rem; /* 16px stops iOS zooming in */
	color: var(--ms-black);
}
.ms-field input:focus,
.ms-field select:focus,
.ms-field textarea:focus {
	border-color: var(--ms-black);
}
.ms-field--checkbox {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
}
.ms-field--checkbox input {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.15rem;
	accent-color: var(--ms-black);
}
.ms-field--checkbox label {
	margin: 0;
	font-weight: 400;
	line-height: 1.5;
}
.ms-contact__submit .ms-button {
	min-width: 12rem;
}
@media (max-width: 520px) {
	.ms-contact__submit .ms-button {
		width: 100%;
	}
}
.ms-req {
	color: #8a1f1f;
}
/* Honeypot: hidden from people, visible to bots. */
.ms-contact__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ── Footer ── */
.ms-footer {
	background: var(--ms-ink);
	color: #bdbdbd;
	font-size: 0.9rem;
	line-height: 1.6;
}
.ms-footer__main {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: 2.5rem;
	max-width: var(--ms-inner);
	margin-inline: auto;
	padding: clamp(3rem, 7vw, 4.5rem) var(--ms-gutter);
}
@media (max-width: 960px) {
	.ms-footer__main {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 560px) {
	.ms-footer__main {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}
.ms-footer__logo img {
	display: block;
	width: 170px;
	height: auto;
}
.ms-footer__tagline {
	margin: 1rem 0 0.5rem;
	font-family: var(--ms-font-serif);
	font-size: 1.2rem;
	font-style: italic;
	color: var(--ms-gold);
}
.ms-footer p {
	margin: 0 0 1rem;
}
.ms-footer__heading {
	margin: 0 0 1rem;
	font-family: var(--ms-font-sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ms-white);
}
.ms-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ms-footer__links li,
.ms-footer__contact li {
	margin-bottom: 0.6rem;
}
.ms-footer a {
	color: #e0e0e0;
	text-decoration: none;
}
.ms-footer a:hover {
	color: var(--ms-gold);
}
.ms-footer__label {
	display: block;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8f8f8f;
}
.ms-footer .ms-button {
	margin-top: 0.5rem;
	min-height: 2.75rem;
	padding: 0.65em 1.3em;
	font-size: 0.875rem;
}
.ms-footer a.ms-button--gold,
.ms-footer a.ms-button--gold:hover {
	color: var(--ms-black);
}
.ms-footer__bottom {
	max-width: var(--ms-inner);
	margin-inline: auto;
	padding: 1.25rem var(--ms-gutter);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.8125rem;
	color: #8f8f8f;
}
.ms-footer__bottom p {
	margin: 0;
}

/* ── Regulatory strip (UK requirements) ── */
.ms-regulatory {
	padding-block: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	background: var(--ms-black);
	color: #a9a9a9;
	font-size: 0.8125rem;
	line-height: 1.6;
}
.ms-regulatory__inner {
	max-width: var(--ms-inner);
	margin-inline: auto;
	padding-inline: var(--ms-gutter);
}
.ms-regulatory p {
	margin: 0 0 0.5rem;
}
.ms-regulatory__label {
	color: var(--ms-white);
}
.ms-regulatory__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}
.ms-regulatory a {
	color: var(--ms-white);
}
.ms-regulatory__badge {
	max-width: 275px;
	margin-top: 1rem;
}

/* ── Blog and default content pages ── */
.loop-entry,
.single-content .entry {
	border-radius: var(--ms-radius);
	box-shadow: var(--ms-shadow);
}
.loop-entry .entry-title a {
	text-decoration: none;
}
.entry-hero .entry-title,
.archive .page-title {
	font-size: clamp(2rem, 5vw, 3rem);
}

/* Blog listing banner matches the page heroes. */
.post-archive-hero-section .entry-hero-container-inner {
	background: var(--ms-black);
	background-image: radial-gradient(ellipse at 85% 20%, rgba(245, 210, 112, 0.12), transparent 55%);
}
.post-archive-hero-section .entry-hero-container-inner .entry-header {
	min-height: clamp(9rem, 18vw, 13rem);
}
.post-archive-hero-section .archive-title,
.post-archive-hero-section .page-title {
	color: var(--ms-white);
}

/* Blog category bar. */
.ms-blog-cats {
	margin: 0 0 2.5rem;
	font-family: var(--ms-font-sans);
}
.ms-blog-cats ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ms-blog-cats a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.55em 1.1em;
	border: 1px solid #c9c9c9;
	border-radius: 999px;
	background: var(--ms-white);
	color: var(--ms-charcoal);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.ms-blog-cats a:hover {
	border-color: var(--ms-black);
	color: var(--ms-black);
}
.ms-blog-cats a[aria-current="page"] {
	border-color: var(--ms-black);
	background: var(--ms-black);
	color: var(--ms-white);
}
.ms-blog-cats__count {
	display: inline-grid;
	place-items: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding-inline: 0.35rem;
	border-radius: 999px;
	background: var(--ms-surface);
	color: var(--ms-muted);
	font-size: 0.75rem;
}
.ms-blog-cats a[aria-current="page"] .ms-blog-cats__count {
	background: var(--ms-gold);
	color: var(--ms-black);
}
/* Phones: one scrollable row instead of several wrapped lines. */
@media (max-width: 600px) {
	.ms-blog-cats ul {
		flex-wrap: nowrap;
		margin-inline: calc(var(--ms-gutter) * -1);
		padding: 0 var(--ms-gutter) 0.5rem;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.ms-blog-cats li {
		flex: none;
	}
}
.post-archive-hero-section .archive-description,
.post-archive-hero-section .archive-description p {
	max-width: 40rem;
	margin-inline: auto;
	color: #cfcfcf;
}
/* Category label on each post card. */
.loop-entry .entry-taxonomies a {
	color: var(--ms-gold-deep);
	letter-spacing: 0.1em;
}

.ms-disclaimer {
	font-family: var(--ms-font-sans);
	font-size: 0.8125rem;
	line-height: 1.6;
	color: var(--ms-muted);
}
.single-post .entry-content h2 {
	margin-top: 2.25rem;
	font-size: clamp(1.6rem, 3vw, 2rem);
}

.ms-notice {
	padding: 1rem;
	border: 1px dashed var(--ms-muted);
	font-family: var(--ms-font-sans);
	font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
