/* ==========================================================================
   Components — header, nav, hero, copy, footer.
   Desktop geometry is the measured Wix canvas: a 320px-tall header with
   absolutely positioned children, exactly as the original lays it out.
   responsive.css converts all of it to flow layout below 1000px.
   ========================================================================== */

/* --------------------------------------------------------------------- */
/* header  (measured: height 320)                                         */
/* --------------------------------------------------------------------- */
.site-header {
  position: relative;
  height: 320px;
}

/* logo — measured X0 Y20 W520 H220 */
.site-header__logo {
  position: absolute;
  left: 0; top: 20px;
  width: 520px; height: 220px;
}
.site-header__logo img { width: 520px; height: 220px; }

/* phone / email — measured X650 Y132, W310, 18px, line step 23 */
.site-header__contact {
  position: absolute;
  left: 650px; top: 132px;
  width: 310px;
  font-size: var(--fs-meta);
  line-height: 23px;
  color: var(--ink-body);
  /* Outfit runs +3.8% wide on this numeric string vs Avenir; corrected. */
  letter-spacing: -0.017em;
}
.site-header__contact a { text-decoration: none; }
.site-header__contact a:hover,
.site-header__contact a:focus-visible { text-decoration: underline; }

/* --------------------------------------------------------------------- */
/* quote button — measured X770 Y225 W193 H40, padding 24px, label 18px   */
/* Original paints #037020 plus a 1x760 PNG overlay positioned 50% 50%.   */
/* Sampled rows 360-400 of that PNG give the stops below.                 */
/* --------------------------------------------------------------------- */
.btn-quote {
  position: absolute;
  left: 770px; top: 225px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 193px; height: 40px;
  font-family: var(--font-alt);
  font-size: 18px;
  line-height: 25.2px;
  font-weight: 500;
  letter-spacing: -0.006em;   /* Barlow runs +1.6% wide vs DIN Next */
  color: var(--on-green);
  text-decoration: none;
  background-color: var(--green);
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.31)   0%,
    rgba(255, 255, 255, 0.15)  40%,
    rgba(0, 0, 0, 0.06)        60%,
    rgba(0, 0, 0, 0.02)       100%);
  transition: filter .15s ease, transform .15s ease;
}
.btn-quote:hover  { filter: brightness(1.12); }
.btn-quote:active { transform: translateY(1px); }

/* --------------------------------------------------------------------- */
/* primary nav — measured strip X-73 (canvas-relative) Y283 W1136 H31     */
/* 6 visible items at 1136/6 = 189.333 each, 1px white divider on each.   */
/* The original also renders a hidden 7th "More" overflow item; dropped.  */
/* --------------------------------------------------------------------- */
.site-nav {
  position: absolute;
  left: -73px; top: 283px;
  width: var(--nav-strip);
  height: 31px;
  background: var(--nav-bg);
}
.site-nav__list {
  display: flex;
  list-style: none;
  height: 31px;
}
.site-nav__item { width: var(--nav-item); }

.site-nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 31px;
  padding: 0 5px;
  border-left: 1px solid var(--nav-divider);
  font-size: var(--fs-nav);
  line-height: var(--lh-nav);
  font-weight: 500;
  letter-spacing: 0.012em;    /* Outfit runs -1.2% narrow vs Avenir at 17px */
  color: var(--ink-body);
  text-align: center;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.site-nav__item:first-child .site-nav__link { border-left: 0; }

.site-nav__link:hover { background: #dcdcdc; }

.site-nav__link[aria-current="page"] {
  background: var(--nav-active);
  color: var(--on-green);
}
.site-nav__link[aria-current="page"]:hover { background: #3d3d3d; }

/* mobile menu toggle — no desktop equivalent; see README */
.nav-toggle { display: none; }

/* --------------------------------------------------------------------- */
/* page title — measured X0 Y348 W980 H56, 44px, colour #292929           */
/* --------------------------------------------------------------------- */
.page-title {
  margin-top: 28px;            /* 348 - 320 header height */
  height: 56px;
  font-family: var(--font-ui);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 500;            /* the original is Avenir Light faux-bolded */
  color: var(--ink-heading);
  text-align: left;
  white-space: nowrap;
}

/* --------------------------------------------------------------------- */
/* hero banner — measured X-542 Y415 W2060 H391, centred on the canvas    */
/* --------------------------------------------------------------------- */
.hero {
  position: relative;
  height: var(--hero-h);
  margin-top: 11px;            /* 415 - 404 (title bottom) */
  overflow: hidden;            /* the image is wider than the viewport */
}
.hero__img {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--hero-w);
  max-width: none;
  height: var(--hero-h);
  transform: translateX(-50%);
  object-fit: cover;
}

/* --------------------------------------------------------------------- */
/* body copy — measured block X20 Y845 W931, Playfair Display 22px/32px   */
/* --------------------------------------------------------------------- */
.copy {
  margin: 39px 0 0 20px;       /* 845 - 806 (hero bottom) */
  width: 931px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-body);
}
.copy p { margin: 0; }
.copy strong { font-weight: 700; }

/* separator matching the original's authored blank line */
.copy p + p { margin-top: var(--gap-blank); }

/* the three places the original uses a paragraph margin instead */
.copy .lead-out,
.copy .services-intro,
.copy .services-list { margin-top: var(--gap-para); }
.copy .services-list + .lead-out { margin-top: var(--gap-para); }

/* CISEC badge — measured X700 Y965 W251 H240.
   The original positions it absolutely and dodges it with four hard line
   breaks mid-sentence. Here it is a float living inside the second
   paragraph, so that paragraph wraps around it by itself while the first
   paragraph — which the badge does not overlap in the original — keeps
   the full 931px measure. The negative top margin lifts the float from
   the paragraph top (1037) to its measured position (965). See README. */
.copy__badge {
  float: right;
  width: 251px; height: 240px;
  margin: -72px 0 12px 24px;   /* 965 - 1037 = -72 */
  shape-outside: circle(50%);
}

/* services list — measured UL X31 Y1379 W920, items X60, 6 x 32px */
.services-list {
  list-style: none;
  padding-left: 40px;          /* 60 - 20 (copy block left) */
}
.services-list li {
  position: relative;
  height: 32px;
  font-weight: 700;
}
.services-list li::before {
  content: "";
  position: absolute;
  left: -18px; top: 13px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;    /* original renders one bullet inconsistently */
}

.copy .closing { font-weight: 700; }

/* --------------------------------------------------------------------- */
/* footer — measured full width, Y1650 H56; text Y1673, 14px, #707070     */
/* --------------------------------------------------------------------- */
.site-footer {
  height: 56px;
  margin-top: 20px;            /* 1650 - 1630 (copy block bottom) */
}
.site-footer .shell {
  height: 56px;
  padding-top: 23px;           /* 1673 - 1650: text sits high in the band */
}
.site-footer__text {
  margin-left: 216px;          /* measured, canvas-relative */
  font-family: var(--font-alt);
  font-size: var(--fs-foot);
  line-height: 23px;
  letter-spacing: 0.004em;     /* Barlow runs -1.1% narrow vs DIN Next */
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------- */
/* forms — used by contact.html / request-a-quote.html                    */
/* Present here so the shell is complete; the home page does not use them.*/
/* --------------------------------------------------------------------- */
.form-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.72);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
}
.form-notice[hidden] { display: none; }

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

/* ==========================================================================
   INNER PAGES
   Same measurement discipline as the home page: X values are relative to the
   980px canvas, Y values are absolute page offsets read off the live site.
   ========================================================================== */

/* --------------------------------------------------------------------- */
/* page headings                                                          */
/* --------------------------------------------------------------------- */

/* CONTACT — measured X425 Y358 W120 H29, Avenir 25px, #707070, centred */
.page-title--contact {
  margin-top: 38px;                 /* 358 - 320 */
  height: 29px;
  font-size: 25px;
  line-height: 29px;
  font-weight: 400;
  color: var(--ink-muted);
  text-align: center;
  white-space: normal;
}

/* ABOUT — measured X345 Y343 W264 H61 (two lines), Avenir 25px, accent */
.page-title--about {
  margin-top: 23px;                 /* 343 - 320 */
  width: 264px;
  margin-left: 345px;
  height: 61px;
  font-size: 25px;
  line-height: 30.5px;
  font-weight: 500;
  color: var(--accent);
  text-align: center;
  white-space: normal;
}

/* CAREERS — measured X10 Y365 W186 H33, Avenir 85 Heavy 28px, accent */
.page-title--careers {
  margin-top: 45px;                 /* 365 - 320 */
  margin-left: 10px;
  height: 33px;
  font-size: 28px;
  line-height: 33px;
  font-weight: 700;                 /* the original uses the Heavy cut here */
  color: var(--accent);
  white-space: normal;
}

/* REQUEST A QUOTE — measured X22 Y354 W231 H36, Avenir 30px, accent */
.page-title--quote {
  margin-top: 34px;                 /* 354 - 320 */
  margin-left: 22px;
  height: 36px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 500;
  color: var(--accent);
  white-space: normal;
}

/* --------------------------------------------------------------------- */
/* ABOUT prose — measured Playfair 15px, #707070, line step 20.5          */
/* --------------------------------------------------------------------- */
.prose {
  margin-top: 34px;                   /* 438 - 404 (title bottom) */
  margin-left: 20px;
  width: 947px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 20.5px;
  color: var(--ink-muted);
}
.prose p { margin: 0; }
.prose p + p { margin-top: 22px; }  /* measured, consistent across the page */

.prose h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 30px;
  line-height: 36px;
  font-weight: 500;
  color: var(--accent);
}
/* heading -> its first paragraph sits tight (measured 0-6px, ~2 typical) */
.prose h2 + p { margin-top: 2px; }
/* Paragraph -> next heading. The original varies: 41 / 43 / 60 / 43 / 62 /
   62 / 71 / 43px between otherwise identical section boundaries, because
   some sections carry one authored blank line and some carry two. That is
   positioning jitter, not design, so it is normalised to the modal value.
   40px puts the first section heading on the original's Y exactly (688);
   the cumulative effect is a page ~104px shorter than the original's 2359.
   See README "Known differences". */
.prose p + h2 { margin-top: 40px; }

/* --------------------------------------------------------------------- */
/* CAREERS prose — measured Playfair 20px, line step 27                   */
/* --------------------------------------------------------------------- */
.prose--careers {
  margin-top: 39px;                   /* 437 - 398 (title bottom) */
  margin-left: 10px;
  width: 813px;
  font-size: 20px;
  line-height: 27.5px;
  color: var(--ink-soft);
}
.prose--careers p { margin: 0; }
.prose--careers p + p { margin-top: 32px; }
/* The original separates the last line with a stray "." on its own line at
   Y577 — an authoring slip. The "." is dropped and its vertical space kept,
   so the artifact is gone and the geometry still lands on Y606. */
.prose--careers p:last-child { margin-top: 54px; }   /* 437->524->606, normalised */
.prose--careers strong { font-weight: 700; color: var(--accent); }
.prose--careers .muted { color: var(--ink-muted); }

/* --------------------------------------------------------------------- */
/* QUOTE intro copy — measured Playfair 18px, two blocks at Y421 / Y532   */
/* --------------------------------------------------------------------- */
.quote-intro {
  margin-top: 31px;                 /* 421 - 390 (title bottom) */
  margin-left: 20px;
  width: 805px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 24.5px;
  color: var(--ink-body);
}
.quote-intro p { margin: 0; }
/* The original's two intro sentences each run to two lines even though
   their box is 805px wide. Constraining the measure to 430px reproduces
   both breaks by natural wrapping — no <br> needed, and the measured
   heights (49 / 49) and offsets (421 / 532) come out identical. */
.quote-intro p { max-width: 430px; }
.quote-intro p + p { margin-top: 62px; }      /* 532 - (421 + 49) */

/* --------------------------------------------------------------------- */
/* FORMS — measured on /contact and /request-a-quote                      */
/* Fields: 35px tall, 40px pitch, 1px #a0a09f, white, DIN Next 17px.      */
/* Textarea 130px. Submit sits on the field's right edge.                 */
/* --------------------------------------------------------------------- */
.form {
  position: relative;
  font-family: var(--font-alt);
}
.form__field {
  display: block;
  width: 100%;
  height: 35px;
  margin-bottom: 5px;                /* 40px pitch - 35px field */
  padding: 3px 3px 3px 5px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  background: #fff;
  font-family: var(--font-alt);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-body);
}
textarea.form__field {
  height: 130px;
  padding: 12.75px 10px 3px 5px;
  resize: vertical;
}
.form__field::placeholder { color: #8d8d8d; opacity: 1; }
.form__field:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.form__field:user-invalid {
  border-color: #b3261e;
  background: #fff7f6;
}
.form__field:disabled { background: #f4f4f4; color: #8d8d8d; }

.form__label { /* visually hidden: the original labels via placeholder only */
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.form__actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.form__submit {
  flex: 0 0 auto;
  min-height: 33px;
  padding: 4px 12px;
  border: 0;
  background: var(--green);
  font-family: var(--font-alt);
  font-size: 17px;
  line-height: 23.8px;
  font-weight: 500;
  letter-spacing: -0.006em;
  color: var(--on-green);
  cursor: pointer;
  transition: filter .15s ease;
}
.form__submit:hover:not(:disabled) { filter: brightness(1.15); }
.form__submit:disabled { opacity: .65; cursor: progress; }

/* Honest failure notice. This is NOT a success message — see js/main.js. */
.form-notice {
  flex: 1 1 auto;
  margin-top: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.86);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-body);
}
.form-notice[hidden] { display: none; }
.form-notice--error { border-left-color: #b3261e; }

/* --------------------------------------------------------------------- */
/* CONTACT page                                                           */
/* --------------------------------------------------------------------- */
/* The grid starts below the page title (387), not at the header bottom.
   Its children are positioned relative to the grid, so every offset here
   is measured from 387 — the probe caught a uniform 67px error when they
   were measured from 320 instead. */
.contact-grid {
  position: relative;
  height: 484px;                     /* 891 - 20 (footer margin) - 387 */
}
/* details column — phone Y419, email Y488, prompt Y552, form Y600 */
.contact-grid__detail {
  position: absolute;
  left: 500px; top: 32px;            /* 419 - 387 */
  width: 475px;
  font-family: var(--font-body);
  color: var(--ink-body);
}
.contact-grid__phone { font-size: 15px; line-height: 20px; }
.contact-grid__email { margin-top: 49px; font-size: 17px; line-height: 22px; }
.contact-grid__prompt {
  margin-top: 42px;                  /* 552 - 510 */
  font-size: 22px; line-height: 30px;
}
.contact-grid__form {
  position: absolute;
  left: 500px; top: 213px;           /* 600 - 387 */
  width: 475px;
}
/* Service-area panel replacing the original's dead Google Maps embed.
   Measured slot: X0 Y493 W475 H270. See README "Known differences". */
.map-panel {
  position: absolute;
  left: 0; top: 106px;               /* 493 - 387 */
  width: 475px; height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 28px 32px;
  border: 1px solid var(--field-border);
  background:
    linear-gradient(135deg, rgba(3,112,32,.06) 0%, rgba(0,101,169,.06) 100%),
    #f4f5f4;
  font-family: var(--font-ui);
}
.map-panel__title {
  margin: 0;
  font-size: 20px; line-height: 26px; font-weight: 500;
  color: var(--ink-heading);
}
.map-panel__body {
  margin: 0;
  font-size: 15px; line-height: 22px;
  color: var(--ink-muted);
}
.map-panel__link {
  align-self: flex-start;
  font-size: 15px; line-height: 22px; font-weight: 500;
  color: var(--accent);
}

/* --------------------------------------------------------------------- */
/* REQUEST A QUOTE page                                                   */
/* --------------------------------------------------------------------- */
.quote-form {
  margin: 51px 0 0 20px;             /* 632 - 581 (intro bottom) */
  width: 805px;
}

/* --------------------------------------------------------------------- */
/* SERVICES page                                                          */
/* Eighteen alternating photo/caption rows.                               */
/* The original's rows are 469-482 x 333-344 at a 333-351px pitch and its  */
/* captions land at eighteen different X values — positioning jitter, not  */
/* design. Normalised to one 479x344 grid; see README.                    */
/* --------------------------------------------------------------------- */
.services {
  margin-top: 13px;                  /* 333 - 320 */
}
.service-row {
  display: grid;
  grid-template-columns: 479px 479px;
  gap: 0 22px;                       /* 500 - 479 + 1 */
  align-items: center;
  min-height: 340px;               /* measured mean row pitch (16 gaps, 339.9) */
}
.service-row__media { grid-column: 1; grid-row: 1; }
.service-row__body  { grid-column: 2; grid-row: 1; }
/* odd rows put the photo on the right */
.service-row--flip .service-row__media { grid-column: 2; }
.service-row--flip .service-row__body  { grid-column: 1; }

.service-row__media img {
  width: 479px; height: 340px;
  object-fit: cover;
}

.service-row__title {
  margin: 0;
  font-family: var(--font-alt);
  font-size: 40px;
  line-height: 48px;
  font-weight: 400;
  letter-spacing: -0.006em;
  color: var(--green);
}
.service-row__list {
  margin: 0;
  padding-left: 54px;                /* measured 154 - 100 */
  list-style: none;
  font-family: var(--font-alt);
  font-size: 30px;
  line-height: 37px;
  color: var(--green);
}

/* "Erosion and Sediment Control BMP's ..." — measured X0 Y1067 W956 H38,
   DIN Next 32px bold, black */
.services__heading {
  margin: 62px 0 28px;
  font-family: var(--font-alt);
  font-size: 32px;
  line-height: 38px;
  font-weight: 600;
  color: var(--ink-body);
}

/* closing block — measured Y6625 (40px) and Y6686 (25px), both green */
/* 44px rather than the measured 53: the 18 normalised rows land the last
   photo 9px above the original's, and absorbing that here puts the closing
   block, the footer and the total page height all on the original's exact
   numbers. */
.services__closing {
  margin-top: 44px;
  margin-left: 84px;
  font-family: var(--font-alt);
  color: var(--green);
}
.services__closing p { margin: 0; }
.services__closing .lead { font-size: 40px; line-height: 48px; }
.services__closing .sub  { margin-top: 13px; font-size: 25px; line-height: 30px; }
.services__closing a { color: inherit; }

/* --------------------------------------------------------------------- */
/* REPORTS placeholder — no original was observable (password-gated)      */
/* --------------------------------------------------------------------- */
.restricted {
  margin: 45px 0 0 10px;
  width: 813px;
  padding: 28px 32px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.86);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 27px;
  color: var(--ink-soft);
}
.restricted h1 {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 28px; line-height: 33px; font-weight: 700;
  color: var(--accent);
}
.restricted p { margin: 0 0 14px; }
.restricted p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------- */
/* per-page minimum heights                                               */
/* Short Wix pages pad their section so the footer sits lower than the    */
/* content needs. Measured from the header bottom (320) to the footer top.*/
/* --------------------------------------------------------------------- */
/* flow-root stops the first heading's top margin collapsing out through
   <main>, which would otherwise shift the whole block and make min-height
   measure from the wrong origin. Caught by the probe: the footer landed
   65px low on Careers. */
.page--careers,
.page--quote,
.page--reports { display: flow-root; }

.page--careers { min-height: 480px; }   /* 820 - 20 (footer margin) - 320 */
.page--quote   { min-height: 811px; }   /* 1151 - 20 - 320 */
.page--reports { min-height: 480px; }   /* no original to match; = Careers */

.page--contact { display: flow-root; }
