/* ============================================================
 * Lowick Hedry — theme additions (v1.0)
 *
 * Lives alongside the v1 stylesheet and only carries new behaviour
 * introduced by the WordPress theme that the static v1 didn't have:
 *  - Sticky / hide-on-scroll header
 *  - Skip-link
 *  - Member detail modal
 *  - Profile card open-button reset
 *
 * Keep this file lean — anything that touches base design should
 * go into lowick-hedry.css.
 * ========================================================== */

/* -------- Skip link -------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--anchor, #0a2c4a);
	color: #fff;
	padding: 10px 14px;
	font: 600 14px/1 var(--font-sans);
	border-radius: 0;
}
.skip-link:focus {
	left: 16px;
	top: 16px;
}
.sr-only:not(:focus):not(:active) {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* -------- Section colour modes (editor-controlled) --------
 *
 * Each home section can be one of four modes:
 *   solid-light      → .mode-solid-light  (white background, dark text)
 *   gradient-light   → .theme-light       (light gradient, dark text)  [v1 base]
 *   solid-dark       → .mode-solid-dark   (solid navy,     white text)
 *   gradient-dark    → .theme-dark        (dark gradient,  white text) [v1 base]
 *
 * Only the two "solid" variants are defined here; the gradients reuse
 * the official Lowick Hedry gradients already in lowick-hedry.css.
 *
 * The mode only sets the SECTION background and the default text colour
 * of the section itself. Child components that have their own colour
 * scheme (service cards, buttons, tag chips, news cards, stat boxes,
 * etc.) keep their own design — we use :where() on every cascading rule
 * to drop its specificity to 0,0,1, so any component-internal rule
 * (e.g. `.service-card h3`) wins automatically.
 */
.mode-solid-light {
	position: relative;
	background: #ffffff;
	color: var(--ink, #0a2c4a);
}
.mode-solid-light > * { position: relative; z-index: 1; }
:where(.mode-solid-light) h1,
:where(.mode-solid-light) h2,
:where(.mode-solid-light) h3,
:where(.mode-solid-light) .display { color: var(--anchor, #0a2c4a); }
:where(.mode-solid-light) .lead,
:where(.mode-solid-light) p        { color: var(--ink-soft, #1f3e5c); }
:where(.mode-solid-light) a        { color: var(--anchor, #0a2c4a); }
:where(.mode-solid-light) .eyebrow { color: var(--civic, #4f719c); }

.mode-solid-dark {
	position: relative;
	background: var(--anchor-deep, #051a2e);
	color: var(--whisper-20, #ecf2f8);
	overflow: hidden;
}
.mode-solid-dark > * { position: relative; z-index: 1; }
:where(.mode-solid-dark) h1,
:where(.mode-solid-dark) h2,
:where(.mode-solid-dark) h3,
:where(.mode-solid-dark) .display { color: var(--off-white, #fafafa); }
:where(.mode-solid-dark) .lead,
:where(.mode-solid-dark) p        { color: var(--whisper-60, #dce6f3); }
:where(.mode-solid-dark) a        { color: var(--off-white, #fafafa); }
:where(.mode-solid-dark) .eyebrow { color: var(--whisper, #c8d8ec); }

/* -------- Home hero — full viewport height --------
 * The v1 base uses min-height: 90vh, which leaves a thin strip of the
 * next (light) section visible at the fold. Pin the hero to 100dvh so
 * the dark gradient + headline + slider fill the first screen exactly.
 */
.hero {
	min-height: 100vh;
	min-height: 100dvh;
}
body.admin-bar .hero {
	min-height: calc(100vh - 32px);
	min-height: calc(100dvh - 32px);
}
@media screen and (max-width: 782px) {
	body.admin-bar .hero {
		min-height: calc(100vh - 46px);
		min-height: calc(100dvh - 46px);
	}
}

/* -------- Hide-on-scroll header --------
 * The base v1 stylesheet already styles the header (position: fixed,
 * translucent navy + 12px blur). We add only the slide animation here.
 *
 * sticky-header.js adds .is-stuck once the page scrolls past a small
 * threshold and .is-hidden when the user is scrolling DOWN — the header
 * slides off-screen and reappears on scroll up. .is-stuck has no visual
 * change (header keeps its original look at all times), but the class
 * stays in the markup as a hook for future polish.
 */
.site-header[data-sticky-header] {
	transition: transform .32s var(--ease-out, cubic-bezier(.2,.7,.1,1));
	will-change: transform;
}
.site-header[data-sticky-header].is-hidden {
	transform: translateY(-100%);
}

/* -------- Profile card open-button (visual reset) -------- */
.profile .profile-open {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	width: 100%;
	display: block;
	border-radius: var(--r-card, 10px);
}
.profile .profile-open:focus-visible {
	outline: 2px solid var(--signal, #d84011);
	outline-offset: 4px;
}
.profile .profile-open:hover .portrait img {
	transform: scale(1.02);
	transition: transform .4s var(--ease-out, cubic-bezier(.2,.7,.1,1));
}
.profile .portrait img {
	transition: transform .4s var(--ease-out, cubic-bezier(.2,.7,.1,1));
	will-change: transform;
}

/* -------- Member detail modal -------- */
body.lh-modal-open { overflow: hidden; }

.member-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 48px);
}
.member-modal[hidden] {
	display: none;
}
.member-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(5, 16, 30, 0.72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: lh-modal-fade .25s var(--ease-out, cubic-bezier(.2,.7,.1,1));
}
.member-modal-dialog {
	position: relative;
	background: var(--off-white, #fafafa);
	color: var(--ink, #0a2c4a);
	width: min(1080px, 100%);
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: var(--r-card, 10px);
	box-shadow: 0 30px 80px -20px rgba(0,0,0,0.45);
	animation: lh-modal-rise .32s var(--ease-out, cubic-bezier(.2,.7,.1,1));
}
.member-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: var(--ink, #0a2c4a);
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.member-modal-close:hover { background: rgba(10,28,47,0.08); }
.member-modal-close:focus-visible {
	outline: 2px solid var(--signal, #d84011);
	outline-offset: 2px;
}
.member-modal-close svg { width: 22px; height: 22px; }

.member-modal-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
	gap: 0;
}
@media (max-width: 820px) {
	.member-modal-grid { grid-template-columns: 1fr; }
}
.member-modal-portrait {
	background: var(--whisper, #c8d8ec);
	aspect-ratio: 4 / 5;
	overflow: hidden;
}
.member-modal-portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.member-modal-text {
	padding: clamp(24px, 4vw, 48px);
}
.member-modal-text h2 {
	font-family: var(--font-display, "Fraunces", serif);
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.05;
	margin: 0 0 6px;
}
.member-modal-role {
	font-family: var(--font-sans, "Rethink Sans", sans-serif);
	font-size: 15px;
	color: var(--ink-soft, #1f3e5c);
	margin: 0 0 18px;
}
.member-modal-text .tags { margin-bottom: 22px; }
.member-modal-standfirst {
	font-family: var(--font-display, "Fraunces", serif);
	font-size: clamp(18px, 1.5vw, 22px);
	line-height: 1.4;
	color: var(--ink, #0a2c4a);
}
.member-modal-bio p {
	font-family: var(--font-sans, "Rethink Sans", sans-serif);
	color: var(--ink-soft, #1f3e5c);
	font-size: 16px;
	line-height: 1.6;
}
.member-modal-contact {
	margin-top: 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-top: 1px solid rgba(10,28,47,0.12);
	padding-top: 18px;
}
.member-modal-contact a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink, #0a2c4a);
	text-decoration: none;
	font-size: 15px;
	font-family: var(--font-sans, "Rethink Sans", sans-serif);
}
.member-modal-contact a:hover { color: var(--signal, #d84011); }
.member-modal-contact a svg { width: 18px; height: 18px; }

@keyframes lh-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lh-modal-rise {
	from { opacity: 0; transform: translateY(12px) scale(0.985); }
	to   { opacity: 1; transform: translateY(0)    scale(1);     }
}

@media (prefers-reduced-motion: reduce) {
	.member-modal-overlay,
	.member-modal-dialog { animation: none; }
	.site-header[data-sticky-header] { transition: none; }
}

/* -------- News pagination -------- */
.news-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 48px;
	font-family: var(--font-sans, "Rethink Sans", sans-serif);
	font-size: 14px;
}
.news-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgba(10, 28, 47, 0.18);
	color: var(--ink, #0a2c4a);
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.news-pagination a.page-numbers:hover {
	background: var(--ink, #0a2c4a);
	color: #fff;
	border-color: var(--ink, #0a2c4a);
}
.news-pagination .page-numbers.current {
	background: var(--signal, #d84011);
	color: #fff;
	border-color: var(--signal, #d84011);
}
.news-pagination .page-numbers.dots {
	border-color: transparent;
}

/* -------- Newsletter feedback -------- */
.newsletter-form { position: relative; flex-wrap: wrap; }
.newsletter-form .btn { flex-shrink: 0; white-space: nowrap; }
.newsletter-feedback {
	flex-basis: 100%;
	width: 100%;
	margin: 10px 0 0;
	font-family: var(--font-sans, "Rethink Sans", sans-serif);
	font-size: 13px;
	color: var(--ink-soft, #1f3e5c);
}
.newsletter-feedback[data-type="success"] {
	color: var(--anchor, #0a2c4a);
	font-size: var(--fs-body, 17px);
	font-weight: 600;
	white-space: nowrap;
}
.newsletter-form[data-state="success"] {
	align-items: center;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 18px;
}
.newsletter-form[data-state="success"] .newsletter-feedback {
	flex: 0 1 auto;
	width: auto;
	margin: 0;
}
.newsletter-form[data-state="success"] .btn,
.newsletter-form[data-state="success"] .btn:hover,
.newsletter-form[data-state="success"] .btn:active {
	background: var(--highlight, #f6ffb0);
	border-color: var(--highlight, #f6ffb0);
	color: var(--anchor, #0a2c4a);
	cursor: default;
	transform: none;
	transition: none;
}
.newsletter-feedback[data-type="error"]   { color: var(--signal-deep, #b83209); }

/* -------- Contact Form 7 — visual integration -------- */

/* Textarea — CF7 defaults to rows=10 which is much taller than the
   v1 design wants. Compress to 4 rows worth and let the user enlarge. */
.form-card .wpcf7-textarea {
	min-height: 120px;
	height: 120px;
	resize: vertical;
}

/* Acceptance checkbox + privacy text on one line.
   CF7 markup nests:
     span.wpcf7-form-control-wrap
       > span.wpcf7-form-control.wpcf7-acceptance
         > span.wpcf7-list-item
           > label
             > input[type=checkbox]
             > span.wpcf7-list-item-label
*/
.form-card .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
	display: block;
}
.form-card .wpcf7-acceptance .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	line-height: 1.45;
}
.form-card .wpcf7-acceptance .wpcf7-list-item label input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--signal, #d84011);
}
.form-card .wpcf7-acceptance .wpcf7-list-item-label {
	font-family: var(--font-sans, "Rethink Sans", sans-serif);
	font-size: 14px;
	color: var(--ink-soft, #1f3e5c);
}
.form-card .wpcf7-acceptance .wpcf7-list-item-label a {
	color: var(--anchor, #0a2c4a);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.form-card .wpcf7-acceptance .wpcf7-list-item-label a:hover {
	color: var(--signal, #d84011);
}

.wpcf7 .wpcf7-response-output {
	border: 0;
	border-left: 3px solid var(--signal, #d84011);
	background: rgba(216, 64, 17, 0.05);
	padding: 12px 14px;
	margin-top: 16px;
	font-family: var(--font-sans, "Rethink Sans", sans-serif);
	font-size: 14px;
}
.wpcf7 .wpcf7-not-valid-tip {
	color: var(--signal-deep, #b83209);
	font-size: 13px;
	margin-top: 6px;
	display: block;
}
.wpcf7-spinner {
	background-color: var(--signal, #d84011) !important;
}
.wpcf7 form.sent .wpcf7-response-output {
	border-left-color: #198754;
	background: rgba(25, 135, 84, 0.06);
}

/* -------- Article — podcast extras -------- */
.article-podcast {
	margin: 48px 0;
	padding: 28px;
	border: 1px solid rgba(10,28,47,0.12);
	border-radius: var(--r-card, 10px);
}
.article-podcast-embed iframe {
	width: 100%;
	border: 0;
	display: block;
	margin: 16px 0 8px;
}
.article-podcast-guests {
	margin-top: 12px;
	font-size: 14px;
	color: var(--ink-soft, #1f3e5c);
}

/* -------- Home — Political Business podcast intro -------- */
.podcast-intro-inner {
	display: grid;
	grid-template-columns: minmax(0, 430px) 0.70fr;
	gap: 48px;
	align-items: center;
	justify-content: space-between;
}
.podcast-intro-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
}
.podcast-intro-logo {
	width: 100%;
	max-width: 260px;
	height: auto;
}
.podcast-intro-copy h2 {
	font-size: clamp(28px, 3vw, 41px);
	margin: 8px 0 12px;
}
.podcast-intro-episode {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin: 18px 0 4px;
	padding: 10px 18px 10px 10px;
	border: 1px solid rgba(255,255,255,0.22);
	border-radius: var(--r-card, 10px);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.podcast-intro-episode:hover {
	border-color: rgba(255,255,255,0.45);
	background: rgba(255,255,255,0.06);
}
.podcast-intro-episode-thumb {
	flex: 0 0 auto;
	width: 96px;
	height: 68px;
	aspect-ratio: 1.42 / 1;
	border-radius: var(--r-sm, 6px);
	object-fit: cover;
	display: block;
}
.podcast-intro-episode-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
}
.podcast-intro-badge {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--highlight, #F6FFB0);
	color: var(--ink, #0a2c4a);
	white-space: nowrap;
	animation: podcast-intro-badge-pulse 2.6s ease-in-out infinite;
}
@keyframes podcast-intro-badge-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.72; }
}
.podcast-intro-episode-title {
	font-size: 20px;
	font-weight: 600;
}
.podcast-intro-episode .arrow {
	transition: transform 0.2s ease;
}
.podcast-intro-episode:hover .arrow {
	transform: translateX(3px);
}
.podcast-intro-platforms {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: 12px;
	margin-top: 12px;
}
.podcast-intro-platform-note {
	margin: 27px 0 0;
	font-size: 15px;
	font-weight: 600;
}
@media (max-width: 768px) {
	.latest-news-home .news-card > p {
		display: none;
	}
	.podcast-intro-inner {
		grid-template-columns: 1fr;
		gap: 28px;
		text-align: left;
	}
	.podcast-intro-logo {
		width: 80%;
		max-width: 208px;
	}
	.podcast-intro-copy h2 {
		display: none;
	}
	.podcast-intro-episode {
		display: grid;
		grid-template-columns: 96px minmax(0, 1fr) auto;
		width: 100%;
		box-sizing: border-box;
	}
	.podcast-intro-episode-text {
		display: contents;
	}
	.podcast-intro-badge {
		grid-column: 2;
		justify-self: start;
	}
	.podcast-intro-episode-title {
		grid-column: 1 / -1;
		width: 100%;
	}
	.podcast-intro-episode .arrow {
		grid-column: 3;
		grid-row: 1;
	}
	.podcast-intro-platforms {
		flex-wrap: wrap;
		justify-content: flex-start;
	}
}
@media (prefers-reduced-motion: reduce) {
	.podcast-intro-badge {
		animation: none;
	}
}
