/* ============================================================
   SpecBounds — Inspection & Load Testing
   Design system: electric blue + steel, precision-instrument motif
   ============================================================ */

:root {
  /* Core palette */
  --ink:        #0C1F33;   /* body text */
  --navy:       #0E2A47;   /* deep brand navy — now used sparingly */
  --navy-deep:  #0A2038;

  --primary:    #0B6BE4;   /* brighter, higher-energy action blue */
  --primary-dk: #0857BC;
  --primary-lt: #EAF2FE;   /* tint surface */
  --primary-hz: #D6E6FD;   /* tint border */

  --cyan:       #00C2E0;   /* electric accent — decorative only, never text on white */
  --cyan-dk:    #00A5C4;
  --cyan-lt:    #7FE3F0;

  --amber:      #F5A623;   /* echoes plant hoist yellow; tiny doses */

  /* Gradients carry most of the new energy.
     --grad-blue backs white text, so its endpoints are tuned to stay >=4.5:1.
     --grad-line is decorative only (hairlines), so it can run to full cyan. */
  --grad-blue:  linear-gradient(102deg, #0B5FD6 0%, #0A6FC0 52%, #00789B 100%);
  --grad-line:  linear-gradient(90deg, #0B6BE4 0%, #00C2E0 100%);

  /* Steel neutrals */
  --steel-900: #1E3550;
  --steel-700: #40607F;
  --steel-500: #7C93AC;
  --steel-300: #BFCFE0;
  --steel-200: #DFE8F2;
  --steel-100: #EEF3FA;
  --paper:     #F4F8FD;
  --white:     #FFFFFF;

  /* Type */
  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', 'SF Mono', Menlo, monospace;

  /* Layout */
  --wrap: 1200px;
  --gut: 24px;
  --header-h: 76px;
  --radius: 3px;

  --shadow-sm: 0 1px 2px rgba(12,31,51,.06), 0 2px 8px rgba(12,31,51,.05);
  --shadow-md: 0 2px 4px rgba(12,31,51,.06), 0 12px 32px rgba(12,31,51,.09);
  --shadow-blue: 0 4px 14px rgba(11,107,228,.22);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--steel-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.14rem; font-weight: 600; letter-spacing: -.01em; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- Eyebrow / section headers ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--steel-500);
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 1rem;
}
.eyebrow-light { color: rgba(255,255,255,.7); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-sub { color: var(--steel-700); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: .95rem; font-weight: 500;
  padding: 13px 26px;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--primary-dk); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.16); border-color: #fff; }
.btn-sm { padding: 9px 18px; font-size: .88rem; }
.btn-lg { padding: 16px 34px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--steel-200);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 12px; color: #fff; }
.site-header.scrolled .logo { color: var(--navy); }
.logo-mark { height: 34px; width: auto; flex: none; filter: brightness(0) invert(1); }
.site-header.scrolled .logo-mark { filter: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 1.22rem; font-weight: 600; letter-spacing: -.025em; color: currentColor; }
.logo-name em { font-style: normal; font-weight: 400; opacity: .72; }
.logo-sub {
  font-family: var(--mono); font-size: .58rem;
  letter-spacing: .17em; text-transform: uppercase;
  color: currentColor; opacity: .58; margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav > a { font-size: .93rem; font-weight: 500; color: rgba(255,255,255,.88); transition: color .16s ease; }
.nav > a:hover { color: #fff; }
.site-header.scrolled .nav > a { color: var(--steel-700); }
.site-header.scrolled .nav > a:hover { color: var(--primary); }
.nav > a.btn, .site-header.scrolled .nav > a.btn { color: #fff; }

.nav-toggle {
  display: none; width: 42px; height: 42px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px; padding: 0 8px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: #fff; transition: background .2s ease; }
.site-header.scrolled .nav-toggle span { background: var(--navy); }

/* ============================================================
   HERO — lighter scrim, blue/cyan tinted
   ============================================================ */
.hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 72px) 0 88px;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg,
      rgba(10,32,56,.90) 0%,
      rgba(11,62,116,.74) 40%,
      rgba(0,116,186,.32) 74%,
      rgba(0,178,214,.16) 100%),
    linear-gradient(to bottom, rgba(12,31,51,.5), transparent 28%);
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero h1 { color: #fff; margin-bottom: 1.1rem; }
.hero h1 .hl {
  color: var(--cyan-lt);
  box-shadow: inset 0 -4px 0 rgba(0,194,224,.32);
}
.hero-lead {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: rgba(255,255,255,.85);
  max-width: 620px; margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Tolerance band — brand signature */
.tolerance-band {
  display: flex; align-items: center; gap: 14px;
  margin-top: 64px; max-width: 420px;
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .18em; color: rgba(255,255,255,.6);
}
.tb-track { position: relative; flex: 1; height: 1px; background: rgba(255,255,255,.32); }
.tb-track::before, .tb-track::after {
  content: ''; position: absolute; top: -5px; width: 1px; height: 11px; background: rgba(255,255,255,.5);
}
.tb-track::before { left: 0; }
.tb-track::after  { right: 0; }
.tb-tick { position: absolute; left: 50%; top: -3px; width: 1px; height: 7px; background: rgba(255,255,255,.26); }
.tb-dot {
  position: absolute; left: 58%; top: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: var(--cyan); border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(0,194,224,.26), 0 0 14px rgba(0,194,224,.5);
}

/* ============================================================
   STAT BAR — gradient, the biggest energy lift
   ============================================================ */
.statbar { background: var(--grad-blue); color: #fff; }
.statbar-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 34px 28px 34px 0; border-right: 1px solid rgba(255,255,255,.22); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat-num {
  display: block; font-family: var(--mono);
  font-size: 1.85rem; font-weight: 500; color: #fff;
  letter-spacing: -.02em; line-height: 1.1;
}
.stat-num em { font-style: normal; font-size: .95rem; font-weight: 400; color: rgba(255,255,255,.82); letter-spacing: 0; }
.stat-label { display: block; margin-top: 8px; font-size: .82rem; line-height: 1.45; color: rgba(255,255,255,.82); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 104px 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--steel-200); }
.section-tint { background: var(--primary-lt); border-block: 1px solid var(--primary-hz); }

.grid-2 { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
.grid-2.gap-lg { gap: 72px; }
.align-start { align-items: start; }
.prose { color: var(--steel-700); font-size: 1.04rem; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Service cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--steel-200); border: 1px solid var(--steel-200);
}
.card { position: relative; background: var(--white); padding: 38px 32px 34px; transition: box-shadow .2s ease; }
.card:hover { box-shadow: var(--shadow-md); z-index: 1; }
.card-rule {
  position: absolute; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad-line);
  transition: width .35s cubic-bezier(.22,.61,.36,1);
}
.card:hover .card-rule { width: 100%; }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--steel-700); font-size: .94rem; line-height: 1.6; margin-bottom: .8rem; }
.card-meta {
  font-family: var(--mono); font-size: .7rem !important;
  letter-spacing: .05em; color: var(--primary) !important;
  padding-top: 14px; border-top: 1px solid var(--steel-200);
  margin-bottom: 0 !important;
}

/* ---------- Industries split ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.split-media { position: sticky; top: calc(var(--header-h) + 32px); }
.split-media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.ind-list li {
  display: block;
  padding: 26px 0; border-bottom: 1px solid var(--steel-200);
}
.ind-list li:first-child { padding-top: 0; }
.ind-list li:last-child { border-bottom: 0; }
.ind-list h3 { margin-bottom: .35rem; }
.ind-list p { color: var(--steel-700); font-size: .94rem; margin: 0; }

/* ---------- Standards — now light, chip-based ---------- */
.std-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.std {
  background: #fff;
  border: 1px solid var(--primary-hz);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 22px 15px;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 210px; flex: 1 1 210px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.std:hover { box-shadow: var(--shadow-blue); transform: translateY(-2px); border-left-color: var(--cyan); }
.std-code { font-family: var(--mono); font-size: .9rem; font-weight: 500; color: var(--primary); letter-spacing: -.01em; }
.std-name { font-size: .82rem; color: var(--steel-700); line-height: 1.4; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); }
.steps li { padding: 26px 30px 0 0; border-top: 2px solid var(--steel-200); position: relative; }
.steps li::before {
  content: ''; position: absolute; top: -2px; left: 0;
  width: 38px; height: 2px; background: var(--grad-line);
}
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--steel-700); font-size: .92rem; margin: 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 16px; }
.g-item { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--steel-900); }
.g-tall { grid-row: span 2; grid-column: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,.61,.36,1); }
.g-item:hover img { transform: scale(1.04); }
.g-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 20px 18px;
  background: linear-gradient(to top, rgba(10,32,56,.94), rgba(10,32,56,.55) 55%, transparent);
  color: #fff;
}
.g-tag {
  display: block; font-family: var(--mono); font-size: .64rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-lt); margin-bottom: 5px;
}
.g-cap { display: block; font-size: .84rem; line-height: 1.45; color: rgba(255,255,255,.88); }

.disclaimer { margin-top: 26px; font-family: var(--mono); font-size: .72rem; color: var(--steel-500); }

/* ---------- CTA band — gradient ---------- */
.cta-band { background: var(--grad-blue); color: #fff; padding: 66px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { color: rgba(255,255,255,.9); margin: 0; max-width: 620px; }
.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 4px 16px rgba(6,40,80,.22); }
.cta-band .btn-primary:hover { background: var(--primary-lt); }

/* ---------- Contact ---------- */
.contact-list { margin: 34px 0 0; }
.contact-list > div {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px;
  padding: 15px 0; border-bottom: 1px solid var(--steel-200);
}
.contact-list dt {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel-500); padding-top: 3px;
}
.contact-list dd { margin: 0; font-size: .97rem; color: var(--steel-900); }
.loc { display: block; }
.loc + .loc { margin-top: 3px; }

.quote-form {
  background: var(--paper); border: 1px solid var(--steel-200);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius); padding: 34px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; margin-bottom: 7px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel-700);
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: .95rem; color: var(--ink);
  padding: 12px 14px; background: #fff;
  border: 1px solid var(--steel-300); border-radius: var(--radius);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,107,228,.16);
}
.field input:invalid:not(:placeholder-shown) { border-color: #C0473B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.form-note { margin: 14px 0 0; font-size: .87rem; color: var(--steel-700); min-height: 1.2em; }
.form-note.ok { color: #147A46; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.66); padding: 68px 0 0; position: relative; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px; padding-bottom: 52px; }
.footer-brand .logo-mark { height: 36px; width: auto; margin-bottom: 16px; }
.footer-name { font-size: 1.2rem; font-weight: 600; color: #fff; margin: 0; letter-spacing: -.02em; }
.footer-tag {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.46); margin: 4px 0 0;
}
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cyan-lt); margin: 0 0 6px; font-weight: 500;
}
.footer-col a, .footer-col span { color: rgba(255,255,255,.76); font-size: .91rem; }
.footer-col a:hover { color: #fff; }

.footer-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding-top: 26px; padding-bottom: 30px; border-top: 1px solid rgba(255,255,255,.12);
}
.footer-base p { margin: 0; font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-std { font-family: var(--mono); font-size: .72rem !important; letter-spacing: .06em; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--steel-200);
    box-shadow: var(--shadow-md); padding: 8px 24px 22px; display: none;
  }
  .nav.open { display: flex; }
  .nav > a {
    color: var(--steel-900) !important; padding: 15px 0;
    border-bottom: 1px solid var(--steel-200); font-size: 1rem;
  }
  .nav > a.btn { color: #fff !important; margin-top: 16px; border-bottom: 0; justify-content: center; }
  .nav-toggle { display: flex; }

  .grid-2, .grid-2.gap-lg { grid-template-columns: 1fr; gap: 32px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split-media { position: static; }
  .split-media img { aspect-ratio: 16/10; }
  .statbar-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 26px 22px 26px 0; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.22); }
  .stat:nth-child(3) { padding-left: 0; }

  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .g-tall { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 660px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .hero { min-height: 0; padding: calc(var(--header-h) + 56px) 0 64px; }
  .hero-scrim { background: linear-gradient(175deg, rgba(10,32,56,.92) 0%, rgba(11,62,116,.86) 60%, rgba(0,116,186,.78) 100%); }
  .tolerance-band { margin-top: 44px; }
  .cards { grid-template-columns: 1fr; }
  .std { min-width: 0; flex: 1 1 100%; }
  .steps { grid-template-columns: 1fr; row-gap: 34px; }
  .steps li { padding-right: 0; }
  .gallery { grid-template-columns: 1fr; }
  .g-tall { grid-column: span 1; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .quote-form { padding: 24px; }
  .contact-list > div { grid-template-columns: 1fr; gap: 3px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); }

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