/*
 * Purpose House theme styles.
 * Colours, fonts and sizes live in theme.json. This file holds the
 * component styles behind the block styles listed in functions.php.
 */

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull,
.wp-block-post-content > .wp-block-group.alignfull { margin-block-start: 0; margin-block-end: 0; }
:where(h1, h2, h3, h4) { margin-block: 0; }
[id] { scroll-margin-top: 24px; }
img { max-width: 100%; height: auto; }

/* ---------- Sections ---------- */
.is-style-ph-inset { padding-left: clamp(12px, 2vw, 24px) !important; padding-right: clamp(12px, 2vw, 24px) !important; }

.is-style-ph-panel-dark,
.is-style-ph-panel-light,
.is-style-ph-panel-purple { border-radius: 28px; }

.is-style-ph-panel-dark {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--soft);
	padding: clamp(64px, 8vw, 96px) clamp(20px, 4vw, 40px);
}
.is-style-ph-panel-light {
	background: var(--wp--preset--color--mist);
	padding: clamp(64px, 8vw, 104px) clamp(20px, 4vw, 40px);
}
.is-style-ph-panel-purple {
	background: var(--wp--preset--color--primary);
	color: rgba(255, 255, 255, 0.9);
	padding: clamp(48px, 6vw, 80px) clamp(28px, 5vw, 72px);
}
.is-style-ph-panel-dark :is(h1, h2, h3, h4),
.is-style-ph-panel-purple :is(h1, h2, h3, h4) { color: var(--wp--preset--color--white); }
.is-style-ph-panel-purple p { font-size: var(--wp--preset--font-size--large); }

/* Page hero (light panel at the top of inner pages) */
.ph-page-hero h1 { max-width: 860px; }
.ph-page-hero p:not(.is-style-ph-eyebrow) { max-width: 640px; line-height: 1.7; }

/* Centred section intro */
.ph-intro { text-align: center; }

/* ---------- Text styles ---------- */
.is-style-ph-eyebrow {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	font-size: 12px !important;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	line-height: 1.4;
}
.is-style-ph-panel-dark .is-style-ph-eyebrow { color: var(--wp--preset--color--lavender); }

.is-style-ph-pill {
	display: inline-block;
	width: fit-content;
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: #FFFFFF;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	font-size: 12px !important;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.4;
}

.is-style-ph-step-number {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 800;
	font-size: 40px !important;
	line-height: 1;
	color: var(--wp--preset--color--lavender);
}

.is-style-ph-quote {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
	font-size: 21px !important;
	line-height: 1.55;
	color: #FFFFFF;
}

.is-style-ph-avatar,
.is-style-ph-avatar-light {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	font-size: 16px !important;
	line-height: 1;
	background: var(--wp--preset--color--primary);
	color: #FFFFFF;
}
.is-style-ph-avatar-light { background: #FFFFFF; color: var(--wp--preset--color--ink); }

.ph-strong { font-family: var(--wp--preset--font-family--montserrat); font-weight: 700; color: var(--wp--preset--color--ink); }
.is-style-ph-panel-dark .ph-strong,
.ph-footer .ph-strong { color: #FFFFFF; }
.ph-card-link { font-family: var(--wp--preset--font-family--montserrat); font-weight: 700; font-size: 15px; }
.ph-note { font-family: var(--wp--preset--font-family--montserrat); font-weight: 600; color: var(--wp--preset--color--lilac); }

/* ---------- Cards ---------- */
.is-style-ph-card {
	background: var(--wp--preset--color--mist);
	border: 1px solid var(--wp--preset--color--lilac);
	border-radius: 24px;
	padding: 36px 32px;
}
.is-style-ph-card-dark {
	background: var(--wp--preset--color--ink-soft);
	color: var(--wp--preset--color--soft);
	border-radius: 20px;
	padding: 28px;
}
.is-style-ph-card-dark :is(h2, h3, h4) { color: #FFFFFF; }
.is-style-ph-card-dark h3 { font-size: 20px; }
.is-style-ph-card-white {
	background: #FFFFFF;
	border: 1px solid var(--wp--preset--color--lilac);
	border-radius: 20px;
	padding: 28px 24px;
}
.is-style-ph-card-purple {
	background: var(--wp--preset--color--primary);
	color: rgba(255, 255, 255, 0.88);
	border-radius: 20px;
	padding: 28px 24px;
}
.is-style-ph-card-purple .ph-strong { color: #FFFFFF; }
.is-style-ph-card-raised {
	background: #FFFFFF;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 28px;
	box-shadow: 0 18px 50px rgba(20, 17, 24, 0.06);
	padding: clamp(28px, 4vw, 52px);
}

/* Push the last item (link or person) to the bottom of equal-height cards */
.is-style-ph-card > .ph-card-link:last-child,
.ph-testimonial .ph-cite { margin-top: auto; }
.ph-testimonial { padding: 40px; border-radius: 22px; }

/* ---------- Images ---------- */
.wp-block-image.is-style-ph-icon { margin: 0; }
.wp-block-image.is-style-ph-icon img {
	width: 60px;
	height: 60px;
	border-radius: 18px;
	box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}
.wp-block-image.ph-quote-mark { margin: 0; }
.wp-block-image.ph-quote-mark img { width: 36px; height: 36px; }
.wp-block-image.ph-inline-icon { margin: 2px 0 0; flex: none; }
.wp-block-image.ph-inline-icon img { width: 20px; height: 20px; }

.wp-block-image.is-style-ph-photo {
	margin: 0;
	border-radius: 22px;
	overflow: hidden;
	background: #F1EAFE;
}
.wp-block-image.is-style-ph-photo img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 440px;
	object-fit: cover;
}

.ph-mosaic { gap: 14px; }
.ph-mosaic > .wp-block-image {
	margin: 0;
	border-radius: 22px;
	overflow: hidden;
	background: #F1EAFE;
	min-height: 213px;
}
.ph-mosaic > .wp-block-image:first-child { grid-row: span 2; min-height: 440px; }
.ph-mosaic > .wp-block-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Lists ---------- */
.wp-block-list.is-style-ph-checks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px 24px;
}
.wp-block-list.is-style-ph-checks li { position: relative; padding-left: 28px; }
.wp-block-list.is-style-ph-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	width: 18px;
	height: 18px;
	background: var(--wp--preset--color--primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ph-checks-box { padding: 24px; border-radius: 20px; background: var(--wp--preset--color--mist); border: 1px solid var(--wp--preset--color--lilac); }
.ph-checks-box h3 { font-size: 16px; }

/* ---------- Buttons ---------- */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.wp-block-button:not(.is-style-outline):not(.is-style-ph-outline-light):not(.ph-nav-cta) .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1.5px solid var(--wp--preset--color--ink);
	padding: 13.5px 26.5px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: #FFFFFF; }
.wp-block-button.is-style-ph-outline-light > .wp-block-button__link {
	background: transparent;
	color: #FFFFFF;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	padding: 13.5px 26.5px;
}
.wp-block-button.is-style-ph-outline-light > .wp-block-button__link:hover { background: #FFFFFF; color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-ph-white > .wp-block-button__link { background: #FFFFFF; color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-ph-white > .wp-block-button__link:hover { background: var(--wp--preset--color--mist); color: var(--wp--preset--color--ink); }
.wp-block-button.ph-nav-cta > .wp-block-button__link { min-height: 44px; padding: 10px 22px; white-space: nowrap; }

/* ---------- FAQ (Details block) ---------- */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding: 4px 0; margin: 0 !important; }
.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 20px 0;
	list-style: none;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	font-size: 18px;
	color: var(--wp--preset--color--ink);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background: var(--wp--preset--color--primary);
	transition: transform 0.2s;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin: 0 0 22px; max-width: 760px; }

/* ---------- Home hero (Cover block) ---------- */
.wp-block-cover.ph-hero {
	border-radius: 28px;
	overflow: hidden;
	min-height: 0;
	padding: clamp(64px, 8vw, 96px) clamp(20px, 4vw, 40px);
	background-color: #2B2433;
}
.ph-hero .wp-block-cover__image-background { object-position: center 60%; }
.ph-hero-copy { max-width: 640px; }
.ph-hero h1 { color: #FFFFFF; font-size: var(--wp--preset--font-size--hero); line-height: 1.06; letter-spacing: -0.025em; }
.ph-hero p:not(.is-style-ph-pill) { max-width: 560px; font-size: 18px; line-height: 1.7; color: rgba(255, 255, 255, 0.88); }

/* ---------- Bridge diagram ---------- */
.ph-bridge > .wp-block-group { flex: 1 1 200px; min-width: 0; text-align: center; }
.ph-bridge .ph-strong { font-size: 19px; }
.ph-bridge-arrow { margin: 0; flex: none; }
.ph-bridge-arrow img { width: 28px; height: 28px; }
.ph-caps { font-family: var(--wp--preset--font-family--montserrat); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--muted); }

/* ---------- Contact ---------- */
.ph-contact .wp-block-column > .wp-block-group { height: 100%; box-sizing: border-box; }
.ph-contact .is-style-ph-panel-light { padding: clamp(36px, 5vw, 64px); }
.ph-contact-info { border-top: 1px solid #DDD3F5; padding-top: 28px; width: 100%; }
.ph-contact-info strong { font-family: var(--wp--preset--font-family--montserrat); color: var(--wp--preset--color--ink); }

/* Jetpack form */
.ph-contact .wp-block-jetpack-contact-form label,
.ph-contact .grunion-field-label {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 600;
	font-size: 14px;
	color: var(--wp--preset--color--ink);
}
.ph-contact .wp-block-jetpack-contact-form :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #D9D3E2;
	border-radius: 12px;
	background: #FFFFFF;
	font: inherit;
	font-size: 16px;
	color: var(--wp--preset--color--ink);
}
.ph-contact .wp-block-jetpack-contact-form :is(input, select, textarea):focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}

/* ---------- Header ---------- */
.ph-header { background: #FFFFFF; border-bottom: 1px solid #EEEAF2; }
.ph-header-row { padding-top: 18px; padding-bottom: 18px; }
.ph-logo { margin: 0; flex: none; }
.ph-logo img { width: 41px; height: auto; display: block; }
.ph-brand .wp-block-site-title a:hover { color: var(--wp--preset--color--primary); }
.ph-header .wp-block-navigation__responsive-container-open {
	width: 44px;
	height: 44px;
	border: 1px solid #E2DDE8;
	border-radius: 50%;
	justify-content: center;
	align-items: center;
}
.ph-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px clamp(20px, 4vw, 40px);
	background: #FFFFFF;
}
.ph-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 20px; }
.ph-header .wp-block-navigation .current-menu-item > a,
.ph-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--primary); }
.ph-brand .wp-block-site-title { white-space: nowrap; }
.ph-header .wp-block-navigation__container { flex-wrap: nowrap; }
.ph-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.ph-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start; }
.ph-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { width: 100%; gap: 0; }
.ph-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	padding: 14px 0;
	border-bottom: 1px solid #EEEAF2;
}
/* Use the menu button below 900px so the links never wrap */
@media (min-width: 600px) and (max-width: 899px) {
	.ph-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.ph-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
@media (max-width: 899px) {
	.ph-header-actions { gap: 8px !important; }
	.ph-header-actions .wp-block-navigation { order: 2; }
	.ph-brand .wp-block-site-tagline { display: none; }
}
@media (max-width: 599px) {
	.ph-header .ph-nav-cta > .wp-block-button__link { padding: 10px 16px; font-size: 14px; }
	.ph-testimonial { padding: 28px; }
	.is-style-ph-quote { font-size: 19px !important; }
	.is-style-ph-card { padding: 28px 24px; }
}


/* ---------- Footer ---------- */
.ph-footer { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--soft); }
.ph-footer a { color: var(--wp--preset--color--soft); }
.ph-footer a:hover { color: #FFFFFF; }
.ph-footer .ph-logo img { width: 48px; }
.ph-footer-label { font-family: var(--wp--preset--font-family--montserrat); font-weight: 700; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #FFFFFF; }
.ph-footer-links p { margin: 0; font-size: 15px; }
.ph-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 24px; font-size: 14px; color: #A8A1B3; }

/* ---------- Blog ---------- */
.ph-post-card { padding: 0 !important; overflow: hidden; height: 100%; }
.ph-post-card .wp-block-post-featured-image { margin: 0; }
.ph-post-card .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.ph-post-card-body { padding: 28px; }
.ph-post-card h2 { font-size: 21px; line-height: 1.3; letter-spacing: 0; }
.ph-back-link { font-family: var(--wp--preset--font-family--montserrat); font-weight: 700; font-size: 14px; }
.ph-article p, .ph-article li { font-size: 17px; line-height: 1.8; }
.ph-article h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; margin-top: 44px; }
.ph-article h3 { margin-top: 28px; }
.ph-article strong { color: var(--wp--preset--color--ink); }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.wp-block-image.is-style-ph-photo img { min-height: 300px; }
	.ph-mosaic > .wp-block-image:first-child { min-height: 300px; }
	.ph-mosaic > .wp-block-image { min-height: 143px; }
	.ph-hero .wp-block-cover__background {
		background: linear-gradient(180deg, rgba(20, 17, 24, 0.55) 0%, rgba(20, 17, 24, 0.78) 100%) !important;
	}
	.ph-bridge { flex-direction: column; }
	.ph-bridge > .wp-block-group { flex: none; width: 100%; }
	.ph-bridge-arrow { transform: rotate(90deg); }
}

/* ---------- Layout helpers ---------- */
.is-style-ph-panel-purple > .ph-cta-text { flex: 1 1 420px; min-width: 0; }
.ph-footer-brand { flex: 1 1 320px; max-width: 380px; }
.ph-form h2 { font-size: clamp(26px, 3vw, 34px); }
.ph-contact h1 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.1; }
.ph-service-row h2 { line-height: 1.12; }
