/* ==========================================================================
   MustEng Engineering Consultancy — stylesheet
   Design system: "Blueprint / Drafting"
   Ink Navy #101C2C · Blueprint Blue #2B5F86 · Paper #F7F5F0
   Graphite #3A3A36 · Redline #C0491E
   Headings: Archivo Expanded · Body: IBM Plex Sans
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Expanded:wght@500;600;700&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens & reset
   -------------------------------------------------------------------------- */
:root {
  --ink: #101C2C;
  --ink-soft: #1B2C42;
  --blueprint: #2B5F86;
  --blueprint-soft: #6A94B3;
  --paper: #E6ECF3;
  --paper-dim: #D6E0EA;
  --white: #FFFFFF;
  --graphite: #3A3A36;
  --redline: #C0491E;
  --redline-soft: #E0693A;

  --line: rgba(16, 28, 44, 0.14);
  --line-on-ink: rgba(247, 245, 240, 0.16);
  --grid-line: rgba(43, 95, 134, 0.10);

  --font-head: 'Archivo Expanded', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius: 2px;

  --shadow-card: 0 1px 0 rgba(16, 28, 44, 0.04), 0 12px 24px -18px rgba(16, 28, 44, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

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

a { color: var(--blueprint); text-decoration: none; }
a:hover { color: var(--redline); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; list-style: none; }

button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* --------------------------------------------------------------------------
   2. Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--ink { background: var(--ink); color: rgba(247,245,240,.86); position: relative; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--paper); }
.section--ink p { color: rgba(247,245,240,.72); }
.section--blueprint { background: var(--blueprint); color: var(--paper); }
.section--blueprint h2 { color: var(--paper); }
.section--paper-dim { background: var(--paper-dim); }

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

.stack-center { text-align: center; margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   3. Drafting motifs — eyebrows, index numbers, dimension rules, crosshairs
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blueprint);
  margin-bottom: 14px;
}
.section--ink .eyebrow, .section--blueprint .eyebrow { color: var(--redline-soft); }
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.index-mark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--blueprint-soft);
}

.dim-rule {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--blueprint);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 56px 0 32px;
}
.dim-rule::before, .dim-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--blueprint) 0 6px, transparent 6px 10px);
  opacity: .55;
}

.crossmarks { position: relative; }
.crossmarks::before, .crossmarks::after,
.crossmarks .cm-tl, .crossmarks .cm-tr, .crossmarks .cm-bl, .crossmarks .cm-br {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.crossmarks .cm-tl { top: -1px; left: -1px; border-top: 1px solid var(--blueprint); border-left: 1px solid var(--blueprint); }
.crossmarks .cm-tr { top: -1px; right: -1px; border-top: 1px solid var(--blueprint); border-right: 1px solid var(--blueprint); }
.crossmarks .cm-bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--blueprint); border-left: 1px solid var(--blueprint); }
.crossmarks .cm-br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--blueprint); border-right: 1px solid var(--blueprint); }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 14px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--redline); color: var(--paper); }
.btn--primary:hover { background: var(--redline-soft); color: var(--white); }

.btn--outline { background: transparent; color: var(--paper); border-color: var(--line-on-ink); }
.btn--outline:hover { border-color: var(--paper); color: var(--paper); }

.btn--outline-ink { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline-ink:hover { border-color: var(--ink); }

.btn--arrow::after { content: "→"; }

.btn--sm { padding: 10px 18px; font-size: .78rem; }

/* --------------------------------------------------------------------------
   5. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--blueprint);
}
.logo:hover { color: var(--blueprint); }
.logo__mark {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.logo__word small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .825rem;
  letter-spacing: .14em;
  color: var(--blueprint);
  text-transform: uppercase;
  margin-top: 0;
  text-align: center;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__list {
  display: flex;
  gap: 30px;
}

.nav__link {
  position: relative;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--graphite);
  padding: 6px 0;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--redline);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); background: var(--blueprint); }

.nav__cta { margin-left: 4px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.project-card__thumb { display: none; }
.project-card { cursor: pointer; }
.project-card.is-empty .project-card__thumb { display: none; }
.project-card.is-empty { cursor: default; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(16,28,44,.92);
}
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: 100%; max-height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox__img { max-width: 90vw; max-height: 82vh; width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox__caption { color: var(--paper); font-size: .95rem; text-align: center; }
.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(247,245,240,.3);
  background: transparent;
  color: var(--paper);
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(247,245,240,.1); }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(247,245,240,.3);
  background: transparent;
  color: var(--paper);
  font-size: 1.8rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox__nav:hover { background: rgba(247,245,240,.1); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__nav[hidden] { display: none; }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
  background:
    radial-gradient(60% 90% at 85% 0%, rgba(43,95,134,.35), transparent 60%),
    linear-gradient(100deg, rgba(16,28,44,.94) 0%, rgba(16,28,44,.82) 40%, rgba(16,28,44,.55) 100%),
    url('images/homescreen-bg.jpg') center 60% / cover no-repeat,
    var(--ink);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-on-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-on-ink) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .5;
  mask-image: linear-gradient(180deg, black, transparent 85%);
}
.hero__inner { position: relative; max-width: 760px; }
.hero__inner h1 { color: var(--paper); }
.hero__lede { font-size: 1.15rem; color: rgba(247,245,240,.78); max-width: 620px; }
.hero__actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  background:
    linear-gradient(100deg, rgba(16,28,44,.94) 0%, rgba(16,28,44,.84) 45%, rgba(16,28,44,.6) 100%),
    url('images/homescreen-bg.jpg') center 60% / cover no-repeat,
    var(--ink);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-on-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-on-ink) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .45;
  mask-image: linear-gradient(180deg, black, transparent 90%);
}
.page-hero__inner { position: relative; max-width: 720px; }
.page-hero__inner h1 { color: var(--paper); }
.page-hero p { color: rgba(247,245,240,.75); font-size: 1.05rem; max-width: 600px; }

/* --------------------------------------------------------------------------
   7. Credentials / stats strip
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats__item {
  padding: 28px 24px;
  border-left: 1px solid var(--line);
  text-align: left;
}
.stats__item:first-child { border-left: none; }
.stats__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--ink);
  display: block;
}
.stats__label {
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--blueprint);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card__index {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .85rem;
  color: var(--redline);
  display: block;
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.card--on-ink {
  background: var(--ink-soft);
  border-color: var(--line-on-ink);
}
.card--on-ink h3 { color: var(--paper); }
.card--on-ink p { color: rgba(247,245,240,.72); }

.tile {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 22px 20px;
}
.tile h4 { color: var(--ink); margin-bottom: 8px; }
.tile p { font-size: .92rem; margin-bottom: 0; color: var(--graphite); }

/* --------------------------------------------------------------------------
   9. Lists with markers (services detail, capability lists)
   -------------------------------------------------------------------------- */
.spec-list li {
  position: relative;
  padding: 18px 0 18px 30px;
  border-top: 1px solid var(--line);
}
.spec-list li:last-child { border-bottom: 1px solid var(--line); }
.spec-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 18px;
  color: var(--redline);
  font-weight: 700;
  font-family: var(--font-head);
}
.spec-list strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   10. Callout / confidentiality note
   -------------------------------------------------------------------------- */
.callout {
  border-left: 3px solid var(--redline);
  background: var(--paper-dim);
  padding: 22px 24px;
  font-size: .95rem;
  color: var(--graphite);
}
.callout strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   11. Forms (contact page)
   -------------------------------------------------------------------------- */
.form-field { margin-bottom: 22px; }
.form-field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blueprint);
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--ink);
  font-family: var(--font-body);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blueprint);
  box-shadow: 0 0 0 3px rgba(43,95,134,.15);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-note { font-size: .82rem; color: var(--blueprint-soft); }

.contact-line {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line-on-ink);
}
.contact-line:first-child { border-top: none; }
.contact-line dt {
  flex: 0 0 120px;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blueprint-soft);
  font-weight: 600;
}
.contact-line dd { margin: 0; color: rgba(247,245,240,.9); }

.map-frame {
  border: 1px solid var(--line);
  filter: grayscale(.15) contrast(1.05);
  width: 100%;
  height: 320px;
}

/* --------------------------------------------------------------------------
   12. Footer — title block
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(247,245,240,.7);
  padding-top: 72px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-on-ink);
}

.footer-brand .logo { color: var(--paper); align-items: center; text-align: center; }
.footer-brand p { margin-top: 14px; color: rgba(247,245,240,.6); font-size: .92rem; max-width: 30ch; text-align: center; margin-left: auto; margin-right: auto; }

.footer-col h4 { color: var(--blueprint-soft); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: rgba(247,245,240,.75); font-size: .92rem; }
.footer-col a:hover { color: var(--paper); }

.title-block {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-on-ink);
  margin: 40px 0 0;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.title-block__cell {
  padding: 12px 16px;
  border-left: 1px solid var(--line-on-ink);
}
.title-block__cell:first-child { border-left: none; }
.title-block__cell span {
  display: block;
  color: var(--blueprint-soft);
  font-weight: 600;
  margin-bottom: 4px;
}
.title-block__cell strong { color: var(--paper); font-weight: 600; letter-spacing: .02em; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 32px;
  font-size: .8rem;
  color: rgba(247,245,240,.5);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: rgba(247,245,240,.5); }
.footer-bottom a:hover { color: var(--paper); }

/* --------------------------------------------------------------------------
   13. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .title-block { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav { position: fixed; top: 68px; left: 0; right: 0; bottom: 0; height: calc(100vh - 68px); height: calc(100dvh - 68px); align-self: stretch; background: var(--paper); flex-direction: column; align-items: stretch; padding: 24px; gap: 20px; border-top: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; overflow-y: auto; }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__list { flex-direction: column; gap: 4px; }
  .nav__link { display: block; padding: 12px 4px; font-size: 1rem; }
  .nav__cta { margin-left: 0; margin-top: 8px; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stats__item { border-left: none; border-top: 1px solid var(--line); }
  .stats__item:first-child { border-top: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .title-block { grid-template-columns: 1fr; }
  .title-block__cell { border-left: none; border-top: 1px solid var(--line-on-ink); }
  .title-block__cell:first-child { border-top: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding: 64px 0; }
  .contact-line { flex-direction: column; gap: 4px; }
  .contact-line dt { flex: none; }
}
