@import url("fonts.css");

/* ==========================================================================
   MetroBuilding Services LLC
   Brand system taken from the logo: navy buildings, gold rule, charcoal
   wordmark. Sharp corners, left-aligned, no shadows except the sticky header.
   ========================================================================== */

:root {
  /* Core */
  --navy-900: #101b33;
  --navy-800: #16233f;
  --navy-700: #1d2e4e;
  --navy-600: #2a3d63;

  --gold-500: #c8951f;
  --gold-400: #d9a93d;
  --gold-100: #f5ead2;

  /* Brand gold is 2.70:1 on white. That fails WCAG AA for body text (4.5:1)
     AND for large text and UI (3.0:1), so it can never carry text on a light
     background. This is the same hue and saturation, darkened until it clears
     4.5:1 on both white (4.95) and --paper-alt (4.62). Gold TEXT on light uses
     this; gold RULES, markers and borders keep --gold-500. On navy, --gold-400
     is 7.90:1 and --gold-500 is 6.34:1, so both are safe there. */
  --gold-ink: #8f6a16;

  --charcoal-700: #3f3f3f;
  --charcoal-500: #6b6b6b;

  --paper: #ffffff;
  --paper-alt: #f6f7f9;
  --rule: #e3e6eb;

  --font-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --max: 1200px;
  --pad-section: 96px;
  --radius: 2px;
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal-700);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--navy-800);
  margin: 0 0 0.6em;
}
h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 2.75rem;
  line-height: 1.15;
}
h2 {
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h3 {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.35;
}
h4 {
  font-weight: 600;
  font-size: 1.0625rem;
}
p {
  margin: 0 0 1.1em;
  max-width: 70ch;
}
a {
  color: var(--navy-700);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  /* navy on white is 15.6:1. Gold would be 2.70:1 and fail WCAG 1.4.11. */
  outline: 3px solid var(--navy-800);
  outline-offset: 2px;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.cta-band :focus-visible,
.page-head :focus-visible,
.section--navy :focus-visible {
  /* gold-400 on navy is 7.90:1 */
  outline-color: var(--gold-400);
}
img,
svg {
  max-width: 100%;
  height: auto;
}
strong {
  font-weight: 600;
  color: var(--navy-800);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: var(--pad-section) 0;
}
.section--alt {
  background: var(--paper-alt);
}
.section--navy {
  background: var(--navy-800);
  color: #e8ecf3;
}
.section--navy h2,
.section--navy h3 {
  color: #fff;
}
.section--navy p {
  color: #c7d0de;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-ink);
  margin: 0 0 12px;
  display: block;
}
/* --gold-ink is the dark gold for light backgrounds; on navy it drops to
   3.45:1. Every dark surface gets the light gold instead. Scoping this to
   .section--navy alone missed .page-head, which is navy on all four subpages. */
.section--navy .eyebrow,
.page-head .eyebrow,
.cta-band .eyebrow,
.hero .eyebrow {
  color: var(--gold-400);
}
.rule {
  width: 56px;
  height: 3px;
  background: var(--gold-500);
  border: 0;
  margin: 0 0 20px;
}
.section-head {
  max-width: 760px;
  margin-bottom: 56px;
}
.lede {
  font-size: 1.1875rem;
  color: var(--charcoal-700);
}
.section--navy .lede {
  color: #d3dbe7;
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.btn--gold {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}
.btn--gold:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
}
.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}
.btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.btn--navy {
  background: var(--navy-800);
  color: #fff;
  border-color: var(--navy-800);
}
.btn--navy:hover {
  background: var(--navy-600);
  border-color: var(--navy-600);
}

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: transparent;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.site-header.is-solid {
  background: var(--navy-900);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(16, 27, 51, 0.28);
}
body.has-subpage-header .site-header {
  background: var(--navy-900);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo svg {
  width: 44px;
  height: 33px;
  flex-shrink: 0;
}
.logo-words {
  display: flex;
  flex-direction: column;
  line-height: 1.04;
}
.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: #c3cedc;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.logo-wordmark b {
  color: #fff;
  font-weight: 700;
}
.logo-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.5625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-top: 3px;
}

.nav {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: 30px;
}
.nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: #d6deea;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  color: #fff;
  border-bottom-color: var(--gold-500);
}
.nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--gold-500);
}
.nav-cta {
  display: none;
}
.nav-toggle {
  margin-left: auto;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #fff;
}
.nav-toggle span::before {
  top: -6px;
}
.nav-toggle span::after {
  top: 6px;
}
.mobile-nav {
  display: none;
  background: var(--navy-900);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav a {
  display: block;
  padding: 15px 24px;
  color: #e4eaf3;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  min-height: 48px;
}
@media (min-width: 1000px) {
  .nav {
    display: flex;
  }
  .nav-cta {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* --- hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--navy-900);
  color: #fff;
  padding: calc(var(--header-h) + 84px) 0 0;
  margin-top: calc(var(--header-h) * -1);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-size: cover;
  background-position: center;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(16, 27, 51, 0.55) 0%,
    rgba(16, 27, 51, 0.85) 100%
  );
}
.hero__inner {
  position: relative;
  padding-bottom: 72px;
}
.hero h1 {
  color: #fff;
  max-width: 19ch;
}
.hero .lede {
  color: #cbd5e4;
  max-width: 62ch;
  font-size: 1.1875rem;
}
.hero .rule {
  margin-bottom: 22px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.statbar {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 27, 51, 0.72);
}
.statbar__grid {
  display: grid;
  grid-template-columns: 1fr;
}
.statbar__item {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.statbar__item:last-child {
  border-bottom: 0;
}
.statbar__fig {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--gold-400);
  font-variant-numeric: tabular-nums;
  display: block;
}
.statbar__lbl {
  font-size: 0.8125rem;
  color: #aebacb;
}
@media (min-width: 760px) {
  .statbar__grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .statbar__item {
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  .statbar__item:last-child {
    border-right: 0;
  }
}

/* --- clients ------------------------------------------------------------ */
.clients {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  align-items: center;
}
.clients li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal-500);
}
.clients {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* --- numbered method list ----------------------------------------------- */
.method {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 40px;
}
@media (min-width: 900px) {
  .method {
    grid-template-columns: 1fr 1fr;
    gap: 48px 56px;
  }
}
.method__n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  /* gold-500 here was 2.51:1 on --paper-alt. These are 24px bold, so the large
     text threshold of 3:1 applies and it failed even that. */
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 6px;
}
.method h3 {
  margin-bottom: 0.45em;
}
.method p {
  margin: 0;
  color: var(--charcoal-700);
}
.section--navy .method p {
  color: #c7d0de;
}

/* --- two-column capability lists ---------------------------------------- */
.cols2 {
  display: grid;
  gap: 48px;
}
@media (min-width: 860px) {
  .cols2 {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}
.tradelist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tradelist li {
  padding: 11px 0 11px 22px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.tradelist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 2px;
  background: var(--gold-500);
}
.tradelist li:last-child {
  border-bottom: 0;
}

.taglist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.taglist li {
  border: 1px solid var(--rule);
  padding: 9px 15px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background: var(--paper);
}

/* --- coverage map ------------------------------------------------------- */
.coverage {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .coverage {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}
.coverage figcaption {
  font-size: 0.9375rem;
  color: var(--charcoal-500);
  margin-top: 14px;
}

/* --- CTA band ----------------------------------------------------------- */
.cta-band {
  background: var(--navy-800);
  color: #fff;
  padding: 72px 0;
}
.cta-band h2 {
  color: #fff;
  margin-bottom: 0.35em;
}
.cta-band p {
  color: #c7d0de;
}

/* --- tables ------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-800);
  background: var(--paper-alt);
  white-space: nowrap;
}
td strong {
  color: var(--navy-800);
}

/* --- project case studies ----------------------------------------------- */
.case {
  border-top: 3px solid var(--navy-800);
  padding-top: 28px;
  margin-bottom: 64px;
}
.case:last-child {
  margin-bottom: 0;
}
.case__meta {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .case__meta {
    grid-template-columns: repeat(2, 1fr);
  }
}
.case__meta div {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.case__meta dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--charcoal-500);
}
.case__meta dd {
  margin: 2px 0 0;
  color: var(--navy-800);
  font-weight: 500;
}

/* --- forms -------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: 20px;
  max-width: 760px;
}
@media (min-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.field--full {
  grid-column: 1/-1;
}
label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-800);
  margin-bottom: 6px;
}
.req {
  color: var(--gold-ink);
}
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--charcoal-700);
  background: var(--paper);
  border: 1px solid #c6ccd6;
  border-radius: var(--radius);
}
textarea {
  min-height: 130px;
  resize: vertical;
}
/* :invalid matches an empty required field immediately, so the whole form
   loaded showing red borders before the user had typed anything. :user-invalid
   only fires after they have actually interacted with the field and left it. */
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: #a32a2a;
  background: #fdf6f6;
}
.hint {
  font-size: 0.8125rem;
  color: var(--charcoal-500);
  margin-top: 6px;
}

/* --- footer ------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: #afbacb;
  padding: 72px 0 32px;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  gap: 40px;
  margin-bottom: 44px;
}
@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 56px;
  }
}
.site-footer h3 {
  color: #fff;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.site-footer a {
  color: #c6d0de;
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 9px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #8d9aad;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 12px 20px;
  z-index: 100;
  font-family: var(--font-display);
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

.page-head {
  background: var(--navy-900);
  color: #fff;
  padding: 56px 0 60px;
}
.page-head h1 {
  color: #fff;
  font-size: 2.375rem;
  margin-bottom: 0.3em;
}
.page-head p {
  color: #c4cedd;
  max-width: 70ch;
  margin: 0;
}

@media (max-width: 760px) {
  :root {
    --pad-section: 56px;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  .page-head h1 {
    font-size: 1.875rem;
  }
  .hero {
    padding-top: calc(var(--header-h) + 52px);
  }
}

/* Hero backdrop. Self-hosted and pre-compressed: 172 KB AVIF desktop, 70 KB on
   phones, sitting at 25% opacity behind the navy so it reads as texture rather
   than as a photograph making a claim. */
.hero__bg {
  background-image: url("/assets/hero-1920.jpg");
  background-image: image-set(
    url("/assets/hero-1920.avif") type("image/avif"),
    url("/assets/hero-1920.webp") type("image/webp"),
    url("/assets/hero-1920.jpg") type("image/jpeg")
  );
}
@media (max-width: 760px) {
  .hero__bg {
    background-image: url("/assets/hero-1100.jpg");
    background-image: image-set(
      url("/assets/hero-1100.avif") type("image/avif"),
      url("/assets/hero-1100.webp") type("image/webp")
    );
  }
}

/* --- layout hardening ---------------------------------------------------- */
/* Grid and flex children default to min-width:auto, so one unbreakable string
   (estimates@metrobuildingservices.net) sets the whole column's minimum width
   and pushes the page sideways. On a 375px viewport that was 102px of
   horizontal overflow on the contact page. */
.cols2 > *,
.form-grid > *,
.coverage > *,
.footer-grid > * {
  min-width: 0;
}

/* Long addresses and URLs wrap rather than widening their container. */
td a,
.site-footer a,
.case__meta dd,
.hint a {
  overflow-wrap: anywhere;
}

/* --- tap targets --------------------------------------------------------- */
/* 44px minimum on every standalone navigation control. Links sitting inside a
   sentence are left alone: padding them out would break the line box, and
   WCAG 2.5.8 exempts inline text links. */
.nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.logo {
  min-height: 44px;
}
.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer li {
  margin-bottom: 2px;
}
.footer-bottom {
  padding-bottom: 4px;
}
/* Contact links are the sole content of their table cell, so they are real
   standalone targets rather than inline prose links. */
td a[href^="mailto:"],
td a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* The bid-invitations column holds a 35-character address. At 1fr it was too
   narrow and the address broke mid-word, which looks like a typo. */
@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: 1.7fr 1fr 1.35fr;
  }
}
.site-footer a[href^="mailto:"] {
  overflow-wrap: break-word;
  font-size: 0.9rem;
}

/* --- SMS opt-in ---------------------------------------------------------- */
/* Deliberately plain. This is a consent mechanism sitting on a legal page, not
   a marketing signup, so it gets no panel, no accent background and no lift.
   The global `label` rule uppercases and shrinks labels, which is unreadable
   for a full consent sentence, so the consent line opts back out of it. */
.optin {
  max-width: 34rem;
}
.optin__field {
  margin-bottom: 18px;
}
.optin__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-transform: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--charcoal-700);
  margin-bottom: 20px;
}
.optin__consent input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
  flex: none;
}
.optin__done {
  border-left: 3px solid var(--gold-500);
  padding-left: 14px;
}
