/*
Theme Name: Cllr Brooks
Theme URI: https://example.com/cllr-brooks/
Description: A clean civic child theme for Katie Brooks, Independent Borough Councillor for Roman Ward.
Author: Richard
Author URI: https://example.com/
Template: genesis
Version: 1.0.0
Text Domain: cllr-brooks
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--cb-navy: #17324d;
	--cb-navy-deep: #10263a;
	--cb-red: #a9343b;
	--cb-red-dark: #87272d;
	--cb-ink: #202830;
	--cb-muted: #5d6973;
	--cb-line: #dce2e6;
	--cb-soft: #f5f7f8;
	--cb-white: #fff;
	--cb-success: #30684c;
	--cb-width: 1220px;
	--cb-reading: 760px;
	--cb-radius: 8px;
	--cb-shadow: 0 14px 40px rgba(23, 50, 77, 0.08);
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--cb-white);
	color: var(--cb-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.68;
	-webkit-font-smoothing: antialiased;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--cb-navy);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover { color: var(--cb-red-dark); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid #e39b31;
	outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	color: var(--cb-navy-deep);
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 700;
	line-height: 1.16;
	letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.55rem, 6vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
p { margin: 0 0 1.3em; }
ul, ol { margin: 0 0 1.5em; }

.screen-reader-text,
.skip-link {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	top: 12px;
	left: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 18px;
	clip: auto;
	background: var(--cb-white);
	color: var(--cb-navy);
	font-weight: 700;
	white-space: normal;
	box-shadow: var(--cb-shadow);
}

.site-container { overflow: hidden; }
.wrap, .cb-wrap {
	width: min(calc(100% - 40px), var(--cb-width));
	margin-inline: auto;
}

.site-inner { max-width: none; padding: 0; }
.content-sidebar-wrap, .content { width: 100%; max-width: none; float: none; }
.sidebar { display: none; }

/* Deliberately replaces the Genesis Sample header and navigation. */
.site-header {
	position: relative;
	z-index: 20;
	padding: 0;
	background: rgba(255, 255, 255, 0.98);
	border-bottom: 1px solid var(--cb-line);
}

.cb-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 82px;
	gap: 30px;
}

.cb-brand { flex: 0 0 auto; line-height: 1.2; }
.cb-brand a { display: inline-flex; align-items: center; gap: 12px; color: var(--cb-navy-deep); text-decoration: none; }
.cb-brand-mark {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 2px solid var(--cb-red);
	border-radius: 50%;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.cb-brand-name { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.18rem; font-weight: 700; }
.cb-brand-role { display: block; margin-top: 2px; color: var(--cb-muted); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; }

.cb-menu { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.cb-menu a { color: var(--cb-ink); font-size: 0.88rem; font-weight: 700; text-decoration: none; }
.cb-menu a:hover { color: var(--cb-red-dark); }
.cb-menu .cb-menu-contact a { padding: 10px 16px; border: 1px solid var(--cb-navy); border-radius: 4px; }
.cb-menu-toggle { display: none; min-width: 46px; min-height: 46px; padding: 8px 12px; border: 1px solid var(--cb-line); border-radius: 4px; background: var(--cb-white); color: var(--cb-navy); font: inherit; font-weight: 700; }

.cb-section { padding: clamp(76px, 9vw, 132px) 0; }
.cb-section--soft { background: var(--cb-soft); }
.cb-section--dark { background: var(--cb-navy-deep); color: var(--cb-white); }
.cb-section--dark h2, .cb-section--dark h3 { color: var(--cb-white); }
.cb-section-header { max-width: 770px; margin-bottom: clamp(34px, 5vw, 58px); }
.cb-section-header p { margin-bottom: 0; color: var(--cb-muted); font-size: 1.08rem; }
.cb-section--dark .cb-section-header p { color: #d8e0e6; }
.cb-eyebrow {
	display: block;
	margin-bottom: 16px;
	color: var(--cb-red-dark);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	line-height: 1.3;
	text-transform: uppercase;
}
.cb-section--dark .cb-eyebrow { color: #f4afb3; }

.cb-hero { position: relative; padding: clamp(58px, 8vw, 110px) 0; background: linear-gradient(145deg, #fff 0%, #fff 58%, #f2f5f6 100%); }
.cb-hero::before { content: ""; position: absolute; top: 0; right: 0; width: 8px; height: 62%; background: var(--cb-red); }
.cb-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.72fr); align-items: center; gap: clamp(50px, 8vw, 105px); }
.cb-hero h1 { margin-bottom: 18px; }
.cb-hero-role { max-width: 680px; margin: 0 0 26px; color: var(--cb-navy); font-size: clamp(1.2rem, 2.5vw, 1.65rem); font-weight: 700; line-height: 1.35; }
.cb-hero-intro { max-width: 700px; margin-bottom: 34px; color: #48545e; font-size: 1.08rem; }
.cb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 13px 21px;
	border: 2px solid var(--cb-navy);
	border-radius: 4px;
	background: var(--cb-navy);
	color: var(--cb-white);
	font-size: 0.92rem;
	font-weight: 750;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
}
.cb-button:hover { border-color: var(--cb-navy-deep); background: var(--cb-navy-deep); color: var(--cb-white); }
.cb-button--secondary { background: transparent; color: var(--cb-navy); }
.cb-button--secondary:hover { color: var(--cb-white); }
.cb-button--light { border-color: var(--cb-white); background: var(--cb-white); color: var(--cb-navy-deep); }
.cb-button--light:hover { border-color: #e6edf1; background: #e6edf1; color: var(--cb-navy-deep); }
.cb-text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; }
.cb-text-link::after { content: "\2192"; transition: transform 160ms ease; }
.cb-text-link:hover::after { transform: translateX(3px); }

.cb-portrait-frame { position: relative; }
.cb-portrait-frame::before { content: ""; position: absolute; inset: -18px 18px 18px -18px; border: 1px solid #bcc7ce; border-radius: 4px; }
.cb-portrait { position: relative; z-index: 1; aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-radius: 4px; background: #dce4e8; box-shadow: var(--cb-shadow); }
.cb-image-placeholder { position: relative; z-index: 1; display: grid; place-items: center; aspect-ratio: 4 / 5; padding: 30px; border-radius: 4px; background: linear-gradient(160deg, #dce4e8, #eef2f4); color: var(--cb-navy); text-align: center; box-shadow: var(--cb-shadow); }
.cb-image-placeholder strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; }
.cb-image-placeholder span { display: block; margin-top: 8px; color: var(--cb-muted); font-size: 0.82rem; }

.cb-ward-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 0.8fr); gap: clamp(38px, 6vw, 72px); align-items: stretch; }
.cb-map { min-height: 470px; overflow: hidden; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: #e8edef; box-shadow: var(--cb-shadow); }
.cb-map img { width: 100%; height: 100%; min-height: 470px; object-fit: cover; }
.cb-map-placeholder { display: grid; place-items: center; min-height: 470px; padding: 40px; background: linear-gradient(135deg, #eef2f4 0 49%, #e3e9ec 49% 51%, #f5f7f8 51%); color: var(--cb-navy); text-align: center; }
.cb-map-placeholder strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; }
.cb-map-placeholder span { display: block; max-width: 330px; margin-top: 8px; color: var(--cb-muted); font-size: 0.9rem; }
.cb-ward-info { align-self: center; }
.cb-fact { padding: 20px 0; border-top: 1px solid var(--cb-line); }
.cb-fact:last-child { border-bottom: 1px solid var(--cb-line); }
.cb-fact dt { color: var(--cb-muted); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.cb-fact dd { margin: 4px 0 0; color: var(--cb-navy-deep); font-weight: 700; }
.cb-road-list { margin-top: 42px; border-top: 1px solid var(--cb-line); border-bottom: 1px solid var(--cb-line); }
.cb-road-list summary { cursor: pointer; padding: 22px 44px 22px 0; color: var(--cb-navy-deep); font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 700; }
.cb-road-content { padding: 0 0 26px; }
.cb-roads { columns: 3 220px; column-gap: 42px; margin: 0; padding-left: 20px; }
.cb-roads li { break-inside: avoid; margin-bottom: 6px; }

.cb-utility-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cb-utility-card { display: flex; flex-direction: column; min-height: 275px; padding: 28px; border: 1px solid var(--cb-line); border-top: 3px solid var(--cb-navy); border-radius: var(--cb-radius); background: var(--cb-white); }
.cb-utility-card h3 { margin-bottom: 10px; font-size: 1.35rem; }
.cb-authority { margin-bottom: 18px; color: var(--cb-muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.cb-utility-card p { font-size: 0.9rem; }
.cb-utility-card .cb-text-link { margin-top: auto; font-size: 0.88rem; }
.cb-external-note { margin-top: 28px; color: var(--cb-muted); font-size: 0.82rem; }

.cb-work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cb-work-card { position: relative; padding: 32px 30px 28px; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-white); box-shadow: 0 8px 24px rgba(23, 50, 77, 0.05); }
.cb-work-card::before { content: ""; position: absolute; top: -1px; left: 30px; width: 54px; height: 3px; background: var(--cb-red); }
.cb-label { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; color: var(--cb-navy); font-size: 0.71rem; font-weight: 850; letter-spacing: 0.08em; line-height: 1.3; text-transform: uppercase; }
.cb-label::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; }
.cb-work-card h3 { margin-bottom: 14px; }
.cb-work-card p { color: #4e5b65; font-size: 0.92rem; }
.cb-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--cb-line); color: var(--cb-muted); font-size: 0.76rem; }
.cb-demo { display: inline-block; margin-bottom: 14px; padding: 5px 8px; border: 1px solid #d7b8ba; border-radius: 3px; background: #fff6f6; color: #812d32; font-size: 0.65rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }

.cb-updates-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 42px; }
.cb-featured-update { overflow: hidden; border-bottom: 1px solid var(--cb-line); }
.cb-featured-update .cb-update-image { aspect-ratio: 16 / 9; margin-bottom: 25px; object-fit: cover; background: #e6ebee; }
.cb-featured-update h3 { font-size: clamp(1.7rem, 3vw, 2.45rem); }
.cb-update-list { display: grid; gap: 0; }
.cb-update-item { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--cb-line); }
.cb-update-item h3 { margin-bottom: 8px; font-size: 1.35rem; }
.cb-update-item p { margin-bottom: 10px; color: var(--cb-muted); font-size: 0.88rem; }
.cb-update-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-bottom: 12px; color: var(--cb-muted); font-size: 0.74rem; font-weight: 650; }
.cb-updates-footer { margin-top: 38px; }
.cb-empty-updates { padding: 35px; border: 1px dashed #b8c3ca; border-radius: var(--cb-radius); background: var(--cb-soft); }

.cb-about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(45px, 7vw, 92px); align-items: start; }
.cb-about-copy { max-width: var(--cb-reading); font-size: 1.06rem; }
.cb-about-rule { width: 70px; height: 3px; margin-top: 10px; background: var(--cb-red); }

.cb-contact-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 40px; padding: clamp(40px, 6vw, 70px); border-left: 4px solid var(--cb-red); background: var(--cb-navy-deep); color: var(--cb-white); }
.cb-contact-panel h2 { color: var(--cb-white); }
.cb-contact-panel p { max-width: 680px; margin-bottom: 0; color: #dce5eb; }

.site-footer { padding: 46px 0; border-top: 1px solid var(--cb-line); background: var(--cb-white); color: var(--cb-muted); font-size: 0.82rem; }
.cb-footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.cb-footer-name { color: var(--cb-navy-deep); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; font-weight: 700; }
.cb-footer-role { display: block; margin-top: 3px; }
.cb-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.cb-footer-links a { color: var(--cb-muted); }
.cb-copyright { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--cb-line); font-size: 0.74rem; }

/* Updates archive and single editorial layouts. */
.cb-page-hero { padding: clamp(55px, 8vw, 90px) 0 45px; border-bottom: 1px solid var(--cb-line); background: var(--cb-soft); }
.cb-page-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.cb-page-hero p { max-width: 680px; margin-bottom: 0; color: var(--cb-muted); }
.cb-archive { padding: 70px 0 110px; }
.cb-filter-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 46px; padding: 0; list-style: none; }
.cb-filter-list a { display: inline-block; padding: 8px 13px; border: 1px solid var(--cb-line); border-radius: 999px; color: var(--cb-ink); font-size: 0.78rem; font-weight: 700; text-decoration: none; }
.cb-filter-list a:hover, .cb-filter-list .is-current { border-color: var(--cb-navy); background: var(--cb-navy); color: var(--cb-white); }
.cb-archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 42px 26px; }
.cb-archive-card { border-bottom: 1px solid var(--cb-line); padding-bottom: 26px; }
.cb-archive-card img { width: 100%; aspect-ratio: 16 / 10; margin-bottom: 20px; object-fit: cover; background: var(--cb-soft); }
.cb-archive-card h2 { font-size: 1.45rem; }
.cb-archive-card p { color: var(--cb-muted); font-size: 0.9rem; }
.pagination { margin-top: 60px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pagination a, .pagination .active, .nav-links .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--cb-line); text-decoration: none; }
.pagination .active, .nav-links .current { border-color: var(--cb-navy); background: var(--cb-navy); color: var(--cb-white); }

.cb-single { padding: clamp(62px, 8vw, 105px) 0 120px; }
.cb-article-header, .cb-article-content, .cb-article-footer { width: min(calc(100% - 40px), var(--cb-reading)); margin-inline: auto; }
.cb-article-header { margin-bottom: 42px; }
.cb-article-header h1 { margin-top: 15px; font-size: clamp(2.45rem, 5.8vw, 4.4rem); }
.cb-article-image { width: min(calc(100% - 40px), 1040px); margin: 0 auto 52px; }
.cb-article-image img { width: 100%; max-height: 680px; object-fit: cover; }
.cb-article-content { font-size: 1.06rem; }
.cb-article-content > * + * { margin-top: 1.35em; }
.cb-article-content h2 { margin-top: 1.7em; font-size: 2rem; }
.cb-article-content h3 { margin-top: 1.5em; }
.cb-article-content blockquote { margin: 2em 0; padding: 10px 0 10px 28px; border-left: 3px solid var(--cb-red); color: var(--cb-navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; }
.cb-article-footer { margin-top: 54px; padding-top: 28px; border-top: 1px solid var(--cb-line); }
.cb-status-callout { margin: 2em 0; padding: 24px 26px; border-left: 3px solid var(--cb-red); background: var(--cb-soft); }
.cb-status-callout > :last-child { margin-bottom: 0; }
.cb-related { padding: 72px 0; background: var(--cb-soft); }
.cb-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.entry { margin: 0; padding: 0; }
.entry-title, .archive-title { word-wrap: break-word; }
.error404 .site-inner, .search .site-inner, .page:not(.home) .site-inner { padding: 70px 0 100px; }
.page:not(.home) .content, .error404 .content, .search .content { width: min(calc(100% - 40px), var(--cb-reading)); margin-inline: auto; }
.page:not(.home) .entry-content > * + * { margin-top: 1.2em; }

@media (max-width: 1050px) {
	.cb-utility-grid { grid-template-columns: repeat(2, 1fr); }
	.cb-work-grid, .cb-archive-grid { grid-template-columns: repeat(2, 1fr); }
	.cb-work-card:last-child { grid-column: span 2; }
}

@media (max-width: 820px) {
	body { font-size: 17px; }
	.cb-header-inner { min-height: 72px; }
	.cb-menu-toggle { display: inline-block; }
	.cb-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 15px 20px 22px; border-bottom: 1px solid var(--cb-line); background: var(--cb-white); box-shadow: 0 15px 24px rgba(23, 50, 77, 0.08); }
	.cb-nav.is-open { display: block; }
	.cb-menu { display: block; }
	.cb-menu li + li { border-top: 1px solid var(--cb-line); }
	.cb-menu a { display: block; padding: 13px 4px; }
	.cb-menu .cb-menu-contact a { margin-top: 8px; border: 0; border-radius: 0; }
	.cb-hero-grid, .cb-ward-grid, .cb-updates-layout, .cb-about-grid, .cb-contact-panel { grid-template-columns: 1fr; }
	.cb-hero-copy { order: 1; }
	.cb-hero-media { width: min(80%, 420px); margin-inline: auto; }
	.cb-map, .cb-map img, .cb-map-placeholder { min-height: 360px; }
	.cb-contact-panel { align-items: start; }
	.cb-contact-panel .cb-button { justify-self: start; }
	.cb-related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
	.wrap, .cb-wrap { width: min(calc(100% - 30px), var(--cb-width)); }
	.cb-brand-role { display: none; }
	.cb-brand-mark { width: 34px; height: 34px; }
	.cb-section { padding: 68px 0; }
	.cb-hero { padding: 48px 0 72px; }
	.cb-hero::before { width: 5px; height: 32%; }
	.cb-hero-grid { gap: 43px; }
	.cb-hero h1 { font-size: clamp(2.55rem, 16vw, 3.5rem); }
	.cb-actions { align-items: stretch; }
	.cb-actions .cb-button { width: 100%; }
	.cb-hero-media { width: min(88%, 360px); }
	.cb-map, .cb-map img, .cb-map-placeholder { min-height: 285px; }
	.cb-utility-grid, .cb-work-grid, .cb-archive-grid { grid-template-columns: 1fr; }
	.cb-work-card:last-child { grid-column: auto; }
	.cb-utility-card { min-height: 240px; }
	.cb-roads { columns: 1; }
	.cb-contact-panel { padding: 38px 26px; }
	.cb-footer-inner { display: block; }
	.cb-footer-links { justify-content: flex-start; margin-top: 26px; }
	.cb-archive-grid { gap: 32px; }
}
