/* ==========================================================================
   Enviroworx Solutions — forensic rebuild
   Tokens, reset, layout primitives.
   Every value here traces to a getBoundingClientRect()/getComputedStyle()
   reading taken from https://www.enviroworxsolutions.com — see README.md.
   ========================================================================== */

:root {
  /* --- canvas -------------------------------------------------------- */
  --canvas: 980px;          /* measured: Wix fixed desktop canvas          */
  --nav-strip: 1136px;      /* measured: menu strip, wider than the canvas */
  --nav-item: 189.3333px;   /* 1136 / 6 visible items                      */
  --hero-w: 2060px;         /* measured: banner overflows the canvas       */
  --hero-h: 391px;

  /* --- colour -------------------------------------------------------- */
  --green:        #037020;  /* rgb(3,112,32)   — buttons                   */
  --nav-bg:       #f1f1f1;  /* rgb(241,241,241)— menu strip                */
  --nav-active:   #323232;  /* rgb(50,50,50)   — current page item         */
  --nav-divider:  #ffffff;  /* 1px left border on each item                */
  --ink-heading:  #292929;  /* rgb(41,41,41)   — h1                        */
  --ink-body:     #000000;  /* rgb(0,0,0)      — body copy, header contact */
  --ink-muted:    #707070;  /* rgb(112,112,112)— footer, About body copy   */
  --ink-soft:     #171717;  /* rgb(23,23,23)   — Careers body copy         */
  --accent:       #0065a9;  /* rgb(0,101,169)  — About/Careers/Quote heads */
  --field-border: #a0a09f;  /* rgb(160,160,159)— form fields, map panel    */
  --on-green:     #ffffff;
  --page-bg:      #e8e8e8;  /* fallback under the marble texture           */

  /* --- type ----------------------------------------------------------
     Originals are Monotype webfonts licensed to Wix and not
     redistributable. Substitutes chosen by canvas measureText() against
     the live page — measurements in README.md.
       DIN Next W01 Light            -> Barlow      (+0.3%..+2.1%)
       Avenir LT W01 35 Light        -> Outfit      (-0.07%..-1.3%)
       Playfair Display              -> Playfair Display (exact, Google)
     ------------------------------------------------------------------- */
  /* Fallback stacks are measured, not guessed. The <h1> is nowrap in a
     980px column and its text is 973px wide, so a fallback more than ~1%
     wider overflows. Measured at 44px on this string:
       Outfit 972 · Segoe UI 965 · Arial 978 · Century Gothic 1055 (!)
     Century Gothic is the obvious "looks like Avenir" pick and it is the
     wrong one — it would push the headline out of its column wherever
     Google Fonts is blocked. */
  --font-ui:   "Outfit", "Segoe UI", Arial, Helvetica, sans-serif;
  --font-alt:  "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Playfair Display", Georgia, "Times New Roman", serif;

  --fs-h1: 44px;   --lh-h1: 52px;    /* measured 44px, span height 52      */
  --fs-body: 22px; --lh-body: 32px;  /* measured 22px, line step 32        */
  --fs-nav: 17px;  --lh-nav: 31px;   /* measured; item box height 31       */
  --fs-meta: 18px;                   /* header phone/email                 */
  --fs-foot: 14px;

  /* --- vertical rhythm (measured, see README "Known differences") ----- */
  --gap-blank: 32px;  /* authored blank line between paragraphs           */
  --gap-para:  27px;  /* authored paragraph margin                        */

  --focus: #116dff;   /* the site's own link blue, reused for focus rings  */
}

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

/* The hero deliberately exceeds the canvas at every width, so the clip has
   to sit on <html> as well as <body> — clipping only <body> still lets the
   document element grow and produces a horizontal scrollbar. Caught by the
   responsive pass at 320 / 375 / 768. */
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  color: var(--ink-body);
  background-color: var(--page-bg);
  overflow-x: clip;               /* the hero deliberately exceeds the canvas */
}

img { display: block; max-width: 100%; height: auto; border: 0; }

a { color: inherit; }

ul { margin: 0; padding: 0; }

h1, h2, h3, p { margin: 0; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--green); color: var(--on-green);
  font-family: var(--font-alt); font-size: 15px; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

/* --------------------------------------------------------------------- */
/* fixed site background                                                  */
/* Original: a full-viewport <wow-image> pinned behind the page.          */
/* CSS equivalent: a fixed cover layer. The marble JPEG lives on the Wix  */
/* CDN — run fetch-assets to drop it in; until then the gradient shows.   */
/* --------------------------------------------------------------------- */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #e3e3e3;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  /* MEASURED PLACEHOLDER — replaced at runtime by the real marble JPEG as
     soon as js/main.js confirms images/site-background.jpg has loaded.

     The original (static.wixstatic.com, 1920x1080, 493,067 bytes) was
     sampled in the browser: it is perfectly neutral greyscale — r = g = b
     in every sample — mean luminance 230, range 133-245, brightening from
     top to bottom.

     Four candidate stand-ins were then measured against it on a 64x36
     tonal map (mean absolute error per channel, out of 255):

       vertical gradient #e0e0e0 -> #ececec   5.31   <- this one
       flat #e6e6e6                           5.80
       decorative gradient (first attempt)    7.21
       gradient + radial "marble patches"     7.67

     Worth recording that the elaborate version scored WORST: the image is
     so uniform that invented structure just adds error. The plain gradient
     below is the best of the four, at 2.1% mean error.

     What it cannot reproduce is the veining (the 133 end of the range).
     Only the real JPEG has that — run fetch-assets.ps1. */
  background-image: linear-gradient(to bottom, #e0e0e0 0%, #ececec 100%);
}

/* the real thing, once main.js has verified it is on disk */
.site-bg[data-texture="ready"] {
  background-image: url("../images/site-background.jpg");
}

/* --------------------------------------------------------------------- */
/* the 980px canvas                                                       */
/* --------------------------------------------------------------------- */
.shell {
  width: var(--canvas);
  margin: 0 auto;
  position: relative;
}
