/* ETG Engineering – main stylesheet */

:root {
	--paper: #f6f8f9;
	--white: #ffffff;
	--ink: #0f2a3d;
	--line: #2e5e86;
	--amber: #d9902f;
	--steel: #5b6b78;
	--rule: #c9d3db;
	--tint: #eaf0f4;

	--sans: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
	--cond: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;

	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 40px);
	--space: clamp(56px, 8vw, 104px);
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

h1, h2, h3 {
	font-family: var(--cond);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.005em;
	margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.lead { font-size: 1.2rem; color: var(--steel); max-width: 62ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.screen-reader-text, .skip-link:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--white); padding: 8px 14px; }

/* Buttons */
.btn {
	display: inline-block;
	padding: 13px 22px;
	background: var(--ink);
	color: var(--white);
	border: 2px solid var(--ink);
	border-radius: 3px;
	font-weight: 600;
	font-size: 0.98rem;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--line); border-color: var(--line); color: var(--white); }
.btn-small { padding: 8px 14px; font-size: 0.9rem; white-space: nowrap; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-light:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.text-link { font-weight: 600; }

/* Header */
.site-header {
	background: var(--white);
	border-bottom: 1px solid var(--rule);
	position: sticky; top: 0; z-index: 50;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.brand-name { font-family: var(--cond); font-weight: 700; font-size: 1.25rem; white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.site-nav li { position: relative; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 0.95rem; white-space: nowrap; font-weight: 500; padding: 6px 0; display: block; }
.site-nav a:not(.btn):hover, .site-nav .current-menu-item > a { color: var(--line); box-shadow: inset 0 -2px 0 var(--amber); }
.site-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: -14px; min-width: 220px;
	background: var(--white); border: 1px solid var(--rule); padding: 8px 14px; flex-direction: column; gap: 0;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }

.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 3px; padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; align-items: center; gap: 8px; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: ""; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

@media (max-width: 1360px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--white); border-bottom: 1px solid var(--rule);
		flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 20px;
	}
	.site-nav.is-open { display: flex; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--tint); }
	.site-nav .sub-menu { display: flex; position: static; border: 0; padding: 0 0 0 16px; }
	.site-nav .btn { margin-top: 14px; text-align: center; }
}

/* Hero: drawing sheet */
.hero { padding: clamp(28px, 5vw, 56px) 0 var(--space); }

.sheet {
	position: relative;
	background-color: var(--white);
	background-image:
		linear-gradient(rgba(46, 94, 134, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(46, 94, 134, 0.07) 1px, transparent 1px);
	background-size: 24px 24px;
	border: 1px solid var(--ink);
	padding: 26px;
}
.sheet::before {
	content: ""; position: absolute; inset: 22px; border: 2px solid var(--ink); pointer-events: none;
}
.sheet-zones { position: absolute; display: flex; font-family: var(--cond); font-size: 0.72rem; color: var(--steel); }
.sheet-zones-top { top: 3px; left: 22px; right: 22px; justify-content: space-around; }
.sheet-zones-side { top: 22px; bottom: 22px; left: 7px; flex-direction: column; justify-content: space-around; }

.sheet-body {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
	gap: 40px;
	align-items: end;
	padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 52px) 0;
}
.hero-copy { padding-bottom: clamp(28px, 5vw, 56px); }
.hero-copy h1 { max-width: 17ch; }

.title-block {
	border-collapse: collapse;
	width: 100%;
	background: var(--white);
	font-size: 0.88rem;
	margin: 0 -2px -2px 0;
	align-self: end;
}
.title-block th, .title-block td {
	border: 1px solid var(--ink);
	padding: 9px 12px;
	vertical-align: top;
	text-align: left;
}
.title-block th {
	font-family: var(--cond);
	font-weight: 600;
	color: var(--steel);
	width: 32%;
	background: var(--tint);
}
.title-block .tb-foot td { font-family: var(--cond); font-weight: 600; }
.title-block tr:first-child td { font-family: var(--cond); font-weight: 700; font-size: 1.05rem; }

@media (max-width: 860px) {
	.sheet-body { grid-template-columns: 1fr; gap: 8px; padding-top: 32px; }
	.sheet { padding: 18px; }
	.sheet::before { inset: 14px; }
	.sheet-zones { display: none; }
}

/* Sections */
.section { padding: var(--space) 0; }
.section + .section { padding-top: 0; }
.section-tint { background: var(--tint); padding-top: var(--space) !important; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px 48px; align-items: end; margin-bottom: 40px; }
.section-head p { color: var(--steel); margin: 0; max-width: 60ch; }
.section-head h2 { margin: 0; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* Divisions */
.divisions { border-top: 2px solid var(--ink); }
.division {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 16px 40px;
	padding: 30px 0;
	border-bottom: 1px solid var(--rule);
}
.division h3 { margin: 0; font-size: 1.5rem; }
.division p { margin: 0; color: var(--steel); }
.division .ticks { margin: 0; }
.division .text-link { grid-column: 2; }
@media (max-width: 900px) {
	.division { grid-template-columns: 1fr; }
	.division .text-link { grid-column: 1; }
}

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 6px; font-size: 0.97rem; }
.ticks li::before {
	content: ""; position: absolute; left: 0; top: 0.55em;
	width: 10px; height: 10px; border: 2px solid var(--amber); border-radius: 50%;
}
.ticks-light li::before { border-color: var(--amber); }

/* Disputes band */
.disputes { background: var(--ink); color: #e6edf2; padding: var(--space) 0 !important; margin-top: var(--space); }
.disputes h2, .disputes h3 { color: var(--white); }
.disputes a:not(.btn) { color: var(--white); }
.disputes .lead { color: #c3d1dc; }
.kicker { font-family: var(--cond); font-weight: 600; color: var(--amber); margin-bottom: 10px; font-size: 1rem; }
.disputes-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; }
.disputes-detail { border-left: 1px solid rgba(255,255,255,0.2); padding-left: 40px; }
.disputes-detail h3 { margin-top: 0; font-size: 1.1rem; }
.disputes-detail h3 + * { margin-bottom: 28px; }
.disputes-detail p { color: #c3d1dc; font-size: 0.97rem; }
@media (max-width: 860px) {
	.disputes-grid { grid-template-columns: 1fr; gap: 32px; }
	.disputes-detail { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 28px; }
}

.disputes + .section { padding-top: var(--space); }

/* Discipline line list */
.line-list { margin: 0; border-top: 2px solid var(--ink); }
.line-list > div {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 40px;
	padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.line-list dt { font-family: var(--cond); font-weight: 600; font-size: 1.15rem; }
.line-list dd { margin: 0; color: var(--steel); }
@media (max-width: 700px) { .line-list > div { grid-template-columns: 1fr; } }

/* Process */
.process {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
	counter-reset: step;
}
.process li {
	counter-increment: step;
	padding: 0 28px 0 0;
	position: relative;
}
.process li::before {
	content: counter(step);
	display: flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%;
	border: 2px solid var(--ink); background: var(--white);
	font-family: var(--cond); font-weight: 700;
	margin-bottom: 16px; position: relative; z-index: 1;
}
.process li::after {
	content: ""; position: absolute; top: 19px; left: 38px; right: 0; height: 2px; background: var(--line);
}
.process li:last-child::after { display: none; }
.process p { color: var(--steel); font-size: 0.97rem; }
@media (max-width: 860px) {
	.process { grid-template-columns: 1fr 1fr; gap: 32px 0; }
	.process li:nth-child(2)::after { display: none; }
}
@media (max-width: 520px) {
	.process { grid-template-columns: 1fr; }
	.process li::after { display: none; }
}

/* Leadership */
.leader > div { max-width: 820px; }
.leader-name { font-family: var(--cond); font-weight: 600; font-size: 1.2rem; color: var(--line); }
.section-tint + .section { padding-top: var(--space); }

/* CTA */
.cta { border-top: 2px solid var(--ink); padding-top: var(--space) !important; }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; }
.offices { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.offices h3 { font-size: 1.05rem; margin-bottom: 4px; }
.offices p { color: var(--steel); margin: 0; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } }

/* Inner pages */
.page-header { background: var(--white); border-bottom: 1px solid var(--rule); padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.page-header h1 { max-width: 22ch; margin-bottom: 0.3em; }
.post-meta { color: var(--steel); font-size: 0.92rem; margin-bottom: 8px; }

.entry { max-width: 820px; }
.entry > * + h2, .entry > * + h3 { margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: 0.4em; }
.entry table { border-collapse: collapse; width: 100%; margin: 1.5em 0; }
.entry th, .entry td { border: 1px solid var(--rule); padding: 8px 12px; text-align: left; }
.entry blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--amber); color: var(--steel); }
.entry-image { margin: 0 0 32px; }
/* Let page-builder layouts use full width */
.entry:has(.elementor) { max-width: none; padding: 0; }

.post-list { display: grid; gap: 0; border-top: 2px solid var(--ink); max-width: 860px; }
.post-summary { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.post-summary h2 { font-size: 1.5rem; margin-bottom: 8px; }
.post-summary h2 a { color: var(--ink); text-decoration: none; }
.post-summary h2 a:hover { color: var(--line); text-decoration: underline; }
.post-summary p:last-child { margin: 0; color: var(--steel); }

.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); }
.pagination .nav-links { display: flex; gap: 10px; margin-top: 32px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--rule); text-decoration: none; }
.pagination .current { background: var(--ink); color: var(--white); border-color: var(--ink); }

.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form input[type=search] { flex: 1; padding: 10px 12px; border: 1px solid var(--steel); border-radius: 3px; font: inherit; }
.search-form input[type=submit], .comment-form input[type=submit] { padding: 10px 18px; background: var(--ink); color: var(--white); border: 0; border-radius: 3px; font: inherit; font-weight: 600; cursor: pointer; }

input, textarea, select { font: inherit; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea, .wpcf7 input:not([type=submit]), .wpcf7 textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--steel); border-radius: 3px; background: var(--white);
}
.wpcf7 input[type=submit] { padding: 12px 22px; background: var(--ink); color: var(--white); border: 0; border-radius: 3px; font-weight: 600; cursor: pointer; }

/* Footer */
.site-footer { background: var(--ink); color: #c3d1dc; padding: 64px 0 0; font-size: 0.95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand { font-family: var(--cond); font-weight: 700; font-size: 1.3rem; color: var(--white); }
.footer-head { font-family: var(--cond); font-size: 1rem; color: var(--white); margin-bottom: 10px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; padding-bottom: 28px; }
.footer-base p { margin: 0; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* WordPress core alignment classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 0.88rem; color: var(--steel); }

/* Small phones */
@media (max-width: 480px) {
	.header-inner { gap: 12px; min-height: 64px; }
	.brand { gap: 8px; min-width: 0; }
	.brand-logo { width: 38px; height: 38px; }
	.brand-name { font-size: 1.05rem; white-space: normal; line-height: 1.15; }
	.nav-toggle { flex-shrink: 0; padding: 8px 10px; }
	.nav-toggle-label { font-size: 0.9rem; }
	.title-block th { width: 36%; }
	h1 { font-size: 2.1rem; }
}
body { overflow-x: hidden; }

/* ETG standard page content */
.entry-etg { max-width: 900px; }
.entry-etg > h2 { border-top: 2px solid var(--ink); padding-top: 28px; margin-top: 56px; }
.entry-etg > h2:first-child { margin-top: 0; }
.entry-etg ul:not(.wp-block-social-links) { list-style: none; padding-left: 0; }
.entry-etg ul:not(.wp-block-social-links) > li { position: relative; padding-left: 22px; }
.entry-etg ul:not(.wp-block-social-links) > li::before {
	content: ""; position: absolute; left: 0; top: 0.6em; width: 10px; height: 10px; border: 2px solid var(--amber); border-radius: 50%;
}
.entry-etg .wp-block-columns { gap: 32px; margin: 1.5em 0; }
.entry-etg .wp-block-column h3 { margin-bottom: 0.3em; }
.entry-etg .wp-block-column p { color: var(--steel); }
.entry-etg .etg-callout { background: var(--ink); color: #e6edf2; padding: 32px; margin: 48px 0; }
.entry-etg .etg-callout h2, .entry-etg .etg-callout h3 { color: var(--white); border: 0; padding: 0; margin-top: 0; }
.entry-etg .etg-callout a { color: var(--white); }
.entry-etg .etg-callout p { color: #c3d1dc; }
.entry-etg .wp-block-button__link { background: var(--ink); color: var(--white); border-radius: 3px; padding: 12px 22px; font-weight: 600; text-decoration: none; }
.entry-etg .etg-callout .wp-block-button__link { background: var(--white); color: var(--ink); }
.entry-etg .wp-block-table td, .entry-etg .wp-block-table th { border: 1px solid var(--rule); }
.entry-etg .wp-block-table thead th { background: var(--tint); font-family: var(--cond); }

/* Standalone PHP site additions */
.preview-bar { background: var(--amber); color: var(--ink); text-align: center; font-weight: 600; font-size: 0.9rem; padding: 6px 12px; }
.plain { list-style: none; padding: 0; margin: 0 0 28px; }
.plain li { margin-bottom: 12px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; }
.contact-side { border-left: 1px solid var(--rule); padding-left: 40px; }
.contact-side h2 { font-size: 1.3rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .contact-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 28px; } }
.etg-form { max-width: 640px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .optional { font-weight: 400; color: var(--steel); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
	width: 100%; padding: 11px 12px; border: 1px solid var(--steel); border-radius: 3px; background: var(--white); color: var(--ink);
}
.field [aria-invalid=true] { border-color: #b3261e; border-width: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field-check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.field-check input { margin-top: 5px; }
.field-error { color: #b3261e; font-size: 0.92rem; margin: 6px 0 0; }
.form-alert { background: #fbe9e8; border-left: 4px solid #b3261e; padding: 12px 16px; }
.form-success { background: var(--tint); border-left: 4px solid var(--line); padding: 16px 20px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button.btn { cursor: pointer; font: inherit; font-weight: 600; }

/* Brochure downloads */
.download { display: flex; align-items: center; gap: 18px; background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--amber); padding: 16px 20px; margin: 24px 0; }
.download-icon { flex-shrink: 0; width: 46px; height: 56px; border: 2px solid var(--ink); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font-family: var(--cond); font-weight: 700; font-size: 0.85rem; position: relative; }
.download-icon::before { content: ""; position: absolute; top: -2px; right: -2px; width: 14px; height: 14px; background: var(--paper); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.download-text { flex: 1; min-width: 0; }
.download-title { font-family: var(--cond); font-weight: 600; font-size: 1.15rem; margin: 0 0 2px; }
.download-desc { margin: 0; color: var(--steel); font-size: 0.95rem; }
.download-meta { white-space: nowrap; }
.download .btn { flex-shrink: 0; }
.entry-etg .download ul, .download p { padding: 0; }
@media (max-width: 600px) { .download { flex-wrap: wrap; } .download .btn { width: 100%; text-align: center; } }
.downloads-list .download { margin: 14px 0; }

/* Light buttons inside dark callouts keep dark text */
.entry-etg .etg-callout a.btn-light { color: var(--ink); }
.entry-etg .etg-callout a.btn-light:hover { color: var(--ink); }
