/*
 * Styles for page and post content (blocks). Loaded on the site and inside the editor.
 * Colors, fonts and sizes come from theme.json presets.
 */

@font-face {
	font-family: "Playfair Display";
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Playfair Display";
	font-style: italic;
	font-weight: 400 900;
	font-display: swap;
	src: url("../fonts/playfair-display-latin-wght-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Work Sans";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/work-sans-latin-wght-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Work Sans";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/work-sans-latin-wght-italic.woff2") format("woff2");
}

/* Eyebrow: gold rule + small uppercase label. */
.is-style-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.75rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
}
.is-style-eyebrow::before,
.is-style-eyebrow.has-text-align-center::after {
	content: "";
	flex: 0 0 2.5rem;
	height: 1px;
	background-color: #b8923f;
}
.is-style-eyebrow.has-text-align-center {
	justify-content: center;
}

/* Halftone dot texture. */
.is-style-halftone {
	position: relative;
}
.is-style-halftone::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image: radial-gradient(rgba(251, 248, 242, 0.08) 1px, transparent 1.5px);
	background-size: 7px 7px;
}
.is-style-halftone.has-cream-background-color::before,
.is-style-halftone.has-ivory-background-color::before {
	background-image: radial-gradient(rgba(22, 34, 62, 0.06) 1px, transparent 1.5px);
}
.is-style-halftone > * {
	position: relative;
	z-index: 1;
}

/* Short gold rule under headings. */
.wp-block-separator.kr-rule {
	width: 4rem;
	height: 1px;
	margin-left: 0;
	border: 0;
}

/* Text links like "All Communities →". */
.kr-arrow-link a {
	text-decoration: none;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: inherit;
}
.kr-arrow-link a::after {
	content: " →";
}
.wp-block-cover .kr-arrow-link {
	color: #d3b36c;
}

/* Cards lift on hover. */
.kr-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.kr-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 28px 56px -24px rgba(22, 34, 62, 0.45);
}

/* Headshot with offset gold frame. */
.kr-framed {
	position: relative;
}
.kr-framed::before {
	content: "";
	position: absolute;
	inset: 0;
	transform: translate(-1rem, -1rem);
	border: 1px solid rgba(184, 146, 63, 0.5);
	pointer-events: none;
	z-index: 0;
}
.kr-framed > *,
.kr-framed img {
	position: relative;
	z-index: 1;
}

/* Lists with gold check icons. */
.kr-checks {
	list-style: none;
	padding-left: 0;
}
.kr-checks li {
	position: relative;
	padding-left: 2rem;
}
.kr-checks li + li {
	margin-top: 0.85rem;
}
.kr-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.25rem;
	height: 1.25rem;
	background-color: #b8923f;
	-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' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%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' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (min-width: 640px) {
	.kr-checks-2col {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1.25rem;
	}
	.kr-checks-2col li + li {
		margin-top: 0;
	}
}

/* Numbered process steps (Buyers / Sellers). */
.kr-steps {
	margin-top: 4rem;
}
.kr-step {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	border-top: 1px solid rgba(22, 34, 62, 0.1);
	padding: 2.5rem 0;
}
.kr-step > * {
	margin: 0;
}
.kr-step-number {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 3.75rem;
	line-height: 1;
	color: rgba(184, 146, 63, 0.4);
}
.kr-step-body {
	max-width: 42rem;
}
.kr-step-body > * + * {
	margin-top: 1rem;
}
@media (min-width: 768px) {
	.kr-step {
		flex-direction: row;
		align-items: flex-start;
		gap: 3rem;
	}
	.kr-step-number {
		flex: 0 0 10rem;
		font-size: 6rem;
	}
}

/* FAQ accordion. */
.wp-block-details.kr-faq {
	border-bottom: 1px solid rgba(22, 34, 62, 0.1);
	padding: 0;
}
.wp-block-details.kr-faq summary {
	position: relative;
	padding: 1.5rem 2rem 1.5rem 0;
	cursor: pointer;
	list-style: none;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.25rem;
	color: #16223e;
	transition: color 0.2s ease;
}
.wp-block-details.kr-faq summary::-webkit-details-marker {
	display: none;
}
.wp-block-details.kr-faq summary::after {
	content: "";
	position: absolute;
	right: 0;
	top: 50%;
	width: 1rem;
	height: 1rem;
	margin-top: -0.5rem;
	background-color: currentColor;
	transition: transform 0.2s ease;
	-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'%3E%3Cpath d='m6 9 6 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'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-details.kr-faq[open] summary::after {
	transform: rotate(180deg);
}
.wp-block-details.kr-faq summary:hover {
	color: #96742c;
}
.wp-block-details.kr-faq > p {
	margin: 0 0 1.5rem;
	line-height: 1.625;
}

/* Lead form card placeholder (until a forms plugin is installed). */
.kr-form-card {
	border: 1px solid rgba(22, 34, 62, 0.1);
	padding: 2rem;
}
@media (min-width: 768px) {
	.kr-form-card {
		padding: 2.5rem;
	}
}

/* Navy aside on community pages. */
.kr-aside {
	padding: 2rem;
}
.kr-aside .wp-block-buttons {
	gap: 1rem;
}
.kr-aside .wp-block-button,
.kr-aside .wp-block-button__link {
	width: 100%;
	text-align: center;
}

/* Community intro paragraph. */
.kr-lede {
	font-family: var(--wp--preset--font-family--serif);
	line-height: 1.625;
}

/* Contact page labels and map. */
.kr-label {
	display: inline-block;
	font-size: 0.6875rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(32, 28, 22, 0.5);
}
.kr-contact a {
	color: #16223e;
	text-decoration: none;
}
.kr-contact a:hover {
	color: #96742c;
}
.kr-map {
	display: block;
	width: 100%;
	height: 420px;
	border: 1px solid rgba(22, 34, 62, 0.1);
}

/* Reviews row on the imported Home page. */
.kr-reviews {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 1rem;
}
.kr-reviews > * {
	flex: 0 0 min(380px, 85vw);
	scroll-snap-align: start;
}

/* Blog post body. */
.kr-entry.is-article > h2 {
	margin-top: 3rem;
	font-size: 1.5rem;
}
.kr-entry.is-article > p {
	margin-top: 1.5rem;
	font-size: 1.125rem;
	line-height: 1.625;
	color: rgba(32, 28, 22, 0.8);
}
@media (min-width: 768px) {
	.kr-entry.is-article > h2 {
		font-size: 1.875rem;
	}
}

/* Links inside running text stay underlined (theme.json turns underlines off for buttons and menus). */
.kr-entry p a:not(.wp-element-button),
.kr-entry li a,
.kr-widget p a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.kr-entry p.kr-arrow-link a:not(.wp-element-button),
.kr-entry .kr-contact p a:not(.wp-element-button) {
	text-decoration: none;
}

/* Community guide: "at a glance" facts, section headings, sources. */
.kr-glance {
	list-style: none;
	padding-left: 0;
}
.kr-glance li {
	padding: 1rem 0;
	border-bottom: 1px solid rgba(22, 34, 62, 0.1);
	line-height: 1.6;
	color: rgba(32, 28, 22, 0.8);
}
.kr-glance li:first-child {
	border-top: 1px solid rgba(22, 34, 62, 0.1);
}
.kr-glance strong {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #96742c;
}
.kr-guide .kr-guide-heading {
	margin-top: 3.5rem;
}
.kr-sources-box {
	margin-top: 3.5rem;
	padding: 1.75rem 2rem;
	border: 1px solid rgba(22, 34, 62, 0.1);
	background-color: #fbf8f2;
}
.kr-sources {
	padding-left: 1.1rem;
}
.kr-sources li + li {
	margin-top: 0.4rem;
}
.kr-entry .kr-sources a {
	color: #96742c;
}

/* Three-up info cards (Buyers, About). */
.kr-info-cards {
	margin-top: 3rem;
}
.kr-info-cards > .wp-block-column {
	padding: 2rem;
	border: 1px solid rgba(22, 34, 62, 0.1);
	background-color: #fbf8f2;
}
.has-white-background-color .kr-info-cards > .wp-block-column {
	background-color: #fbf8f2;
}
.has-cream-background-color .kr-info-cards > .wp-block-column,
.wp-block-group:not(.has-background) .kr-info-cards > .wp-block-column {
	background-color: #fff;
}

/* Tables on guide pages and the Communities index. */
.wp-block-table.kr-table {
	margin: 1.75rem 0;
	overflow-x: auto;
}
.wp-block-table.kr-table table {
	width: 100%;
	min-width: 32rem;
	border-collapse: collapse;
	font-size: 0.9375rem;
	line-height: 1.5;
	background-color: #fff;
}
.wp-block-table.kr-table th,
.wp-block-table.kr-table td {
	padding: 0.85rem 1rem;
	border: 1px solid rgba(22, 34, 62, 0.12);
	text-align: left;
	vertical-align: top;
}
.wp-block-table.kr-table thead th {
	background-color: #16223e;
	color: #fbf8f2;
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
}
.wp-block-table.kr-table tbody tr:nth-child(even) td {
	background-color: #fbf8f2;
}
.wp-block-table.kr-table thead {
	border-bottom: 0;
}

/* Numbered steps on guide pages. */
ol.kr-steps-list {
	counter-reset: kr-step;
	list-style: none;
	padding-left: 0;
	margin: 1.75rem 0;
}
ol.kr-steps-list > li {
	counter-increment: kr-step;
	position: relative;
	padding: 0 0 1.25rem 3.25rem;
	line-height: 1.65;
}
ol.kr-steps-list > li::before {
	content: counter(kr-step);
	position: absolute;
	left: 0;
	top: -0.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid #b8923f;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 1rem;
	color: #96742c;
}

/* Guide body: readable width, section headings. */
.kr-guide-body .kr-guide-heading {
	margin-top: 3rem;
	margin-bottom: 1rem;
}
.kr-guide-body > .kr-guide-heading:first-child {
	margin-top: 0;
}
.kr-guide-body ul.wp-block-list:not(.kr-checks) li + li {
	margin-top: 0.5rem;
}
