/*
Theme Name: Exam Reader
Theme URI: https://examreader.co.za/
Author: Exam Reader
Author URI: https://examreader.co.za/
Description: Custom WordPress theme for Exam Reader — assistive exam-reading software for South African schools. Colours are taken from the Exam Reader application icon. Includes a one-click starter-content setup, a built-in enquiry form and no third-party font or script dependencies.
Version: 1.0.0
Requires at least: 6.0
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: examreader
Tags: education, business, one-column, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Design tokens
   Palette sampled directly from "Exam Reader.ico":
     blue    #1E6EB5   (icon background)
     yellow  #FCE800   (highlighter bar + sound waves)
     grey    #7B7B7B   (document text lines)
     white   #FFFFFF   (document)
   The --er-blue and --er-yellow values are overridden from the Customizer.
   ========================================================================== */

:root {
	--er-blue: #1e6eb5;
	--er-yellow: #fce800;

	/* Derived tints/shades — recomputed in PHP when the Customizer colours change. */
	--er-blue-950: #071d31;
	--er-blue-900: #0d3a60;
	--er-blue-800: #124b7c;
	--er-blue-700: #175c98;
	--er-blue-400: #5195cd;
	--er-blue-200: #a8cae6;
	--er-blue-100: #d2e4f3;
	--er-blue-50: #edf4fb;
	--er-yellow-700: #8a7f00;
	--er-yellow-300: #fdf17f;
	--er-yellow-100: #fefbcc;

	--er-ink: #16202b;
	--er-ink-soft: #3b4855;
	--er-body: #5a6472;
	--er-muted: #78828f;
	--er-line: #dde4ec;
	--er-line-soft: #eaeff5;
	--er-surface: #ffffff;
	--er-surface-alt: #f6f8fb;

	--er-radius-sm: 8px;
	--er-radius: 14px;
	--er-radius-lg: 22px;
	--er-radius-pill: 999px;

	--er-shadow-sm: 0 1px 2px rgba(16, 32, 48, .06), 0 2px 6px rgba(16, 32, 48, .05);
	--er-shadow: 0 2px 6px rgba(16, 32, 48, .05), 0 12px 28px rgba(16, 32, 48, .08);
	--er-shadow-lg: 0 8px 20px rgba(16, 32, 48, .08), 0 30px 60px rgba(13, 58, 96, .16);

	--er-wrap: 1180px;
	--er-wrap-narrow: 760px;
	--er-gutter: clamp(20px, 5vw, 48px);
	--er-section-y: clamp(64px, 9vw, 112px);

	--er-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--er-font-display: "Segoe UI Variable Display", "Segoe UI Semibold", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--er-font-mono: ui-monospace, "Cascadia Mono", "Consolas", "SFMono-Regular", Menlo, monospace;

	--er-header-h: 74px;
}

/* ==========================================================================
   2. Reset / base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--er-header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}

body {
	margin: 0;
	background: var(--er-surface);
	color: var(--er-body);
	font-family: var(--er-font);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

body.er-nav-open {
	overflow: hidden;
}

img,
svg,
video,
canvas,
iframe {
	max-width: 100%;
	height: auto;
	display: block;
}

figure {
	margin: 0;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	color: var(--er-ink);
	font-family: var(--er-font-display);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -.02em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.35rem + 3.1vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
h4 { font-size: 1.1rem; }
h5, h6 { font-size: 1rem; }

p, ul, ol, dl, table, pre, blockquote, figure {
	margin: 0 0 1.15em;
}

:where(p, li):last-child {
	margin-bottom: 0;
}

a {
	color: var(--er-blue-700);
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	transition: color .15s ease;
}

a:hover {
	color: var(--er-blue);
}

strong, b {
	font-weight: 700;
	color: var(--er-ink-soft);
}

small {
	font-size: .875em;
}

code, kbd, pre, samp {
	font-family: var(--er-font-mono);
	font-size: .9em;
}

code {
	background: var(--er-surface-alt);
	border: 1px solid var(--er-line-soft);
	border-radius: 5px;
	padding: .12em .38em;
}

pre {
	background: var(--er-blue-950);
	color: #e8eef5;
	padding: 20px 22px;
	border-radius: var(--er-radius);
	overflow-x: auto;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
}

blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 22px;
	border-left: 4px solid var(--er-yellow);
	color: var(--er-ink-soft);
	font-size: 1.1em;
}

hr {
	border: 0;
	border-top: 1px solid var(--er-line);
	margin: 2.5rem 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: .96rem;
}

th, td {
	border: 1px solid var(--er-line);
	padding: 11px 14px;
	text-align: left;
	vertical-align: top;
}

th {
	background: var(--er-surface-alt);
	color: var(--er-ink);
	font-weight: 600;
}

:focus-visible {
	outline: 3px solid var(--er-blue-400);
	outline-offset: 2px;
	border-radius: 3px;
}

::selection {
	background: var(--er-yellow);
	color: var(--er-ink);
}

/* ==========================================================================
   3. Layout helpers
   ========================================================================== */

.er-wrap {
	width: 100%;
	max-width: var(--er-wrap);
	margin-inline: auto;
	padding-inline: var(--er-gutter);
}

.er-wrap--narrow {
	max-width: calc(var(--er-wrap-narrow) + var(--er-gutter) * 2);
}

.er-section {
	padding-block: var(--er-section-y);
}

.er-section--tight {
	padding-block: clamp(48px, 6vw, 76px);
}

.er-section--alt {
	background: var(--er-surface-alt);
}

.er-section--ink {
	background: var(--er-blue-950);
	color: #c3d2e0;
}

.er-section--ink :where(h1, h2, h3, h4) {
	color: #fff;
}

.er-section--ink strong {
	color: #fff;
}

.er-section--ink a:not(.er-btn) {
	color: var(--er-yellow);
}

.er-screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.er-skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 1000;
	background: var(--er-yellow);
	color: var(--er-ink);
	font-weight: 700;
	padding: 12px 20px;
	border-radius: var(--er-radius-sm);
	transition: top .2s ease;
}

.er-skip-link:focus {
	top: 14px;
}

/* ==========================================================================
   4. Section headings
   ========================================================================== */

.er-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 16px;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--er-blue-700);
}

.er-eyebrow::before {
	content: "";
	width: 22px;
	height: 4px;
	border-radius: 2px;
	background: var(--er-yellow);
	flex: none;
}

.er-section--ink .er-eyebrow {
	color: var(--er-blue-200);
}

.er-section-head {
	max-width: 62ch;
	margin-bottom: clamp(36px, 4.5vw, 60px);
}

.er-section-head--center {
	margin-inline: auto;
	text-align: center;
}

.er-section-head--center .er-eyebrow {
	justify-content: center;
}

.er-lead {
	font-size: clamp(1.06rem, 1rem + .35vw, 1.22rem);
	line-height: 1.6;
	color: var(--er-body);
}

.er-section--ink .er-lead {
	color: #b7c8d9;
}

/*
 * The yellow highlighter behind key words — the same idea as the
 * highlighted line in the application icon.
 */
.er-mark {
	position: relative;
	white-space: nowrap;
	color: inherit;
}

.er-mark::after {
	content: "";
	position: absolute;
	left: -.12em;
	right: -.12em;
	bottom: .17em;
	height: .21em;
	background: var(--er-yellow);
	border-radius: 3px;
	z-index: -1;
}

.er-mark--ring::after {
	top: -.12em;
	bottom: -.12em;
	height: auto;
	background: none;
	border: 3px solid var(--er-yellow);
	border-radius: var(--er-radius-pill);
	left: -.35em;
	right: -.35em;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.er-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 26px;
	border: 2px solid transparent;
	border-radius: var(--er-radius-pill);
	font-family: var(--er-font-display);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.er-btn:hover {
	transform: translateY(-1px);
}

.er-btn:active {
	transform: translateY(0);
}

.er-btn svg {
	flex: none;
}

.er-btn--primary {
	background: var(--er-yellow);
	border-color: var(--er-yellow);
	color: var(--er-ink);
	box-shadow: 0 6px 18px rgba(252, 232, 0, .28);
}

.er-btn--primary:hover {
	background: #ffef3d;
	border-color: #ffef3d;
	color: var(--er-ink);
	box-shadow: 0 10px 26px rgba(252, 232, 0, .36);
}

.er-btn--solid {
	background: var(--er-blue);
	border-color: var(--er-blue);
	color: #fff;
}

.er-btn--solid:hover {
	background: var(--er-blue-800);
	border-color: var(--er-blue-800);
	color: #fff;
}

.er-btn--ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, .38);
	color: #fff;
}

.er-btn--ghost:hover {
	background: rgba(255, 255, 255, .1);
	border-color: #fff;
	color: #fff;
}

.er-btn--outline {
	background: transparent;
	border-color: var(--er-line);
	color: var(--er-ink);
}

.er-btn--outline:hover {
	border-color: var(--er-blue);
	color: var(--er-blue-700);
}

.er-btn--sm {
	padding: 10px 20px;
	font-size: .94rem;
}

.er-btn--lg {
	padding: 17px 34px;
	font-size: 1.06rem;
}

.er-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
}

.er-btn-row--center {
	justify-content: center;
}

/* ==========================================================================
   6. Site header
   ========================================================================== */

.er-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.er-header.is-stuck {
	border-bottom-color: var(--er-line);
	box-shadow: 0 4px 18px rgba(16, 32, 48, .06);
}

.er-header__inner {
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: var(--er-header-h);
}

.er-brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
	color: var(--er-ink);
	flex: none;
	margin-right: auto;
}

.er-brand__mark {
	width: 38px;
	height: 38px;
	flex: none;
}

.er-brand img {
	max-height: 44px;
	width: auto;
}

.er-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.er-brand__name {
	font-family: var(--er-font-display);
	font-size: 1.16rem;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--er-ink);
}

.er-brand__tag {
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--er-muted);
}

.er-nav ul {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* :not(.er-btn) keeps these rules off the call-to-action button in the menu. */
.er-nav a:not(.er-btn) {
	display: block;
	padding: 9px 14px;
	border-radius: var(--er-radius-sm);
	font-size: .96rem;
	font-weight: 600;
	color: var(--er-ink-soft);
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.er-nav a:not(.er-btn):hover {
	background: var(--er-blue-50);
	color: var(--er-blue-700);
}

.er-nav .current-menu-item > a,
.er-nav .current_page_item > a,
.er-nav .current-menu-ancestor > a {
	color: var(--er-blue-700);
	background: var(--er-blue-50);
}

/* Dropdowns */
.er-nav .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 220px;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--er-line);
	border-radius: var(--er-radius);
	box-shadow: var(--er-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.er-nav li {
	position: relative;
}

.er-nav li:hover > .sub-menu,
.er-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.er-header__cta {
	flex: none;
}

.er-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--er-line);
	border-radius: var(--er-radius-sm);
	color: var(--er-ink);
	cursor: pointer;
	flex: none;
}

.er-nav-toggle span {
	position: relative;
	display: block;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: background-color .15s ease;
}

.er-nav-toggle span::before,
.er-nav-toggle span::after {
	content: "";
	position: absolute;
	left: 0;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .2s ease, top .2s ease;
}

.er-nav-toggle span::before { top: -6px; }
.er-nav-toggle span::after  { top: 6px; }

.er-nav-toggle[aria-expanded="true"] span {
	background: transparent;
}

.er-nav-toggle[aria-expanded="true"] span::before {
	top: 0;
	transform: rotate(45deg);
}

.er-nav-toggle[aria-expanded="true"] span::after {
	top: 0;
	transform: rotate(-45deg);
}

@media (max-width: 979px) {
	.er-nav-toggle {
		display: inline-flex;
	}

	.er-header__cta {
		display: none;
	}

	/*
	 * Absolute, not fixed: .er-header uses backdrop-filter, which makes it the
	 * containing block for fixed descendants and would collapse this panel to
	 * the height of the bar itself.
	 */
	.er-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		min-height: calc(100vh - var(--er-header-h));
		min-height: calc(100dvh - var(--er-header-h));
		max-height: calc(100vh - var(--er-header-h));
		max-height: calc(100dvh - var(--er-header-h));
		background: #fff;
		border-top: 1px solid var(--er-line);
		padding: 22px var(--er-gutter) 40px;
		overflow-y: auto;
		overscroll-behavior: contain;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}

	.er-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.er-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.er-nav a:not(.er-btn) {
		padding: 13px 14px;
		font-size: 1.06rem;
		border-bottom: 1px solid var(--er-line-soft);
		border-radius: 0;
	}

	.er-nav .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		border: 0;
		box-shadow: none;
		padding: 0 0 0 16px;
		min-width: 0;
	}

	.er-nav__mobile-cta {
		margin-top: 22px;
	}

	.er-nav__mobile-cta .er-btn {
		width: 100%;
	}
}

@media (min-width: 980px) {
	.er-nav__mobile-cta {
		display: none;
	}
}

/* ==========================================================================
   7. Hero
   ========================================================================== */

.er-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(1100px 620px at 78% -8%, rgba(30, 110, 181, .55), transparent 62%),
		linear-gradient(158deg, var(--er-blue-900) 0%, var(--er-blue-950) 62%, #061727 100%);
	color: #c6d6e5;
	padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 112px);
}

.er-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 -1px 0;
	height: 90px;
	background: linear-gradient(to bottom, transparent, rgba(6, 23, 39, .45));
	pointer-events: none;
}

.er-hero__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
	gap: clamp(36px, 4vw, 60px);
	align-items: center;
}

.er-hero h1 {
	/* Slightly tighter than the global h1 so the headline holds two lines. */
	font-size: clamp(2.05rem, 1.4rem + 2.6vw, 3.3rem);
}

@media (max-width: 899px) {
	.er-hero__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.er-hero h1 {
	color: #fff;
	margin-bottom: 22px;
}

.er-hero .er-lead {
	color: #b2c5d7;
	font-size: clamp(1.08rem, 1rem + .5vw, 1.28rem);
	max-width: 54ch;
	margin-bottom: 30px;
}

.er-hero__pill {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 24px;
	padding: 7px 8px 7px 7px;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: var(--er-radius-pill);
	font-size: .84rem;
	font-weight: 600;
	color: #dbe7f2;
}

.er-hero__pill b {
	background: var(--er-yellow);
	color: var(--er-ink);
	font-size: .74rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 4px 11px;
	border-radius: var(--er-radius-pill);
	white-space: nowrap;
	flex: none;
}

.er-hero__note {
	margin-top: 24px;
	font-size: .92rem;
	color: #8fa6bc;
}

.er-hero__note strong {
	color: #cbdaea;
}

/* Stylised product mock — pure CSS/SVG, no screenshots required. */
.er-mock {
	position: relative;
	background: #fff;
	border-radius: var(--er-radius-lg);
	box-shadow: var(--er-shadow-lg);
	rotate: .4deg;
}

/*
 * No overflow:hidden here — it would clip the floating badge. The bar rounds
 * its own top corners instead.
 */
.er-mock__bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 13px 18px;
	background: var(--er-blue-950);
	border-radius: var(--er-radius-lg) var(--er-radius-lg) 0 0;
	color: #9fb4c8;
	font-size: .8rem;
	font-weight: 600;
}

.er-mock__dots {
	display: flex;
	gap: 6px;
	margin-right: 6px;
}

.er-mock__dots i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .22);
}

.er-mock__badge {
	margin-left: auto;
	background: rgba(252, 232, 0, .16);
	color: var(--er-yellow);
	border-radius: var(--er-radius-pill);
	padding: 3px 11px;
	font-size: .72rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.er-mock__body {
	padding: 26px 26px 22px;
}

.er-mock__q {
	font-family: var(--er-font-display);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--er-blue-700);
	margin-bottom: 14px;
}

.er-mock__line {
	height: 11px;
	border-radius: var(--er-radius-pill);
	background: #e3e8ee;
	margin-bottom: 13px;
}

.er-mock__line--w90 { width: 90%; }
.er-mock__line--w96 { width: 96%; }
.er-mock__line--w70 { width: 70%; }
.er-mock__line--w82 { width: 82%; }

/* The "currently being read" line, ringed in yellow like the icon. */
.er-mock__reading {
	position: relative;
	margin: 0 -10px 13px;
	padding: 8px 10px;
	border: 3px solid var(--er-yellow);
	border-radius: var(--er-radius-pill);
}

.er-mock__reading .er-mock__line {
	margin: 0;
	background: #99a3ae;
}

.er-mock__text {
	margin: 18px 0 0;
	font-size: .95rem;
	color: var(--er-ink-soft);
	line-height: 1.55;
}

.er-mock__controls {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--er-line-soft);
}

.er-mock__btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--er-surface-alt);
	color: var(--er-ink-soft);
	flex: none;
}

.er-mock__btn--play {
	width: 50px;
	height: 50px;
	background: var(--er-blue);
	color: #fff;
	box-shadow: 0 6px 16px rgba(30, 110, 181, .34);
}

.er-mock__progress {
	flex: 1;
	min-width: 0;
}

.er-mock__track {
	height: 7px;
	border-radius: var(--er-radius-pill);
	background: var(--er-line-soft);
	overflow: hidden;
}

.er-mock__track i {
	display: block;
	width: 42%;
	height: 100%;
	border-radius: inherit;
	background: var(--er-blue);
}

.er-mock__meta {
	display: flex;
	justify-content: space-between;
	margin-top: 7px;
	font-size: .76rem;
	font-weight: 600;
	color: var(--er-muted);
}

.er-mock__float {
	position: absolute;
	right: -14px;
	bottom: 22px;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 10px 16px 10px 12px;
	background: #fff;
	border-radius: var(--er-radius-pill);
	box-shadow: var(--er-shadow);
	font-size: .84rem;
	font-weight: 700;
	color: var(--er-ink);
	white-space: nowrap;
}

.er-mock__float span {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--er-yellow);
	color: var(--er-ink);
	flex: none;
}

@media (max-width: 520px) {
	.er-mock__float {
		right: 8px;
		bottom: -18px;
	}
}

/* ==========================================================================
   8. Trust strip
   ========================================================================== */

.er-strip {
	border-bottom: 1px solid var(--er-line);
	background: var(--er-surface);
}

.er-strip__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	background: var(--er-line-soft);
	border-inline: 1px solid var(--er-line-soft);
}

.er-strip__item {
	background: #fff;
	padding: 26px 24px;
	text-align: center;
}

.er-strip__item b {
	display: block;
	font-family: var(--er-font-display);
	font-size: 1.55rem;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--er-blue-700);
	margin-bottom: 4px;
}

.er-strip__item span {
	font-size: .9rem;
	color: var(--er-muted);
}

@media (max-width: 767px) {
	.er-strip__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ==========================================================================
   9. Cards
   ========================================================================== */

.er-grid {
	display: grid;
	gap: clamp(18px, 2.2vw, 26px);
}

.er-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.er-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.er-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 939px) {
	.er-grid--3,
	.er-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
	.er-grid--2,
	.er-grid--3,
	.er-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.er-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--er-line);
	border-radius: var(--er-radius-lg);
	padding: clamp(24px, 3vw, 32px);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.er-card:hover {
	transform: translateY(-3px);
	border-color: var(--er-blue-200);
	box-shadow: var(--er-shadow);
}

.er-card h3 {
	margin-bottom: .45em;
}

.er-card p {
	font-size: .99rem;
}

.er-card__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 20px;
	border-radius: var(--er-radius);
	background: var(--er-blue-50);
	color: var(--er-blue-700);
}

.er-card__icon--yellow {
	background: var(--er-yellow-100);
	color: var(--er-yellow-700);
}

.er-section--ink .er-card {
	background: rgba(255, 255, 255, .04);
	border-color: rgba(255, 255, 255, .12);
	color: #b7c8d9;
}

.er-section--ink .er-card:hover {
	border-color: rgba(255, 255, 255, .26);
	box-shadow: none;
}

.er-section--ink .er-card__icon {
	background: rgba(255, 255, 255, .08);
	color: var(--er-yellow);
}

/* ==========================================================================
   10. Steps
   ========================================================================== */

.er-steps {
	--er-steps-gap: clamp(20px, 2.4vw, 30px);

	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--er-steps-gap);
	counter-reset: er-step;
}

@media (max-width: 939px) {
	.er-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
	.er-steps { grid-template-columns: minmax(0, 1fr); }
}

.er-step {
	position: relative;
	padding-top: 30px;
}

/* Runs from the centre of this step's badge to the centre of the next one. */
.er-step::before {
	content: "";
	position: absolute;
	top: 21px;
	left: 50%;
	right: calc(-50% - var(--er-steps-gap));
	height: 2px;
	background: var(--er-blue-200);
}

.er-step:last-child::before {
	display: none;
}

@media (max-width: 939px) {
	.er-step::before {
		display: none;
	}

	.er-step {
		padding-top: 0;
	}
}

.er-step__num {
	counter-increment: er-step;
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: -30px 0 18px;
	border-radius: 50%;
	background: var(--er-blue);
	color: #fff;
	font-family: var(--er-font-display);
	font-size: 1.06rem;
	font-weight: 800;
	box-shadow: 0 0 0 6px var(--er-surface-alt);
}

.er-step__num::after {
	content: counter(er-step);
}

@media (max-width: 939px) {
	.er-step__num { margin-top: 0; }
}

.er-step h3 {
	font-size: 1.14rem;
	margin-bottom: .4em;
}

.er-step p {
	font-size: .97rem;
}

/* ==========================================================================
   11. Split / feature rows
   ========================================================================== */

.er-split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
}

@media (max-width: 899px) {
	.er-split { grid-template-columns: minmax(0, 1fr); }
	.er-split__media { order: -1; }
}

.er-checklist {
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.er-checklist li {
	position: relative;
	padding-left: 34px;
	font-size: 1rem;
}

.er-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .18em;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--er-yellow);
}

.er-checklist li::after {
	content: "";
	position: absolute;
	left: 7px;
	top: .5em;
	width: 8px;
	height: 4px;
	border-left: 2.5px solid var(--er-ink);
	border-bottom: 2.5px solid var(--er-ink);
	rotate: -45deg;
}

/* Voice / language panel */
.er-panel {
	background: #fff;
	border: 1px solid var(--er-line);
	border-radius: var(--er-radius-lg);
	padding: clamp(24px, 3vw, 34px);
	box-shadow: var(--er-shadow-sm);
}

.er-voice {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--er-line-soft);
}

.er-voice:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.er-voice:first-child {
	padding-top: 0;
}

.er-voice__flag {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: var(--er-radius-sm);
	background: var(--er-blue-50);
	color: var(--er-blue-700);
	font-family: var(--er-font-display);
	font-size: .84rem;
	font-weight: 800;
	letter-spacing: .04em;
	flex: none;
}

.er-voice__body b {
	display: block;
	color: var(--er-ink);
	font-size: 1.02rem;
}

.er-voice__body span {
	font-size: .9rem;
	color: var(--er-muted);
}

.er-voice__wave {
	margin-left: auto;
	color: var(--er-yellow);
	flex: none;
}

/* ==========================================================================
   12. FAQ accordion
   ========================================================================== */

.er-faq {
	max-width: calc(var(--er-wrap-narrow) + 60px);
	margin-inline: auto;
	border-top: 1px solid var(--er-line);
}

.er-faq__item {
	border-bottom: 1px solid var(--er-line);
}

.er-faq__q {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	width: 100%;
	padding: 22px 4px;
	background: none;
	border: 0;
	text-align: left;
	font-family: var(--er-font-display);
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--er-ink);
	cursor: pointer;
}

.er-faq__q:hover {
	color: var(--er-blue-700);
}

.er-faq__icon {
	position: relative;
	margin-left: auto;
	width: 22px;
	height: 22px;
	flex: none;
	margin-top: 2px;
}

.er-faq__icon::before,
.er-faq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	translate: -50% -50%;
	background: var(--er-blue);
	border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}

.er-faq__icon::before { width: 14px; height: 2.5px; }
.er-faq__icon::after  { width: 2.5px; height: 14px; }

.er-faq__q[aria-expanded="true"] .er-faq__icon::after {
	transform: scaleY(0);
	opacity: 0;
}

/*
 * Answers are open by default so the content is readable without JavaScript.
 * theme.js adds .er-faq--js once it can take over the toggling.
 */
.er-faq__a {
	display: block;
	padding: 0 44px 24px 4px;
	font-size: 1rem;
}

.er-faq:not(.er-faq--js) .er-faq__icon {
	display: none;
}

.er-faq--js .er-faq__a {
	display: none;
}

.er-faq--js .er-faq__item.is-open .er-faq__a {
	display: block;
}

/* ==========================================================================
   13. CTA band
   ========================================================================== */

.er-cta {
	position: relative;
	overflow: hidden;
	background: linear-gradient(140deg, var(--er-blue-800), var(--er-blue-950));
	color: #bed0e0;
}

.er-cta__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
	padding-block: clamp(48px, 6vw, 76px);
}

@media (max-width: 839px) {
	.er-cta__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

.er-cta h2 {
	color: #fff;
	margin-bottom: .35em;
}

.er-cta p {
	max-width: 56ch;
	color: #b2c5d7;
}

.er-cta::before {
	content: "";
	position: absolute;
	right: -80px;
	top: -120px;
	width: 380px;
	height: 380px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(252, 232, 0, .16), transparent 62%);
	pointer-events: none;
}

/* ==========================================================================
   14. Page header + content (inner pages)
   ========================================================================== */

.er-page-head {
	position: relative;
	background: var(--er-surface-alt);
	border-bottom: 1px solid var(--er-line);
	padding-block: clamp(44px, 6vw, 76px);
}

.er-page-head h1 {
	margin-bottom: .25em;
}

.er-page-head .er-lead {
	max-width: 62ch;
}

.er-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
	font-size: .86rem;
	color: var(--er-muted);
}

.er-breadcrumb a {
	color: var(--er-blue-700);
	text-decoration: none;
	font-weight: 600;
}

.er-breadcrumb a:hover {
	text-decoration: underline;
}

.er-breadcrumb span[aria-hidden] {
	color: var(--er-line);
}

.er-content {
	font-size: 1.06rem;
}

.er-content > *:first-child {
	margin-top: 0;
}

.er-content h2 {
	margin-top: 1.9em;
	font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
}

.er-content h3 {
	margin-top: 1.7em;
}

.er-content ul,
.er-content ol {
	padding-left: 1.35em;
}

.er-content li {
	margin-bottom: .5em;
}

.er-content ul li::marker {
	color: var(--er-blue);
}

.er-content img {
	border-radius: var(--er-radius);
}

.er-content .wp-block-image,
.er-content figure {
	margin-block: 2em;
}

.er-content figcaption {
	margin-top: .7em;
	font-size: .88rem;
	color: var(--er-muted);
	text-align: center;
}

.er-content .wp-block-table,
.er-content .wp-block-table table {
	margin-block: 1.6em;
}

.er-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.aligncenter { margin-inline: auto; }
.alignleft   { float: left; margin: 0 1.6em 1.2em 0; }
.alignright  { float: right; margin: 0 0 1.2em 1.6em; }
.alignwide,
.alignfull { max-width: 100%; }

.wp-caption { max-width: 100%; }

.er-sticky-note {
	margin: 2em 0;
	padding: 20px 24px;
	background: var(--er-blue-50);
	border-left: 4px solid var(--er-blue);
	border-radius: 0 var(--er-radius) var(--er-radius) 0;
	font-size: 1rem;
}

.er-sticky-note--warn {
	background: var(--er-yellow-100);
	border-left-color: var(--er-yellow);
}

/* ==========================================================================
   15. Posts / archives
   ========================================================================== */

.er-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(20px, 2.5vw, 30px);
}

@media (max-width: 939px) { .er-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .er-posts { grid-template-columns: minmax(0, 1fr); } }

.er-post-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--er-line);
	border-radius: var(--er-radius-lg);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
}

.er-post-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--er-shadow);
}

.er-post-card__thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.er-post-card__body {
	padding: 24px 26px 26px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.er-post-card h2,
.er-post-card h3 {
	font-size: 1.2rem;
	margin-bottom: .4em;
}

.er-post-card h2 a,
.er-post-card h3 a {
	color: inherit;
	text-decoration: none;
}

.er-post-card h2 a:hover,
.er-post-card h3 a:hover {
	color: var(--er-blue-700);
}

.er-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-bottom: 12px;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--er-muted);
}

.er-post-card__more {
	margin-top: auto;
	padding-top: 16px;
	font-weight: 700;
	font-size: .94rem;
	text-decoration: none;
}

.er-post-card__more::after {
	content: " →";
}

.er-pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.er-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding-inline: 12px;
	margin: 0 3px;
	border: 1px solid var(--er-line);
	border-radius: var(--er-radius-sm);
	font-weight: 600;
	text-decoration: none;
	color: var(--er-ink-soft);
}

.er-pagination .page-numbers:hover {
	border-color: var(--er-blue);
	color: var(--er-blue-700);
}

.er-pagination .page-numbers.current {
	background: var(--er-blue);
	border-color: var(--er-blue);
	color: #fff;
}

.er-entry-thumb {
	margin-bottom: 2rem;
	border-radius: var(--er-radius-lg);
	overflow: hidden;
}

/* Comments */
.er-comments {
	margin-top: 3.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--er-line);
}

.er-comments ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.er-comments .children {
	list-style: none;
	margin: 0;
	padding-left: clamp(16px, 4vw, 42px);
}

.er-comments .comment-body {
	padding: 20px 0;
	border-bottom: 1px solid var(--er-line-soft);
}

.er-comments .comment-author img {
	border-radius: 50%;
	display: inline-block;
	vertical-align: middle;
	margin-right: 10px;
}

.er-comments .comment-meta {
	font-size: .85rem;
	color: var(--er-muted);
	margin-bottom: 10px;
}

/* ==========================================================================
   16. Forms
   ========================================================================== */

.er-form {
	display: grid;
	gap: 18px;
}

.er-field {
	display: grid;
	gap: 7px;
}

.er-field--half {
	grid-column: span 1;
}

.er-form--2col {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.er-form--2col .er-field--full {
	grid-column: 1 / -1;
}

@media (max-width: 639px) {
	.er-form--2col {
		grid-template-columns: minmax(0, 1fr);
	}

	.er-form--2col .er-field--full {
		grid-column: auto;
	}
}

.er-field label {
	font-size: .9rem;
	font-weight: 700;
	color: var(--er-ink);
}

.er-field .er-req {
	color: #b4232a;
}

.er-field small {
	color: var(--er-muted);
	font-size: .84rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: 12px 14px;
	background: #fff;
	border: 1.5px solid var(--er-line);
	border-radius: var(--er-radius-sm);
	font-family: inherit;
	font-size: 1rem;
	color: var(--er-ink);
	transition: border-color .15s ease, box-shadow .15s ease;
}

select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235a6472' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

textarea {
	min-height: 150px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--er-blue);
	box-shadow: 0 0 0 3px rgba(30, 110, 181, .16);
}

::placeholder {
	color: #9aa4b1;
	opacity: 1;
}

.er-consent {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-size: .92rem;
	color: var(--er-body);
}

.er-consent input[type="checkbox"] {
	margin-top: .25em;
	width: 18px;
	height: 18px;
	accent-color: var(--er-blue);
	flex: none;
}

/* Honeypot — hidden from people, visible to naive bots. */
.er-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.er-notice {
	padding: 16px 20px;
	border-radius: var(--er-radius);
	font-size: .98rem;
	margin-bottom: 24px;
}

.er-notice--ok {
	background: #e8f6ec;
	border: 1px solid #b6dfc2;
	color: #1c5a30;
}

.er-notice--error {
	background: #fdecec;
	border: 1px solid #f3c2c2;
	color: #8f1f24;
}

.er-notice ul {
	margin: 8px 0 0;
	padding-left: 1.2em;
}

.er-search-form {
	display: flex;
	gap: 10px;
}

.er-search-form input[type="search"] {
	flex: 1;
	min-width: 0;
}

/* ==========================================================================
   17. Contact layout
   ========================================================================== */

.er-contact {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: clamp(32px, 4.5vw, 64px);
	align-items: start;
}

@media (max-width: 899px) {
	.er-contact { grid-template-columns: minmax(0, 1fr); }
}

.er-contact__aside {
	position: sticky;
	top: calc(var(--er-header-h) + 24px);
	background: var(--er-surface-alt);
	border: 1px solid var(--er-line);
	border-radius: var(--er-radius-lg);
	padding: clamp(24px, 3vw, 32px);
}

@media (max-width: 899px) {
	.er-contact__aside { position: static; }
}

.er-contact__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 18px;
}

.er-contact__list li {
	display: flex;
	gap: 13px;
	align-items: flex-start;
}

.er-contact__list svg {
	color: var(--er-blue);
	flex: none;
	margin-top: 3px;
}

.er-contact__list b {
	display: block;
	color: var(--er-ink);
	font-size: .84rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: 2px;
}

.er-contact__list a {
	text-decoration: none;
	font-weight: 600;
}

.er-contact__list a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   18. Footer
   ========================================================================== */

.er-footer {
	background: var(--er-blue-950);
	color: #93a8bd;
	font-size: .96rem;
}

/* :not(.er-btn) so the footer link colour never overrides a button. */
.er-footer a:not(.er-btn) {
	color: #c4d4e3;
	text-decoration: none;
}

.er-footer a:not(.er-btn):hover {
	color: var(--er-yellow);
}

.er-footer__top {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
	gap: clamp(28px, 4vw, 52px);
	padding-block: clamp(48px, 6vw, 72px);
}

@media (max-width: 899px) {
	.er-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 539px) {
	.er-footer__top { grid-template-columns: minmax(0, 1fr); }
}

.er-footer__brand .er-brand__name { color: #fff; }
.er-footer__brand .er-brand__tag  { color: #7e93a8; }

.er-footer__about {
	margin-top: 18px;
	max-width: 38ch;
	font-size: .94rem;
	line-height: 1.6;
}

.er-footer h2,
.er-footer h3 {
	color: #fff;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.er-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 11px;
}

.er-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 26px;
	align-items: center;
	justify-content: space-between;
	padding-block: 22px;
	border-top: 1px solid rgba(255, 255, 255, .09);
	font-size: .88rem;
}

.er-footer__bottom p {
	margin: 0;
}

.er-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   19. Reveal-on-scroll (progressive enhancement — JS adds .er-reveal)
   ========================================================================== */

.er-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .5s ease, transform .5s ease;
}

.er-reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.er-reveal {
		opacity: 1;
		transform: none;
	}
}

/* ==========================================================================
   20. Print
   ========================================================================== */

@media print {
	.er-header,
	.er-footer,
	.er-cta,
	.er-nav-toggle,
	.er-skip-link {
		display: none !important;
	}

	body {
		color: #000;
		font-size: 11pt;
	}

	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: .85em;
		color: #444;
	}
}
