/* ==========================================================================
   PortHosted: styles that theme.json can't express.
   Loaded on the front end and in the editor.
   ========================================================================== */

:root {
	--ph-hair-dark: #3d3d3d;
	--ph-hair: #e4e4e4;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5,
.wp-block-site-title,
.is-style-stat {
	font-variation-settings: "opsz" 72;
	text-wrap: balance;
}

p { text-wrap: pretty; }

/* -------- Header -------- */
.ph-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0);
	z-index: 50;
}
.ph-header .wp-block-navigation-item__content { color: var(--wp--preset--color--muted-light); transition: color .15s; }
.ph-header .wp-block-navigation-item__content:hover,
.ph-header .current-menu-item > .wp-block-navigation-item__content { color: #fff; text-decoration: none; }
.ph-header .wp-block-navigation__responsive-container.is-menu-open { background: #000; color: #fff; padding: 32px 24px; }
.ph-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 22px; color: #fff; }

/* -------- Paragraph styles -------- */
.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 600;
	letter-spacing: .08em;
	line-height: 1.3;
	text-transform: uppercase;
}
.is-style-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--muted); }
.has-contrast-background-color .is-style-eyebrow:not(.has-text-color),
.is-style-card-dark .is-style-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--muted-light); }

.is-style-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.45; }

.is-style-stat {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 500;
	letter-spacing: -.03em;
	line-height: 1;
}

/* -------- Group styles -------- */
.is-style-card-dark {
	background: #000;
	color: #fff;
	border: 1px solid #000; /* matches light cards' 1px border so contents line up */
	border-radius: 2px;
	box-shadow: var(--wp--preset--shadow--card);
}
.is-style-card-light {
	background: #fff;
	color: #000;
	border: 1px solid var(--ph-hair);
	border-radius: 2px;
	box-shadow: var(--wp--preset--shadow--card);
}
.is-style-panel { border: 1px solid var(--ph-hair-dark); }
.has-base-background-color .is-style-panel,
.has-base-2-background-color .is-style-panel { border-color: var(--ph-hair); }

.is-style-rule-top {
	border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	padding-top: var(--wp--preset--spacing--40);
}

@media (min-width: 782px) {
	.is-style-sticky {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 120px);
		align-self: flex-start;
	}
}

/* Cards stretch to equal height inside columns */
.wp-block-column > .is-style-card-dark:only-child,
.wp-block-column > .is-style-card-light:only-child { height: 100%; }
.ph-card-foot { margin-top: auto !important; }

/* -------- Buttons -------- */
.wp-block-button.is-style-light .wp-block-button__link { background: #fff; color: #000; }
.wp-block-button.is-style-light .wp-block-button__link:hover { background: #e4e4e4; }

.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255,255,255,.85);
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: rgba(255,255,255,.1); }

.wp-block-button.is-style-chip .wp-block-button__link {
	background: #fff;
	color: #000;
	border: 1px solid var(--ph-hair);
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	padding: 8px 16px;
	line-height: 1.2;
}
.wp-block-button.is-style-chip .wp-block-button__link:hover { border-color: #000; text-decoration: none; }
.wp-block-button.is-style-chip.is-active .wp-block-button__link {
	background: #000;
	color: #fff;
	border-color: #000;
	font-size: var(--wp--preset--font-size--medium);
}

.wp-block-buttons .wp-block-button__link:hover { text-decoration: none; }

/* -------- Badge (post terms) -------- */
.wp-block-post-terms.is-style-badge a,
.wp-block-post-terms.is-style-badge span:not(.wp-block-post-terms__separator) {
	display: inline-block;
	border: 1px solid currentColor;
	padding: 2px 6px;
	font-size: 11px;
	line-height: 1.3;
}
.wp-block-post-terms.is-style-badge .wp-block-post-terms__separator { display: none; }
.wp-block-post-terms.is-style-badge { display: flex; gap: 6px; flex-wrap: wrap; }

/* -------- Columns: divided -------- */
@media (min-width: 782px) {
	.wp-block-columns.is-style-divided { gap: 0 !important; }
	.wp-block-columns.is-style-divided > .wp-block-column { padding-inline: 24px; }
	.wp-block-columns.is-style-divided > .wp-block-column + .wp-block-column {
		border-left: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	}
}

/* -------- Separators -------- */
.wp-block-separator { opacity: 1; border: 0 !important; border-top: 1px solid currentColor !important; background: none !important; }
.has-contrast-background-color .wp-block-separator:not(.has-text-color),
.is-style-card-dark .wp-block-separator:not(.has-text-color) { color: var(--ph-hair-dark); }
.wp-block-separator.is-style-short { width: 120px; max-width: 120px; margin-left: 0 !important; margin-right: auto !important; }
.has-text-align-center.wp-block-separator.is-style-short,
.aligncenter.wp-block-separator.is-style-short { margin-inline: auto !important; }

/* -------- Lists -------- */
.wp-block-list.is-style-plain { list-style: none; padding-left: 0; }
.wp-block-list.is-style-timeline {
	list-style: none;
	padding-left: 0;
	border-left: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}
.wp-block-list.is-style-timeline li { padding: 0 0 16px 24px; position: relative; }
.wp-block-list.is-style-timeline li::before {
	content: "";
	position: absolute;
	left: -4px;
	top: .55em;
	width: 7px;
	height: 7px;
	background: currentColor;
	border-radius: 50%;
}
.wp-block-list li + li { margin-top: 4px; }

/* -------- Case study card -------- */
.ph-case-card .wp-block-columns { margin: 0; }
.ph-case-card .ph-case-media { align-self: stretch; }
.ph-case-card .ph-case-media .wp-block-post-featured-image { height: 100%; margin: 0; }
.ph-case-card .ph-case-media .wp-block-post-featured-image img { height: 100%; min-height: 300px; object-fit: cover; }
.ph-case-card .wp-block-post-title a:hover { text-decoration: none; opacity: .85; }
.ph-case-card .ph-industry-row .wp-block-separator { flex: 1; margin: 0; }
.ph-case-card .wp-block-read-more:hover { text-decoration: none; }
.ph-case-card .wp-block-read-more::after { content: " \2192"; }
.wp-block-post-template.ph-case-list { display: grid; gap: 16px; }
.ph-case-card .wp-block-column > .is-style-panel { height: 100%; }
.ph-case-card .ph-industry-row { width: 100%; }

/* -------- Cover hero (image on the right, fading into black) -------- */
.ph-hero .wp-block-cover__image-background { object-position: right center; }

/* -------- Insight cards -------- */
.ph-insight-card .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; }
.ph-insight-card .wp-block-post-title a:hover { text-decoration: none; opacity: .85; }

/* -------- Team monogram -------- */
.ph-monogram {
	aspect-ratio: 4/5;
	display: flex !important;
	align-items: flex-end;
	background: radial-gradient(120% 80% at 70% 20%, #3a332b 0%, #0b0a08 70%);
	border-radius: 2px;
}

/* -------- Post navigation (single case study) -------- */
.ph-next a::after { content: " \203A"; }

/* -------- Footer -------- */
.ph-footer a:hover { color: #fff; }
.ph-footer .wp-block-list.is-style-plain li + li { margin-top: 10px; }

/* -------- Long-form body (case studies, posts) -------- */
.ph-prose > * + * { margin-block-start: 1.1em; }
.ph-prose h2 { margin-top: 1.8em; }

/* -------- Mobile -------- */
@media (max-width: 781px) {
	.ph-case-card .ph-case-media .wp-block-post-featured-image img { min-height: 220px; aspect-ratio: 16/10; }
	.ph-hide-mobile { display: none !important; }
	.wp-block-columns.is-style-divided > .wp-block-column + .wp-block-column {
		border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
		padding-top: 24px;
	}
}

/* -------- Layout fixes -------- */
/* Header, main and footer sit flush: no gap between top-level template blocks. */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Image heroes: content sits on the same 1200px grid as the header. */
.wp-block-cover.ph-hero {
	--ph-pad: var(--wp--style--root--padding-left, clamp(20px, 4.5vw, 64px));
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.wp-block-cover.ph-hero > .wp-block-cover__inner-container {
	box-sizing: border-box;
	width: 100% !important;
	flex: 1 1 100%;
	max-width: calc(var(--wp--style--global--wide-size, 1200px) + 2 * var(--ph-pad)) !important;
	margin: 0 auto !important;
	padding-left: var(--ph-pad);
	padding-right: var(--ph-pad);
}
.wp-block-cover.ph-hero > .wp-block-cover__inner-container > * {
	max-width: 760px;
	margin-left: 0 !important;
	margin-right: auto !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.wp-block-cover.ph-hero > .wp-block-cover__inner-container > .alignwide { max-width: none; }

/* Separators span their container unless the Short style is chosen. */
.wp-block-separator:not(.is-style-short):not(.is-style-dots) { width: 100%; }

/* Full-width page sections stack flush. */
.wp-block-post-content > .alignfull { margin-block: 0 !important; }

/* Home hero fills the screen below the sticky header. */
.wp-block-cover.ph-hero-full {
	--ph-header-h: 71px;
	min-height: calc(100vh - var(--ph-header-h) - var(--wp-admin--admin-bar--height, 0px)) !important;
	min-height: calc(100svh - var(--ph-header-h) - var(--wp-admin--admin-bar--height, 0px)) !important;
}
@media (max-width: 781px) {
	.wp-block-cover.ph-hero-full { --ph-header-h: 53px; }
}
