/* Matrix International (UK) Ltd website: components and sections. Every colour, font and size comes from
   tokens.css (tools/tokens.test.mjs checks that no literal slips in), so the brand changes there,
   not here. Pages load tokens.css first. Design: DESIGN.md (DT-72, "Dark plant, clear words", industry-first). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--leading-body); color: var(--text); background: var(--paper); overflow-x: hidden; }
img, video, svg { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--weight-head); color: var(--heading); line-height: var(--leading-head); margin: 0 0 .4em; letter-spacing: var(--tracking-head); text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: 1.125rem; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-weight: var(--weight-lead); font-size: var(--fs-lead); line-height: 1.5; max-width: 40em; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: var(--section); }
section.tight { padding-block: var(--s8); }
.soft { background: var(--soft); }
.mist { background: var(--mist); }
.dark { background: var(--deep); color: var(--fog); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--on-dark); }
.dark a { color: var(--link-dark); }
.dark a:hover { color: var(--on-dark); }
.dark .muted { color: var(--fog); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--cta); color: var(--on-cta); padding: 10px 16px; font-family: var(--font-mono); border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

/* Focus: a double ring (accent + deep halo) that is visible on every surface */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-halo); border-radius: var(--r-sm); }

/* Dot-field motif (the "matrix" of the logo), densest at the top right */
.dotted { position: relative; overflow: hidden; }
.dotted::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, var(--dots) 1.5px, transparent 1.6px) 0 0 / 28px 28px; -webkit-mask-image: linear-gradient(115deg, transparent 45%, var(--deep) 100%); mask-image: linear-gradient(115deg, transparent 45%, var(--deep) 100%); pointer-events: none; }
.dotted > * { position: relative; }

/* ---------- Labels, kickers ---------- */
.kicker, .label { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--kicker); margin: 0 0 .9em; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ''; width: 22px; height: 2px; background: currentColor; flex: none; }
.dark .kicker, .dark .label, .hero .kicker, .hero .label, .fade .kicker, .fade .label, .cta .kicker, .cta .label { color: var(--kicker-dark); }
.tag { font-family: var(--font-mono); font-size: var(--fs-tag); letter-spacing: .1em; text-transform: uppercase; color: var(--kicker); }
.dark .tag, .fade .tag { color: var(--kicker-dark); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 500; font-size: .875rem; letter-spacing: var(--tracking-btn); text-transform: uppercase; text-decoration: none; padding: 15px 22px; border-radius: var(--r-pill); border: 2px solid transparent; transition: transform var(--t) var(--ease), background var(--t), color var(--t), border-color var(--t); line-height: 1; white-space: nowrap; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--cta); color: var(--on-cta); border-color: var(--cta); }
.btn.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--on-cta); }
.btn.ghost { background: transparent; color: var(--on-dark); border-color: var(--on-dark-55); }
.btn.ghost:hover { border-color: var(--on-dark); color: var(--on-dark); }
.btn.outline { background: transparent; color: var(--heading); border-color: var(--heading); }
.btn.outline:hover { background: var(--heading); color: var(--paper); }
.btn .arr { transition: transform var(--t) var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s6); }
.more { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-btn); text-transform: uppercase; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; color: var(--link); }
.more .arr { transition: transform var(--t) var(--ease); }
.more:hover .arr, a:hover .more .arr { transform: translateX(4px); }
.dark .more, .fade .more, .tile .more { color: var(--link-dark); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--header-line); transition: box-shadow var(--t); }
.site-header.scrolled { box-shadow: var(--shadow-header); }
.site-header > .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); min-height: 80px; }
.logo { display: block; flex: none; }
.logo img { height: var(--logo-h); width: auto; }
/* "Control Systems" beside the logo's MATRIX (the owner, DT-781): lighter and smaller than the wordmark */
.logo:has(.logo-sub) { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-sub { font-family: var(--font-sans); font-weight: 300; font-size: 1.25rem; line-height: 1; letter-spacing: .01em; color: var(--header-text); white-space: nowrap; padding-top: 2px; }
@media (max-width: 1100px) { .logo-sub { font-size: 1.0625rem; } }
@media (max-width: 480px) { .logo:has(.logo-sub) { gap: 8px; } .logo-sub { font-size: .875rem; } }
/* narrow phones: on two short lines beside the logo, so the menu button still fits at 320 px */
@media (max-width: 420px) { .logo-sub { white-space: normal; width: 4.6em; line-height: 1.15; font-size: .8125rem; padding-top: 0; } }
.site-footer .logo img { height: auto; width: 120px; }
.nav { display: flex; align-items: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav-list > li { position: static; }
.nav-list > li > a, .nav-btn { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-btn); text-transform: uppercase; text-decoration: none; color: var(--header-text); padding: 12px 14px; border-radius: var(--r-sm); position: relative; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.nav-list > li > a:hover, .nav-btn:hover { color: var(--link); }
.nav-list > li > a[aria-current="page"]::after, .has-menu.current > .nav-btn::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--kicker); }
.nav-btn .chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--t); }
.has-menu.open > .nav-btn .chev { transform: translateY(1px) rotate(-135deg); }
.nav .btn { margin-left: 12px; padding: 12px 18px; }
.menu-btn { display: none; background: none; border: 1px solid var(--header-line); color: var(--header-text); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-btn); text-transform: uppercase; padding: 10px 14px; border-radius: var(--r-sm); cursor: pointer; gap: 10px; align-items: center; }
.menu-btn .bars { display: inline-block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.menu-btn .bars::before { top: -6px; } .menu-btn .bars::after { top: 6px; }

/* Mega menus (industries, services): a full-width panel under the header, opened by hover, tap or focus */
.mega { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--menu-bg); color: var(--text); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-menu); }
.has-menu.open > .mega { display: block; }
.mega .wrap { padding-block: var(--s6) var(--s7); }
.mega-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 2fr); gap: var(--s5); align-items: start; }
.mega-cols.svc { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.mega-group { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); font-family: var(--font-head); font-weight: var(--weight-head); font-size: 1.0625rem; line-height: 1.15; margin-bottom: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.mega-group img { width: 48px; height: 36px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.mega-group:hover { color: var(--link); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega-ind { display: block; padding: 7px 10px; margin-left: -10px; border-radius: var(--r-sm); text-decoration: none; color: var(--text); font-size: var(--fs-small); line-height: 1.3; }
.mega-ind:hover, .mega-ind:focus-visible { background: var(--menu-hover); color: var(--heading); }
.mega-all { margin-top: var(--s4); }
.mega-detail { position: relative; background: var(--card-bg); border-radius: var(--r); padding: var(--s4); border: 1px solid var(--line); min-height: 100%; }
.mega-detail::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, var(--fire), transparent); }
.mmd[hidden] { display: none; }
.mmd img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: var(--r-sm); margin-bottom: var(--s3); }
.mmd strong { display: block; font-family: var(--font-head); font-size: 1.375rem; color: var(--heading); line-height: 1.1; }
.mmd p { font-size: var(--fs-small); color: var(--muted); margin: 4px 0 10px; }
.mmd .label { margin: var(--s3) 0 6px; }
.mmd ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); }
.mmd ul li a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); font-size: var(--fs-small); line-height: 1.3; padding: 7px 0; border-top: 1px solid var(--line); }
.mmd ul li a:hover { color: var(--link); }
.mmd ul li a .tag { white-space: normal; font-size: .6875rem; }
.mega-svc img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: var(--r-sm); margin-bottom: var(--s3); }
.mega-svc > a.title { font-family: var(--font-head); font-weight: var(--weight-head); font-size: 1.375rem; color: var(--heading); text-decoration: none; line-height: 1.1; display: block; }
.mega-svc > a.title:hover { color: var(--link); }
.mega-svc p { font-size: var(--fs-small); color: var(--muted); margin: 4px 0 var(--s3); }
.mega-svc ul li a { display: block; text-decoration: none; color: var(--text); font-size: var(--fs-small); padding: 6px 0; border-top: 1px solid var(--line); }
.mega-svc ul li a:hover { color: var(--link); }
@media (max-width: 1100px) { .mega-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mega-detail { display: none; } }
@media (max-width: 900px) {
	.menu-btn { display: inline-flex; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg); border-bottom: 1px solid var(--header-line); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; box-shadow: var(--shadow-header); max-height: calc(100vh - 80px); overflow-y: auto; }
	.nav.open { display: flex; }
	.nav-list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-list > li { border-bottom: 1px solid var(--header-line); }
	.nav-list > li > a, .nav-btn { width: 100%; justify-content: space-between; padding: 14px 8px; font-size: var(--fs-small); }
	.nav-list > li > a[aria-current="page"]::after, .has-menu.current > .nav-btn::after { display: none; }
	.nav-list > li > a[aria-current="page"] { color: var(--kicker); }
	.nav .btn { margin: 12px 0 0; }
	.nav .btn { align-self: flex-start; width: auto; }
	.nav-list > li.tools { display: flex; gap: 12px; align-items: center; border-bottom: 0; }
	.mega { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 8px 8px; }
	.mega .wrap { padding: 0; }
	.mega-cols, .mega-cols.svc { display: block; }
	.mega-group { margin: 12px 0 4px; padding-bottom: 6px; font-size: 1rem; }
	.mega-group img, .mega-detail, .mega-svc img, .mega-svc p { display: none; }
	.mega-ind { margin: 0; padding: 8px 10px; }
	.mega-svc { margin-top: 14px; }
	.mega-svc > a.title { font-size: 1.125rem; }
	.mega-svc ul li a { padding: 7px 10px; border: 0; }
}
@media (max-width: 480px) { .site-header .wrap { gap: 12px; min-height: 64px; } .menu-btn { padding: 10px 11px; } .menu-btn .txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- Media + scrim primitives ----------
   Text never sits on a photo. It sits on the SOLID part of a scrim (--scrim at 100 % under the text column),
   which fades to the photo on the other side. Worst case for every text colour is therefore text on --deep. */
.media { position: absolute; inset: 0; overflow: hidden; background: var(--deep); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media.pos-right img, .media.pos-right video { object-position: 70% 50%; }
.media.pos-left img, .media.pos-left video { object-position: 30% 50%; }
.scrim { position: absolute; inset: 0; }
.scrim-left { background: linear-gradient(90deg, var(--scrim) 0, var(--scrim) 50%, var(--scrim-60) 60%, var(--scrim-12) 76%, var(--scrim-0) 100%); }
.scrim-right { background: linear-gradient(270deg, var(--scrim) 0, var(--scrim) 50%, var(--scrim-60) 60%, var(--scrim-12) 76%, var(--scrim-0) 100%); }
/* Crossfade (industry heroes with several photos): the first photo is the base and always shows; the others sit on
   top and fade in and out (site.js, --t-fade). The text is on the solid scrim above them, so contrast never depends
   on which photo is showing. Under reduced motion the first photo alone shows. */
.media img.slide { position: absolute; inset: 0; opacity: 0; transition: opacity var(--t-fade) ease-in-out; }
.media img.slide.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .media img.slide { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--deep); color: var(--on-dark); overflow: hidden; display: grid; align-items: end; min-height: min(92vh, 900px); padding: 0; }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: var(--s10); padding-bottom: var(--s9); }
.hero .copy { max-width: 50%; }
.hero .breadcrumb { margin-bottom: var(--s5); }
.hero h1 { color: var(--on-dark); font-size: var(--fs-display); line-height: .96; letter-spacing: var(--tracking-display); margin-bottom: .3em; }
.hero h1 .alt { color: var(--kicker-dark); }
/* The strapline: two phrases on two lines at display size (the owner's final round), each phrase held together with
   no-break spaces; the second in the strapline accent (the logo's fire). Display size is large text, so the orange
   passes AA at 3:1 on the hero ground (tools/themes.test.mjs). On the home hero (.hero.split) the text is on --deep itself. */
.hero h1.strapline { font-size: var(--fs-strapline); line-height: 1; letter-spacing: var(--tracking-display); }
.hero h1.strapline span { display: block; }
.hero h1.strapline .fire { color: var(--strapline-accent); }
/* The home hero (the owner, DT-781): the text beside a bigger video, side by side on desktop, stacked below 900 px
   (video first). The text starts on the page grid (lined up with the logo); the video fills the rest of the hero to
   the right edge, full height, and fades into the page towards the text and at the bottom (the owner, 2026-10-01:
   "still have the fading in the video"), as the full-bleed hero's scrim did. The fade is a mask on the video only:
   the text sits on --deep, never on the video. The strapline is smaller than display size and scales with its column
   (cqi) so each phrase stays on one line. */
.hero.split { display: block; min-height: 0; }
.hero.split .wrap { max-width: none; padding: 0 0 0 max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s8); align-items: stretch; min-height: min(84vh, 780px); }
.hero.split .copy { max-width: none; container-type: inline-size; align-self: center; padding-block: var(--s9) var(--s8); }
.hero.split h1.strapline { font-size: min(var(--fs-strapline-split), 11cqi); }
.hero.split .lead { font-size: var(--fs-body); }
.hero-video { position: relative; overflow: hidden; background: var(--deep);
	-webkit-mask-image: linear-gradient(90deg, transparent 0, var(--deep) 38%), linear-gradient(180deg, var(--deep) 72%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, var(--deep) 38%), linear-gradient(180deg, var(--deep) 72%, transparent 100%);
	-webkit-mask-composite: source-in; mask-composite: intersect; }
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero .lead { color: var(--fog); }
.hero.compact { min-height: min(64vh, 640px); }
.hero.compact h1 { font-size: var(--fs-h1); }
.hero.plain { min-height: 0; }
.hero.plain .wrap { padding-top: var(--s9); padding-bottom: var(--s9); }
.hero.plain .copy { max-width: 60%; }
.hero .downloads { margin-top: var(--s6); }
.breadcrumb { font-family: var(--font-mono); font-size: var(--fs-tag); letter-spacing: .1em; text-transform: uppercase; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--link-dark); text-decoration: none; }
.breadcrumb a:hover { color: var(--on-dark); text-decoration: underline; }
.breadcrumb span::before { content: '/'; color: var(--fog); margin-right: 10px; }
.breadcrumb span { color: var(--fog); }
@media (max-width: 900px) {
	.hero { min-height: 0; display: block; }
	.hero .media { position: relative; height: clamp(260px, 56vw, 440px); }
	.hero .scrim-left, .hero .scrim-right { background: linear-gradient(180deg, var(--scrim-05) 0, var(--scrim-25) 45%, var(--scrim) 78%, var(--scrim) 100%); }
	.hero .wrap { padding-top: 0; margin-top: -56px; padding-bottom: var(--s7); }
	.hero .copy, .hero.plain .copy { max-width: none; }
	.hero.split .wrap { grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin-top: 0; padding: 0 var(--gutter) var(--s7); min-height: 0; }
	.hero.split .copy { padding-block: 0; }
	/* full width above the text, fading into the page at the bottom */
	.hero.split .hero-video { order: -1; margin-inline: calc(-1 * var(--gutter)); height: clamp(240px, 62vw, 480px);
		-webkit-mask-image: linear-gradient(180deg, var(--deep) 62%, transparent 100%); mask-image: linear-gradient(180deg, var(--deep) 62%, transparent 100%); }
	.hero.compact { min-height: 0; }
	.hero.plain .wrap { margin-top: 0; padding-top: var(--s7); padding-bottom: var(--s7); }
}

/* ---------- Photo-fade section (text on the faded side) ---------- */
.fade { position: relative; background: var(--deep); color: var(--fog); overflow: hidden; display: grid; align-items: center; min-height: 600px; padding: 0; }
.fade .wrap { position: relative; z-index: 1; width: 100%; padding-block: var(--s10); display: grid; grid-template-columns: minmax(0, 46%) 1fr; }
.fade.right .wrap { grid-template-columns: 1fr minmax(0, 46%); }
.fade.right .copy { grid-column: 2; }
.fade h2, .fade h3 { color: var(--on-dark); }
.fade h2 { font-size: var(--fs-h2-fade); line-height: 1; letter-spacing: -.015em; }
.fade .lead { color: var(--fog); }
.fade.banner { min-height: 440px; }
.fade.banner h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem); }
.fade + .fade { border-top: 1px solid var(--line-dark); }
.fade.nomedia .wrap { grid-template-columns: 1fr; }
.fade.nomedia .copy { max-width: 60%; grid-column: 1; }
.offer-links { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.offer-links a { color: var(--on-dark); text-decoration: none; font-size: var(--fs-small); display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line-dark); }
.offer-links a::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--kicker-dark); flex: none; }
.offer-links a:hover { color: var(--kicker-dark); }
@media (max-width: 900px) {
	.fade { display: block; min-height: 0; }
	.fade .media { position: relative; height: clamp(240px, 52vw, 420px); }
	.fade .scrim-left, .fade .scrim-right { background: linear-gradient(180deg, var(--scrim-05) 0, var(--scrim-25) 45%, var(--scrim) 78%, var(--scrim) 100%); }
	.fade .wrap, .fade.right .wrap { grid-template-columns: 1fr; padding-top: 0; margin-top: -48px; padding-bottom: var(--s8); }
	.fade.right .copy, .fade.nomedia .copy { grid-column: 1; max-width: none; }
	.fade.nomedia .wrap { margin-top: 0; padding-top: var(--s8); }
	.fade.banner { min-height: 0; }
	.offer-links { grid-template-columns: 1fr; }
}

/* ---------- Section headers and grids ---------- */
.sec-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s5) var(--s8); align-items: end; margin-bottom: var(--s8); }
.sec-head .lead { margin: 0; padding-bottom: 6px; }
.sec-head h2 { margin: 0; }
.sec-head .side { justify-self: start; }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; margin-bottom: var(--s6); } }
.grid { display: grid; gap: var(--s5); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .grid { gap: var(--s4); } }
.group-head { display: flex; align-items: baseline; gap: var(--s4); margin: var(--s8) 0 var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.group-head:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.group-head .n { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-label); color: var(--kicker); }
.group-head h3 { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); }
.group-head .more { margin-left: auto; }

/* ---------- Cards ---------- */
.card { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); position: relative; }
.card h3 { margin-bottom: .35em; }
.card p { font-size: var(--fs-small); color: var(--muted); }
.card.accent { border-top: 4px solid var(--a1); }
.card.accent.a2 { border-top-color: var(--a2); } .card.accent.a3 { border-top-color: var(--a3); } .card.accent.a4 { border-top-color: var(--a4); } .card.accent.a5 { border-top-color: var(--a5); } .card.accent.a6 { border-top-color: var(--a6); }
.card .num { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .1em; color: var(--a1-text); display: block; margin-bottom: var(--s3); }
.card .num.a2 { color: var(--a2-text); } .card .num.a3 { color: var(--a3-text); } .card .num.a4 { color: var(--a4-text); } .card .num.a5 { color: var(--a5-text); } .card .num.a6 { color: var(--a6-text); }
a.card { display: block; text-decoration: none; color: inherit; transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: inherit; }
.offer { padding: var(--s6) var(--s5); }
.offer h3 { font-size: 1.375rem; }
.offer .inds { font-size: var(--fs-label); color: var(--muted); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); line-height: 1.6; }
.offer .inds a { color: var(--link); }
.card.row { display: flex; gap: 14px; align-items: center; }
.card.row .num { margin: 0; }
.card.row strong { font-family: var(--font-head); font-size: 1.25rem; color: var(--heading); line-height: 1.15; }
.card .more { margin-top: var(--s3); }
.offering .tag { display: inline-block; margin-bottom: 8px; }
.note-card { margin-top: var(--s5); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: start; }
.note-card .label { margin: 4px 0 0; white-space: nowrap; }
.note-card h3 { font-size: 1.25rem; }
@media (max-width: 700px) { .note-card { grid-template-columns: 1fr; gap: var(--s2); } }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pills a { display: inline-block; padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card-bg); color: var(--heading); text-decoration: none; font-size: var(--fs-small); }
.pills a:hover { border-color: var(--link); color: var(--link); }

/* Photo tiles (industries): caption on a solid bar; the photo fades INTO the bar */
.tile { position: relative; display: block; text-decoration: none; color: var(--on-dark); background: var(--deep); border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--scrim-0) 40%, var(--scrim-55) 62%, var(--scrim) 80%); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 var(--s4) var(--s4); background: var(--deep); }
.tile .cap::before { content: ''; display: block; height: 10px; }
.tile .cap strong { display: block; font-family: var(--font-head); font-weight: var(--weight-head); font-size: 1.375rem; line-height: 1.1; color: var(--on-dark); }
.tile .cap span { display: block; font-size: var(--fs-label); color: var(--fog); margin-top: 4px; line-height: 1.4; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.05); }
.tile:hover { color: var(--on-dark); }
.tile.all { background: var(--navy); display: flex; align-items: flex-end; padding: var(--s4); }
.tile.all::after { display: none; }
.tile.all strong { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.1; color: var(--on-dark); display: block; }
.tile.all .more { margin-top: 10px; }
@media (max-width: 600px) {
	.tile { aspect-ratio: auto; display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 96px; }
	.tile img { position: static; height: 100%; min-height: 96px; }
	.tile::after { display: none; }
	.tile .cap { position: static; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
	.tile .cap::before { display: none; }
	.tile .cap strong { font-size: 1.125rem; }
	.tile .cap span { font-size: var(--fs-tag); }
	.tile.all { grid-template-columns: 1fr; min-height: 0; padding: 18px 14px; }
}

/* Project cards and gallery */
.project { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform var(--t) var(--ease), box-shadow var(--t); }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.project img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.project .body { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.project h3 { font-size: 1.25rem; margin: 2px 0 0; }
.project p { font-size: var(--fs-small); color: var(--muted); }
.project .more { margin-top: auto; padding-top: var(--s3); }

/* ---------- Problem -> fix rows ---------- */
.painfix { display: grid; gap: var(--s4); }
.pf { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1.5fr); align-items: stretch; }
.pf .pain, .pf .fix { padding: var(--s5); border-radius: var(--r); display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.pf .pain { background: var(--soft); }
.pf .pain .label { color: var(--problem); margin: 0 0 4px; }
.pf .pain strong { font-family: var(--font-head); font-weight: var(--weight-head); font-size: 1.5rem; line-height: 1.1; color: var(--heading); }
.pf .arrow { align-self: center; justify-self: center; width: 14px; height: 14px; border-top: 3px solid var(--heading); border-right: 3px solid var(--heading); transform: rotate(45deg); }
.pf .fix { background: var(--card-dark); color: var(--fog); box-shadow: inset 4px 0 0 var(--a1-dark); }
.pf .fix .label { margin: 0 0 4px; color: var(--a1-dark); }
.pf .fix strong { font-family: var(--font-head); font-weight: var(--weight-head); font-size: 1.5rem; line-height: 1.1; color: var(--on-dark); }
.pf .fix span { font-size: var(--fs-small); }
.pf.a2 .fix { box-shadow: inset 4px 0 0 var(--a2-dark); } .pf.a2 .fix .label { color: var(--a2-dark); }
.pf.a3 .fix { box-shadow: inset 4px 0 0 var(--a3-dark); } .pf.a3 .fix .label { color: var(--a3-dark); }
.pf.a4 .fix { box-shadow: inset 4px 0 0 var(--a4-dark); } .pf.a4 .fix .label { color: var(--a4-dark); }
@media (max-width: 700px) { .pf { grid-template-columns: 1fr; gap: 6px; } .pf .arrow { transform: rotate(135deg); margin: 2px 0; } }

/* Diagram panel */
.diagram { margin-top: var(--s7); background: var(--soft); border-radius: var(--r-lg); padding: var(--s6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s6); align-items: center; }
.diagram img { width: 100%; height: auto; background: var(--white); border-radius: var(--r-sm); }
.diagram h3 { margin: 0; }
.diagram p { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 900px) { .diagram { grid-template-columns: 1fr; padding: var(--s5); } }

/* ---------- Steps rail ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s5); position: relative; }
.steps.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps::before { content: ''; position: absolute; left: 24px; right: 24px; top: 24px; height: 2px; background: var(--line); }
.step { position: relative; }
.step .dot { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 1rem; background: var(--a1); color: var(--a1-on); position: relative; margin-bottom: var(--s4); box-shadow: 0 0 0 6px var(--paper); }
.step.a2 .dot { background: var(--a2); color: var(--a2-on); } .step.a3 .dot { background: var(--a3-text); color: var(--a3-on); } .step.a4 .dot { background: var(--a4-text); color: var(--a4-on); } .step.a5 .dot { background: var(--a5-text); color: var(--a5-on); } .step.a6 .dot { background: var(--a6); color: var(--a6-on); }
.soft .step .dot { box-shadow: 0 0 0 6px var(--soft); }
.step h3 { font-size: 1.375rem; margin-bottom: .25em; }
.step p { font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 1100px) { .steps, .steps.n4, .steps.n5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps::before { display: none; } }
@media (max-width: 600px) { .steps, .steps.n4, .steps.n5 { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } .step { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px var(--s4); } .step .dot { margin: 0; grid-row: 1 / 3; } .step h3, .step p { grid-column: 2; } .step h3 { margin: 0; align-self: center; } }

/* ---------- Lists ---------- */
ul.ticks, ul.dots, ul.plain { list-style: none; padding: 0; margin: 0; }
ul.ticks li, ul.dots li { padding-left: 1.7em; position: relative; margin-bottom: .55em; }
ul.ticks li::before { content: ''; position: absolute; left: 2px; top: .5em; width: .75em; height: .4em; border-left: 2.5px solid var(--tick); border-bottom: 2.5px solid var(--tick); transform: rotate(-45deg); }
ul.dots li::before { content: ''; position: absolute; left: 4px; top: .65em; width: 7px; height: 7px; background: var(--tick); border-radius: 50%; }
.dark ul.ticks li::before, .fade ul.ticks li::before { border-color: var(--tick-dark); }
.dark ul.dots li::before, .fade ul.dots li::before { background: var(--tick-dark); }
ul.ticks.cols { columns: 2; column-gap: var(--s6); }
ul.ticks.cols li { break-inside: avoid; }
ul.ticks.big li { font-family: var(--font-head); font-size: 1.375rem; line-height: 1.2; margin-bottom: .7em; color: var(--heading); }
.dark ul.ticks.big li { color: var(--on-dark); }
@media (max-width: 600px) { ul.ticks.cols { columns: 1; } }
.why { display: grid; gap: var(--s4); }
.why li { display: grid; grid-template-columns: 36px 1fr; gap: var(--s3); align-items: start; }
.why .n { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--kicker-dark); padding-top: 6px; letter-spacing: var(--tracking-btn); }
.why strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--on-dark); line-height: 1.2; }
.why span { font-size: var(--fs-small); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card-bg); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); min-width: 640px; }
th { background: var(--navy); color: var(--on-dark); text-align: left; font-weight: 600; padding: 14px 16px; font-family: var(--font-mono); font-size: var(--fs-tag); letter-spacing: .1em; text-transform: uppercase; }
td { padding: 14px 16px; vertical-align: top; border-top: 1px solid var(--line); }
tr:nth-child(even) td { background: var(--soft); }
td:first-child { font-weight: 600; color: var(--heading); white-space: nowrap; }
.note { font-size: var(--fs-small); color: var(--muted); margin-top: var(--s4); }
@media (max-width: 700px) {
	table { min-width: 0; }
	thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	table, tbody, tr, td { display: block; }
	tr { border-top: 4px solid var(--navy); padding: 6px 0 10px; }
	tr:nth-child(even) td { background: none; }
	tr:nth-child(even) { background: var(--soft); }
	td { border: 0; padding: 8px 16px; white-space: normal; }
	td:first-child { font-family: var(--font-head); font-size: 1.125rem; padding-top: 10px; }
	td[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--kicker); margin-bottom: 2px; }
}

/* ---------- Accordion ---------- */
details { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--r); margin-top: var(--s3); padding: 0 var(--s5); transition: box-shadow var(--t); }
details[open] { padding-bottom: var(--s5); box-shadow: var(--shadow-sm); }
summary { cursor: pointer; font-family: var(--font-head); font-weight: var(--weight-head); font-size: 1.25rem; color: var(--heading); padding: 18px 0; list-style: none; display: flex; align-items: center; gap: 14px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ''; flex: none; width: 28px; height: 28px; border-radius: 50%; background-color: var(--mist); background-image: linear-gradient(var(--kicker), var(--kicker)), linear-gradient(var(--kicker), var(--kicker)); background-size: 12px 2px, 2px 12px; background-position: center; background-repeat: no-repeat; }
details[open] summary::before { background-size: 12px 2px, 0 0; }
summary:hover { color: var(--link); }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); margin-top: var(--s4); }
.compare ul { margin-top: 12px; font-size: var(--fs-small); }
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s4); }
.tool { background: var(--soft); border-radius: var(--r); padding: var(--s4) var(--s5); }
.tool .label { margin-bottom: 4px; }
.tool p { font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 900px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tools { grid-template-columns: 1fr; } }
.limits { background: var(--mist); border-left: 4px solid var(--tick); padding: var(--s4) var(--s5); border-radius: 0 var(--r) var(--r) 0; margin-top: var(--s4); font-size: var(--fs-small); }

/* ---------- Downloads ---------- */
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.downloads a { font-family: var(--font-mono); font-size: var(--fs-tag); letter-spacing: var(--tracking-btn); text-transform: uppercase; text-decoration: none; padding: 10px 14px; border: 1px solid var(--on-dark-40); color: var(--on-dark); border-radius: var(--r-pill); display: inline-flex; gap: 8px; align-items: center; }
.downloads a::before { content: ''; width: 10px; height: 12px; border: 2px solid currentColor; border-radius: 2px; }
.downloads a:hover { border-color: var(--on-dark); background: var(--on-dark-08); color: var(--on-dark); }
.downloads.light a { border-color: var(--heading); color: var(--heading); }
.downloads.light a:hover { background: var(--heading); color: var(--paper); }

/* ---------- CTA / contact block (every page) ---------- */
.cta { background: var(--navy); color: var(--on-dark); }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s6) var(--s8); align-items: center; }
.cta h2 { color: var(--on-dark); font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem); line-height: 1; margin: 0 0 .3em; }
.cta p { color: var(--fog); max-width: 36em; }
.cta .contact { display: grid; gap: 14px; justify-items: start; }
.cta .contact a.big { font-family: var(--font-head); font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem); color: var(--on-dark); text-decoration: none; line-height: 1.1; }
.cta .contact a.big:hover { color: var(--link-dark); }
.cta .contact .label { margin: 0; }
.cta .contact .btn { margin-top: 8px; }
@media (max-width: 900px) { .cta .wrap { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); font-size: var(--fs-small); padding: var(--s8) 0 var(--s6); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s6); }
.site-footer h4 { color: var(--on-dark); font-family: var(--font-mono); font-size: var(--fs-tag); letter-spacing: var(--tracking-label); text-transform: uppercase; margin-bottom: var(--s3); font-weight: 500; }
.site-footer a { color: var(--footer-link); text-decoration: none; }
.site-footer a:hover { color: var(--link-dark); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .logo { margin-bottom: var(--s4); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line-dark); padding-top: var(--s5); margin-top: var(--s4); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; font-size: var(--fs-label); }
.accred { font-family: var(--font-mono); font-size: var(--fs-tag); letter-spacing: var(--tracking-btn); text-transform: uppercase; color: var(--kicker-dark); }
@media (max-width: 900px) { .site-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
	.reveal { opacity: 1; transform: none; }
	.tile:hover img { transform: none; }
}
