/* ==========================================================
   EMS Industrial — main stylesheet
   ========================================================== */

:root {
	--ems-navy: #0b1f33;
	--ems-navy-2: #12304d;
	--ems-accent: #f59e0b;
	--ems-copper: #c9963a;
	--ems-ink: #0f172a;
	--ems-text: #334155;
	--ems-muted: #64748b;
	--ems-line: #e2e8f0;
	--ems-bg: #ffffff;
	--ems-tint: #f4f7fa;
	--ems-radius: 12px;
	--ems-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
	--ems-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ems-display: "Space Grotesk", var(--ems-font);
	--ems-mono: "IBM Plex Mono", ui-monospace, monospace;
	--ems-header-h: 72px;
	--ems-logo-h: 34px;
	--ems-logo-h-m: 28px;
	--ems-logo-h-f: 38px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--ems-header-h) + 16px); }
body {
	margin: 0;
	font-family: var(--ems-font);
	font-size: 16.5px;
	line-height: 1.65;
	color: var(--ems-text);
	background: var(--ems-bg);
	-webkit-font-smoothing: antialiased;
}
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--ems-navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ems-accent); }
h1, h2, h3, h4 { font-family: var(--ems-display); color: var(--ems-ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--ems-accent); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px;
	padding: 10px 16px; background: #fff; color: var(--ems-ink); border-radius: 8px;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }

.ems-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .85em 1.4em; border-radius: 8px; border: 1.5px solid transparent;
	font: 600 .97rem/1 var(--ems-font); text-decoration: none; cursor: pointer;
	background: var(--ems-navy); color: #fff; transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); color: #fff; background: var(--ems-navy-2); }
.btn--accent { background: var(--ems-accent); color: var(--ems-ink); }
.btn--accent:hover { background: #fbbf24; color: var(--ems-ink); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }
.btn--sm { padding: .6em 1.05em; font-size: .9rem; }
.btn .ems-icon { width: 1.05em; height: 1.05em; }

.eyebrow {
	font: 500 .78rem/1.2 var(--ems-mono); letter-spacing: .14em; text-transform: uppercase;
	color: #b45309; margin: 0 0 .9em; display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--ems-accent); }
.eyebrow--light { color: var(--ems-accent); }
.lead { font-size: 1.1rem; color: var(--ems-muted); max-width: 62ch; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--ems-navy); color: #cbd5e1; font-size: .84rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar__note, .topbar__contact a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar__note .ems-icon { color: var(--ems-accent); }
.topbar__contact { display: flex; gap: 20px; }
.topbar a { color: #cbd5e1; text-decoration: none; }
.topbar a:hover { color: #fff; }

.site-header {
	position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { border-color: var(--ems-line); box-shadow: 0 4px 20px rgba(15, 23, 42, .05); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--ems-header-h); gap: 24px; }

.brand .custom-logo { max-height: 48px; width: auto; }
.brand__text { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ems-ink); }
.brand__logo { height: var(--ems-logo-h); width: auto; flex: none; }
.brand__name { white-space: nowrap; }
.site-footer .brand__logo { height: var(--ems-logo-h-f); }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--ems-navy); color: var(--ems-accent); }
.brand__mark .ems-icon { width: 22px; height: 22px; }
.brand__name { font: 700 1.15rem/1.1 var(--ems-display); letter-spacing: -.01em; }
.brand__text--light { color: #fff; }
.brand__text--light .brand__mark { background: rgba(255, 255, 255, .08); }

.primary-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.primary-nav li { position: relative; }
.primary-nav a:not(.btn) { color: var(--ems-ink); text-decoration: none; font-weight: 500; font-size: .96rem; padding: 6px 0; }
.primary-nav a:not(.btn):hover, .primary-nav .current-menu-item > a { color: #b45309; }
.primary-nav .sub-menu {
	position: absolute; top: 100%; left: -16px; min-width: 220px; display: block; padding: 10px;
	background: #fff; border: 1px solid var(--ems-line); border-radius: 10px; box-shadow: var(--ems-shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
}
.primary-nav .sub-menu li a { display: block; padding: 8px 10px; border-radius: 6px; }
.primary-nav .sub-menu li a:hover { background: var(--ems-tint); }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.nav-toggle { display: none; background: none; border: 0; color: var(--ems-ink); padding: 8px; cursor: pointer; }
.nav-toggle .ems-icon { width: 26px; height: 26px; }
.nav-toggle__close { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ems-navy); color: #cbd5e1; padding: 88px 0 0; overflow: hidden; }
.hero__grid-bg {
	position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image:
		linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
	background-size: 32px 32px;
	mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero__text { font-size: 1.15rem; color: #b6c2d1; max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ems-radius); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); outline: 1px solid rgba(255, 255, 255, .08); outline-offset: 8px; }
.pcb-art { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .4)); }
.pcb-signal path { stroke-dasharray: 18 260; animation: ems-signal 3.2s linear infinite; }
.pcb-signal path:nth-child(2) { animation-delay: -1.1s; }
.pcb-signal path:nth-child(3) { animation-delay: -2.2s; }
@keyframes ems-signal { from { stroke-dashoffset: 278; } to { stroke-dashoffset: 0; } }

.stats {
	position: relative; margin: 72px 0 0; display: grid; grid-template-columns: repeat(4, 1fr);
	border-top: 1px solid rgba(148, 163, 184, .18);
}
.stat { padding: 28px 24px 34px; border-left: 1px solid rgba(148, 163, 184, .18); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dd { margin: 0; order: -1; font: 700 clamp(1.7rem, 3vw, 2.4rem)/1 var(--ems-display); color: #fff; }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat dt { font-size: .9rem; color: #94a3b8; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--tint { background: var(--ems-tint); }
.section--dark { background: var(--ems-navy); color: #b6c2d1; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section-head { margin-bottom: 48px; }
.section-head--center { text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .lead { margin-inline: auto; }
.section-head--light .lead { color: #94a3b8; }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; margin-bottom: 52px; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
	position: relative; background: #fff; border: 1px solid var(--ems-line); border-radius: var(--ems-radius);
	padding: 28px; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--ems-accent); transform: translateY(-3px); box-shadow: var(--ems-shadow); }
.card__top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 22px; }
.card__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--ems-navy); color: var(--ems-accent); }
.card__icon .ems-icon { width: 26px; height: 26px; }
.card__num { font: 500 .82rem var(--ems-mono); color: #94a3b8; }
.card p { margin: 0; color: var(--ems-muted); }

/* Capabilities */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; align-items: center; }
.split__img { border-radius: var(--ems-radius); margin: 0 0 28px; }
.spec { border: 1px solid rgba(148, 163, 184, .2); border-radius: var(--ems-radius); overflow: hidden; background: rgba(255, 255, 255, .02); }
.spec table { width: 100%; border-collapse: collapse; }
.spec th, .spec td { padding: 17px 22px; text-align: left; border-bottom: 1px solid rgba(148, 163, 184, .14); vertical-align: top; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { font-weight: 500; color: #94a3b8; width: 42%; font-size: .95rem; }
.spec td { color: #fff; font-family: var(--ems-mono); font-size: .93rem; }
.spec tr:hover td { color: var(--ems-accent); }

/* Industries */
.industries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.industries li {
	display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
	background: #fff; border: 1px solid var(--ems-line); border-radius: var(--ems-radius); padding: 28px 12px;
	font-weight: 600; color: var(--ems-ink);
}
.industries .ems-icon { width: 34px; height: 34px; color: var(--ems-navy-2); }

/* Process */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: step; position: relative; }
.process::before { content: ""; position: absolute; top: 21px; left: 22px; right: 22px; height: 2px; background: repeating-linear-gradient(90deg, var(--ems-line) 0 8px, transparent 8px 14px); }
.process li { position: relative; counter-increment: step; padding-right: 20px; }
.process li::before {
	content: counter(step, decimal-leading-zero); position: relative; display: grid; place-items: center;
	width: 44px; height: 44px; border-radius: 50%; background: var(--ems-navy); color: var(--ems-accent);
	font: 500 .85rem var(--ems-mono); margin-bottom: 20px; box-shadow: 0 0 0 6px #fff;
}
.process p { color: var(--ems-muted); font-size: .95rem; margin: 0; }


/* About */
.about { align-items: start; }
.about__text p { color: var(--ems-text); }
.about__media { margin: 0; }
.about__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ems-radius); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 28px 0 0; border-top: 1px solid var(--ems-line); }
.facts > div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--ems-line); }
.facts dt { font: 500 .74rem var(--ems-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ems-muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; color: var(--ems-ink); }
.group { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 56px; }
.group__item { border: 1px solid var(--ems-line); border-top: 3px solid var(--ems-accent); border-radius: var(--ems-radius); padding: 26px; background: #fff; }
.group__mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: var(--ems-tint); color: var(--ems-navy-2); margin-bottom: 16px; }
.group__item h3 { font-size: 1.08rem; }
.group__item p { margin: 0; color: var(--ems-muted); font-size: .95rem; }

/* Service cards with photo */
.card--media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--ems-navy); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card--media:hover .card__media img { transform: scale(1.04); }
.card--media .card__body { padding: 0 26px 26px; }
.card--media .card__top { margin: -26px 0 16px; }
.card--media .card__icon { position: relative; box-shadow: 0 0 0 4px #fff; }
.card--media .card__num { margin-top: 34px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); row-gap: 32px; border-left: 1px solid var(--ems-line); }
.timeline li { position: relative; padding: 4px 24px 8px; border-right: 1px solid var(--ems-line); }
.timeline__year { display: block; font: 700 2.4rem/1 var(--ems-display); color: var(--ems-navy-2); margin-bottom: 14px; letter-spacing: -.02em; }
.timeline__year::after { content: ""; display: block; width: 32px; height: 3px; background: var(--ems-accent); margin-top: 12px; }
.timeline p { margin: 0; color: var(--ems-muted); font-size: .95rem; }

/* Products */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product { margin: 0; background: #fff; border: 1px solid var(--ems-line); border-radius: var(--ems-radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.product:hover { box-shadow: var(--ems-shadow); transform: translateY(-3px); }
.product__media { aspect-ratio: 4 / 3; background: #eef2f6; display: grid; place-items: center; color: var(--ems-muted); }
.product__media img { width: 100%; height: 100%; object-fit: cover; }
.product figcaption { padding: 16px 18px 18px; display: grid; gap: 4px; }
.product__cat { font: 500 .72rem var(--ems-mono); letter-spacing: .08em; text-transform: uppercase; color: #b45309; }
.product strong { color: var(--ems-ink); font-weight: 600; line-height: 1.35; }

/* References */
.section--compact { padding: 72px 0; border-top: 1px solid var(--ems-line); }
.refs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.refs li { padding: 14px 24px; border: 1px solid var(--ems-line); border-radius: 99px; font: 600 1.05rem var(--ems-display); color: var(--ems-ink); background: #fff; }

/* Quality */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: start; font-weight: 500; color: var(--ems-ink); }
.checklist .ems-icon { color: #fff; background: #16a34a; border-radius: 50%; padding: 3px; width: 22px; height: 22px; margin-top: 2px; }
.certs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cert {
	display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--ems-line);
	border-left: 4px solid var(--ems-accent); border-radius: 10px; padding: 20px; font: 600 1rem var(--ems-display); color: var(--ems-ink);
}
.cert .ems-icon { width: 28px; height: 28px; color: var(--ems-navy-2); }

/* Posts */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: #fff; border: 1px solid var(--ems-line); border-radius: var(--ems-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: var(--ems-shadow); transform: translateY(-3px); }
.post-card__media { display: block; aspect-ratio: 16 / 10; background: var(--ems-navy); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__placeholder { display: grid; place-items: center; height: 100%; color: rgba(245, 158, 11, .5); }
.post-card__placeholder .ems-icon { width: 56px; height: 56px; }
.post-card__body { padding: 22px 24px 26px; }
.post-card__title { font-size: 1.15rem; }
.post-card__title a { color: var(--ems-ink); text-decoration: none; }
.post-card__title a:hover { color: #b45309; }
.post-card p { color: var(--ems-muted); font-size: .95rem; margin: 0; }
.post-meta { font: 500 .78rem var(--ems-mono); color: var(--ems-muted); letter-spacing: .03em; margin-bottom: 10px; }
.post-meta a { color: inherit; }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: stretch; }
.contact--solo { grid-template-columns: 1fr; max-width: 720px; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact__list li { display: flex; gap: 14px; align-items: start; }
.contact__list .ems-icon { color: var(--ems-accent); margin-top: 3px; }
.contact__label { display: block; font: 500 .72rem var(--ems-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ems-muted); margin-bottom: 2px; }
.section--dark .contact__label { color: #7f8ea3; }
.section--dark .contact__list a, .section--dark .contact__list li div { color: #fff; text-decoration: none; }
.section--dark .contact__list a:hover { color: var(--ems-accent); }
.contact__mapwrap { min-height: 380px; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, .04); border: 1px solid rgba(148, 163, 184, .18); }
.contact--light .contact__mapwrap { border-color: var(--ems-line); background: var(--ems-tint); }
.contact__map { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }
.contact--light .entry-content { margin-bottom: 28px; }

/* Language switcher */
.lang-switch { display: inline-flex; align-items: center; border: 1px solid var(--ems-line); border-radius: 8px; overflow: hidden; font: 600 .8rem/1 var(--ems-mono); }
.lang-switch a { padding: 8px 10px; color: var(--ems-muted); text-decoration: none; letter-spacing: .04em; }
.lang-switch a:hover { color: var(--ems-ink); background: var(--ems-tint); }
.lang-switch a[aria-current="true"] { background: var(--ems-navy); color: #fff; }

/* CTA band */
.cta-band { background: var(--ems-accent); padding: 48px 0; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 4px; font-size: 1.7rem; }
.cta-band p { margin: 0; color: #451a03; }
.cta-band .btn { background: var(--ems-navy); color: #fff; }

/* Inner pages */
.page-hero { background: var(--ems-navy); padding: 72px 0 60px; position: relative; overflow: hidden; }
.page-hero::after {
	content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
	background-image: linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
	background-size: 32px 32px; mask-image: linear-gradient(90deg, transparent, #000);
}
.page-hero h1 { color: #fff; margin: 0; position: relative; z-index: 1; font-size: clamp(1.9rem, 4vw, 3rem); }
.page-hero h1 span { color: var(--ems-accent); }
.page-hero .post-meta, .page-hero .lead { color: #94a3b8; position: relative; z-index: 1; }
.page-hero .lead { margin-top: 12px; }

.entry-thumb { margin: 0 0 36px; }
.entry-thumb img { border-radius: var(--ems-radius); }
.entry-content { font-size: 1.05rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 1.8em; font-size: 1.7rem; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content img { border-radius: 10px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--ems-line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--ems-tint); }
.entry-content blockquote { border-left: 4px solid var(--ems-accent); margin: 1.6em 0; padding: .2em 0 .2em 1.4em; color: var(--ems-ink); font-size: 1.15rem; }
.entry-content code { font-family: var(--ems-mono); background: var(--ems-tint); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.entry-content .alignwide { margin-inline: calc(50% - min(600px, 50vw - 24px)); }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.entry-content--full > * { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.entry-content--full > .alignfull { max-width: none; padding-inline: 0; }
.entry-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ems-line); }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 12px; border-radius: 99px; background: var(--ems-tint); font-size: .85rem; text-decoration: none; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; font-weight: 600; }
.post-nav a { text-decoration: none; }

.navigation.pagination { margin-top: 48px; }
.nav-links { display: flex; gap: 8px; justify-content: center; }
.page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--ems-line); border-radius: 8px; text-decoration: none; color: var(--ems-ink); font-weight: 600; }
.page-numbers.current, .page-numbers:hover { background: var(--ems-navy); color: #fff; border-color: var(--ems-navy); }

.search-form input {
	width: 100%; font: 400 .97rem var(--ems-font); color: var(--ems-ink); background: #fff;
	border: 1.5px solid var(--ems-line); border-radius: 8px; padding: 11px 13px;
}
.search-form input:focus { outline: none; border-color: var(--ems-navy-2); box-shadow: 0 0 0 3px rgba(18, 48, 77, .12); }
.search-form { display: flex; gap: 8px; max-width: 460px; margin: 20px 0; }
.empty { text-align: center; }
.empty .search-form { margin-inline: auto; }

.notfound { text-align: center; }
.notfound__code { font: 700 7rem/1 var(--ems-display); color: var(--ems-accent); margin: 0; }
.notfound .search-form { margin: 28px auto; }

.comments { margin-top: 56px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 18px 0; border-bottom: 1px solid var(--ems-line); }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; border: 1.5px solid var(--ems-line); border-radius: 8px; padding: 10px 12px; font: inherit; }
.comment-form .submit { background: var(--ems-navy); color: #fff; border: 0; border-radius: 8px; padding: 12px 22px; font-weight: 600; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { background: #071523; color: #94a3b8; padding: 72px 0 0; font-size: .95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 56px; }
.site-footer__about p { margin: 18px 0; max-width: 38ch; }
.footer-title { font: 600 .78rem var(--ems-mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-list, .footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: var(--ems-accent); }
.footer-contact li { display: flex; gap: 10px; align-items: start; }
.footer-contact .ems-icon { color: var(--ems-accent); margin-top: 3px; width: 1.1em; height: 1.1em; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.social a:hover { background: var(--ems-accent); color: var(--ems-ink); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 28px; border-top: 1px solid rgba(148, 163, 184, .14); font-size: .86rem; }
.certs-inline { font-family: var(--ems-mono); font-size: .8rem; }


/* Widgets */
.widget { margin-bottom: 32px; }
.widget-title { font-size: 1rem; }

/* WP core */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--ems-muted); margin-top: 8px; }
.sticky, .bypostauthor, .gallery-caption { outline: 0; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.cards { grid-template-columns: repeat(2, 1fr); }
	.products { grid-template-columns: repeat(3, 1fr); }
	.industries { grid-template-columns: repeat(3, 1fr); }
	.process { grid-template-columns: 1fr; gap: 26px; }
	.process::before { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--ems-line) 0 8px, transparent 8px 14px); }
	.process li { padding-left: 68px; }
	.process li::before { position: absolute; left: 0; top: -6px; margin: 0; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; order: 3; }
	.lang-switch { margin-left: auto; }
	.primary-nav {
		position: fixed; inset: var(--ems-header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
		background: #fff; border-bottom: 1px solid var(--ems-line); padding: 12px 24px 24px;
		max-height: calc(100vh - var(--ems-header-h)); overflow-y: auto; box-shadow: 0 20px 30px rgba(15, 23, 42, .08);
		transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s;
	}
	.nav-open .primary-nav { transform: none; opacity: 1; visibility: visible; }
	.nav-open .nav-toggle__open { display: none; }
	.nav-open .nav-toggle__close { display: inline; }
	.primary-nav ul { flex-direction: column; gap: 0; }
	.primary-nav a:not(.btn) { display: block; padding: 13px 0; border-bottom: 1px solid var(--ems-line); }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; }
	.header-cta { margin-top: 18px; justify-content: center; }
	.topbar__note { display: none; }
	.topbar__inner { justify-content: center; }

	.hero { padding-top: 56px; }
	.hero__inner, .split, .split--even, .contact { grid-template-columns: 1fr; gap: 40px; }
	.contact__mapwrap, .contact__map { min-height: 300px; }
	.hero__visual { max-width: 520px; }
	.stats { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
	.stat:nth-child(odd) { border-left: 0; padding-left: 0; }
	.stat:nth-child(n+3) { border-top: 1px solid rgba(148, 163, 184, .18); }
	.cards, .posts { grid-template-columns: 1fr 1fr; }
	.products, .industries { grid-template-columns: repeat(2, 1fr); }
	.section { padding: 72px 0; }
}

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.container { padding: 0 16px; }
	.cards, .posts, .certs { grid-template-columns: 1fr; }
	.timeline { grid-template-columns: 1fr; }
	.timeline li { padding: 24px 0 24px 20px; border-right: 0; border-top: 1px solid var(--ems-line); }
	.timeline li:first-child { border-top: 0; padding-top: 4px; }
	.timeline__year { font-size: 2rem; }
	.facts { grid-template-columns: 1fr; }
	.refs li { padding: 10px 16px; font-size: .95rem; }
	.industries { grid-template-columns: repeat(2, 1fr); }
		.section-head-row { display: block; }
	.link-arrow { margin: -24px 0 28px; }
	.spec th, .spec td { display: block; width: auto; padding: 4px 18px; border: 0; }
	.spec th { padding-top: 14px; }
	.spec tr { display: block; border-bottom: 1px solid rgba(148, 163, 184, .14); padding-bottom: 12px; }
	.site-footer__grid { grid-template-columns: 1fr; }
	.topbar__contact { gap: 14px; font-size: .8rem; }
	.topbar__contact a + a { display: none; }
	.site-header .brand__logo { height: var(--ems-logo-h-m); }
	.site-header .brand__name { font-size: 1rem; }
	.site-header .brand__text { gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.pcb-signal path { animation: none; }
	.js .reveal { opacity: 1; transform: none; transition: none; }
}
