/**
 * Mission Biz — Design System
 *
 * Aesthetic: Warm Editorial Authority
 * DM Serif Display headlines. Deep navy + warm gold palette.
 * Intentional texture. Visual depth. Distinctly human.
 *
 * @package Mission Biz
 */

/* ─── FULL-WIDTH BLOCK SUPPORT ─────────────────────────────────────── */

.front-page .site-inner {
	max-width: 100% !important;
	padding: 0 !important;
	margin-top: 0;
}

.front-page .content-sidebar-wrap,
.front-page .content {
	padding: 0 !important;
	max-width: 100% !important;
	float: none !important;
	width: 100% !important;
}

.front-page .entry {
	margin-bottom: 0;
	padding: 0;
}

.front-page .entry-content {
	padding: 0;
}

.front-page .entry-content > .alignfull {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
}

.front-page .site-container .wp-block-columns.alignfull {
	padding: 0;
}

.front-page .entry-content > *:not(.alignfull) {
	max-width: 1060px;
	margin-left: auto;
	margin-right: auto;
}

/* ─── GLOBAL TYPOGRAPHY OVERRIDES ──────────────────────────────────── */

.entry-content .wp-block-heading,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
}

/* ─── HERO COVER BLOCK ─────────────────────────────────────────────── */

.front-page .entry-content > .wp-block-cover:first-of-type {
	position: relative;
	overflow: hidden;
}

/* Subtle noise grain texture over hero */
.front-page .entry-content > .wp-block-cover:first-of-type::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
	pointer-events: none;
	z-index: 0;
}

/* Warm accent glow */
.front-page .entry-content > .wp-block-cover:first-of-type::after {
	content: '';
	position: absolute;
	bottom: -30%;
	right: -5%;
	width: 600px;
	height: 600px;
	background: radial-gradient(circle, rgba(200, 162, 81, 0.08) 0%, transparent 65%);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

.front-page .wp-block-cover .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
}

/* ─── COVER BLOCKS (ALL) ──────────────────────────────────────────── */

.wp-block-cover {
	overflow: hidden;
}

.wp-block-cover .wp-block-heading {
	font-family: 'DM Serif Display', Georgia, serif !important;
	font-weight: 400 !important;
}

/* Gold accent line under eyebrow text in covers */
.wp-block-cover p[style*="letter-spacing:3px"] {
	color: var(--color-secondary) !important;
}

/* Buttons inside covers */
.wp-block-cover .wp-block-button__link {
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wp-block-cover .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.wp-block-cover .is-style-outline .wp-block-button__link {
	border-width: 1px;
	border-color: rgba(255, 255, 255, 0.4);
}

.wp-block-cover .is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	border-color: rgba(255, 255, 255, 0.8);
}

/* White CTA buttons inside cover blocks */
.site-container .wp-block-cover .wp-block-button__link.has-white-background-color {
	background-color: var(--color-secondary) !important;
	color: var(--color-dark) !important;
	border: 0 !important;
	font-weight: 600;
	letter-spacing: 1.5px;
}

.site-container .wp-block-cover .wp-block-button__link.has-white-background-color:hover {
	background-color: #d4af5a !important;
	box-shadow: 0 6px 24px rgba(200, 162, 81, 0.4);
}

/* ─── SERVICE & CONTENT CARDS ──────────────────────────────────────── */

/* Bordered cards — service cards on homepage */
.wp-block-column[style*="border-width"] {
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	border-color: var(--color-border) !important;
}

.wp-block-column[style*="border-width"]:hover {
	border-color: var(--color-secondary) !important;
	box-shadow: 0 12px 40px rgba(13, 27, 42, 0.08);
	transform: translateY(-6px);
}

/* Gold line accent on hover */
.wp-block-column[style*="border-width"]::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%) scaleX(0);
	width: 60px;
	height: 3px;
	background: var(--color-secondary);
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	border-radius: 2px;
}

.wp-block-column[style*="border-width"]:hover::before {
	transform: translateX(-50%) scaleX(1);
}

.wp-block-column[style*="border-width"] {
	position: relative;
}

/* Service card headings */
.wp-block-column[style*="border-width"] h3 {
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
}

/* Stat cards inside cover blocks */
.wp-block-cover .wp-block-column[style*="border-radius"] {
	transition: all 0.3s ease;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.wp-block-cover .wp-block-column[style*="border-radius"]:hover {
	background-color: rgba(255, 255, 255, 0.1) !important;
	transform: translateY(-2px);
}

/* Stat numbers — make them gold */
.wp-block-cover .wp-block-column p[style*="font-weight:700"][style*="line-height:1"] {
	color: var(--color-secondary) !important;
}

/* Testimonial cards */
.wp-block-group.has-background .wp-block-column.has-background {
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	position: relative;
}

.wp-block-group.has-background .wp-block-column.has-background:hover {
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
	transform: translateY(-4px);
}

/* Decorative quote mark on testimonials */
.wp-block-group.has-background .wp-block-column.has-background::before {
	content: '\201C';
	position: absolute;
	top: 20px;
	right: 24px;
	font-family: 'DM Serif Display', Georgia, serif;
	font-size: 64px;
	line-height: 1;
	color: var(--color-secondary);
	opacity: 0.15;
	pointer-events: none;
}

/* Star ratings — warm gold */
.entry-content p[style*="color:#f5a623"] {
	line-height: 1;
	color: var(--color-secondary) !important;
}

/* Testimonial author names */
.wp-block-group.has-background .wp-block-column p[style*="font-weight:600"] {
	font-family: 'DM Sans', sans-serif;
}

/* ─── EYEBROW TEXT ─────────────────────────────────────────────────── */

/* Gold eyebrow labels throughout */
p[style*="letter-spacing:3px"][style*="text-transform:uppercase"] {
	color: var(--color-secondary) !important;
	font-family: 'DM Sans', sans-serif !important;
}

/* ─── SECTION HEADINGS ─────────────────────────────────────────────── */

.entry-content h2[style*="font-weight:700"] {
	font-family: 'DM Serif Display', Georgia, serif !important;
	font-weight: 400 !important;
}

/* ─── BUTTONS ──────────────────────────────────────────────────────── */

.entry-content .wp-block-button__link {
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	font-family: 'DM Sans', sans-serif;
	font-weight: 600;
	letter-spacing: 1px;
}

.entry-content .wp-block-button__link:hover {
	transform: translateY(-2px);
}

/* ─── SECTION SPACING ──────────────────────────────────────────────── */

.entry-content .wp-block-group.alignfull + .wp-block-group.alignfull,
.entry-content .wp-block-group.alignfull + .wp-block-cover.alignfull,
.entry-content .wp-block-cover.alignfull + .wp-block-group.alignfull,
.entry-content .wp-block-cover.alignfull + .wp-block-cover.alignfull {
	margin-top: 0;
}

/* ─── CONTENT WIDTH CONSTRAINTS ────────────────────────────────────── */

/*
 * Full-width blocks go edge-to-edge for backgrounds,
 * but their INNER content must be constrained to readable widths.
 * WordPress's layout.contentSize doesn't always work in Genesis,
 * so we enforce it here.
 */

/* The inner container of full-width groups — constrain it */
.alignfull > .wp-block-group__inner-container,
.alignfull > .wp-block-cover__inner-container > .wp-block-group {
	max-width: 1060px;
	margin-left: auto;
	margin-right: auto;
}

/* Cover block inner containers */
.wp-block-cover.alignfull > .wp-block-cover__inner-container {
	max-width: 1060px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

/* Narrower constraint for text-heavy sections (about story, etc) */
.alignfull > .wp-block-group__inner-container > p,
.alignfull > .wp-block-group__inner-container > h1,
.alignfull > .wp-block-group__inner-container > h2,
.alignfull > .wp-block-group__inner-container > h3,
.alignfull > .wp-block-group__inner-container > .wp-block-separator {
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
}

/* But columns, covers, and other layout blocks inside should use full container width */
.alignfull > .wp-block-group__inner-container > .wp-block-columns,
.alignfull > .wp-block-group__inner-container > .wp-block-cover,
.alignfull > .wp-block-group__inner-container > .wp-block-buttons {
	max-width: 1060px;
	margin-left: auto;
	margin-right: auto;
}

/* Front page hero — wider text allowed */
.front-page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container {
	max-width: 760px;
}

/* ─── INNER PAGES ──────────────────────────────────────────────────── */

.page:not(.front-page) .entry-content > .wp-block-group.alignfull,
.page:not(.front-page) .entry-content > .wp-block-cover.alignfull {
	margin-left: calc(-100vw / 2 + 100% / 2);
	margin-right: calc(-100vw / 2 + 100% / 2);
	max-width: 100vw;
	width: 100vw;
}

.page:not(.front-page) .wp-block-column.has-background[style*="border-radius"] {
	transition: all 0.3s ease;
}

.page:not(.front-page) .wp-block-column.has-background[style*="border-radius"]:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* ─── HERO PAGE TITLE (inner pages) ───────────────────────────────── */

.hero-page-title .entry-title {
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
}

/* On full-width pages, the hero wrapper is skipped in PHP (title-functions.php).
   The site-inner needs to clear the fixed header. */
.page.full-width-content .site-inner {
	margin-top: 0;
}

/* Inner pages with full-width layout — remove padding so cover blocks go edge-to-edge */
.page.full-width-content .content {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.page.full-width-content .entry {
	margin-bottom: 0;
}

.page.full-width-content .entry-content {
	padding: 0;
}

/* Section spacing on inner pages */
.page:not(.front-page) .entry-content .wp-block-group.alignfull + .wp-block-group.alignfull,
.page:not(.front-page) .entry-content .wp-block-group.alignfull + .wp-block-cover.alignfull,
.page:not(.front-page) .entry-content .wp-block-cover.alignfull + .wp-block-group.alignfull,
.page:not(.front-page) .entry-content .wp-block-cover.alignfull + .wp-block-cover.alignfull {
	margin-top: 0;
}

/* Remove the 200px side padding on full-width inner pages */
.page.full-width-content:not(.front-page) .full-width-content .content {
	padding: 0 !important;
}

.hero-page-title .archive-title {
	font-family: 'DM Serif Display', Georgia, serif;
}

/* ─── SCROLL ANIMATIONS ───────────────────────────────────────────── */

.front-page .wp-block-group.alignfull,
.front-page .wp-block-cover.alignfull:not(:first-of-type) {
	transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
	            transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.front-page .mission-animate-init {
	opacity: 0;
	transform: translateY(40px);
}

.front-page .mission-animate-init.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.front-page .mission-animate-init {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ─── GLOBAL TEXTURE ───────────────────────────────────────────────── */

/* Subtle warm tint on the light background sections */
.wp-block-group[style*="background-color:#f8f9fa"],
.wp-block-group[style*="background-color:#f8f9fa"] {
	background-color: #f5f1eb !important;
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────── */

/* Ensure inner content never touches screen edges */
@media only screen and (max-width: 1120px) {
	.alignfull > .wp-block-group__inner-container,
	.wp-block-cover.alignfull > .wp-block-cover__inner-container {
		padding-left: 5%;
		padding-right: 5%;
	}
}

@media only screen and (max-width: 1023px) {
	.front-page .wp-block-cover:first-of-type .wp-block-heading[style*="font-size:56px"] {
		font-size: 42px !important;
	}

	.wp-block-cover .wp-block-heading[style*="font-size:44px"] {
		font-size: 34px !important;
	}

	.wp-block-heading[style*="font-size:36px"] {
		font-size: 30px !important;
	}
}

@media only screen and (max-width: 781px) {
	.front-page .wp-block-cover:first-of-type {
		min-height: 75vh !important;
	}

	.front-page .wp-block-cover:first-of-type .wp-block-heading[style*="font-size:56px"] {
		font-size: 34px !important;
	}

	.wp-block-cover .wp-block-heading[style*="font-size:44px"] {
		font-size: 28px !important;
	}

	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*="border-width"],
	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column.has-background {
		margin-bottom: 20px;
	}

	/* Hide decorative quote marks on mobile */
	.wp-block-group.has-background .wp-block-column.has-background::before {
		display: none;
	}
}

@media only screen and (max-width: 480px) {
	.front-page .wp-block-cover:first-of-type .wp-block-heading[style*="font-size:56px"] {
		font-size: 28px !important;
	}

	.wp-block-cover .wp-block-buttons {
		flex-direction: column;
		align-items: center;
	}
}
