/* =========================================================
   NorthGate site — shared chrome + page primitives.
   Photo-B lineage: dark full-bleed photo hero with gradient
   bracket and signature italic display type.
   ========================================================= */

* { box-sizing: border-box; }
/* WCAG AA: --fg-3's design-system value (#8A8A88) reaches only 3.46:1 on white.
   Site pages use it for 11-13px labels, so darken it here to clear 4.5:1. */
:root { --fg-3: #6F6F6D; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Helvetica Neue LT', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--fg-2);
  background: #fff;
}
img { display: block; max-width: 100%; }

/* ---------- Primitives ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ng-green-dark);
}
.eyebrow.on-dark { color: var(--ng-green-light); }
.h-italic {
  font-style: italic; font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1.02; color: var(--fg-1); margin: 0;
}
.h-italic.on-dark { color: #fff; }
.h-italic .em { color: var(--ng-green-dark); }
.h-italic.on-dark .em { color: var(--ng-green-light); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 15px; padding: 14px 26px;
  border-radius: 6px; border: 2px solid transparent; cursor: pointer;
  transition: all 180ms cubic-bezier(0.4,0,0.2,1); text-decoration: none;
  font-family: inherit;
}
.btn-primary { background: var(--ng-green-dark); color: #fff; box-shadow: 0 4px 12px rgba(63,124,58,0.22); }
.btn-primary:hover { background: #346A30; color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(63,124,58,0.32); }
.btn-secondary { background: transparent; color: var(--ng-green-dark); border-color: var(--ng-green-dark); }
.btn-secondary:hover { background: var(--ng-green-dark-050); color: var(--ng-green-dark); }
.btn-inverse { background: #fff; color: var(--ng-green-dark); }
.btn-inverse:hover { background: var(--ng-green-dark-050); color: var(--ng-green-dark); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.85); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: #fff; }

/* ---------- Header ---------- */
header.chrome {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-1);
}
.chrome-row { display: flex; align-items: center; gap: 36px; padding-top: 16px; padding-bottom: 16px; }
.chrome-row img.logo { height: 80px; object-fit: contain; }
nav.chrome-nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
nav.chrome-nav a {
  font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-2); text-decoration: none; border: 0;
  padding-bottom: 4px; border-bottom: 2px solid transparent;
  transition: color 120ms, border-color 120ms;
}
nav.chrome-nav a:hover,
nav.chrome-nav a[data-active] { color: var(--ng-green-dark); border-bottom-color: var(--ng-green-dark); }

/* Nav dropdown */
.nav-item { position: relative; }
.nav-item > a.trigger { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.nav-item > a.trigger svg { width: 10px; height: 10px; transition: transform 180ms; }
.nav-item:hover > a.trigger svg,
.nav-item:focus-within > a.trigger svg { transform: rotate(180deg); }
.nav-item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px; }
.nav-drop {
  position: absolute; top: calc(100% + 14px); left: -18px;
  min-width: 340px; background: #fff;
  border: 1px solid var(--border-1); border-radius: 10px;
  box-shadow: 0 18px 50px rgba(10,10,10,0.14);
  padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 160ms, transform 160ms, visibility 160ms;
  z-index: 100;
}
.nav-item:hover .nav-drop,
.nav-item:focus-within .nav-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-drop a.drop-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 8px;
  border: 0; text-transform: none; letter-spacing: 0; text-decoration: none;
}
.nav-drop a.drop-item:hover { background: var(--ng-green-dark-050); }
.nav-drop a.drop-item .dot {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ng-gray-100); color: var(--ng-green-dark);
  font-style: italic; font-weight: 800; font-size: 12px; letter-spacing: 0;
}
.nav-drop a.drop-item:hover .dot { background: var(--ng-green-dark); color: #fff; }
.nav-drop a.drop-item .dot.jp { background: var(--ng-green-dark); padding: 6px; }
.nav-drop a.drop-item .dot.jp img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nav-drop .drop-item .meta { display: flex; flex-direction: column; gap: 2px; }
.nav-drop .drop-item .t { font-size: 14px; font-weight: 700; color: var(--fg-1); font-style: italic; text-transform: uppercase; letter-spacing: 0.04em; }
.nav-drop .drop-item .d { font-size: 12px; font-weight: 400; color: var(--fg-2); line-height: 1.4; font-style: normal; text-transform: none; letter-spacing: 0; }

/* ---------- Hero (photo-B style, reusable per-page via CSS var) ---------- */
.page-hero {
  position: relative; min-height: 520px; overflow: hidden;
  display: flex; align-items: flex-end; color: #fff;
  background:
    linear-gradient(100deg, rgba(15,20,15,0.86) 0%, rgba(15,20,15,0.58) 48%, rgba(15,20,15,0.28) 100%),
    var(--hero-photo, linear-gradient(135deg, #2a2e28, #1a1f18)) center/cover no-repeat,
    #1a1f18;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.5) 100%);
}
.page-hero::after {
  content: ""; position: absolute; z-index: 2;
  left: -80px; bottom: -60px; width: 480px; height: 320px;
  background: linear-gradient(135deg, #3F7C3A 0%, #7A9A01 55%, #B7BF10 100%);
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
  opacity: 0.94;
}
.page-hero .container { position: relative; z-index: 3; padding: 96px 32px 96px; }
.page-hero .crumb { display: flex; gap: 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(255,255,255,0.55); margin-bottom: 20px; }
.page-hero .crumb a { color: rgba(255,255,255,0.55); text-decoration: none; }
.page-hero .crumb a:hover { color: #fff; }
.page-hero .crumb span.here { color: #fff; }
.page-hero h1 { font-size: 84px; max-width: 960px; margin: 12px 0 22px; color: #fff; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.02; }
.page-hero h1 .em { color: var(--ng-green-light); }
.page-hero p.lede { color: rgba(255,255,255,0.88); font-size: 20px; line-height: 1.5; max-width: 680px; margin: 0 0 32px; font-weight: 300; }
.page-hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.page-hero img.division-logo { height: 72px; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: 0.96; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section.soft { background: var(--ng-gray-050); }
.section.dark { background: var(--ng-gray-900); color: #fff; }
.section.dark .h-italic { color: #fff; }
.section.dark p { color: rgba(255,255,255,0.78); }

.section-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; margin-bottom: 56px; }
.section-head h2 { font-size: 60px; line-height: 1.02; margin: 12px 0 0; max-width: 780px; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; color: var(--fg-1); }
.section.dark .section-head h2 { color: #fff; }
.section-head p.kicker { color: var(--fg-2); font-size: 17px; line-height: 1.55; max-width: 420px; margin: 0; }
.section.dark .section-head p.kicker { color: rgba(255,255,255,0.7); }

/* ---------- Cards (reusable) ---------- */
.ncard {
  background: #fff; border: 1px solid var(--border-1); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: all 220ms cubic-bezier(0.4,0,0.2,1);
}
.ncard:hover { border-color: var(--ng-green-dark); box-shadow: 0 20px 40px rgba(10,10,10,0.08); transform: translateY(-3px); }

/* ---------- CTA band ---------- */
.cta-band { padding: 80px 0; background: #fff; border-top: 1px solid var(--border-1); }
.cta-band.dark { background: var(--ng-gray-900); color: #fff; border-top: 0; }
.cta-row { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.cta-row h2 { font-size: 52px; line-height: 1.05; max-width: 820px; margin: 0; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; color: var(--fg-1); }
.cta-band.dark .cta-row h2 { color: #fff; }
.cta-row h2 .em { color: var(--ng-green-dark); }
.cta-band.dark .cta-row h2 .em { color: var(--ng-green-light); }
.cta-row .ctas { display: flex; gap: 12px; }

/* ---------- Footer ---------- */
footer.chrome {
  background: var(--ng-gray-900); color: #fff; padding: 72px 0 32px;
  border-top: 4px solid;
  border-image: linear-gradient(90deg, #3F7C3A 0%, #7A9A01 55%, #B7BF10 100%) 1;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.foot-grid img { height: 76px; margin-left: -19px; filter: brightness(0) invert(1); }
.foot-grid p { color: rgba(255,255,255,0.65); font-size: 14px; line-height: 1.65; max-width: 320px; margin-top: 18px; font-weight: 300; }
.foot-col-head { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ng-green-light); margin-bottom: 16px; }
.foot-grid a { display: block; color: rgba(255,255,255,0.75); font-size: 14px; padding: 4px 0; text-decoration: none; border: 0; }
.foot-grid a:hover { color: #fff; }
.foot-social { display: flex; gap: 12px; margin-top: 22px; }
.foot-social a {
  width: 38px; height: 38px; border-radius: 8px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  transition: background 160ms, color 160ms;
}
.foot-social a:hover { background: var(--ng-green-dark); color: #fff; }
.foot-social svg { width: 18px; height: 18px; display: block; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px; color: rgba(255,255,255,0.5);
}

/* Below the container's 1280px max-width, the hero content is no longer capped and
   sits lower in the fixed-height hero, so the wedge (::after, anchored to the hero's
   bottom-left corner) rides up into the h1's second line — worst on "PEOPLE", which
   is already green-on-green against the wedge. Drop it before that range starts. */
@media (max-width: 1300px) {
  .page-hero::after { display: none; }
}

@media (max-width: 1080px) {
  .section-head { grid-template-columns: 1fr; }
  .cta-row { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 60px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px;
  width: 48px; height: 48px; padding: 0; flex: 0 0 auto;
  background: transparent; border: 1px solid var(--border-1); border-radius: 8px;
  color: var(--fg-1); cursor: pointer;
}
.nav-toggle:hover { border-color: var(--ng-green-dark); color: var(--ng-green-dark); }
.nav-toggle .bars { display: block; width: 20px; height: 14px; position: relative; }
.nav-toggle .bars span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform 160ms, opacity 160ms; }
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Tablet / small-laptop ---------- */
@media (max-width: 860px) {
  .container { padding-left: 22px; padding-right: 22px; }
  /* Header collapses to a hamburger; nav becomes a stacked panel */
  .chrome-row { gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
  .chrome-row img.logo { height: 58px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  nav.chrome-nav {
    order: 4; width: 100%; margin-left: 0; gap: 0;
    display: none; flex-direction: column; align-items: stretch;
    border-top: 1px solid var(--border-1); margin-top: 8px; padding-bottom: 8px;
  }
  .chrome-row[data-nav-open] nav.chrome-nav { display: flex; }
  nav.chrome-nav > a,
  nav.chrome-nav .nav-item > a.trigger {
    font-size: 15px; white-space: nowrap;
    min-height: 52px; display: flex; align-items: center;
    border-bottom: 1px solid var(--border-1) !important; padding-bottom: 0;
  }
  nav.chrome-nav .nav-item { width: 100%; }
  .nav-item::after { display: none; }
  /* Dropdowns can't hover on touch — render them inline, indented */
  .nav-drop {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0; min-width: 0; width: 100%;
    padding: 0 0 0 14px; background: transparent;
  }
  .nav-drop a.drop-item { min-height: 56px; border-bottom: 1px solid var(--border-1); border-radius: 0; }
  .chrome-row > a.btn { min-height: 48px; }
  .page-hero { min-height: 0; }
  /* .page-hero::after is already hidden from 1080px down (see that breakpoint above). */
  .page-hero .container { padding: 64px 22px; }
  .page-hero h1 { font-size: 48px; }
  .page-hero p.lede { font-size: 17px; }
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .section { padding: 56px 0; }
  .page-hero h1 { font-size: 38px; }
  .page-hero .ctas { flex-direction: column; align-items: stretch; }
  .page-hero .ctas .btn { justify-content: center; }
  .section-head h2 { font-size: 34px; }
  /* Long single words (e.g. "Manufacturing") outrun a 320px column at display sizes */
  .page-hero h1, .section-head h2, .cta-row h2, .h-italic { overflow-wrap: break-word; hyphens: auto; }
  .cta-row h2 { font-size: 36px; }
  .cta-row .ctas { flex-direction: column; align-items: stretch; }
  .cta-row .ctas .btn { justify-content: center; }
  .btn { font-size: 14px; padding: 12px 20px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-grid a { min-height: 44px; display: flex; align-items: center; }
  .foot-social a { min-width: 44px; justify-content: center; }
  .foot-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
}


/* ---------- Form validation states ---------- */
.fld { position: relative; }
.fld label .req { color: #B23B3B; margin-left: 3px; font-weight: 800; }
.fld .fld-error { font-size: 13px; line-height: 1.4; color: #A32E2E; margin-top: 6px; font-weight: 600; }
.fld .fld-error:empty { display: none; }
.fld[data-invalid] input,
.fld[data-invalid] select,
.fld[data-invalid] textarea { border-color: #B23B3B !important; box-shadow: 0 0 0 3px rgba(178,59,59,0.12); }
.form-summary {
  background: #FBEDED; border: 1px solid #E3BFBF; border-left: 4px solid #B23B3B;
  color: #7E2222; font-size: 14px; font-weight: 600; line-height: 1.45;
  padding: 12px 16px; border-radius: 8px; margin-bottom: 20px;
}
.form-note { font-size: 13px; color: var(--fg-3); margin: 0 0 18px; }
.form-note .req { color: #B23B3B; font-weight: 800; }

/* ---------- Cookie consent bar ---------- */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--ng-gray-900); color: #fff;
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg, #3F7C3A, #7A9A01 55%, #B7BF10) 1;
  box-shadow: 0 -14px 40px rgba(0,0,0,0.28);
  transform: translateY(100%); transition: transform 240ms ease;
}
.cookie-bar[data-in] { transform: translateY(0); }
.cookie-row { display: flex; align-items: center; gap: 32px; padding-top: 20px; padding-bottom: 20px; }
.cookie-copy { flex: 1 1 auto; min-width: 0; }
.cookie-head {
  font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: 15px; letter-spacing: 0.02em; color: var(--ng-green-light); margin-bottom: 6px;
}
.cookie-copy p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,0.86); max-width: 76ch; font-weight: 300; }
.cookie-copy a { color: var(--ng-green-light); text-decoration: underline; }
.cookie-copy a:hover { color: #fff; }
.cookie-acts { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-acts .btn { min-height: 46px; }
.btn.btn-ghost-light {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.45);
}
.btn.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
@media (max-width: 860px) {
  .cookie-row { flex-direction: column; align-items: stretch; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
  .cookie-acts .btn { flex: 1; justify-content: center; }
}


/* ---------- Mobile overflow guard ----------
   Grid and flex items default to a min-content floor (min-width:auto), which
   makes long words and fixed inner widths push past the viewport once tracks
   collapse to one column. Zeroing the floor lets them shrink instead. */
@media (max-width: 1080px) {
  .container > *,
  .container > * > *,
  [class*="grid"] > *,
  [class*="row"] > *,
  .section-head > * { min-width: 0; }
}
