/* Datum Engineering: layout and component styles. Colours come from the theme.json palette
   (Appearance › Editor › Styles), so changing a palette colour there updates the whole site. */
:root {
	--paper: var(--wp--preset--color--paper);
	--sheet: var(--wp--preset--color--sheet);
	--ink: var(--wp--preset--color--ink);
	--muted: var(--wp--preset--color--muted);
	--line: var(--wp--preset--color--line);
	--accent: var(--wp--preset--color--accent);
	--accent-ink: var(--wp--preset--color--accent-ink);
	--accent-soft: var(--wp--preset--color--accent-soft);
	--amber: var(--wp--preset--color--amber);
	--amber-soft: var(--wp--preset--color--amber-soft);
	--led: var(--wp--preset--color--led);
	--led-off: var(--wp--preset--color--led-off);
	--cyan: var(--wp--preset--color--cyan);
	--green: var(--wp--preset--color--green);
	--f-display: var(--wp--preset--font-family--display);
	--f-mono: var(--wp--preset--font-family--mono);
	--grid: color-mix(in srgb, var(--accent) 6%, transparent);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
body .wp-site-blocks > * + * { margin-block-start: 0; }
body .wp-block-post-content > .alignfull { margin-block: 0; }

/* shared small type */
.label, .crumb, .dimline, .step-n, .spec-title { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.crumb { text-transform: none; letter-spacing: 0; font-size: 0.8rem; }
.crumb a { color: var(--muted); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 58ch; }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--sheet); border-bottom: 1px solid var(--line); }
body.admin-bar .site-header { top: calc(var(--wp-admin--admin-bar--height, 0px) + env(safe-area-inset-top, 0px)); }
body .header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 12px; }
body .header-row > * { margin-block: 0; }
body .brand { display: flex; align-items: center; gap: 10px; }
body .brand > * { margin-block: 0; }
.brand .wp-block-site-title { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; }
.brand .wp-block-site-title a { color: var(--ink); text-decoration: none; }
.main-nav { font-size: 0.85rem; font-weight: 400; }
.main-nav a { color: var(--muted); text-decoration: none; padding: 8px 8px; border-radius: 6px; display: inline-block; }
.main-nav a:hover { color: var(--ink); background: var(--paper); }
.main-nav .current-menu-item > a, .main-nav [aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* buttons */
.wp-block-button.is-style-outline > .wp-block-button__link { color: var(--accent); border: 1px solid var(--accent); background: transparent; }
.wp-block-button__link { min-height: 46px; display: inline-flex; align-items: center; }

/* sections */
.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { max-width: 70ch; margin-bottom: 32px; }
body .sec-head > * { margin-block: 0 10px; }
.sec-head p:not(.label) { color: var(--muted); }

/* heroes: drawing-sheet grid */
.hero { background-color: var(--sheet); border-bottom: 1px solid var(--line);
	background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 24px 24px; padding-block: 64px 56px; }
.page-hero { padding-block: 48px 40px; }
body .hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
body .hero-grid > * { margin-block: 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.dimline { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.dimline::before, .dimline::after { content: ""; height: 1px; background: currentColor; flex: 1; }
.hero-figure svg { width: 100%; height: auto; display: block; max-width: 460px; margin-inline: auto; }
@media (max-width: 860px) { body .hero-grid { grid-template-columns: 1fr; } .hero { padding-block: 40px; } .hero-figure svg { max-width: 340px; } }

/* grids */
body .svc-grid, body .sectors-grid, body .steps, body .split, body .teaser, body .contact-grid, body .titleblock, body .details { display: grid; gap: 16px; }
body .svc-grid > *, body .sectors-grid > *, body .steps > *, body .split > *, body .teaser > *, body .contact-grid > *, body .titleblock > *, body .details > * { margin-block: 0; min-width: 0; }
.svc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sectors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px !important; align-items: start; }
.teaser { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px !important; align-items: center; }
.contact-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px !important; align-items: start; }
@media (max-width: 980px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .split, .teaser, .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .sectors-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .svc-grid { grid-template-columns: 1fr; } }

/* service cards */
.svc, .sector, .detail { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
body .svc > *, body .sector > *, body .detail > * { margin-block: 0 10px; }
body .svc > :last-child, body .sector > :last-child, body .detail > :last-child { margin-bottom: 0; }
.svc { display: flex; flex-direction: column; transition: border-color .15s; }
.svc:hover { border-color: var(--accent); }
.svc .icon svg { width: 40px; height: 40px; color: var(--accent); display: block; }
.svc p:not(.more) { color: var(--muted); font-size: 0.95rem; flex: 1; }
.svc .more a { font-weight: 600; text-decoration: none; }
.sector p { color: var(--muted); }
.chips-line { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink) !important; }

/* process steps */
.steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 !important; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); overflow: hidden; }
.steps > * { padding: 20px; border-right: 1px solid var(--line); }
.steps > :last-child { border-right: 0; }
body .steps > * > * { margin-block: 0 8px; }
.step-n { color: var(--accent); }
.steps h3 { font-size: 1.25rem; }
.steps p:not(.step-n) { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .steps > * { border-right: 0; border-bottom: 1px solid var(--line); } .steps > :last-child { border-bottom: 0; } }

/* prose + ticks */
.prose { max-width: 64ch; }
.ticks { list-style: none; padding-left: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 10px; box-sizing: border-box; border: 2px solid var(--accent); border-radius: 50%; }

/* spec table */
.spec { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
body .spec > * { margin-block: 0; }
.spec-title { padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
body .spec-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.spec-row:last-child { border-bottom: 0; }
body .spec-row > * { margin: 0; }
.spec-row > :first-child { color: var(--muted); }
.spec-row > :last-child { font-family: var(--f-mono); font-size: 0.85rem; overflow-wrap: anywhere; }
@media (max-width: 420px) { body .spec-row { grid-template-columns: 1fr; gap: 2px; } }
.placeholder, mark.placeholder { color: var(--amber); background: var(--amber-soft); padding: 0 4px; border-radius: 3px; }

/* CAD viewer */
.viewer-card { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
body .viewer-card > * { margin-block: 0; }
.viewer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
body .viewer-head > * { margin-block: 0 6px; }
.viewer-head p:not(.label) { color: var(--muted); font-size: 0.92rem; max-width: 64ch; }
.viewer-foot { padding: 14px 20px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.cad-viewer__frame { display: block; width: 100%; height: var(--viewer-h, 600px); border: 0; background: var(--paper); }
@media (max-width: 760px) { .cad-viewer__frame { height: 980px; } }
.cad-viewer--pending { height: var(--viewer-h, 600px); display: grid; place-items: center; text-align: center; padding: 24px; background: var(--paper); color: var(--muted); font-family: var(--f-mono); font-size: 0.85rem; }
@media (max-width: 760px) { .cad-viewer--pending { height: 360px; } }

/* overlay illustration */
.overlay-fig { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.overlay-fig svg { width: 100%; height: auto; display: block; }

/* callout */
.callout { background: var(--sheet); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; box-shadow: inset 3px 0 0 var(--led); }
body .callout > * { margin-block: 0; }
body .callout-text > * { margin-block: 0 6px; }
.callout h2 { color: var(--ink); font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.callout p { color: var(--muted); }
.callout .wp-block-button__link { background: var(--accent); color: var(--accent-ink); }

/* enquiry form */
form.enquiry { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 16px; }
form.enquiry p { margin: 0; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.enquiry .field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.enquiry label, .enquiry legend { font-size: 0.88rem; font-weight: 500; }
.enquiry input:not([type="checkbox"]), .enquiry select, .enquiry textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; min-height: 44px; width: 100%; }
.enquiry textarea { min-height: 140px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font-weight: 400; cursor: pointer; min-height: 44px; }
.checks input { accent-color: var(--accent); width: 16px; height: 16px; }
.enquiry button { cursor: pointer; border: 0; min-height: 46px; padding: 0 22px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.95rem; }
.form-note { padding: 12px 14px; border-radius: 6px; }
.form-note--ok { background: var(--accent-soft); border: 1px solid var(--accent); }
.form-note--err { background: var(--amber-soft); border: 1px solid var(--amber); }
.enquiry .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enquiry .field--type select { font-weight: 500; }
.enq-body, .contact-phone { display: grid; gap: 16px; }
.contact-phone { padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.checks label { align-self: flex-start; }
.checks--days label { min-width: 64px; justify-content: center; }
.enquiry [hidden] { display: none !important; }
.detail .v { font-family: var(--f-mono); overflow-wrap: anywhere; }

/* title-block footer */
.site-footer { background: var(--sheet); border-top: 1px solid var(--line); }
.footer-inner { padding-block: 32px; }
.titleblock { grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); gap: 0 !important; border: 1.5px solid var(--ink); font-size: 0.85rem; }
.titleblock > * { padding: 10px 12px; border-right: 1px solid var(--ink); }
.titleblock > :last-child { border-right: 0; }
body .titleblock > * > * { margin: 0; }
.titleblock .label { font-size: 0.66rem; }
.titleblock .v { font-family: var(--f-mono); }
.titleblock .wp-block-site-title { font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; }
.titleblock .wp-block-site-title a { color: var(--ink); text-decoration: none; }
@media (max-width: 760px) {
	.titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.titleblock > * { border-bottom: 1px solid var(--ink); }
	.titleblock > :first-child { grid-column: 1 / -1; border-right: 0; }
}
.foot-links { font-size: 0.88rem; color: var(--muted); margin: 0; }
.foot-links a { color: var(--muted); text-decoration: none; margin-right: 18px; }
.foot-links a:hover { color: var(--accent); }

/* case study */
body .case-study > * + * { margin-block-start: 40px; }
.steps.six { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px !important; background: var(--line); }
.steps.six > * { border: 0 !important; background: var(--sheet); }
@media (max-width: 900px) { .steps.six { grid-template-columns: 1fr; } }
/* scanning layout diagram */
.layout-fig { margin: 24px 0 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.layout-fig svg { width: 100%; max-width: 760px; height: auto; display: block; margin-inline: auto;
	--d-red: var(--led); --d-blue: var(--cyan); --d-ink: var(--ink); --d-muted: var(--muted); --d-bg: var(--sheet);
	--d-fov: color-mix(in srgb, var(--ink) 9%, transparent); --d-ok: var(--green); --d-okfill: color-mix(in srgb, var(--cyan) 12%, var(--sheet));
	--d-badfill: color-mix(in srgb, var(--led) 16%, var(--sheet)); --d-mono: var(--f-mono); --d-sans: var(--wp--preset--font-family--body); }
.layout-fig figcaption { margin-top: 12px; font-size: 0.88rem; color: var(--muted); max-width: 70ch; }

p.note { font-size: 0.9rem; color: var(--muted); }

/* experience */
body .exp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; align-items: start; }
body .exp > * { margin-block: 0; min-width: 0; }
body .exp-intro > * { margin-block: 0 14px; }
.exp-figure { display: grid; gap: 2px; }
.exp-num { font-family: var(--f-display); font-weight: 700; font-size: clamp(4.5rem, 10vw, 7rem); line-height: 0.9; color: var(--accent); }
.exp-unit { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; line-height: 1.1; text-transform: uppercase; }
.exp-intro p:not(.label):not(.exp-figure) { color: var(--muted); max-width: 46ch; }
body .exp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
body .exp-cell { background: var(--sheet); padding: 18px; margin: 0; display: flex; align-items: center; min-height: 84px; }
body .exp-cell > *, body .exp-cell p { margin: 0; font-weight: 500; line-height: 1.35; }
@media (max-width: 980px) { body .exp { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 600px) { body .exp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } body .exp-cell { min-height: 72px; padding: 14px; font-size: 0.92rem; } body .exp-cell:last-child { grid-column: 1 / -1; } }

/* who we work with */
.scale-strips { display: grid; gap: 22px; }

.who-head { max-width: 72ch; }
.who-strong { color: var(--ink) !important; font-weight: 500; }
.scale-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.scale-end { color: var(--ink); font-weight: 500; white-space: nowrap; }
.scale-mid { color: var(--accent); white-space: nowrap; }
.scale-line { flex: 1 1 40px; min-width: 40px; height: 12px; border-left: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); background: linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat; }
@media (max-width: 760px) { .scale-strip { flex-direction: column; align-items: flex-start; } .scale-line { width: 12px; min-width: 0; flex: 0 0 28px; height: auto; border: 0; border-top: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); background-size: 1.5px 100%; margin-left: 20px; } .scale-mid { white-space: normal; } }

/* sectors */
.sectors-grid.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .sectors-grid.quad { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sectors-grid.quad { grid-template-columns: 1fr; } }
.sector-other { background: transparent; border-style: dashed; }
.sector-other .more a { font-weight: 600; text-decoration: none; }

/* accuracy table */
body .acc-points > * { margin-block: 0 18px; }
body .acc-points > * > * { margin-block: 0 6px; }
.acc-points h3 { font-size: 1.3rem; }
.acc { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.acc > p { margin: 0; }
.acc-scroll { overflow-x: auto; }
.acc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.acc th, .acc td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.acc th { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.acc td:first-child, .acc td:last-child { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc td:last-child, .acc th:last-child { text-align: right; }
.acc td:last-child { color: var(--accent); font-weight: 500; }
.acc-formula { padding: 12px 18px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); background: var(--paper); }
.svc-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .svc-grid.three { grid-template-columns: 1fr; } }
.svc.static:hover { border-color: var(--line); }
.steps.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px !important; background: var(--line); }
.steps.eight > * { border: 0 !important; background: var(--sheet); }
@media (max-width: 980px) { .steps.eight { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps.eight { grid-template-columns: 1fr; } }
.sectors-grid.trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .sectors-grid.trio { grid-template-columns: 1fr; } }
body .case-study > .sec-head + * { margin-block-start: 0; }
.case-fig { margin: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.case-fig svg { width: 100%; height: auto; display: block; }
.case-fig figcaption { margin-top: 12px; font-size: 0.88rem; color: var(--muted); }

/* blog / posts */
.post-list .wp-block-post { padding-block: 24px; border-bottom: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Digital Dog LED lettering (assets/js/led.js) */
.led-svg { display: block; height: 1em; width: auto; max-width: 100%; overflow: visible; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--led) 55%, transparent)); }
.led-on { fill: var(--led); }
.led-off { fill: var(--led-off); }
.led-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand .wp-block-site-title a { display: inline-flex; align-items: center; font-size: 1.5rem; }
.brand .wp-block-site-title a .led-svg { height: 1.15em; max-width: none; }
.exp-num .led-svg { height: 0.82em; }
.exp-num { text-shadow: none; }
h1 em { text-shadow: 0 0 18px color-mix(in srgb, var(--led) 45%, transparent); }
.label, .step-n, .crumb, .dimline, .spec-title, .chips-line, .acc-formula { font-family: var(--f-mono); }

/* All text in Share Tech Mono, which has a single weight: keep headings at their real weight */
h1, h2, h3, h4, .wp-block-site-title, .exp-unit, .exp-num { font-weight: 400 !important; font-synthesis-weight: none; letter-spacing: 0.01em; }
.svc .more a, .sector-other .more a, .exp-cell p, .enquiry label, .enquiry legend { font-weight: 400; }

/* Headings use Digital Segment LED (theme.json); all other text uses Share Tech Mono */
