/* =========================================================================
   Mu Inspections Inc. -- design tokens
   Palette pulled from the logo (deep navy) plus a brass accent used the way
   a calibration seal or certification stamp would use foil -- sparingly.
   ========================================================================= */
:root {
  --navy-950: #0a1a2c;
  --navy-900: #0f2338;
  --navy-800: #123258;
  --navy-700: #1c4a7a;
  --navy-600: #2c608f;
  --brass-600: #a97e2f;
  --brass-500: #c99a42;
  --paper: #f6f4ee;
  --paper-dim: #efeadf;
  --white: #ffffff;
  --ink: #142235;
  --ink-soft: #4a5566;
  --line: #d9d2c0;
  --line-dark: rgba(255, 255, 255, 0.18);

  --font-display: 'Libre Caslon Display', Georgia, 'Times New Roman', serif;
  --font-text: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1160px;
  --gap: clamp(1.5rem, 3vw, 3rem);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 400;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; max-width: 62ch; }
p.lede { font-size: 1.15rem; color: var(--ink-soft); }

a { color: var(--navy-700); }
a:hover { color: var(--brass-600); }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--brass-500);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--dim { background: var(--paper-dim); }
.section--navy { background: var(--navy-900); color: rgba(255,255,255,0.92); }
.section--navy h1,
.section--navy h2,
.section--navy h3 { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.78); }
.section--navy a { color: var(--brass-500); }

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* --- registration mark: a small corner-bracket motif, borrowed from
   calibration targets / inspection stamps, used to mark section openings
   and to frame key figures instead of drop shadows or rounded cards. --- */
.mark {
  position: relative;
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  margin-bottom: 1.1rem;
}
.mark::before,
.mark::after {
  content: '';
  position: absolute;
  border: 2px solid var(--brass-600);
}
.mark::before { top: 0; left: 0; width: 100%; height: 40%; border-right: none; border-bottom: none; }
.mark::after  { bottom: 0; right: 0; width: 40%; height: 100%; border-left: none; border-top: none; }
.section--navy .mark::before,
.section--navy .mark::after { border-color: var(--brass-500); }

/* =========================================================================
   Header / nav
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.75rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy-900);
}
.nav__brand img { height: 44px; width: 44px; border-radius: 4px; }
.nav__brand-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.1;
}
.nav__brand-text small {
  display: block;
  font-family: var(--font-text);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  font-weight: 600;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.85rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--navy-900);
  border-bottom-color: var(--brass-600);
}

.nav__cta {
  white-space: nowrap;
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1rem;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding-block: 0.65rem; width: 100%; }
  .nav__cta { display: none; }
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn--primary {
  background: var(--brass-600);
  color: var(--navy-950);
}
.btn--primary:hover { background: var(--brass-500); color: var(--navy-950); }
.btn--outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn--outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn--outline-navy {
  background: transparent;
  border-color: var(--navy-800);
  color: var(--navy-900);
}
.btn--outline-navy:hover { background: var(--navy-900); color: var(--white); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem);
}
.hero::before {
  /* faint blueprint grid, subject-matter texture rather than decoration */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 85%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--gap);
  align-items: center;
}
.hero__mu {
  font-family: var(--font-display);
  font-size: clamp(9rem, 20vw, 15rem);
  color: rgba(255,255,255,0.06);
  line-height: 1;
  text-align: center;
  user-select: none;
}
.hero__eyebrow-rule {
  width: 60px;
  height: 3px;
  background: var(--brass-500);
  margin-bottom: 1.4rem;
}
.hero h1 { max-width: 14ch; }
.hero p.lede { color: rgba(255,255,255,0.82); max-width: 46ch; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__mu { display: none; }
}

/* =========================================================================
   Grid / cards (flat, bordered -- not shadowed "SaaS card" style)
   ========================================================================= */
.grid {
  display: grid;
  gap: 1.75rem;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1.75rem;
}
.card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 18px; height: 18px;
  border-top: 2px solid var(--brass-600);
  border-left: 2px solid var(--brass-600);
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1rem; margin: 0.75rem 0 0; }
.card li { margin-bottom: 0.35rem; }

/* two-column split layout used across interior pages */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--gap);
  align-items: start;
}
.split--reverse { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 860px) {
  .split, .split--reverse { grid-template-columns: 1fr; }
}
.split__label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brass-600);
  position: sticky;
  top: 5.5rem;
}

/* numbered process -- numbers only used because the content is a genuine sequence */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass-600);
}

/* =========================================================================
   Tables (certifications matrix) & lists
   ========================================================================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.matrix { width: 100%; border-collapse: collapse; min-width: 560px; }
table.matrix th, table.matrix td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
table.matrix thead th {
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-text);
  font-weight: 700;
}
table.matrix tbody tr:last-child td { border-bottom: none; }
table.matrix tbody tr:nth-child(odd) { background: var(--paper-dim); }

.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag-list li {
  border: 1px solid var(--navy-800);
  color: var(--navy-900);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* =========================================================================
   Forms
   ========================================================================= */
.form { max-width: 640px; }
.form-row { margin-bottom: 1.25rem; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .form-row--split { grid-template-columns: 1fr; } }

.form label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--navy-900);
}
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form select,
.form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #b9b2a0;
  background: var(--white);
  font-family: var(--font-text);
  font-size: 1rem;
  color: var(--ink);
}
.form textarea { min-height: 140px; resize: vertical; }
.form-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.35rem; }
.form input[type="file"] { font-size: 0.9rem; }

/* honeypot field, hidden from real visitors */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.alert {
  padding: 1rem 1.15rem;
  border: 1px solid;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}
.alert--success { background: #eef4ea; border-color: #7fa863; color: #2f4a20; }
.alert--error { background: #f8ecec; border-color: #c96a6a; color: #6b1f1f; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.75);
  padding-block: 3rem 1.75rem;
}
.site-footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-text);
  letter-spacing: 0.03em;
  margin-bottom: 0.9rem;
}
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-footer a:hover { color: var(--brass-500); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-dark);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid p { color: rgba(255,255,255,0.65); }
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 0.5rem; }
.eyebrow-free-space { height: 0; } /* placeholder for spacing consistency */
