/* ==========================================================================
   ENGER SAFETY — enger.ca
   --------------------------------------------------------------------------
   FONTS
   The brand face is DDC Hardware (Draplin Design Co. — commercial licence,
   ddcfonts.com). It is NOT a free/Google font, so it can't be linked from a
   CDN. Once you buy the WEBFONT licence:
     1. Drop DDCHardware-Regular.woff2 / -Bold.woff2 into  /fonts/
     2. Uncomment the @font-face block below.
   Until then the site falls back to Archivo, which is the closest free match
   (same square industrial grotesque skeleton). Nothing breaks either way.
   ========================================================================== */

/*
@font-face {
  font-family: "DDC Hardware";
  src: url("fonts/DDCHardware-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DDC Hardware";
  src: url("fonts/DDCHardware-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
*/

/* --------------------------------------------------------------------------
   TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colour — pulled from the logo (#07A74E) */
  --green:        #07A74E;
  --green-deep:   #047034;
  --green-wash:   #EAF7F0;

  --ink:          #10120F;   /* headlines, near-black */
  --ink-soft:     #3A3F3A;   /* body copy */
  --steel:        #6E746D;   /* secondary / captions */
  --rule:         #E1E4E0;   /* hairlines */
  --fog:          #F3F4F2;   /* section wash */
  --paper:        #FFFFFF;

  /* Type */
  --display: "DDC Hardware", "Archivo", "Arial Narrow", sans-serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* Layout */
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1440px;
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   RESET / BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 0.98;
  letter-spacing: 0.005em;
  margin: 0;
}
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

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

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------------------
   SHARED BITS
   -------------------------------------------------------------------------- */

/* Mono eyebrow — the "stamped label" device used across the site */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--green);
  flex: none;
}
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: var(--green); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 2px solid var(--green);
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn:active { transform: translateY(1px); }
.btn .arw { transition: transform .18s ease; }
.btn:hover .arw { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.btn--ghost-light {
  background: transparent;
  border-color: rgba(255,255,255,.55);
  color: #fff;
}
.btn--ghost-light:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* Image placeholder system -------------------------------------------------
   Every photo slot is a .media wrapper. If the image file isn't there yet,
   the <img onerror> flips the wrapper to .is-empty and you get a labelled
   dashed box telling you exactly what size to drop in. Add the file and the
   placeholder disappears on its own.
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--fog);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media::after {
  content: "PHOTO — " attr(data-spec);
  position: absolute; inset: 0;
  display: none;
  place-content: center;
  text-align: center;
  padding: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--steel);
  background: repeating-linear-gradient(45deg, #EFF1EE 0 12px, #F6F7F5 12px 24px);
  box-shadow: inset 0 0 0 2px var(--rule);
}
.media.is-empty::after { display: grid; }
.media.is-empty img { visibility: hidden; }

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 42px; width: auto; }   /* landscape lockup — ~3.2:1 */

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 0;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--green);
  transition: width .2s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }
.nav .btn { padding: 12px 20px; }
.nav .btn::after { display: none; }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-content: center;
}
.burger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  margin: 4px auto;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
}
.hero .media {
  position: absolute; inset: 0;
  background: var(--ink);
}
.hero .media::after { box-shadow: none; }

/* Hero video ---------------------------------------------------------------
   The <video> carries poster="images/hero.jpg". If the video files aren't
   there yet, the poster is what renders — so the photo IS the hero until you
   add the footage. On mobile and for reduced-motion we skip the video download
   entirely and paint the same photo as a background image instead.
   -------------------------------------------------------------------------- */
.hero__video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ink) url("images/hero.jpg") center 30% / cover no-repeat;
}
.hero__video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

@media (max-width: 780px) {
  /* Don't spend a phone's data on a hero loop — show the still. */
  .hero__video video { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__video video { display: none; }
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    /* Vignette — darkens the corners/edges so the photo reads as framed and the
       busy edges (grass, ropes) recede, keeping the eye on the centre + type. */
    radial-gradient(120% 130% at 50% 42%,
      rgba(16,18,15,0) 42%,
      rgba(16,18,15,.28) 74%,
      rgba(16,18,15,.72) 100%),
    /* Top + bottom fade (keeps type legible top and bottom) */
    linear-gradient(180deg, rgba(16,18,15,.45) 0%, rgba(16,18,15,.10) 35%, rgba(16,18,15,.86) 100%),
    /* Left weight — for the landing page's left-set headline */
    linear-gradient(90deg, rgba(16,18,15,.75) 0%, rgba(16,18,15,.15) 65%);
}
/* Interior heroes are centre-set, so drop the left weight and lean on the
   vignette + a touch more centre darkening behind the headline. */
.hero--page .hero__scrim {
  background:
    radial-gradient(115% 125% at 50% 44%,
      rgba(16,18,15,.06) 34%,
      rgba(16,18,15,.34) 70%,
      rgba(16,18,15,.78) 100%),
    linear-gradient(180deg, rgba(16,18,15,.42) 0%, rgba(16,18,15,.12) 34%, rgba(16,18,15,.84) 100%);
}
.hero__body {
  position: relative;
  padding-top: clamp(90px, 16vh, 180px);
  padding-bottom: 46px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.9rem, 7.6vw, 6.6rem);
  max-width: 16ch;
  margin-bottom: 26px;
}
/* the one piece of type play: the word that carries the whole positioning */
.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--green);
  paint-order: stroke fill;
}
.hero__sub {
  font-size: clamp(1.02rem, 1.5vw, 1.3rem);
  color: rgba(255,255,255,.86);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Spec strip — the stamped markings you'd find on a piece of certified gear */
.spec {
  position: relative;
  border-top: 1px solid rgba(255,255,255,.18);
  background: rgba(16,18,15,.55);
}
.spec ul {
  list-style: none;
  margin: 0;
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.spec li { display: flex; align-items: center; gap: 12px; }
.spec li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--green);
  flex: none;
}

/* Compact hero for interior pages */
.hero--page {
  /* Scale height with viewport WIDTH (not just vh) so on a wide monitor the box
     grows taller too, keeping the photo from being cropped to a thin middle band
     — that band-crop is what made the confined-space shot read as "stretched".
     42vw ≈ a 2.4:1 box; clamped so it never gets silly on huge or tiny screens. */
  min-height: clamp(460px, 42vw, 680px);
}
.hero--page .media img,
.hero--page .hero__video video { object-position: center 42%; }
.hero--page h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); max-width: 18ch; margin-bottom: 18px; }

/* --------------------------------------------------------------------------
   SECTIONS
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(72px, 10vw, 140px); }
.section--fog { background: var(--fog); }
.section--ink { background: var(--ink); color: rgba(255,255,255,.78); }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--tight { padding-block: clamp(56px, 7vw, 96px); }

.section__head { max-width: 62ch; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head h2 { font-size: clamp(2.1rem, 4vw, 3.5rem); margin-bottom: 22px; }

/* Statement: big claim left, supporting prose right */
.statement {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.statement h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.statement__body { font-size: clamp(1.02rem, 1.3vw, 1.18rem); }
.statement__body .lead { color: var(--ink); font-weight: 500; }

/* Two-up photo tiles — the Auditing / Training doors */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--rule);
}
.tile {
  position: relative;
  display: block;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
  min-height: 560px;
}
.tile .media { position: absolute; inset: 0; }
.tile .media img { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.tile:hover .media img { transform: scale(1.05); }
.tile__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,18,15,.05) 30%, rgba(16,18,15,.88) 100%);
}
.tile__body {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 3.4vw, 52px);
  min-height: inherit;
}
.tile h3 {
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  margin-bottom: 14px;
}
.tile p {
  color: rgba(255,255,255,.82);
  max-width: 38ch;
  margin-bottom: 22px;
}
.tile__go {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
  align-self: flex-start;
}
.tile:hover .tile__go .arw { transform: translateX(5px); }
.tile__go .arw { transition: transform .2s ease; }

/* Credential row */
.creds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
.cred { background: var(--paper); padding: clamp(28px, 3vw, 44px); }
.cred h3 { font-size: 1.15rem; margin-bottom: 10px; }
.cred p { font-size: 0.95rem; color: var(--steel); }
.cred .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--green);
  display: block;
  margin-bottom: 18px;
}

/* Split: copy beside a photo */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.split--flip .split__media { order: -1; }
.split__media { aspect-ratio: 4 / 3; }
.split h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); margin-bottom: 22px; }

/* ISO / CWB registration panel — audit page only */
.iso {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(32px, 4vw, 56px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--green);
}
.iso img { width: 100%; max-width: 190px; height: auto; }
.iso h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); margin-bottom: 14px; }
.iso p { font-size: 0.98rem; }
.iso .std {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

/* Course catalogue */
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.course {
  background: var(--paper);
  padding: 24px 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--display);
  font-size: 1.06rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  transition: background .18s ease;
}
.course:hover { background: var(--green-wash); }
.course::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  background: var(--green);
  transform: rotate(45deg);
}
.courses-note {
  margin-top: 34px;
  padding: 26px 28px;
  background: var(--green-wash);
  border-left: 4px solid var(--green);
  color: var(--ink);
}

/* CTA band */
.cta {
  background: var(--green);
  color: #fff;
  padding-block: clamp(64px, 8vw, 110px);
}
.cta h2 { color: #fff; font-size: clamp(2.2rem, 4.4vw, 3.8rem); margin-bottom: 20px; }
.cta p { color: rgba(255,255,255,.92); max-width: 54ch; font-size: 1.08rem; }
.cta__inner { display: grid; grid-template-columns: 1.4fr auto; gap: 40px; align-items: end; }
.cta .btn {
  background: #fff; border-color: #fff; color: var(--ink);
}
.cta .btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Contact / form */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); }
.contact h2 { font-size: clamp(2rem, 3.4vw, 3rem); margin-bottom: 20px; }
.contact__detail { margin-top: 34px; display: grid; gap: 18px; }
.contact__detail div { border-top: 1px solid var(--rule); padding-top: 14px; }
.contact__detail dt {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 4px;
}
.contact__detail dd { margin: 0; color: var(--ink); font-weight: 500; }
.contact__detail a:hover { color: var(--green); }

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field--half { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  transition: border-color .15s ease;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px var(--green-wash);
}
.field textarea { min-height: 130px; resize: vertical; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.62);
  padding-block: clamp(56px, 7vw, 88px) 32px;
  font-size: 0.94rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.footer__logo img {
  height: 74px;
  width: auto;
  /* The stacked mark is a green shield with white cut-outs, so a white-knockout
     filter would flatten the whole thing to white. Show it in full colour on a
     small tile instead, which reads correctly on the dark footer. */
  display: block;
  padding: 14px;
  background: #fff;
  border-radius: 4px;
  margin-bottom: 22px;
}
.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--green); }
.footer__bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

/* --------------------------------------------------------------------------
   MOTION
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .statement, .split, .contact, .cta__inner { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .cta__inner { align-items: start; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 460px; }
  .creds { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .burger { display: grid; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-140%);
    transition: transform .3s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 24px 40px -24px rgba(0,0,0,.25);
  }
  .nav-open .nav { transform: none; }
  .nav a { padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 20px; justify-content: center; border-bottom: 0; }

  .iso { grid-template-columns: 1fr; text-align: left; }
  .iso img { max-width: 150px; }
  .field--half { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 34px; }
  .hero h1 em { -webkit-text-stroke-width: 1.5px; }
}
