/* ==================================================================================================================
   Metal Craft Engineering, round D2 (M2, 15 Nov 2026): the square matrix (d1-matrix.js draws it). Hosts, set by build.py
   as markup classes only: .d1-mx--hero (the three Forge heroes), .d1-mx--band (the closing call to action on seven pages),
   .d1-mx--form (Contact, the enquiry section). One treatment only, light (owner 13:15: "do not keep the matrix dark";
   html[data-matrix] is ignored), and no strings in a matrix section ("dont put the strands in that section"): the band and
   the enquiry section lay their own opaque board and grain (lined up with body's by d1-matrix.js) over the strings layer.
   Everything here is off under html[data-bg="live"] (the live look exactly), in print, forced colours and "more contrast".
   No layout moves: the canvases are absolutely placed, and the isolation below only makes a stacking context.
   ================================================================================================================== */
.d1-mxc{position:absolute;left:0;top:0;z-index:-1;display:none;pointer-events:none;image-rendering:pixelated;opacity:0;transition:opacity 1.4s cubic-bezier(.33,1,.68,1)}
.d1-mxc.is-in{opacity:1}
@media screen and (forced-colors:none){@media not all and (prefers-contrast:more){

html.d1mx-on:not([data-bg="live"]) .d1-mxc{display:block}
html:not([data-bg="live"]) .d1-mx--failed .d1-mxc{display:none}
/* The hero: the canvas is the text block's first child; the block becomes a stacking context, so the cells paint above the
   hero's shade and the upright screens' board backing, and under the text. Its containing block stays the hero. */
html:not([data-bg="live"]) .d1-mx--hero .hero-in{isolation:isolate}
html:not([data-bg="live"]) main>.d1-mx--form{position:relative;isolation:isolate;overflow-x:clip}   /* no scrollbar while a resize settles (CR) */

/* The band and the enquiry section: the board and its grain, opaque, so the strings (main's first child, under every
   section) stop at the section's edges. --mxg-p (d1-matrix.js) lines the grain up with body's; without it (no scripts) the
   grain tiles from the section's corner. Out-ranks d1-bg.css's clear and poster rules for these two hosts (three classes). */
html:not([data-bg="live"]) main>.d1-mx.d1-mx.d1-mx:is(.d1-mx--band,.d1-mx--form){background-color:var(--bg);
  background-image:var(--board-grain);background-attachment:scroll;background-size:auto;background-repeat:repeat;
  background-position:var(--mxg-p,0 0,131px 67px)}

/* No scripts, or no 2D canvas: stills of the same shapes in crisp cells (10 px pitch, 2 px gaps), never a box. The hero's
   hangs on its shade (the hero's own ::before is the no-script phone still band, tabs.css) and stays inside 44% of the
   width, short of the Forge subject. */
html:is(:not(.js),.d1mx-still):not([data-bg="live"]) .d1-mx--hero .hero-shade::after,html:not([data-bg="live"]) .d1-mx--hero.d1-mx--failed .hero-shade::after,
html:is(:not(.js),.d1mx-still):not([data-bg="live"]) main>.d1-mx--band::before,
html:not([data-bg="live"]) main>.d1-mx--failed::before,
html:is(:not(.js),.d1mx-still):not([data-bg="live"]) main>.d1-mx--form::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  -webkit-mask-image:repeating-linear-gradient(90deg,transparent 0 2px,#000 2px 10px),repeating-linear-gradient(180deg,transparent 0 2px,#000 2px 10px);
  -webkit-mask-composite:source-in;
  mask-image:repeating-linear-gradient(90deg,transparent 0 2px,#000 2px 10px),repeating-linear-gradient(180deg,transparent 0 2px,#000 2px 10px);
  mask-composite:intersect}
html:is(:not(.js),.d1mx-still):not([data-bg="live"]) .d1-mx--hero .hero-shade::after,html:not([data-bg="live"]) .d1-mx--hero.d1-mx--failed .hero-shade::after{left:0;top:15%;width:44%;height:85%;
  background:radial-gradient(ellipse 100% 60% at 0 55%,rgba(94,95,102,.24),rgba(94,95,102,.1) 55%,rgba(94,95,102,0) 100%)}
/* The band: low steel columns rising from the bottom on the right, fading toward the text. */
html:is(:not(.js),.d1mx-still):not([data-bg="live"]) main>.d1-mx--band::before{right:0;bottom:0;width:50%;height:45%;
  background:linear-gradient(0deg,rgba(94,95,102,.26),rgba(94,95,102,.08) 70%,rgba(94,95,102,0));
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 40%),repeating-linear-gradient(90deg,transparent 0 2px,#000 2px 10px),repeating-linear-gradient(180deg,transparent 0 2px,#000 2px 10px);
  mask-image:linear-gradient(90deg,transparent,#000 40%),repeating-linear-gradient(90deg,transparent 0 2px,#000 2px 10px),repeating-linear-gradient(180deg,transparent 0 2px,#000 2px 10px)}
/* Contact: a light steel strip from the page's right edge. */
html:is(:not(.js),.d1mx-still):not([data-bg="live"]) main>.d1-mx--form::before{right:0;top:0;width:30%;height:100%;
  background:linear-gradient(270deg,rgba(94,95,102,.24),rgba(94,95,102,.1) 55%,rgba(94,95,102,0));
  -webkit-mask-image:linear-gradient(180deg,transparent,#000 60px,#000 calc(100% - 60px),transparent),repeating-linear-gradient(90deg,transparent 0 2px,#000 2px 10px),repeating-linear-gradient(180deg,transparent 0 2px,#000 2px 10px);
  mask-image:linear-gradient(180deg,transparent,#000 60px,#000 calc(100% - 60px),transparent),repeating-linear-gradient(90deg,transparent 0 2px,#000 2px 10px),repeating-linear-gradient(180deg,transparent 0 2px,#000 2px 10px)}
}}
@media print{.d1-mxc{display:none}}
