/* =====================================================================
   KK — block styles, patterns & template-part treatments
   Loaded on the front end AND in the editor (add_editor_style) so the
   block editor matches the published page. Everything reads the
   --wp--preset--color--* variables so it flips with light/dark.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. HEADER (template part: parts/header.html)
   --------------------------------------------------------------------- */
/* Full-bleed bottom rule (the topbar group spans the viewport; the inner
   row is the centered 740px content column). */
.kk-topbar {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.kk-topbar-inner {
	padding-top: 1.75rem;
	padding-bottom: 1.75rem;
}

/* Logo (inline SVG, themed via currentColor + classes) */
.kk-logo { display: inline-flex; align-items: center; line-height: 0; }
.kk-logo svg { height: 46px; width: auto; display: block; }
.kk-logo .kk-logo-card   { stroke: var(--wp--preset--color--accent); fill: none; }
.kk-logo .kk-logo-slash  { stroke: var(--wp--preset--color--accent); }
.kk-logo .kk-logo-word   { fill: var(--wp--preset--color--contrast); }
.kk-logo .kk-logo-accent { fill: var(--wp--preset--color--accent); }
.kk-logo .kk-logo-sub    { fill: var(--wp--preset--color--accent); }

/* Top-right cluster: theme toggle + monogram link */
.kk-topbar-tools { gap: 0.85rem; }

/* Central monogram (kk/monogram block) — header avatar, bio portrait,
   author card all use this, sized via the --kk-mono-size variable. */
.kk-monogram {
	width: var(--kk-mono-size, 42px);
	height: var(--kk-mono-size, 42px);
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	overflow: hidden;
	background: var(--wp--preset--color--surface);
	border: 1.5px solid var(--wp--preset--color--accent-dim);
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-weight: 600;
	font-size: calc(var(--kk-mono-size, 42px) * 0.3);
	letter-spacing: 0;
	line-height: 1;
	text-decoration: none;
	transition: border-color .2s ease, transform .2s ease;
}
a.kk-monogram:hover { border-color: var(--wp--preset--color--accent); transform: scale(1.04); }
.kk-monogram img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------------------------
   2. FOOTER (template part: parts/footer.html)
   --------------------------------------------------------------------- */
.kk-footer {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: 3.5rem;
	padding-top: 2rem;
	padding-bottom: 5rem;
}
.kk-footer-link a,
.kk-footer-link,
.is-style-kk-link a,
.is-style-kk-link {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.78rem; font-weight: 500; letter-spacing: 0.03em;
	color: var(--wp--preset--color--accent);
	transition: opacity .2s ease;
}
.kk-footer-link a:hover, .is-style-kk-link a:hover { opacity: .7; }
.kk-site-credit, .kk-site-credit a {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--wp--preset--color--faint);
}

/* ---------------------------------------------------------------------
   3. PARAGRAPH STYLE VARIATIONS
   --------------------------------------------------------------------- */

/* Eyebrow — mono uppercase teal with a glowing dot */
.is-style-kk-eyebrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.6875rem !important; font-weight: 500;
	letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--wp--preset--color--accent) !important;
	line-height: 1.4;
}
.is-style-kk-eyebrow::before {
	content: ""; width: 6px; height: 6px; flex: none;
	background: var(--wp--preset--color--accent);
	border-radius: 50%;
	box-shadow: var(--kk-glow);
}

/* Lede — larger, muted intro paragraph */
.is-style-kk-lede {
	font-size: 1.13rem !important;
	color: var(--wp--preset--color--muted) !important;
	line-height: 1.7 !important;
	max-width: 600px;
}

/* Opening — serif italic statement that opens an article */
.is-style-kk-opening,
.is-style-kk-lead {
	font-family: var(--wp--preset--font-family--source-serif) !important;
	font-style: italic;
	font-size: 1.32rem !important;
	color: var(--wp--preset--color--contrast) !important;
	line-height: 1.65 !important;
}
.is-style-kk-lead { font-size: 1.22rem !important; line-height: 1.7 !important; }

/* Mono label / read-time */
.is-style-kk-mono {
	font-family: var(--wp--preset--font-family--jetbrains-mono) !important;
	font-size: 0.72rem !important; letter-spacing: 0.03em;
	color: var(--wp--preset--color--faint) !important;
}

/* ---------------------------------------------------------------------
   4. LIST — dash bullets (em-dash in accent)
   --------------------------------------------------------------------- */
.is-style-kk-dash {
	list-style: none;
	padding-left: 0;
	display: flex; flex-direction: column; gap: 0.6rem;
}
.is-style-kk-dash li {
	position: relative;
	padding-left: 1.4rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--faint);
	line-height: 1.6;
}
.is-style-kk-dash li::before {
	content: "—";
	position: absolute; left: 0; top: 0;
	color: var(--wp--preset--color--accent);
}
.is-style-kk-dash li strong { color: var(--wp--preset--color--muted); font-weight: 500; }

/* ---------------------------------------------------------------------
   5. QUOTE — pull statement (core/quote default is already the "pull")
   --------------------------------------------------------------------- */
.wp-block-quote {
	border-radius: 0 4px 4px 0;
	margin: 2.5rem 0;
}
.wp-block-quote p {
	font-family: var(--wp--preset--font-family--source-serif);
	font-style: italic;
	font-size: 1.32rem;
	color: var(--wp--preset--color--contrast);
	line-height: 1.55;
}
.wp-block-quote cite {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-style: normal; font-size: 0.72rem; letter-spacing: 0.04em;
	color: var(--wp--preset--color--faint);
}

/* Pullquote tidy-up */
.wp-block-pullquote {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 2.5rem 0;
}
.wp-block-pullquote p {
	font-family: var(--wp--preset--font-family--source-serif);
	font-style: italic; font-size: 1.6rem; line-height: 1.45;
	color: var(--wp--preset--color--contrast);
}

/* ---------------------------------------------------------------------
   6. GROUP — callout box (is-style-kk-callout)
   --------------------------------------------------------------------- */
.is-style-kk-callout {
	position: relative;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line-bright);
	border-radius: 4px;
	padding: 1.9rem 2.1rem !important;
	margin: 2.5rem 0;
	overflow: hidden;
}
.is-style-kk-callout::before {
	content: ""; position: absolute; top: 0; left: 0;
	width: 100%; height: 2px;
	background: linear-gradient(90deg, var(--wp--preset--color--accent), transparent);
}
.is-style-kk-callout p {
	font-size: 0.9rem !important;
	color: var(--wp--preset--color--muted) !important;
	line-height: 1.8 !important;
}
.is-style-kk-callout :where(h2, h3, h4, h5, h6) {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.68rem; font-weight: 500;
	letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.4rem;
}
.is-style-kk-callout .kk-callout-label,
.is-style-kk-callout .is-style-kk-callout-label,
.is-style-kk-callout-label {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.68rem !important; font-weight: 500;
	letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--wp--preset--color--accent) !important;
	line-height: 1.4 !important;
	margin-bottom: 0.65rem !important;
}

/* Generic card */
.is-style-kk-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: 1.6rem 1.8rem !important;
}

/* ---------------------------------------------------------------------
   7. SEPARATOR / DIVIDER
   --------------------------------------------------------------------- */
.wp-block-separator:not(.is-style-dots) {
	border: 0; height: 1px;
	background: var(--wp--preset--color--line);
	color: var(--wp--preset--color--line);
	opacity: 1; max-width: none;
	margin-block: 3.25rem;
}

/* ---------------------------------------------------------------------
   8. POST META — tag pill, date, terms
   --------------------------------------------------------------------- */
.wp-block-post-terms.is-style-kk-pill,
.is-style-kk-pill,
.is-style-kk-pill-muted {
	display: inline-block; margin: 0;
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.625rem; font-weight: 500;
	letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	border: 1px solid var(--wp--preset--color--accent-dim);
	padding: 4px 10px; border-radius: 2px; line-height: 1.4;
}
.is-style-kk-pill-muted {
	color: var(--wp--preset--color--muted);
	border-color: var(--wp--preset--color--line-bright);
}
.wp-block-post-terms.is-style-kk-pill a { color: inherit; }
.wp-block-post-terms.is-style-kk-pill a:hover { color: var(--wp--preset--color--accent); }

/* Meta row: tag + date together */
.kk-meta-row { gap: 1rem; align-items: center; }
.kk-meta-row .wp-block-post-date { color: var(--wp--preset--color--faint); font-size: 0.78rem; }

/* ---------------------------------------------------------------------
   9. AUTHOR SIGNATURE (single.html)
   --------------------------------------------------------------------- */
.kk-author-sig { gap: 1rem; align-items: center; margin-top: 3.25rem; }
.kk-author-sig .wp-block-avatar img,
.kk-author-sig .wp-block-avatar {
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--accent-dim);
	background: var(--wp--preset--color--surface);
}
.kk-author-name {
	font-size: 0.84rem; font-weight: 600;
	color: var(--wp--preset--color--contrast) !important;
	line-height: 1.3;
}
.kk-author-role {
	font-size: 0.75rem;
	color: var(--wp--preset--color--faint) !important;
	margin-top: 2px;
}

/* ---------------------------------------------------------------------
   11. SERVICES (pattern: service rows)
   --------------------------------------------------------------------- */
/* "Service row" = a Columns block style. It styles its own descendants, so the
   number / title / description inside need no manual CSS classes. */
.is-style-kk-service-row {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 2.5rem !important;
	padding-bottom: 2.5rem !important;
}
.is-style-kk-service-row:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
/* number (first, narrow column) */
.is-style-kk-service-row > .wp-block-column:first-child p {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.78rem; color: var(--wp--preset--color--accent) !important;
	line-height: 1.5;
}
.is-style-kk-service-row > .wp-block-column:first-child p :where(span, em) {
	color: var(--wp--preset--color--faint) !important; font-style: normal; font-family: inherit;
}
/* title */
.is-style-kk-service-row h3 {
	font-size: 1.3125rem !important; font-weight: 600;
	margin-bottom: 0.5rem !important;
}
/* description = the content column's own paragraph (not the pills/list) */
.is-style-kk-service-row > .wp-block-column:last-child > p {
	font-size: 0.9rem !important;
	color: var(--wp--preset--color--muted) !important;
	line-height: 1.8 !important;
}
/* pills row = a flex group of pill paragraphs */
.is-style-kk-service-row > .wp-block-column:last-child > .wp-block-group {
	gap: 6px; margin-bottom: 1rem;
}

/* ---------------------------------------------------------------------
   12. ABOUT (bio hero + track grid)
   --------------------------------------------------------------------- */
/* "Bio hero" group style — monogram beside name + role. */
.is-style-kk-bio-hero {
	gap: 1.75rem; align-items: center;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-bottom: 3rem; margin-bottom: 3rem;
}
.is-style-kk-bio-hero h1 { font-size: clamp(26px, 4vw, 36px) !important; margin-bottom: 0.5rem !important; }
.is-style-kk-bio-hero p { color: var(--wp--preset--color--accent) !important; font-size: 0.88rem !important; }

/* "Bio story" group style — narrower 700px column, quieter in-body H2s. */
.is-style-kk-bio-story { max-width: 700px; }
.is-style-kk-bio-story h2 {
	font-size: 1.375rem !important;
	line-height: 1.3 !important;
	margin: 2.75rem 0 1rem !important;
}

/* "Verticals" group style — a section label + a hairline 2-col grid, every
   inner block styled by position so none of them needs a manual class. */
.is-style-kk-verticals > p:first-child {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--wp--preset--color--faint) !important;
	margin-bottom: 1.25rem !important;
}
.is-style-kk-verticals > .wp-block-group {
	gap: 1px !important;
	background: var(--wp--preset--color--line);
	border: 1px solid var(--wp--preset--color--line);
}
.is-style-kk-verticals > .wp-block-group > .wp-block-group {
	background: var(--wp--preset--color--base);
	padding: 1.1rem 1.25rem !important;
}
.is-style-kk-verticals > .wp-block-group > .wp-block-group > p:first-child {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: 0.84rem !important; font-weight: 600;
	color: var(--wp--preset--color--contrast) !important;
	margin-bottom: 4px !important; line-height: 1.3;
}
.is-style-kk-verticals > .wp-block-group > .wp-block-group > p:last-child {
	font-size: 0.69rem !important;
	color: var(--wp--preset--color--faint) !important;
	line-height: 1.5 !important;
}

/* ---------------------------------------------------------------------
   13. HOMEPAGE / ARCHIVE — Query Loop styled as a timeline
   --------------------------------------------------------------------- */
/* "Page header" group style (also matches the legacy .kk-page-head used by the
   archive/search templates). */
.kk-page-head,
.is-style-kk-page-head {
	padding-top: 4rem; padding-bottom: 0.5rem;
}
/* Page titles (Services / About / Home / archive) — larger than post titles. */
.kk-page-head h1, .kk-page-head .wp-block-post-title,
.is-style-kk-page-head h1, .is-style-kk-page-head .wp-block-post-title {
	font-size: clamp(30px, 5vw, 44px) !important;
	line-height: 1.12;
	letter-spacing: -0.02em;
}
.kk-page-sub,
.is-style-kk-subtitle {
	color: var(--wp--preset--color--muted) !important;
	max-width: 560px; line-height: 1.7 !important;
}

.wp-block-post-template.is-style-kk-timeline {
	list-style: none; margin: 0; padding: 0; gap: 0;
}
.is-style-kk-timeline > li.wp-block-post {
	position: relative;
	margin: 0; padding: 0 0 2.5rem 2rem;
	border-left: 1px solid var(--wp--preset--color--line);
}
.is-style-kk-timeline > li.wp-block-post:last-child { border-left-color: transparent; padding-bottom: 0.5rem; }
.is-style-kk-timeline > li.wp-block-post::before {
	content: ""; position: absolute; left: -5px; top: 7px;
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--wp--preset--color--accent);
	box-shadow: var(--kk-glow);
}
.is-style-kk-timeline .wp-block-post-date {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.7rem; letter-spacing: 0.04em;
	color: var(--wp--preset--color--faint) !important;
	margin-bottom: 0.5rem !important;
}
.is-style-kk-timeline .wp-block-post-title { margin: 0.3rem 0 0.5rem !important; }
.is-style-kk-timeline .wp-block-post-title a {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: 1.3rem; font-weight: 600; line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--contrast);
	transition: color .2s ease;
}
.is-style-kk-timeline .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.is-style-kk-timeline .wp-block-post-excerpt {
	font-size: 0.9rem !important;
	color: var(--wp--preset--color--muted) !important;
	line-height: 1.75 !important; margin-top: 0.4rem !important;
}
.is-style-kk-timeline .wp-block-post-excerpt a,
.is-style-kk-timeline .wp-block-read-more {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.72rem; color: var(--wp--preset--color--accent);
	text-decoration: none; display: inline-block; margin-top: 0.5rem;
}

/* Search results — a plain list (no timeline, since results include pages). */
.kk-result-list { list-style: none; margin: 0; padding: 0; }
.kk-result-list > li.wp-block-post {
	margin: 0; padding: 1.5rem 0;
	border-top: 1px solid var(--wp--preset--color--line);
}
.kk-result-title { margin: 0 0 0.4rem !important; }
.kk-result-title a {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: 1.18rem; font-weight: 600; line-height: 1.3;
	color: var(--wp--preset--color--contrast);
	transition: color .2s ease;
}
.kk-result-title a:hover { color: var(--wp--preset--color--accent); }
.kk-result .wp-block-post-excerpt { font-size: 0.9rem !important; color: var(--wp--preset--color--muted) !important; line-height: 1.7 !important; }

/* Pagination */
.wp-block-query-pagination {
	margin-top: 3.5rem; gap: 1rem;
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 1.5rem;
}
.wp-block-query-pagination a,
.wp-block-query-pagination .wp-block-query-pagination-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 0.74rem; letter-spacing: 0.03em;
	color: var(--wp--preset--color--faint);
}
.wp-block-query-pagination a:hover { color: var(--wp--preset--color--accent); }
.wp-block-query-pagination .page-numbers.current { color: var(--wp--preset--color--accent); }

/* ---------------------------------------------------------------------
   14. SINGLE POST polish
   --------------------------------------------------------------------- */
.kk-post-header { padding-top: 4rem; padding-bottom: 0; }
.kk-post-title { margin-bottom: 1.4rem !important; }
.kk-post-content { padding-top: 2.25rem; }
.kk-post-content > * { margin-block: 1.4rem; }
.kk-post-content > h2 { margin-top: 3.25rem !important; margin-bottom: 1rem !important; }
.kk-read-time-row {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: 2.25rem; padding-top: 1.1rem;
}

/* ---------------------------------------------------------------------
   15. Comments (kept on-brand but quiet)
   --------------------------------------------------------------------- */
.wp-block-comments { margin-top: 3.5rem; }
.wp-block-comment-author-name a, .wp-block-comment-author-name { color: var(--wp--preset--color--contrast); }
.wp-block-comment-date, .wp-block-comment-date a { color: var(--wp--preset--color--faint); }

/* ---------------------------------------------------------------------
   16. Responsive
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
	.kk-service-row .wp-block-column:first-child { margin-bottom: 0.5rem; }
	.kk-bio-hero { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
	.kk-footer { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
}
