/* IEC Portal Dev Theme — light electrician mockup */

:root {
	--bg: #f4f6f8;
	--surface: #ffffff;
	--ink: #15202b;
	--muted: #5b6b7c;
	--line: #d8dee6;
	--navy: #0b3a5b;
	--navy-deep: #082a42;
	--amber: #f5b942;
	--amber-ink: #6a4a05;
	--focus: #1a73a8;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(21, 32, 43, 0.06), 0 8px 24px rgba(21, 32, 43, 0.06);
	--font: "Source Sans 3", "Segoe UI", sans-serif;
	--display: "Barlow", "Arial Narrow", sans-serif;
	--header-h: 64px;
	--max: 1100px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

body.nav-open {
	overflow: hidden;
}

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

a {
	color: var(--navy);
}

a:hover,
a:focus {
	color: var(--focus);
}

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

/* —— Header bar —— */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.site-header__bar {
	background: var(--surface);
}

.site-header__inner {
	max-width: calc(var(--max) + 4rem);
	margin: 0 auto;
	padding: 0 1.25rem;
	min-height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.site-brand,
.custom-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.custom-logo-link img {
	max-height: 40px;
	width: auto;
}

.site-brand__mark {
	flex: 0 0 auto;
	display: flex;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--navy);
}

.site-brand__mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hero--photo {
	position: relative;
	overflow: hidden;
	background: var(--navy-deep);
	border-bottom: 0;
	color: #fff;
}

.hero--photo .hero__media {
	position: absolute;
	inset: 0;
}

.hero--photo .hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hero--photo .hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, rgba(8, 42, 66, 0.88) 0%, rgba(8, 42, 66, 0.55) 48%, rgba(8, 42, 66, 0.25) 100%);
}

.hero--photo .hero__inner {
	position: relative;
	z-index: 1;
	padding-top: 3.5rem;
	padding-bottom: 3.5rem;
}

.hero--photo .hero__eyebrow {
	color: var(--amber);
}

.hero--photo .hero__title {
	color: #fff;
}

.hero--photo .hero__lede {
	color: rgba(255, 255, 255, 0.88);
}

.hero--photo .btn--ghost {
	border-color: rgba(255, 255, 255, 0.45);
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.hero--photo .btn--ghost:hover,
.hero--photo .btn--ghost:focus {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.hero--photo .btn--primary {
	background: var(--amber);
	color: var(--navy-deep);
}

.hero--photo .btn--primary:hover,
.hero--photo .btn--primary:focus {
	background: #ffc857;
	color: var(--navy-deep);
}

.card--media {
	padding: 0;
	overflow: hidden;
}

.card__img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.card__body {
	padding: 1.1rem 1.15rem 1.25rem;
}

.card__body h3 {
	margin: 0 0 0.4rem;
	font-family: var(--display);
	font-size: 1.2rem;
	color: var(--navy);
}

.card__body p {
	margin: 0;
	color: var(--muted);
	font-size: 0.98rem;
}

.project-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.project-card {
	margin: 0;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.project-card img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.project-card figcaption {
	padding: 0.85rem 1rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.project-card strong {
	font-family: var(--display);
	color: var(--navy-deep);
}

.project-card span {
	font-size: 0.92rem;
	color: var(--muted);
}

.about-photo {
	margin: 0 0 1.25rem;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}

.about-photo img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.post-card--media {
	padding: 0;
	overflow: hidden;
}

.post-card__thumb {
	display: block;
}

.post-card__thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.post-card__body {
	padding: 1rem 1.1rem 1.15rem;
}

.page-featured {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 1.25rem;
}

.page-featured__img {
	display: block;
	width: 100%;
	max-height: 360px;
	object-fit: cover;
	border-radius: var(--radius);
	border: 1px solid var(--line);
}

.prose .wp-block-image,
.prose figure {
	margin: 1.25rem 0;
}

.prose .wp-block-image img,
.prose figure img {
	border-radius: var(--radius);
	border: 1px solid var(--line);
	width: 100%;
	height: auto;
}

.prose figcaption {
	margin-top: 0.4rem;
	font-size: 0.9rem;
	color: var(--muted);
}

.site-brand__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.15;
}

.site-brand__name {
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.01em;
	color: var(--navy);
}

.site-brand__tag {
	font-size: 0.78rem;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 240px;
}

.site-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem 0.1rem;
}

.site-nav__list a {
	display: block;
	padding: 0.45rem 0.7rem;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--ink);
	border-radius: 6px;
}

.site-nav__list a:hover,
.site-nav__list a:focus,
.site-nav__list .current-menu-item > a {
	background: #eef3f7;
	color: var(--navy);
}

.site-nav__list .menu-item:last-child > a {
	background: var(--navy);
	color: #fff;
	margin-left: 0.35rem;
}

.site-nav__list .menu-item:last-child > a:hover,
.site-nav__list .menu-item:last-child > a:focus {
	background: var(--navy-deep);
	color: #fff;
}

.site-nav-toggle {
	display: none;
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: 8px;
	width: 42px;
	height: 42px;
	padding: 0;
	cursor: pointer;
}

.site-nav-toggle__bars,
.site-nav-toggle__bars::before,
.site-nav-toggle__bars::after {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--ink);
	margin: 0 auto;
	position: relative;
}

.site-nav-toggle__bars::before,
.site-nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.site-nav-toggle__bars::before {
	top: -6px;
}

.site-nav-toggle__bars::after {
	top: 6px;
}

/* —— Layout —— */
.site-main {
	min-height: 50vh;
}

.hero {
	background:
		linear-gradient(135deg, rgba(11, 58, 91, 0.06), rgba(245, 185, 66, 0.12)),
		var(--surface);
	border-bottom: 1px solid var(--line);
}

.hero__inner,
.section__inner,
.page-hero__inner,
.content-page__body {
	max-width: var(--max);
	margin: 0 auto;
	padding: 2.5rem 1.25rem;
}

.hero__inner {
	padding-top: 3rem;
	padding-bottom: 3rem;
}

.hero__eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--navy);
}

.hero__title {
	margin: 0 0 0.85rem;
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--navy-deep);
	max-width: 16ch;
}

.hero__lede {
	margin: 0 0 1.5rem;
	max-width: 40rem;
	color: var(--muted);
	font-size: 1.1rem;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
}

.section {
	padding: 0.5rem 0 1rem;
}

.section--light {
	background: transparent;
}

.section__title {
	margin: 0 0 0.5rem;
	font-family: var(--display);
	font-size: 1.65rem;
	font-weight: 700;
	color: var(--navy-deep);
}

.section__intro {
	margin: 0 0 1.5rem;
	color: var(--muted);
	max-width: 38rem;
}

.section__inner--split {
	display: grid;
	grid-template-columns: 1.4fr 0.9fr;
	gap: 2rem;
	align-items: start;
}

.card-grid,
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.card,
.post-card,
.callout {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.card {
	padding: 1.25rem 1.2rem;
}

.card h3 {
	margin: 0 0 0.4rem;
	font-family: var(--display);
	font-size: 1.2rem;
	color: var(--navy);
}

.card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.98rem;
}

.callout {
	padding: 1.35rem 1.25rem;
}

.callout__label {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--amber-ink);
}

.callout__line {
	margin: 0 0 0.35rem;
	font-weight: 600;
}

.checklist {
	margin: 1rem 0 0;
	padding: 0 0 0 1.1rem;
	color: var(--muted);
}

.checklist li {
	margin: 0.35rem 0;
}

.post-card {
	padding: 1.1rem 1.15rem;
}

.post-card__date,
.page-hero__meta {
	margin: 0 0 0.35rem;
	font-size: 0.82rem;
	color: var(--muted);
}

.post-card__title {
	margin: 0 0 0.4rem;
	font-family: var(--display);
	font-size: 1.15rem;
}

.post-card__title a {
	text-decoration: none;
	color: var(--navy-deep);
}

.post-card__excerpt {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.post-list {
	display: grid;
	gap: 1rem;
	padding-bottom: 3rem;
}

.post-card--row {
	padding: 1.25rem 1.35rem;
}

/* —— Buttons —— */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.7rem 1.15rem;
	border-radius: 8px;
	font-family: var(--font);
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	line-height: 1.2;
}

.btn--primary {
	background: var(--navy);
	color: #fff;
}

.btn--primary:hover,
.btn--primary:focus {
	background: var(--navy-deep);
	color: #fff;
}

.btn--ghost {
	background: transparent;
	border-color: var(--line);
	color: var(--navy);
}

.btn--ghost:hover,
.btn--ghost:focus {
	border-color: var(--navy);
	color: var(--navy-deep);
}

.btn--block {
	width: 100%;
	margin-top: 1rem;
}

/* —— Inner pages —— */
.page-hero {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.page-hero--compact .page-hero__inner {
	padding-top: 1.75rem;
	padding-bottom: 1.5rem;
}

.page-hero__title {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	color: var(--navy-deep);
}

.page-hero__lede {
	margin: 0.5rem 0 0;
	color: var(--muted);
	max-width: 36rem;
}

.content-page__body {
	padding-top: 1.75rem;
	padding-bottom: 3rem;
}

.content-page--wide .content-page__body,
.content-page--wide .page-hero__inner {
	max-width: 1200px;
}

.content-page--embed-flush {
	max-width: none;
}

.embed-flush {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.75rem 1rem 2rem;
}

.embed-flush .iec-portal-embed-wrap,
.embed-flush .iec-portal-embed-frame {
	width: 100%;
}

.content-page__body--embed {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.25rem;
	margin: 0 auto 3rem;
	max-width: 1200px;
}

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

.prose h2,
.prose h3 {
	font-family: var(--display);
	color: var(--navy-deep);
	margin-top: 1.75rem;
}

.prose p,
.prose ul {
	color: var(--ink);
}

.iec-dev-embed-fallback {
	margin: 1rem 0;
	padding: 0.85rem 1rem;
	background: #fff8e8;
	border: 1px solid #f0d9a0;
	border-radius: 8px;
	font-size: 0.92rem;
	color: var(--amber-ink);
}

.iec-dev-embed-fallback code {
	font-size: 0.88em;
}

/* Hide leftover note whenever the embed plugin rendered */
.embed-flush:has(.iec-portal-embed-wrap) .iec-dev-embed-fallback,
.embed-flush:has(.iec-portal-embed-frame) .iec-dev-embed-fallback,
.embed-flush:has(.iec-portal-embed-breakout) .iec-dev-embed-fallback,
.content-page__body--embed:has(.iec-portal-embed-wrap) .iec-dev-embed-fallback,
.content-page__body--embed:has(.iec-portal-embed-frame) .iec-dev-embed-fallback {
	display: none !important;
}

/* —— Footer —— */
.site-footer {
	background: var(--navy-deep);
	color: rgba(255, 255, 255, 0.88);
	margin-top: 1rem;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
	text-decoration: underline;
}

.site-footer__inner {
	max-width: calc(var(--max) + 4rem);
	margin: 0 auto;
	padding: 2rem 1.25rem 1.5rem;
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 1.5rem;
}

.site-footer__name {
	margin: 0 0 0.25rem;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.2rem;
	color: #fff;
}

.site-footer__tag,
.site-footer__meta,
.site-footer__note {
	margin: 0;
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.72);
}

.site-footer__meta {
	margin-top: 0.75rem;
}

.site-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
}

.site-footer__note {
	grid-column: 1 / -1;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.8rem;
}

/* —— Responsive —— */
@media (max-width: 900px) {
	.card-grid,
	.post-grid,
	.project-grid,
	.section__inner--split,
	.site-footer__inner {
		grid-template-columns: 1fr;
	}

	.site-nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.site-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: var(--header-h);
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		padding: 0.75rem 1.25rem 1.25rem;
		box-shadow: var(--shadow);
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav__list {
		flex-direction: column;
		align-items: stretch;
	}

	.site-nav__list .menu-item:last-child > a {
		margin-left: 0;
		text-align: center;
	}

	.site-brand__tag {
		max-width: 160px;
	}

	.hero__title {
		max-width: none;
	}
}

@media (max-width: 520px) {
	.site-brand__tag {
		display: none;
	}
}
