/*
 * Pension Plain — base.css
 * Minimal additions on top of theme.json: accessibility utilities,
 * focus styles, skip-link, and a handful of utility classes used by
 * patterns and templates.
 *
 * theme.json owns colors, typography, spacing. Anything that can be
 * done there should NOT be done here.
 */

/* ---------- Accessibility utilities ---------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--warm-white);
	border-radius: 6px;
	box-shadow: 0 0 0 3px var(--wp--preset--color--terracotta);
	clip: auto !important;
	clip-path: none;
	color: var(--wp--preset--color--charcoal);
	display: block;
	font-size: 1rem;
	font-weight: 500;
	height: auto;
	left: 1rem;
	line-height: normal;
	padding: 0.75rem 1.25rem;
	text-decoration: none;
	top: 1rem;
	width: auto;
	z-index: 100000;
}

.skip-link:focus {
	position: fixed;
}

/* ---------- Focus styles — visible on every interactive element ---------- */

:where(a:focus-visible),
:where(button:focus-visible),
:where(input:focus-visible),
:where(textarea:focus-visible),
:where(select:focus-visible),
:where([tabindex]:focus-visible),
:where(.wp-block-button__link:focus-visible) {
	outline: 3px solid var(--wp--preset--color--terracotta);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------- Body reading optimisations ---------- */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Constrain article body line length for readable measure */
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote {
	max-width: 65ch;
}

/* Make sure block alignments still escape that constraint */
.entry-content > .alignwide,
.entry-content > .alignfull {
	max-width: none;
}

/* ---------- Reduced motion ---------- */

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

/* ---------- Smooth scrolling for anchor links (TOC, FAQs) ---------- */

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

html {
	scroll-padding-top: 80px;
}

/* ---------- Custom utility: scheme card hover ---------- */

.is-style-scheme-card {
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.is-style-scheme-card:hover {
	border-color: var(--wp--preset--color--terracotta) !important;
	transform: translateY(-2px);
}

/* ---------- Custom utility: eyebrow label ---------- */

.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
}

/* ---------- Article meta line (author + date + reading time) ---------- */

.article-meta {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.article-meta a {
	color: var(--wp--preset--color--slate);
	text-decoration: none;
}

.article-meta a:hover {
	color: var(--wp--preset--color--terracotta);
}

.article-meta .sep {
	color: var(--wp--preset--color--soft-sand);
}

/* ---------- Disclaimer band ---------- */

.disclaimer-band {
	border-top: 1px solid var(--wp--preset--color--soft-sand);
	border-bottom: 1px solid var(--wp--preset--color--soft-sand);
	padding: 1rem var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
	background: var(--wp--preset--color--warm-white);
}

/* ---------- Image defaults: lazy + intrinsic sizing ---------- */

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

/* ---------- Site-logo SVG colour inherits text colour by default ---------- */

.custom-logo svg,
.wp-block-site-logo svg {
	fill: currentColor;
}


/* ─────────────────────────────────────────────────────────────
 * Newsletter signup form (used in the newsletter pattern)
 * ───────────────────────────────────────────────────────────── */
.newsletter-signup input[type="email"]:focus {
	outline: 2px solid var(--wp--preset--color--terracotta);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--terracotta);
}
.newsletter-signup button[type="submit"]:hover:not(:disabled) {
	background: #1f3a41;
}
.newsletter-signup button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: progress;
}
.newsletter-status[data-state="success"] {
	color: var(--wp--preset--color--slate);
	font-weight: 500;
}
.newsletter-status[data-state="error"] {
	color: #B5462E;
	font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────
 * Skip-to-content link — visible only on focus, helps keyboard users
 * jump past the header straight to the main content.
 * ───────────────────────────────────────────────────────────── */
.pp-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--wp--preset--color--slate);
	color: var(--wp--preset--color--warm-white);
	padding: 0.75rem 1.25rem;
	text-decoration: underline;
	font-family: inherit;
	font-weight: 500;
	border-radius: 0 0 6px 0;
}
.pp-skip-link:focus {
	left: 0;
	outline: 2px solid var(--wp--preset--color--terracotta);
	outline-offset: 0;
}