/* ═══════════════════════════════════════════════════════════════════════════════
 * MICROSITE BASE — Design tokens, typography, buttons, layout primitives.
 *
 * @package 4M Dental Microsite
 * ═══════════════════════════════════════════════════════════════════════════════ */


/* ─── Full-width override — break out of Genesis .site-inner container ────── */

.fm-microsite-page .site-inner {
	max-width: 100%;
	padding: 0;
}

.fm-microsite-page .site-inner .wrap,
.fm-microsite-page .content-sidebar-wrap {
	max-width: 100%;
	padding: 0;
}

.fm-microsite-page .content {
	max-width: 100%;
	padding: 0;
	float: none;
	width: 100%;
}

.fm-microsite-page .entry {
	max-width: 100%;
	padding: 0;
	margin: 0;
}


/* ─── Design Tokens ─────────────────────────────────────────────────────────── */

:root {
	/* Colors */
	--fm-color-header: #05070b;
	--fm-color-body: #060c17;
	--fm-color-body-inverse: #b8b8b8;
	--fm-color-header-inverse: #ffffff;
	--fm-color-bg-main: #fbf7f3;
	--fm-color-bg-dark: #060c17;
	--fm-color-bg-dark-feint: #162b4e;
	--fm-color-bg-white: #ffffff;
	--fm-color-accent: #6388B4;
	--fm-color-tertiary: #E69056;
	--fm-color-border: #e0dcd8;
	--fm-color-star: #f4b400;

	/* Fonts */
	--fm-font-display: 'Helvetica Neue', sans-serif;
	--fm-font-serif: 'Instrument Serif', Georgia, serif;
	--fm-font-body: 'Brockmann', sans-serif;
	--fm-font-ui: 'Plus Jakarta Sans', sans-serif;

	/* Type Scale */
	--fm-text-sm: 14px;
	--fm-text-md: 16px;
	--fm-text-lg: 18px;
	--fm-text-h4: 32px;
	--fm-text-h3: 44px;
	--fm-text-h2: 52px;
	--fm-text-h1-serif: 72px;
	--fm-text-hero: 64px;

	/* Spacing */
	--fm-section-padding: 80px 0;
	--fm-container-max: 1200px;
	--fm-container-padding: 0 24px;
	--fm-gap-sm: 16px;
	--fm-gap-md: 24px;
	--fm-gap-lg: 40px;
	--fm-gap-xl: 64px;

	/* Radius */
	--fm-radius-sm: 8px;
	--fm-radius-md: 12px;
	--fm-radius-lg: 16px;
	--fm-radius-pill: 999px;
}


/* ─── Reset / Scope ─────────────────────────────────────────────────────────── */

.fm-microsite {
	font-family: var(--fm-font-body);
	font-size: var(--fm-text-md);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--fm-color-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.fm-microsite *,
.fm-microsite *::before,
.fm-microsite *::after {
	box-sizing: border-box;
}

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


/* ─── Container ─────────────────────────────────────────────────────────────── */

.fm-container {
	width: 100%;
	max-width: var(--fm-container-max);
	margin: 0 auto;
	padding: var(--fm-container-padding);
}


/* ─── Sections ──────────────────────────────────────────────────────────────── */

.fm-section {
	padding: var(--fm-section-padding);
	position: relative;
	overflow: hidden;
}

.fm-section--bg-main {
	background-color: var(--fm-color-bg-main);
}

.fm-section--bg-dark {
	background-color: var(--fm-color-bg-dark);
	color: var(--fm-color-body-inverse);
}

.fm-section--bg-dark .fm-section-subtitle {
	color: var(--fm-color-body-inverse);
	opacity: 1;
}

.fm-section--bg-white {
	background-color: var(--fm-color-bg-white);
}


/* ─── Typography ────────────────────────────────────────────────────────────── */

.fm-microsite h1,
.fm-microsite h2,
.fm-microsite h3:not(.fm-ae-card-title),
.fm-microsite h4,
.fm-microsite h5,
.fm-microsite h6 {
	font-family: var(--fm-font-display);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--fm-color-header);
	margin: 0 0 var(--fm-gap-sm);
}

.fm-microsite h1 { font-size: var(--fm-text-h1-serif); }
.fm-microsite h2 { font-size: var(--fm-text-h2); }
.fm-microsite h3:not(.fm-ae-card-title) { font-size: var(--fm-text-h3); }
.fm-microsite h4 { font-size: var(--fm-text-h4); }

/* Dark-background heading overrides — MUST come after generic heading rules */
.fm-section--bg-dark h1,
.fm-section--bg-dark h2,
.fm-section--bg-dark h3,
.fm-section--bg-dark h4,
.fm-section--bg-dark h5,
.fm-section--bg-dark h6,
.fm-section--hero h1,
.fm-section--hero h2,
.fm-section--hero h3,
.fm-section--hero h4 {
	color: var(--fm-color-header-inverse);
}

.fm-microsite p {
	margin: 0 0 var(--fm-gap-sm);
	line-height: 1.4;
}

/* Serif headings (hero, section feature titles) — needs .fm-microsite prefix
   to beat the generic heading font-family rule (.fm-microsite h1, etc.) */
.fm-microsite .fm-text-serif {
	font-family: var(--fm-font-serif);
	font-style: normal;
}

/* Section titles that use serif — matches Figma design across most sections */
.fm-microsite .fm-section-title--serif {
	font-family: var(--fm-font-serif);
	font-style: normal;
}

/* UI text (badges, small labels) */
.fm-text-ui {
	font-family: var(--fm-font-ui);
}

/* Body sizes */
.fm-text-sm { font-size: var(--fm-text-sm); }
.fm-text-md { font-size: var(--fm-text-md); }
.fm-text-lg { font-size: var(--fm-text-lg); }


/* ─── Section Header ────────────────────────────────────────────────────────── */

.fm-section-header {
	text-align: center;
	margin-bottom: var(--fm-gap-lg);
}

.fm-section-title {
	margin-bottom: var(--fm-gap-sm);
}

.fm-section-subtitle {
	font-size: var(--fm-text-lg);
	color: var(--fm-color-body);
	opacity: 0.7;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}


/* ─── Buttons ───────────────────────────────────────────────────────────────── */

.fm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--fm-font-body);
	font-size: var(--fm-text-md);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
	padding: 16px 32px;
	border: none;
	border-radius: var(--fm-radius-pill);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s, transform 0.15s;
	white-space: nowrap;
}

.fm-btn:hover {
	transform: translateY(-1px);
}

.fm-btn:active {
	transform: translateY(0);
}

/* Primary (dark bg, light text) */
.fm-btn--primary,
.fm-btn {
	background-color: var(--fm-color-bg-dark);
	color: var(--fm-color-header-inverse);
}

.fm-btn--primary:hover,
.fm-btn:hover {
	background-color: var(--fm-color-bg-dark-feint);
	color: var(--fm-color-header-inverse);
}

/* Light (white bg, dark text) */
.fm-btn--light {
	background-color: var(--fm-color-bg-white);
	color: var(--fm-color-header);
}

.fm-btn--light:hover {
	background-color: #f0f0f0;
	color: var(--fm-color-header);
}

/* Outline */
.fm-btn--outline {
	background-color: transparent;
	border: 1px solid var(--fm-color-border);
	color: var(--fm-color-header);
}

.fm-btn--outline:hover {
	background-color: var(--fm-color-bg-dark);
	border-color: var(--fm-color-bg-dark);
	color: var(--fm-color-header-inverse);
}

/* Small */
.fm-btn--sm {
	font-size: var(--fm-text-sm);
	padding: 10px 20px;
}


/* ─── Google Badge ──────────────────────────────────────────────────────────── */

.fm-google-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--fm-font-ui);
	font-size: var(--fm-text-sm);
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}

.fm-google-badge__icon {
	width: 24px;
	height: 24px;
}

.fm-google-badge__rating {
	font-weight: 700;
}

.fm-google-badge__stars {
	display: inline-flex;
	gap: 1px;
}

.fm-star {
	font-size: 14px;
	line-height: 1;
}

.fm-star--full {
	color: var(--fm-color-star);
}

.fm-star--half {
	color: var(--fm-color-star);
	opacity: 0.6;
}

.fm-star--empty {
	color: #d0d0d0;
}


/* ─── Phone Link ────────────────────────────────────────────────────────────── */

.fm-phone-link {
	text-decoration: none;
	color: inherit;
	font-weight: 500;
}

.fm-phone-link:hover {
	text-decoration: underline;
}


/* ─── Video Modal ───────────────────────────────────────────────────────────── */

.fm-video-modal {
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	cursor: pointer;
}

.fm-video-modal__content {
	position: relative;
	width: 90vw;
	max-width: 960px;
	cursor: default;
}

.fm-video-modal__close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: white;
	font-size: 32px;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
	z-index: 1;
}

.fm-video-modal__player {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
}

.fm-video-modal__player iframe,
.fm-video-modal__player video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}


/* ─── FAQ Accordion ─────────────────────────────────────────────────────────── */

.fm-faq__list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.fm-faq__item {
	border-bottom: 1px solid var(--fm-color-border);
}

.fm-microsite .fm-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 20px 0;
	background: none;
	border: none;
	font-family: var(--fm-font-display);
	font-size: var(--fm-text-lg);
	font-weight: 400;
	text-align: left;
	color: var(--fm-color-header);
	cursor: pointer;
}

.fm-faq__question::after {
	content: '+';
	font-size: 24px;
	font-weight: 300;
	transition: transform 0.3s;
	flex-shrink: 0;
	margin-left: 16px;
}

.fm-faq__item.is-open .fm-faq__question::after {
	content: '\2212'; /* minus sign */
}

.fm-faq__answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease;
}

.fm-faq__answer-inner {
	padding: 0 0 20px;
	color: var(--fm-color-body);
	line-height: 1.6;
}

.fm-faq__answer-inner p:last-child {
	margin-bottom: 0;
}


/* ─── Utility Classes ───────────────────────────────────────────────────────── */

.fm-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ─── Image Placeholder ────────────────────────────────────────────────────── */

.fm-img-placeholder {
	background: linear-gradient(135deg, #e8e4df 0%, #d4d0cb 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-family: var(--fm-font-ui);
	font-size: 14px;
	font-weight: 500;
}


.fm-text-center { text-align: center; }
.fm-text-left   { text-align: left; }
.fm-text-right  { text-align: right; }

.fm-mb-0  { margin-bottom: 0; }
.fm-mb-sm { margin-bottom: var(--fm-gap-sm); }
.fm-mb-md { margin-bottom: var(--fm-gap-md); }
.fm-mb-lg { margin-bottom: var(--fm-gap-lg); }
.fm-mb-xl { margin-bottom: var(--fm-gap-xl); }

.fm-mt-0  { margin-top: 0; }
.fm-mt-sm { margin-top: var(--fm-gap-sm); }
.fm-mt-md { margin-top: var(--fm-gap-md); }
.fm-mt-lg { margin-top: var(--fm-gap-lg); }