/*
Theme Name: PSC Theme
Theme URI: https://example.com/
Author: Your team
Description: A calm, highly readable theme for a People, Spaces, Conversations thought-leadership site. Built for readers over 60: large text, strong contrast, plain navigation and a built-in text size control. Works on its own and alongside Elementor Pro (header, footer, single and archive templates from the Theme Builder take over automatically). Install the PSC Content Types plugin with it.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: psc
Tags: accessibility-ready, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
	--psc-ink: #1F2933;
	--psc-ink-soft: #3E4C59;
	--psc-paper: #FFFFFF;
	--psc-warm: #F7F4EE;
	--psc-primary: #1D3C5A;
	--psc-primary-dark: #14293F;
	--psc-people: #A8452B;
	--psc-spaces: #1F6F6B;
	--psc-conversations: #4B3F8F;
	--psc-gold: #C9962B;
	--psc-line: #D9D4C9;
	--psc-field: #5F6B76;

	--psc-accent: var(--psc-primary);

	--psc-font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
	--psc-font-body: "Atkinson Hyperlegible", "Segoe UI", Verdana, system-ui, sans-serif;

	--psc-s1: 0.5rem;
	--psc-s2: 1rem;
	--psc-s3: 1.5rem;
	--psc-s4: 2rem;
	--psc-s6: 3rem;
	--psc-s9: 4.5rem;
}

body.psc-section-people { --psc-accent: var(--psc-people); }
body.psc-section-spaces { --psc-accent: var(--psc-spaces); }
body.psc-section-conversations { --psc-accent: var(--psc-conversations); }

.psc-card--people { --psc-accent: var(--psc-people); }
.psc-card--spaces { --psc-accent: var(--psc-spaces); }
.psc-card--conversations { --psc-accent: var(--psc-conversations); }

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-text="lg"] { font-size: 112.5%; }
html[data-text="xl"] { font-size: 125%; }

body {
	margin: 0;
	background: var(--psc-paper);
	color: var(--psc-ink);
	font-family: var(--psc-font-body);
	font-size: 1.125rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

@media (min-width: 40em) {
	body { font-size: 1.1875rem; }
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	color: var(--psc-primary);
	font-family: var(--psc-font-head);
	font-weight: 600;
	line-height: 1.2;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.125rem); }
h3 { font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.625rem); }
h4 { font-size: 1.3125rem; }

p { margin: 0 0 1.1em; }

a {
	color: var(--psc-primary);
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 0.08em;
}
a:hover { text-decoration-thickness: 0.16em; }

img, video, iframe { max-width: 100%; }
img { height: auto; }

:focus-visible {
	outline: 3px solid var(--psc-accent);
	outline-offset: 3px;
}

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

.psc-skip {
	position: absolute;
	left: 1rem;
	top: -5rem;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--psc-primary);
	color: #fff;
	font-weight: 700;
}
.psc-skip:focus { top: 1rem; }

.psc-main:focus { outline: none; }

.psc-wrap {
	width: min(100% - 2rem, 72.5rem);
	margin-inline: auto;
}
.psc-read { max-width: 45rem; }
.psc-read-wide { max-width: 52rem; }

.psc-band { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.psc-band--tight { padding-block: 1.5rem 4rem; }
.psc-band--warm { background: var(--psc-warm); }

.psc-note {
	padding: 1rem 1.25rem;
	background: var(--psc-warm);
	border-left: 4px solid var(--psc-gold);
}

/* ==========================================================================
   3. Buttons and forms
   ========================================================================== */
.psc-btn,
.search-submit,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.4rem 1.4rem;
	background: var(--psc-primary);
	border: 2px solid var(--psc-primary);
	border-radius: 4px;
	color: #fff;
	font: 700 1.125rem/1.2 var(--psc-font-body);
	text-decoration: none;
	cursor: pointer;
}
.psc-btn:hover,
.search-submit:hover,
.wp-block-button__link:hover {
	background: var(--psc-primary-dark);
	border-color: var(--psc-primary-dark);
	color: #fff;
}

.psc-btn--ghost {
	background: #fff;
	color: var(--psc-primary);
}
.psc-btn--ghost:hover {
	background: var(--psc-warm);
	color: var(--psc-primary);
}

.psc-btn--light {
	background: #fff;
	border-color: #fff;
	color: var(--psc-primary);
}
.psc-btn--light:hover {
	background: var(--psc-warm);
	border-color: var(--psc-warm);
	color: var(--psc-primary);
}

.psc-btn--section {
	background: var(--psc-accent);
	border-color: var(--psc-accent);
}
.psc-btn--section:hover {
	filter: brightness(0.88);
	background: var(--psc-accent);
	border-color: var(--psc-accent);
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
select,
textarea {
	min-height: 3rem;
	padding: 0.5rem 0.85rem;
	background: #fff;
	border: 2px solid var(--psc-field);
	border-radius: 4px;
	color: var(--psc-ink);
	font: inherit;
	font-size: 1.0625rem;
}
textarea { width: 100%; min-height: 8rem; }

.search-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-block: 1rem; }
.search-form label { flex: 1 1 14rem; }
.search-form .search-field { width: 100%; }

/* ==========================================================================
   4. Header
   ========================================================================== */
.psc-header {
	background: #fff;
	border-bottom: 1px solid var(--psc-line);
}

.psc-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	padding-block: 1rem;
}

.psc-brand { min-width: 0; }
.psc-brand__name {
	color: var(--psc-primary);
	font-family: var(--psc-font-head);
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
}
.psc-brand .custom-logo { max-height: 3.5rem; width: auto; }

.psc-nav-toggle {
	min-height: 3rem;
	padding: 0.4rem 1.2rem;
	background: #fff;
	border: 2px solid var(--psc-primary);
	border-radius: 4px;
	color: var(--psc-primary);
	font: 700 1.125rem var(--psc-font-body);
	cursor: pointer;
}

.psc-header__panel { display: none; flex-basis: 100%; }
.psc-header__panel.is-open { display: block; }

.psc-menu {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}
.psc-menu li { margin: 0; }
.psc-menu a {
	display: block;
	padding: 0.7rem 0;
	border-bottom: 4px solid transparent;
	color: var(--psc-primary);
	font-family: var(--psc-font-head);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}
.psc-menu a:hover,
.psc-menu .current-menu-item > a,
.psc-menu .current-menu-ancestor > a,
.psc-menu .current_page_item > a {
	border-bottom-color: var(--psc-primary);
}
.psc-menu .psc-nav--people > a { border-bottom-color: var(--psc-people); }
.psc-menu .psc-nav--spaces > a { border-bottom-color: var(--psc-spaces); }
.psc-menu .psc-nav--conversations > a { border-bottom-color: var(--psc-conversations); }
.psc-menu .psc-nav--people > a:hover { background: rgba(168, 69, 43, 0.08); }
.psc-menu .psc-nav--spaces > a:hover { background: rgba(31, 111, 107, 0.08); }
.psc-menu .psc-nav--conversations > a:hover { background: rgba(75, 63, 143, 0.08); }

.psc-header__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	padding-block: 1rem;
}

.psc-search { display: flex; gap: 0.5rem; margin: 0; }
.psc-search input[type="search"] { width: 10rem; }
.psc-search .psc-btn { min-height: 3rem; padding-inline: 1rem; }

.psc-textsize { display: flex; }
.psc-textsize button {
	min-width: 2.9rem;
	min-height: 3rem;
	padding: 0 0.5rem;
	background: #fff;
	border: 2px solid var(--psc-primary);
	color: var(--psc-primary);
	font: 700 1.0625rem var(--psc-font-body);
	cursor: pointer;
}
.psc-textsize button + button { margin-left: -2px; }
.psc-textsize button:first-child { border-radius: 4px 0 0 4px; }
.psc-textsize button:last-child { border-radius: 0 4px 4px 0; }
.psc-textsize button[aria-pressed="true"] {
	background: var(--psc-primary);
	color: #fff;
}

@media (min-width: 62em) {
	.psc-header__inner {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"brand tools"
			"nav nav";
		gap: 0 2rem;
	}
	.psc-brand { grid-area: brand; }
	.psc-nav-toggle { display: none; }
	.psc-header__panel,
	.psc-header__panel.is-open { display: contents; }
	.psc-nav { grid-area: nav; margin-top: 0.5rem; }
	.psc-header__tools { grid-area: tools; padding-block: 0; justify-content: flex-end; }
	.psc-menu { flex-direction: row; flex-wrap: wrap; gap: 0 2.25rem; }
}

/* ==========================================================================
   5. Home page
   ========================================================================== */
.psc-hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3.5rem); }
.psc-hero__title {
	max-width: 24em;
	margin-bottom: 1.25rem;
	font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.1rem);
	line-height: 1.18;
}
.psc-hero__text {
	max-width: 38rem;
	color: var(--psc-ink-soft);
	font-size: 1.25rem;
}

.psc-panels {
	display: grid;
	grid-template-columns: 1fr;
}
.psc-panel {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 15rem;
	padding: clamp(1.75rem, 3vw, 3rem);
	color: #fff;
	text-decoration: none;
}
.psc-panel--people { background: var(--psc-people); }
.psc-panel--spaces { background: var(--psc-spaces); }
.psc-panel--conversations { background: var(--psc-conversations); }
.psc-panel:hover { filter: brightness(0.9); }
.psc-panel:focus-visible { outline-color: #fff; outline-offset: -8px; }

.psc-panel__title {
	margin-bottom: 0.5rem;
	color: #fff;
	font-size: clamp(2.5rem, 1.5rem + 4.5vw, 4.25rem);
	line-height: 1.05;
	font-weight: 700;
}
.psc-panel__text { max-width: 22rem; margin-bottom: 1.25rem; font-size: 1.1875rem; }
.psc-panel__more { font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; }
.psc-panel:hover .psc-panel__more { text-decoration-thickness: 0.15em; }

@media (min-width: 52em) {
	.psc-panels { grid-template-columns: repeat(3, 1fr); }
	.psc-panel { min-height: 26rem; }
}

.psc-sectionbar {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-bottom: 1.5rem;
}
.psc-sectionbar h2 { margin: 0; }
.psc-sectionbar a { font-weight: 700; }

.psc-featured__label {
	margin: 0 0 0.75rem;
	color: var(--psc-primary);
	font-family: var(--psc-font-head);
	font-size: 1.375rem;
	font-weight: 600;
}

.psc-events { margin: 0; padding: 0; list-style: none; }
.psc-events li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	padding: 1rem 0;
	border-top: 1px solid var(--psc-line);
	font-size: 1.25rem;
}
.psc-events li:last-child { border-bottom: 1px solid var(--psc-line); }
.psc-events__date { min-width: 10rem; color: var(--psc-conversations); font-weight: 700; }

.psc-join {
	padding-block: clamp(2.5rem, 6vw, 4rem);
	background: var(--psc-primary);
	color: #fff;
}
.psc-join h2 { color: #fff; }
.psc-join p { max-width: 36rem; }
.psc-join :focus-visible { outline-color: #fff; }

/* ==========================================================================
   6. Grids and cards
   ========================================================================== */
.psc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: 2.25rem 2rem;
}
.psc-grid--featured { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.psc-card {
	display: flex;
	flex-direction: column;
	border-top: 4px solid var(--psc-accent);
}
.psc-card__media { display: block; }
.psc-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.psc-card__ph {
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--psc-warm);
}
.psc-card__body { padding-top: 0.9rem; }
.psc-card__kind {
	margin: 0 0 0.2rem;
	color: var(--psc-accent);
	font-size: 0.9375rem;
	font-weight: 700;
}
.psc-card__title {
	margin: 0 0 0.35rem;
	font-size: 1.375rem;
	line-height: 1.25;
}
.psc-card__title a { color: var(--psc-primary); text-decoration: none; }
.psc-card__title a:hover,
.psc-card__title a:focus-visible { text-decoration: underline; }
.psc-card__num {
	display: inline-block;
	min-width: 2rem;
	color: var(--psc-accent);
	font-weight: 700;
}
.psc-card__detail { margin: 0 0 0.4rem; color: var(--psc-ink-soft); font-size: 1rem; }
.psc-card__excerpt { margin: 0; font-size: 1.0625rem; }

/* ==========================================================================
   7. Section and list pages
   ========================================================================== */
.psc-sectionhead {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
	background: var(--psc-accent);
	color: #fff;
}
.psc-sectionhead__title {
	margin-bottom: 0.75rem;
	color: #fff;
	font-size: clamp(2.75rem, 1.5rem + 5vw, 5rem);
	font-weight: 700;
	line-height: 1.05;
}
.psc-sectionhead__intro { max-width: 40rem; font-size: 1.25rem; }
.psc-sectionhead a { color: #fff; }
.psc-sectionhead :focus-visible { outline-color: #fff; }

.psc-pagehead { padding-block: clamp(2rem, 5vw, 3.5rem) 1rem; }
.psc-pagehead__intro { max-width: 42rem; font-size: 1.1875rem; }

.psc-kicker {
	margin: 0 0 0.4rem;
	color: var(--psc-accent);
	font-size: 1rem;
	font-weight: 700;
}
.psc-kicker a { color: inherit; }

.psc-filter ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}
.psc-filter a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.25rem 1rem;
	border: 2px solid var(--psc-primary);
	border-radius: 4px;
	color: var(--psc-primary);
	font-weight: 700;
	text-decoration: none;
}
.psc-filter a:hover { background: var(--psc-warm); }
.psc-filter a[aria-current="true"] { background: var(--psc-primary); color: #fff; }

.psc-explore {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.psc-linklist { padding-left: 1.25rem; }
.psc-linklist li { margin-bottom: 0.5rem; font-size: 1.25rem; }

/* ==========================================================================
   8. Single pages
   ========================================================================== */
.psc-entry__head { padding-block: clamp(1.5rem, 4vw, 3rem) 1rem; }
.psc-entry__title { max-width: 22em; margin-bottom: 0.5rem; }
.psc-entry__meta { color: var(--psc-ink-soft); }
.psc-lede { max-width: 40rem; color: var(--psc-ink-soft); font-size: 1.3125rem; line-height: 1.5; }

.psc-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	font-size: 1rem;
}
.psc-breadcrumb li + li::before {
	content: "/";
	margin: 0 0.6rem;
	color: var(--psc-field);
}

.psc-single {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem;
	padding-bottom: 4rem;
}
@media (min-width: 62em) {
	.psc-single {
		grid-template-columns: minmax(0, 45rem) minmax(15rem, 19rem);
		justify-content: space-between;
		gap: 4rem;
	}
	.psc-single--solo { grid-template-columns: minmax(0, 45rem); justify-content: start; }
}

.psc-single__aside {
	align-self: start;
	padding-top: 1rem;
	border-top: 4px solid var(--psc-accent);
}

.psc-entry__image { margin: 0 0 1.75rem; }
.psc-entry__image img { display: block; width: 100%; }

.psc-portrait { margin: 0 0 1.25rem; }
.psc-portrait img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.psc-facts { margin: 0; }
.psc-facts__row { margin-bottom: 1rem; }
.psc-facts dt { color: var(--psc-accent); font-size: 1rem; font-weight: 700; }
.psc-facts dd { margin: 0; font-size: 1.0625rem; }
.psc-facts dd p { margin: 0 0 0.5em; }

.psc-keyquestion {
	margin: 0 0 1.75rem;
	padding: 1rem 1.25rem;
	background: var(--psc-warm);
	border-left: 4px solid var(--psc-accent);
	font-family: var(--psc-font-head);
	font-size: 1.375rem;
	line-height: 1.4;
}
.psc-keyquestion span { display: block; margin-bottom: 0.25rem; color: var(--psc-accent); font-family: var(--psc-font-body); font-size: 1rem; font-weight: 700; }

.psc-quote {
	margin: 0 0 1.75rem;
	padding: 0 0 0 1.25rem;
	border-left: 4px solid var(--psc-accent);
	font-family: var(--psc-font-head);
	font-size: 1.5rem;
	line-height: 1.4;
}
.psc-quote p { margin: 0; }

.psc-media { margin: 0 0 1.75rem; }
.psc-media iframe { width: 100%; }

.psc-stops { padding-left: 1.5rem; }
.psc-stops li { margin-bottom: 0.6rem; font-size: 1.25rem; }
.psc-stops__city { color: var(--psc-ink-soft); font-size: 1rem; }

.psc-content > * + * { margin-top: 1.25em; margin-bottom: 0; }
.psc-content h2, .psc-content h3 { margin-top: 1.75em; }
.psc-content img { max-width: 100%; height: auto; }
.psc-content ul, .psc-content ol { padding-left: 1.4rem; }
.psc-content li { margin-bottom: 0.4em; }
.psc-content blockquote {
	margin-inline: 0;
	padding-left: 1.25rem;
	border-left: 4px solid var(--psc-accent);
	font-family: var(--psc-font-head);
	font-size: 1.25rem;
}
.psc-content table { width: 100%; border-collapse: collapse; }
.psc-content th, .psc-content td { padding: 0.6rem; border: 1px solid var(--psc-line); text-align: left; }

.alignleft { float: left; margin: 0.25rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.25rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { color: var(--psc-ink-soft); font-size: 0.9375rem; }

.post-navigation .nav-links { display: grid; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--psc-line); }
@media (min-width: 40em) {
	.post-navigation .nav-links { grid-template-columns: 1fr 1fr; }
	.post-navigation .nav-next { text-align: right; }
}
.psc-nav-label { display: block; color: var(--psc-ink-soft); font-size: 0.9375rem; }

/* ==========================================================================
   9. Pagination
   ========================================================================== */
.pagination { margin-top: 3rem; }
.pagination .nav-links,
.pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.25rem 0.9rem;
	border: 2px solid var(--psc-primary);
	border-radius: 4px;
	color: var(--psc-primary);
	font-weight: 700;
	text-decoration: none;
}
.pagination .page-numbers.current { background: var(--psc-primary); color: #fff; }
.pagination a.page-numbers:hover { background: var(--psc-warm); }
.pagination .dots { border-color: transparent; }

/* ==========================================================================
   10. Footer
   ========================================================================== */
.psc-footer {
	background: var(--psc-primary);
	color: #fff;
}
.psc-footer a { color: #fff; }
.psc-footer :focus-visible { outline-color: #fff; }
.psc-footer__inner {
	display: grid;
	gap: 2rem;
	padding-block: 3rem 2rem;
}
@media (min-width: 52em) {
	.psc-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}
.psc-footer__name {
	margin-bottom: 0.5rem;
	font-family: var(--psc-font-head);
	font-size: 1.5rem;
	font-weight: 700;
}
.psc-footer ul { margin: 0; padding: 0; list-style: none; }
.psc-footer li { margin-bottom: 0.6rem; }
.psc-footer__sections a { font-family: var(--psc-font-head); font-size: 1.25rem; font-weight: 600; }
.psc-footer__legal { padding-block: 1.25rem 2rem; border-top: 1px solid rgba(255, 255, 255, 0.35); font-size: 1rem; }
.psc-footer__legal p { margin: 0; }

/* ==========================================================================
   11. Elementor and motion
   ========================================================================== */
.elementor-page .psc-main,
.elementor-default .psc-main { padding: 0; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.psc-header, .psc-footer, .psc-panels, .psc-join, .psc-skip { display: none; }
	body { font-size: 12pt; }
}
