/* MAC Electronics — 2026 stylesheet
   Palette derived from the logo gradient. Mono face carries anything
   that behaves like a datum: phone, email, company numbers, labels. */

:root {
	--paper:      #f2f5f7;
	--surface:    #ffffff;
	--ink:        #0c1b2a;
	--slate:      #55697a;
	--line:       #cfd9e0;
	--brand:      #0193d8;
	--brand-deep: #01418f;
	--copper:     #b0561c;

	--font-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

	--measure: 34em;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--radius: 3px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--paper:   #0c1319;
		--surface: #121c24;
		--ink:     #e7eef3;
		--slate:   #9aadbb;
		--line:    #27363f;
		--brand:   #35b1ec;
		--copper:  #d9853f;
	}
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-synthesis-weight: none;
}

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

a { color: var(--brand-deep); text-underline-offset: 0.15em; }
a:hover, a:focus-visible { color: var(--copper); }

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

@media (prefers-color-scheme: dark) {
	a { color: var(--brand); }
}

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

.skip {
	position: absolute;
	left: -100vw;
	top: 0;
	background: var(--ink);
	color: var(--paper);
	padding: 0.6em 1em;
	z-index: 50;
}
.skip:focus { left: 0; color: var(--paper); }

/* ---------- header ---------- */

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

.site-head__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding-block: 1.15rem;
}

.logo { display: block; line-height: 0; }
.logo img { width: 300px; }

@media (prefers-color-scheme: dark) {
	.logo {
		background: #fff;
		padding: 0.5rem 0.75rem;
		border-radius: var(--radius);
	}
}

.contact-head {
	font-style: normal;
	font-family: var(--font-mono);
	font-size: 0.875rem;
	line-height: 1.7;
	display: grid;
	gap: 0.15rem;
}

.contact-head a,
.contact-head span.val {
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
}
.contact-head a:hover,
.contact-head a:focus-visible { color: var(--copper); text-decoration: underline; }

.contact-head .row { display: flex; align-items: center; gap: 0.55em; }
.contact-head svg { flex: none; color: var(--brand); }

/* ---------- nav ---------- */

.site-nav {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 20;
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.75rem;
}

.site-nav a,
.site-nav span[aria-current] {
	display: block;
	padding: 0.9rem 0 calc(0.9rem - 3px) 0;
	border-bottom: 3px solid transparent;
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--slate);
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--ink); border-bottom-color: var(--line); }

.site-nav span[aria-current] { color: var(--ink); border-bottom-color: var(--copper); }

/* ---------- type ---------- */

.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--slate);
	margin: 0 0 0.9rem 0;
}

h1 {
	font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.08;
	margin: 0 0 0.7rem 0;
	text-wrap: balance;
}

h2 {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 0.6rem 0;
}

p { margin: 0 0 1rem 0; max-width: var(--measure); }

p.mt { margin-top: 1.5rem; }

.lead {
	font-size: 1.1875rem;
	line-height: 1.55;
	color: var(--slate);
	max-width: 38em;
}

main { padding-block: clamp(2.25rem, 6vw, 4rem) 0; }

/* ---------- via / trace motif ---------- */

/* Capability lists: each marker is a plated through-hole. */
.caps {
	list-style: none;
	margin: 1.4rem 0 0 0;
	padding: 0;
	columns: 2;
	column-gap: 2.5rem;
	max-width: 44em;
}

.caps li {
	position: relative;
	padding: 0 0 0 1.7rem;
	margin: 0 0 0.55rem 0;
	break-inside: avoid;
	line-height: 1.45;
}

.caps li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.46em;
	width: 10px;
	height: 10px;
	border: 2px solid var(--copper);
	border-radius: 50%;
	background: var(--paper);
}

@media (max-width: 40em) {
	.caps { columns: 1; }
}

/* Divider: hairline routes right, steps 45°, terminates in a via. */
.trace {
	display: flex;
	align-items: flex-start;
	color: var(--copper);
	margin: clamp(2.25rem, 6vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.25rem) 0;
}

.trace .line {
	flex: 1 1 auto;
	height: 0;
	border-top: 1px solid var(--line);
}

.trace svg { flex: none; display: block; }

/* ---------- service cards ---------- */

.cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.5rem;
}

.card {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.18s ease, transform 0.18s ease;
}

.card:hover, .card:focus-within {
	border-color: var(--brand);
	transform: translateY(-2px);
}

.card__img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center;
	background: var(--brand-deep);
}

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

.card h2 { margin-bottom: 0.35rem; font-size: 1.125rem; }

.card h2 a {
	color: var(--ink);
	text-decoration: none;
}

/* whole card clickable, link text still the accessible target */
.card h2 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.card:hover h2 a, .card:focus-within h2 a { color: var(--brand-deep); }

@media (prefers-color-scheme: dark) {
	.card:hover h2 a, .card:focus-within h2 a { color: var(--brand); }
}

.card p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--slate);
}

/* ---------- inner page layout ---------- */

.split {
	display: grid;
	grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
	gap: clamp(1.75rem, 5vw, 3.5rem);
	align-items: start;
}

@media (max-width: 46em) {
	.split { grid-template-columns: 1fr; }
	.split .figure { max-width: 20rem; }
}

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

.figure img { display: block; width: 100%; }

.figure figcaption {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--slate);
	padding: 0.7rem 0.85rem;
	border-top: 1px solid var(--line);
}

/* ---------- contact block ---------- */

.contact {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(1.35rem, 4vw, 2rem);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem 2rem;
}

.contact p { margin: 0; max-width: 30em; }
.contact h2 { margin-bottom: 0.3rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.7em 1.15em;
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-decoration: none;
	border: 1px solid var(--brand-deep);
	background: var(--brand-deep);
	color: #fff;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover, .btn:focus-visible { background: var(--copper); border-color: var(--copper); color: #fff; }

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

.btn--ghost:hover, .btn--ghost:focus-visible {
	background: transparent;
	color: var(--copper);
	border-color: var(--copper);
}

@media (prefers-color-scheme: dark) {
	.btn { background: var(--brand); border-color: var(--brand); color: #06111a; }
	.btn:hover, .btn:focus-visible { color: #fff; }
}

/* ---------- footer ---------- */

.site-foot {
	margin-top: clamp(2.5rem, 7vw, 4.5rem);
	border-top: 1px solid var(--line);
	background: var(--surface);
	padding-block: 1.6rem 2rem;
	font-size: 0.875rem;
	color: var(--slate);
}

.site-foot p { max-width: none; margin: 0 0 0.4rem 0; }
.site-foot a { color: var(--slate); }
.site-foot a:hover, .site-foot a:focus-visible { color: var(--copper); }

.reginfo {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	line-height: 1.8;
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.25rem;
}

.reginfo .item { color: var(--ink); opacity: 0.72; }

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

@media print {
	.site-nav, .contact, .trace, .skip { display: none; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.card, .figure, .site-head, .site-foot { border-color: #999; background: #fff; }
	a { color: #000; }
	.split { grid-template-columns: 1fr; }
}
