/* ══════════════════════════════════════════════════════════════════
   System Trade & Services — shared.css
   Typography, layout primitives, nav, footer, utilities, mobile-safety.
   ══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-deep: oklch(0.20 0.07 162);
  --green-mid:  oklch(0.32 0.09 162);
  --green-accent: oklch(0.48 0.14 155);
  --green-bright: oklch(0.62 0.12 155);
  --off-white:  oklch(0.98 0.003 90);
  --warm-gray:  oklch(0.52 0.008 90);
  --dark-text:  oklch(0.14 0.01 90);
  --border:     oklch(0.90 0.006 90);
  --border-strong: oklch(0.82 0.01 90);
  --shadow-lift: 0 6px 24px oklch(0.20 0.07 162 / 0.09);

  --nav-h: 72px;
  --page-max: 1280px;
  --pad-x: 48px;
}

[x-cloak] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--off-white);
  color: var(--dark-text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}

a { color: inherit; }
button { font: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--green-accent); border-radius: 3px; }

/* ── Utilities ─────────────────────────────────────────────────── */
.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.section { padding: 120px 0; }
.section--white { background: #fff; }
.section--cream { background: var(--off-white); }
.section--deep  { background: var(--green-deep); color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--dark-text);
  background: var(--dark-text);
  color: #fff;
  padding: 14px 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: transparent; color: var(--dark-text); }
.btn--ghost {
  background: transparent;
  color: var(--dark-text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--dark-text); color: #fff; border-color: var(--dark-text); }
.btn--light {
  background: #fff; color: var(--green-deep); border-color: #fff;
}
.btn--light:hover { background: oklch(0.93 0.03 155); color: var(--green-deep); border-color: oklch(0.93 0.03 155); }

/* Image placeholder (used until real photos uploaded) */
.img-ph {
  background: oklch(0.90 0.005 90);
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  overflow: hidden;
}
.img-ph span {
  font-size: 10px;
  color: oklch(0.62 0.01 90);
  text-align: center;
  padding: 12px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.img-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Admin-image overlay — apply to any box that already has a text
   placeholder fallback (e.g. .np-card__img, .sector__img, .csrb__media-big).
   The img fills the box; the fallback text is visible only when no URL is
   set because the <template x-if> wrapper is absent from the DOM. */
.img-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 1000;
  background: var(--green-deep);        /* solid, matches page-hero band */
  border-bottom: 1px solid oklch(1 0 0 / 0.07);
  transition: background .4s, border-color .4s;
}
.nav--transparent {
  background: transparent;
  border-bottom: none;
}
.nav__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo img {
  height: 36px; width: auto; display: block;
  filter: brightness(0) invert(1);
}
.nav__links {
  display: flex; align-items: center; gap: 36px;
}
.nav__link {
  color: oklch(0.74 0.01 90);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color .2s;
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
}
.nav__link:hover, .nav__link.is-active { color: #fff; }
.nav__link.is-active { font-weight: 500; }
.nav__link .chev { font-size: 7px; opacity: .55; margin-left: 2px; transition: transform .2s; }

.nav__item { position: relative; }
.nav__item.dropdown-open > .nav__link .chev { transform: rotate(180deg); }

.nav__dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: oklch(0.17 0.05 162);
  border: 1px solid oklch(1 0 0 / 0.09);
  border-radius: 4px;
  padding: 6px 0;
  min-width: 230px;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.45);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height .25s ease, opacity .2s ease;
}
.nav__item.dropdown-open .nav__dropdown {
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
}
.nav__dropdown a {
  display: block;
  padding: 11px 22px;
  color: oklch(0.80 0.01 90);
  text-decoration: none;
  font-size: 13px;
  border-left: 2px solid transparent;
  letter-spacing: 0.01em;
  transition: background .15s, color .15s, border-color .15s;
}
.nav__dropdown a:hover {
  background: oklch(1 0 0 / 0.06);
  color: #fff;
  border-left-color: var(--green-bright);
}

.nav__contact {
  border: 1px solid oklch(1 0 0 / 0.3);
  color: #fff;
  padding: 9px 24px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.nav__contact:hover { background: #fff; color: var(--green-deep); }

.nav__burger {
  display: none;
  background: none; border: none;
  cursor: pointer;
  padding: 8px;
  width: 48px; height: 48px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  position: relative;
  z-index: 1002;                     /* above any fixed overlay */
  touch-action: manipulation;        /* kill 300ms tap delay on iOS */
  -webkit-tap-highlight-color: transparent;
}
.nav__burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: #fff;
  transition: transform .25s, opacity .2s;
}
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Page hero ─────────────────────────────────────────────────── */
.page-hero {
  background: var(--green-deep);
  padding-top: var(--nav-h);
}
.page-hero__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 72px var(--pad-x) 64px;
}
.page-hero__crumb {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 18px;
  font-weight: 500;
}
.page-hero__title {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-size: clamp(36px, 4vw, 60px);
  color: #fff;
  line-height: 1.06;
  margin-bottom: 20px;
  max-width: 700px;
  letter-spacing: -0.02em;
}
.page-hero__subtitle {
  font-size: 16px;
  color: oklch(0.72 0.03 90);
  line-height: 1.72;
  max-width: 540px;
  font-weight: 300;
}

/* ── Footer ────────────────────────────────────────────────────── */
.footer { background: oklch(0.13 0.05 162); color: oklch(0.80 0.01 90); }
.footer__contact {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 96px var(--pad-x) 80px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 96px;
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
}
.footer__label-row {
  display: flex; align-items: center; gap: 14px; margin-bottom: 28px;
}
.footer__label-line { width: 28px; height: 1px; background: var(--green-bright); }
.footer__label-txt {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green-bright); font-weight: 500;
}
.footer__title {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 46px; line-height: 1.06; color: #fff;
  margin-bottom: 44px; font-weight: 400; letter-spacing: -0.02em;
}
.footer__row {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px;
  margin-bottom: 24px; padding-bottom: 24px;
  border-bottom: 1px solid oklch(1 0 0 / 0.07);
}
.footer__row:last-child { border-bottom: none; }
.footer__row-label {
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: oklch(0.48 0.08 155); font-weight: 600; padding-top: 2px;
}
.footer__row-val {
  font-size: 14.5px; line-height: 1.7; font-weight: 300;
  color: oklch(0.80 0.01 90); white-space: pre-line;
}

.footer__form {
  display: flex; flex-direction: column; gap: 12px; padding-top: 8px;
}
.footer__form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.footer__input, .footer__textarea {
  width: 100%;
  background: oklch(1 0 0 / 0.05);
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: 2px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  letter-spacing: 0.01em;
  transition: border-color .2s;
  outline: none;
}
.footer__input::placeholder, .footer__textarea::placeholder { color: oklch(0.55 0.01 90); }
.footer__input:focus, .footer__textarea:focus { border-color: var(--green-bright); }
.footer__textarea { resize: vertical; min-height: 140px; }
.footer__submit {
  align-self: flex-start;
  background: #fff; color: var(--green-deep);
  border: none; padding: 14px 36px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  cursor: pointer; transition: background .2s;
}
.footer__submit:hover { background: oklch(0.93 0.03 155); }

.footer__success-icon {
  width: 48px; height: 48px;
  border: 1px solid var(--green-bright);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: oklch(0.72 0.12 155);
  margin-bottom: 24px;
}
.footer__success-title {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  color: #fff; font-size: 28px; margin-bottom: 12px;
  font-weight: 400; letter-spacing: -0.02em;
}
.footer__success-text {
  color: oklch(0.65 0.01 90); font-size: 15px; font-weight: 300; line-height: 1.7;
}

.footer__links {
  max-width: var(--page-max); margin: 0 auto;
  padding: 56px var(--pad-x);
  display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr; gap: 56px;
}
.footer__brand-logo { display: block; margin-bottom: 22px; }
.footer__brand-logo img {
  height: 34px; width: auto; filter: brightness(0) invert(1); opacity: 0.75;
}
.footer__brand-desc {
  font-size: 13px; color: oklch(0.48 0.01 90); line-height: 1.82;
  max-width: 280px; font-weight: 300;
}
.footer__brand-rc {
  font-size: 11.5px; color: oklch(0.38 0.01 90); margin-top: 10px;
}
.footer__col-head {
  color: oklch(0.55 0.01 90);
  font-weight: 600; font-size: 10.5px;
  margin-bottom: 20px; letter-spacing: 0.14em; text-transform: uppercase;
}
.footer__col-link {
  display: block;
  color: oklch(0.48 0.01 90);
  font-size: 13.5px;
  text-decoration: none;
  margin-bottom: 11px;
  transition: color .2s;
  font-weight: 300;
}
.footer__col-link:hover { color: oklch(0.78 0.05 155); }
.footer__col-cta {
  display: inline-block;
  margin-top: 18px;
  font-size: 11.5px;
  color: oklch(0.55 0.10 155);
  text-decoration: none;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-bottom: 1px solid oklch(0.55 0.10 155 / 0.35);
  padding-bottom: 2px;
  font-weight: 500;
}
.footer__bottom {
  border-top: 1px solid oklch(1 0 0 / 0.06);
  max-width: var(--page-max); margin: 0 auto;
  padding: 20px var(--pad-x);
  display: flex; justify-content: space-between; align-items: center;
}
.footer__copy { font-size: 12px; color: oklch(0.36 0.01 90); font-weight: 300; }
.footer__rc { font-size: 11px; color: oklch(0.30 0.01 90); font-weight: 300; }

/* ── Toast / inline error banner (admin + forms) ──────────────── */
.toast {
  position: fixed; top: 24px; right: 24px; z-index: 5000;
  background: oklch(0.35 0.12 155);
  color: #fff;
  padding: 14px 22px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 30px oklch(0 0 0 / 0.25);
  opacity: 0; transform: translateY(-10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.err-banner {
  background: oklch(0.96 0.03 25);
  color: oklch(0.32 0.15 25);
  border: 1px solid oklch(0.78 0.15 25);
  border-left: 3px solid oklch(0.55 0.22 25);
  padding: 12px 16px;
  font-size: 13px;
  border-radius: 2px;
  margin-bottom: 16px;
}


/* Subtle admin / staff links in footer bottom bar */
.footer__bottom-right {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; color: oklch(0.36 0.01 90);
}
.footer__intlink {
  color: oklch(0.48 0.01 90);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 10.5px;
  transition: color .2s;
}
.footer__intlink:hover { color: oklch(0.78 0.05 155); }
.footer__intlink-sep { color: oklch(0.30 0.01 90); }

/* ══════════════════════════════════════════════════════════════════
   Mobile-safety block — always at the bottom; !important is intentional.
   `overflow-x: clip` (not `hidden`) — `hidden` creates a scroll
   container on <html> which silently breaks position:sticky
   descendants (e.g. the services sub-nav). `clip` gives the same
   visual clipping without establishing a scroll container.
   ══════════════════════════════════════════════════════════════════ */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }
.container, .footer__contact, .footer__links, .footer__bottom,
.page-hero__inner, .nav__inner { max-width: 100vw; }
.page-hero__title, .footer__title { overflow-wrap: break-word; hyphens: auto; }
.footer__row-val, .footer__col-link { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  :root { --pad-x: 24px; }

  .nav__burger { display: inline-flex !important; }

  .nav__links {
    display: none !important;
    position: fixed !important;
    top: var(--nav-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: oklch(0.15 0.05 162) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 24px !important;
    overflow-y: auto !important;
  }
  .nav.is-open .nav__links { display: flex !important; }
  body.nav-open { overflow: hidden; }

  .nav__links > * { border-bottom: 1px solid oklch(1 0 0 / 0.06); padding: 18px 4px; }
  .nav__links > *:last-child { border-bottom: none; }
  .nav__link { font-size: 15px !important; }
  .nav__item { flex-direction: column; align-items: stretch; }
  /* On mobile the dropdowns are always expanded inline — no hover
     on touch devices, so users can tap sub-links directly. */
  .nav__dropdown {
    position: static !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 8px !important;
    padding: 0 0 0 8px !important;
    max-height: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }
  .nav__dropdown a { font-size: 14px !important; padding: 10px 18px !important; }
  .nav__contact {
    align-self: flex-start;
    margin-top: 12px;
    padding: 12px 28px !important;
  }

  .section { padding: 80px 0 !important; }
  .page-hero__inner { padding: 48px var(--pad-x) 40px !important; }

  .footer__contact { grid-template-columns: 1fr !important; gap: 48px !important; padding: 64px var(--pad-x) 48px !important; }
  .footer__links   { grid-template-columns: 1fr 1fr !important; gap: 32px !important; padding: 40px var(--pad-x) !important; }
  .footer__bottom  { flex-direction: column; gap: 8px; align-items: flex-start; }
  .footer__title   { font-size: 34px !important; }

  /* Any 2- or 3-column editorial grid collapses to 1 column. */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; gap: 24px !important; }
}

@media (max-width: 500px) {
  .page-hero__title { font-size: 32px !important; }
  .footer__title { font-size: 28px !important; }
  .footer__row { grid-template-columns: 1fr !important; gap: 4px !important; }
}

/* ── Touch-target hardening (mobile) ───────────────────────────── */
/* Brief: all interactive elements ≥ 44px on touch. */
@media (max-width: 900px) {
  .hero__cta,
  .about-teaser__cta,
  .csrb__cta,
  .footer__submit,
  .ct-submit,
  .ptn-cta__btn,
  .csr-story__btn {
    min-height: 48px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
  .nav__contact { min-height: 48px; display: inline-flex !important; align-items: center; }

  /* Team cards: switch from portrait stack to horizontal LinkedIn
     style so you don't scroll through 6 giant cards on a phone.
     Image is a fixed square at top-left; body fills the rest. */
  .team-card { display: grid !important; grid-template-columns: 120px 1fr !important; align-items: start !important; }
  .team-card .img-ph { height: 120px !important; aspect-ratio: 1 / 1 !important; min-height: 0 !important; }
  .team-card .img-ph img { object-position: center 20% !important; }   /* crop from upper-third so faces are centred */
  .team-card__body { padding: 16px 18px !important; }

  /* Form submit rows become full-width tappable. */
  .footer__submit { width: 100%; justify-content: center; }
}
