:root {
  --color-bg: #ffffff;
  --color-bg-muted: #f2f5f8;
  --color-text: #1c232b;
  --color-text-muted: #57626d;
  --color-brand: #2b6cb0;       /* LEM hardhat blue */
  --color-brand-dark: #1d4a7d;
  --color-accent: #e8830e;      /* construction safety orange */
  --color-border: #e0e5eb;
  --radius: 8px;
  --wrap-width: 1160px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--color-brand); }

.wrap {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  gap: 16px;
}

.brand__mark { height: 56px; width: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text);
  white-space: nowrap;
}

.site-nav a:hover { color: var(--color-brand); }

.site-nav__cta {
  background: var(--color-accent);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 20px;
    gap: 14px;
  }

  .site-nav.is-open { display: flex; }

  .site-nav__cta { align-self: flex-start; }
}

/* ---------- Hero (homepage) ---------- */

.hero { position: relative; color: #fff; }

.hero__media {
  aspect-ratio: 16 / 8;
  min-height: 340px;
  overflow: hidden;
  background: var(--color-brand-dark);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(90deg, rgba(15,35,58,0.90) 0%, rgba(15,35,58,0.62) 55%, rgba(15,35,58,0.18) 100%);
  max-width: none;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 700;
  margin: 0 0 10px;
}

.hero__content h1 {
  max-width: 620px;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin: 0 0 16px;
}

.hero .lede {
  max-width: 540px;
  color: rgba(255,255,255,0.92);
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---------- Page hero (interior pages) ---------- */

.page-hero { position: relative; color: #fff; }

.page-hero__media {
  aspect-ratio: 16 / 5;
  min-height: 200px;
  overflow: hidden;
  background: var(--color-brand-dark);
}

.page-hero--short .page-hero__media { aspect-ratio: 16 / 4; min-height: 160px; }

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: brightness(0.55);
}

.page-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  max-width: none;
}

.page-hero h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* ---------- Buttons & links ---------- */

.button {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.button--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}

.link-arrow {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-brand);
}

/* ---------- Sections ---------- */

.section { padding-top: 64px; padding-bottom: 64px; }
.section--muted { background: var(--color-bg-muted); }
.section__heading { text-align: center; margin-bottom: 36px; }
.section__cta { text-align: center; margin-top: 32px; }

.prose { max-width: 780px; }
.prose h2 { margin-top: 40px; }
.lede { font-size: 1.1rem; color: var(--color-text-muted); }

.callout {
  border-left: 4px solid var(--color-accent);
  padding: 14px 20px;
  background: var(--color-bg-muted);
  font-weight: 600;
}

.checklist {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}

.checklist li {
  padding-left: 26px;
  position: relative;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 2px;
}

@media (max-width: 640px) {
  .checklist { grid-template-columns: 1fr; }
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split--top { align-items: start; }

.split--reverse { grid-template-columns: 1fr 1.1fr; }
.split--reverse .split__media { order: 2; }
.split--reverse .split__text { order: 1; }

.split__media, .split__media img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.split__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 800px) {
  .split, .split--reverse { grid-template-columns: 1fr; }
  .split--reverse .split__media, .split--reverse .split__text { order: initial; }
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-bg-muted); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { margin: 18px 20px 8px; }
.card p { margin: 0 20px 20px; color: var(--color-text-muted); }

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery--projects { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 700px) {
  .gallery, .gallery--projects { grid-template-columns: repeat(2, 1fr); }
}

.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.gallery__item img { width: 100%; height: 100%; object-fit: cover; }

.gallery__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  background: linear-gradient(0deg, rgba(15,35,58,0.85), rgba(15,35,58,0));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Contact ---------- */

.contact-card {
  background: var(--color-bg-muted);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
}

.contact-card h2 { margin-top: 0; }

/* ---------- Contact form ---------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.92rem; }

.field input,
.field textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

/* Honeypot — hidden from real visitors, left in the tab/DOM flow for bots. */
.field--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__status { min-height: 1.2em; font-weight: 600; }
.contact-form__status[data-state="ok"] { color: #1a7f37; }
.contact-form__status[data-state="error"] { color: #c1121f; }

/* ---------- Current bids ---------- */

.bids-list { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }

.bid-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.bid-item h2 { margin-top: 0; margin-bottom: 6px; font-size: 1.2rem; }

.bid-item__deadline {
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 0;
}

.bids-list__status { color: var(--color-text-muted); }

/* ---------- Affiliations strip ---------- */

.section--dark {
  background: var(--color-brand-dark);
  color: rgba(255,255,255,0.9);
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.affiliations img {
  max-height: 56px;
  width: auto;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-brand-dark);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 20px;
  margin-top: 40px;
}

.site-footer h3 { color: #fff; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-logo { height: 56px; width: auto; margin-bottom: 12px; filter: brightness(0) invert(1); }

.footer-affiliations {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-affiliations img {
  height: 34px;
  width: auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr; } }

.site-footer__utility {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
}

.site-footer__utility a { text-decoration: none; opacity: 0.85; }
.site-footer__utility a:hover { opacity: 1; }

.site-footer__legal {
  margin-top: 14px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}
