/* =========================================================
   TRUPOINT — site styles
   Layout: dark charcoal header band, light content bands,
   one wide content column (max 1120px), cards only for services.
   Change colours here and they update across every page.
   ========================================================= */

:root {
  color-scheme: light;
  /* Brand colours */
  --charcoal: #111827;
  --steel: #4A6FA5;
  --orange: #E07B20;

  /* Page tokens (light) */
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --fg: #111827;
  --muted: #4B5563;
  --line: #DDE2EA;
  --band: #111827;          /* dark bands (header, hero, footer) */
  --band-fg: #F3F4F6;
  --band-muted: #A9B4C6;
  --accent: #E07B20;
  --accent-fg: #111827;
  --link: #3A5F95;
  --tint: #EAF0F8;          /* steel-blue tint for highlight panels */
  --hero: #EDF2F8;          /* light steel background for page tops */
  --cta: #4A6FA5;           /* steel-blue call-to-action band */
  --cta-fg: #FFFFFF;

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 1120px;
  --radius: 4px;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: 72px; }
.band--tight { padding-block: 48px; }
.band--white { background: var(--surface); border-block: 1px solid var(--line); }
.band--dark { background: var(--cta); color: var(--cta-fg); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; text-transform: uppercase; }
h3 { font-size: 1.5rem; font-weight: 600; }
p { margin: 0; max-width: 65ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 500;
}
.band--dark .eyebrow { color: #FFD3A8; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--lg { gap: 28px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.lede { font-size: 1.15rem; color: var(--muted); }
.band--dark .lede { color: rgba(255,255,255,0.85); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: #F09440; }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,0.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
}
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--surface);
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(17,24,39,0.05);
}
.topbar {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--band);
  color: var(--band-muted);
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  padding-block: 6px;
}
.topbar a { color: var(--band-fg); text-decoration: none; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
}
.brand-logo { display: block; height: 54px; width: auto; }
.site-footer .brand-logo { height: 64px; }
@media (max-width: 520px) { .brand-logo { height: 44px; } }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.08em;
}
.brand-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin-top: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--line); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav-links .nav-cta {
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--radius);
  margin-left: 8px;
  border-bottom: 0;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 20px rgba(17,24,39,0.08);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a[aria-current="page"] { color: var(--accent); }
  .nav-links .nav-cta { margin: 12px 0 0; text-align: center; }
  .site-header { position: sticky; }
  .nav { position: relative; }
}

/* ---------- Hero ---------- */
.hero { background: var(--hero); color: var(--fg); padding-block: 72px 80px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .lede, .page-hero .lede { color: var(--muted); }
.hero .btn--ghost, .page-hero .btn--ghost { color: var(--fg); }
.hero .btn--ghost:hover, .page-hero .btn--ghost:hover { background: var(--surface); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede { font-size: 1.2rem; }
.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.hero-points li::before { content: "■ "; color: var(--accent); font-size: 0.7em; vertical-align: 0.15em; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Page hero (inner pages) */
.page-hero { background: var(--hero); color: var(--fg); padding-block: 56px 60px; border-bottom: 1px solid var(--line); }
.page-hero .stack { gap: 14px; }

/* ---------- Certificate excerpt (signature element) ---------- */
.cert {
  background: #FBFBF8;
  color: #111827;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(17,24,39,0.12);
  font-size: 0.82rem;
  overflow: hidden;
}
.cert-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 3px solid #4A6FA5;
}
.cert-head strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cert-head span { font-family: var(--font-mono); font-size: 0.72rem; color: #4B5563; }
.cert-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #374151;
  border-bottom: 1px solid #E5E7EB;
}
.cert-meta b { color: #111827; font-weight: 600; }
.cert-table-wrap { overflow-x: auto; }
.cert table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
}
.cert th, .cert td { padding: 7px 10px; text-align: right; white-space: nowrap; }
.cert th:first-child, .cert td:first-child { text-align: left; }
.cert thead th {
  background: #EEF2F8;
  color: #1F2A3D;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cert tbody tr + tr td { border-top: 1px solid #EEF0F3; }
.cert .pass { color: #1F7A4D; font-weight: 600; }
.cert-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 18px 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #6B7280;
  border-top: 1px solid #E5E7EB;
}
.cert-caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Division cards ---------- */
.divisions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.division {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--steel);
  border-radius: var(--radius);
  padding: 28px 26px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.division:first-child { border-top-color: var(--accent); }
.division:hover { transform: translateY(-2px); border-color: var(--steel); }
.division ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.96rem; }
.division .more {
  margin-top: auto;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--link);
}
@media (max-width: 900px) { .divisions { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .division { transition: none; } .division:hover { transform: none; } }

/* ---------- Two-column feature ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.checklist li::before {
  content: "";
  width: 14px; height: 14px;
  margin-top: 6px;
  border: 2px solid var(--accent);
  background: linear-gradient(var(--accent), var(--accent)) center / 6px 6px no-repeat;
}
.checklist strong { display: block; font-weight: 600; }
.checklist span { color: var(--muted); }

/* ---------- Spec list (equipment, credentials) ---------- */
.spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.spec-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.6fr) minmax(0, 1.4fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.spec-row dd { margin: 0; }
.spec { margin: 0; }
@media (max-width: 520px) { .spec-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Industries strip ---------- */
.industries {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.industry { padding: 24px 22px; display: flex; flex-direction: column; gap: 8px; }
.industry + .industry { border-left: 1px solid var(--line); }
.industry p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 900px) {
  .industries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industry:nth-child(3) { border-left: 0; }
  .industry:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .industries { grid-template-columns: 1fr; }
  .industry + .industry { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Process steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
}
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 8px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.steps p { color: var(--muted); font-size: 0.96rem; }
.band--dark .steps p { color: rgba(255,255,255,0.85); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Highlight panel ---------- */
.panel {
  background: var(--tint);
  border-left: 4px solid var(--steel);
  padding: 22px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.panel p { color: var(--fg); }

/* ---------- CTA band ---------- */
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.cta .phone {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cta-fg);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

/* ---------- Contact form ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.form-status { grid-column: 1 / -1; font-weight: 600; }
.form-status[data-state="ok"] { color: #1F7A4D; }
.form-status[data-state="info"] { color: var(--link); }
@media (max-width: 620px) { .form { grid-template-columns: 1fr; } }

.contact-card { display: flex; flex-direction: column; gap: 22px; }
.contact-item { display: flex; flex-direction: column; gap: 2px; }
.contact-item .eyebrow { color: var(--muted); }
.contact-item a, .contact-item span.value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  word-break: break-word;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--hero); color: var(--muted); padding-block: 56px 32px; font-size: 0.95rem; border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.site-footer h3 {
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--link); }
.footer-legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Home page path tiles (Electrical / Calibration) ---------- */
.paths { display: flex; flex-direction: column; gap: 14px; }
.path {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--steel);
  border-radius: var(--radius);
  padding: 22px 22px;
  color: var(--fg);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(17,24,39,0.06);
  transition: border-color 0.15s, transform 0.15s;
}
.path:first-child { border-left-color: var(--accent); }
.path:hover { transform: translateX(3px); border-color: var(--steel); }
.path:first-child:hover { border-left-color: var(--accent); }
.path-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--tint);
  color: var(--steel);
}
.path:first-child .path-icon { background: #FDF0E3; color: var(--accent); }
.path-icon svg { width: 28px; height: 28px; }
.path-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.path-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.path-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
}
.path-text { color: var(--muted); font-size: 0.95rem; }
.path-arrow { font-size: 1.6rem; color: var(--link); }
.path-small { padding: 4px 4px 0; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.path-small strong { color: var(--link); }
@media (max-width: 520px) {
  .path { grid-template-columns: 44px minmax(0, 1fr); padding: 18px; gap: 14px; }
  .path-icon { width: 44px; height: 44px; }
  .path-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .path { transition: none; } .path:hover { transform: none; } }

/* Four-card service row (electrical page) */
.divisions--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1060px) { .divisions--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .divisions--4 { grid-template-columns: 1fr; } }

/* ---------- Sample certificate image ---------- */
.cert-sample { margin: 0; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.cert-sample a { display: block; }
.cert-sample img {
  display: block;
  width: 100%;
  height: auto;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(17,24,39,0.12);
}
.cert-sample figcaption { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
