/* Massachusetts AI Agency: "The Job Site"
   Concept: the page is a construction site; AI is the building material.
   Influence: Bob Gill (simple direct line, idea over style).
   Tokens first; every surface is a designed drawing sheet, never a flat void. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/space-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f4f1ea;
  --paper-deep: #ebe7dc;
  --ink: #14181f;
  --ink-soft: #3c4350;
  --cobalt: #1d4ed8;
  --cobalt-deep: #173ea8;
  --orange: #f45d22;
  --orange-deep: #cf4413;
  --concrete: #d8d4ca;
  --line: #c9c3b4;
  --white: #fffdf8;
  --font-d: "Archivo", system-ui, sans-serif;
  --font-m: "Space Mono", ui-monospace, monospace;
  --mw: 1160px;
  --radius: 14px;
  --stroke: 3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-d);
  font-variation-settings: "wght" 440;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.015em; }
img { max-width: 100%; display: block; }
a { color: var(--cobalt); }
section { scroll-margin-top: 84px; }
.wrap { max-width: var(--mw); margin: 0 auto; padding: 0 24px; }

/* Mono annotation voice: phase tags, dimensions, stamps */
.tag {
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tag .tick { width: 30px; height: 12px; flex: none; }
.reveal { opacity: 0; transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .crane-load, .fm-arm-wave { animation: none !important; }
}

/* ---------------- header ---------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: var(--stroke) solid var(--ink);
}
.site-head .bar {
  max-width: var(--mw); margin: 0 auto; padding: 0 24px;
  height: 72px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); margin-right: auto; }
.brand svg { width: 40px; height: 34px; }
.brand b {
  font-variation-settings: "wght" 800;
  font-size: 1.06rem; letter-spacing: -0.01em;
}
.brand small { display: block; font-family: var(--font-m);
  font-size: 0.6rem; letter-spacing: 0.22em; color: var(--cobalt);
  text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-m); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
  padding: 10px 12px; border-radius: 8px;
}
.nav a:hover, .nav a:focus-visible { color: var(--ink);
  background: var(--paper-deep); }
.call-btn {
  font-family: var(--font-d); font-variation-settings: "wght" 800;
  font-size: 0.92rem; color: var(--ink) !important;
  background: var(--orange); border: var(--stroke) solid var(--ink);
  border-radius: 999px; padding: 10px 20px !important;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap; letter-spacing: 0 !important;
  text-transform: none !important;
}
.call-btn:hover, .call-btn:focus-visible {
  transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink);
  background: var(--orange) !important; color: var(--ink) !important;
}
.menu-btn { display: none; background: none; border: var(--stroke) solid var(--ink);
  border-radius: 10px; width: 46px; height: 42px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu-btn span { width: 22px; height: 3px; background: var(--ink); border-radius: 2px; }
@media (max-width: 640px) {
  .brand small { display: none; }
  .brand b { font-size: 0.98rem; }
}
@media (max-width: 980px) {
  .menu-btn { display: flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; background: var(--paper);
    border-bottom: var(--stroke) solid var(--ink);
    flex-direction: column; align-items: stretch; padding: 12px 24px 20px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; font-size: 0.85rem; }
  .nav .call-btn { text-align: center; margin-top: 8px; }
}

/* ---------------- hero: SITE SURVEY ---------------- */
.hero {
  background: url("images/bg-hero-drafting-paper.webp") center/cover var(--paper);
  border-bottom: var(--stroke) solid var(--ink);
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 48px;
  align-items: stretch; padding-top: 92px; padding-bottom: 0;
}
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; padding-top: 76px; }
  .hero .sheet { margin-bottom: 18px; padding: 28px 24px 2px; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
}
.hero .sheet {
  background: var(--white);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(20, 24, 31, 0.16);
  padding: 40px 38px 4px;
  margin: 36px 0 56px;
  position: relative;
  align-self: center;
}
.sheet-tab {
  position: absolute; top: -14px; right: 22px;
  font-family: var(--font-m); font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white); background: var(--ink);
  padding: 5px 12px; border-radius: 6px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-variation-settings: "wght" 860;
  margin: 18px 0 22px; max-width: 12ch;
}
.hero h1 em { font-style: normal; color: var(--cobalt); }
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 34rem;
  margin-bottom: 30px; }
.hero .lede strong { color: var(--ink); }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin-bottom: 26px; }
.btn-main {
  font-variation-settings: "wght" 820; font-size: 1.05rem;
  color: var(--ink); background: var(--orange);
  border: var(--stroke) solid var(--ink); border-radius: 12px;
  padding: 15px 28px; text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn-main:hover, .btn-main:focus-visible {
  transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn-line {
  font-variation-settings: "wght" 650; color: var(--ink);
  text-decoration: none; padding: 15px 20px;
  border: var(--stroke) solid var(--ink); border-radius: 12px;
  background: var(--white);
  transition: background .15s;
}
.btn-line:hover, .btn-line:focus-visible { background: var(--paper-deep); }
.dim {
  font-family: var(--font-m); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--cobalt); display: flex; align-items: center; gap: 12px;
  margin-bottom: 46px;
}
.dim .tick { width: 56px; height: 12px; flex: none; }
.hero-art { align-self: end; position: relative; }
.hero-art .callout {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-m); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cobalt-deep);
  background: var(--paper); border: 2px solid var(--cobalt);
  padding: 3px 10px; border-radius: 6px; white-space: nowrap;
}
.hero-art .callout-ink { color: var(--ink); border-color: var(--ink); }
.hero-art .chip-ink {
  color: var(--white); background: var(--ink); border-color: var(--ink);
  font-size: 0.78rem; letter-spacing: 0.28em; padding: 3px 8px 3px 12px;
}
.hero-art svg { width: 100%; height: auto; display: block; }

/* ---------------- phase intro strip: THE GROUND ---------------- */
.ground {
  background: var(--ink); color: var(--paper);
  border-bottom: var(--stroke) solid var(--ink);
}
.ground .wrap { display: grid; grid-template-columns: auto 1fr; gap: 40px;
  align-items: center; padding-top: 54px; padding-bottom: 54px; }
.ground .fig svg { width: 170px; height: auto; }
.ground .tag { color: var(--orange); }
.ground .tag::before { border-color: var(--orange);
  background: linear-gradient(var(--orange), var(--orange)) center/100% 2px no-repeat; }
.ground h2 { font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-variation-settings: "wght" 800; margin: 12px 0 12px; max-width: 26ch; }
.ground p { color: #c9cdd6; max-width: 62ch; }
.ground p strong { color: var(--paper); }
@media (max-width: 760px) { .ground .wrap { grid-template-columns: 1fr; }
  .ground .fig { display: flex; justify-content: center; } }

/* ---------------- phase sections shared ---------------- */
.phase-head { display: flex; align-items: baseline; gap: 22px;
  flex-wrap: wrap; margin-bottom: 14px; }
.phase-num {
  font-family: var(--font-m); font-size: 0.78rem; letter-spacing: 0.16em;
  color: var(--white); background: var(--cobalt); padding: 7px 14px;
  border-radius: 7px; border: 2px solid var(--ink);
}
.phase h2 { font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-variation-settings: "wght" 830; }
.phase .sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 56ch;
  margin-bottom: 40px; }

/* Foundations */
.foundations { padding: 88px 0 0; }
.foundations .grid { display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: 48px; align-items: center; padding-bottom: 56px; }
.foundations .fig svg { width: 100%; max-width: 420px; height: auto; }
.rebar-list { list-style: none; display: grid; gap: 14px; }
.rebar-list li { display: flex; gap: 14px; align-items: flex-start;
  background: var(--white); border: var(--stroke) solid var(--ink);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 4px 4px 0 rgba(20, 24, 31, 0.14); }
.rebar-list li::before { content: ""; flex: 0 0 14px; height: 14px;
  margin-top: 6px; border-radius: 50%; background: var(--orange);
  border: 3px solid var(--ink); }
.rebar-list b { font-variation-settings: "wght" 720; }
.rebar-list span { color: var(--ink-soft); font-size: 0.95rem; }
.concrete-band {
  background: url("images/bg-foundation-poured-concrete.webp") center/cover;
  border-top: var(--stroke) solid var(--ink);
  border-bottom: var(--stroke) solid var(--ink);
  padding: 26px 0;
}
.concrete-band p { font-family: var(--font-m); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  text-align: center; }
.concrete-band .chip { display: inline-block; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 8px; padding: 8px 18px; }
@media (max-width: 860px) { .foundations .grid { grid-template-columns: 1fr; } }

/* Framing & wiring */
.framing { padding: 88px 0 72px; position: relative;
  background:
    repeating-linear-gradient(90deg, transparent 0 218px,
      rgba(29, 78, 216, 0.10) 218px 222px),
    var(--paper);
}
.wire-row { position: relative; margin: 46px 0 40px; }
.wire-row svg { width: 100%; height: auto; display: block; }
.auto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.auto-card { background: var(--white); border: var(--stroke) solid var(--ink);
  border-radius: var(--radius); padding: 22px;
  box-shadow: 4px 4px 0 rgba(20, 24, 31, 0.14); }
.auto-card h3 { font-size: 1.06rem; font-variation-settings: "wght" 760;
  margin-bottom: 6px; }
.auto-card p { color: var(--ink-soft); font-size: 0.93rem; }
.auto-card .tag { margin-bottom: 10px; }
@media (max-width: 900px) { .auto-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .auto-grid { grid-template-columns: 1fr; } }

/* Topping out (dark) */
.topping {
  background: url("images/bg-topping-out-dusk-mainstreet.webp") center/cover,
    var(--ink);
  color: var(--paper);
  border-top: var(--stroke) solid var(--ink);
  border-bottom: var(--stroke) solid var(--ink);
  padding: 92px 0 0;
}
.topping .phase-num { background: var(--orange); }
.topping .sub { color: #ccd2de; }
.topping .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
  align-items: end; }
.topping .fig { align-self: end; }
.topping .fig svg { width: 100%; max-width: 470px; height: auto; display: block;
  margin: 0 auto; }
.beam-list { list-style: none; display: grid; gap: 12px; padding-bottom: 70px; }
.beam-list li { background: rgba(20, 24, 31, 0.72);
  border: 2px solid rgba(244, 241, 234, 0.35); border-radius: 12px;
  padding: 15px 18px; backdrop-filter: blur(3px); }
.beam-list b { color: var(--white); font-variation-settings: "wght" 720; }
.beam-list span { color: #c2c9d6; font-size: 0.93rem; display: block; }
@media (max-width: 860px) { .topping .grid { grid-template-columns: 1fr; } }

/* Schedule */
.schedule { padding: 88px 0; }
.sched-grid { display: grid; grid-template-columns: auto 1fr; gap: 44px;
  align-items: center; }
.sched-grid .fig svg { width: 200px; height: auto; }
.gantt { list-style: none; display: grid; gap: 16px; counter-reset: ph; }
.gantt li { display: grid; grid-template-columns: 120px 1fr; gap: 16px;
  align-items: center; }
.gantt .bar { height: 42px; border: var(--stroke) solid var(--ink);
  border-radius: 9px; position: relative; overflow: hidden;
  background: var(--white); }
.gantt .bar i { position: absolute; inset: 0; background: var(--cobalt);
  width: var(--w, 40%); }
.gantt li:nth-child(2) .bar i { background: var(--orange); }
.gantt li:nth-child(3) .bar i { background: var(--cobalt-deep); }
.gantt li:nth-child(4) .bar i {
  background: repeating-linear-gradient(45deg, var(--cobalt) 0 10px,
    var(--cobalt-deep) 10px 20px); }
.gantt .lbl { font-family: var(--font-m); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; }
.gantt .bar b { position: relative; z-index: 1; color: var(--white);
  font-size: 0.9rem; line-height: 42px; padding-left: 14px;
  font-variation-settings: "wght" 700; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.gantt .note { grid-column: 2; color: var(--ink-soft); font-size: 0.92rem;
  margin-top: -6px; }
@media (max-width: 820px) { .sched-grid { grid-template-columns: 1fr; }
  .sched-grid .fig { display: flex; justify-content: center; } }

/* Punch list (FAQ) */
.punch { padding: 0 0 88px; }
.punch-head { display: grid; grid-template-columns: 1fr auto; gap: 30px;
  align-items: end; margin-bottom: 26px; }
.punch-head .fig svg { width: 150px; height: auto; }
.punch details { background: var(--white); border: var(--stroke) solid var(--ink);
  border-radius: var(--radius); margin-bottom: 12px;
  box-shadow: 4px 4px 0 rgba(20, 24, 31, 0.12); }
.punch summary { cursor: pointer; list-style: none; padding: 18px 22px;
  display: flex; gap: 14px; align-items: center;
  font-variation-settings: "wght" 700; }
.punch summary::-webkit-details-marker { display: none; }
.punch summary::before { content: ""; flex: 0 0 20px; height: 20px;
  border: 3px solid var(--ink); border-radius: 5px; background: var(--white);
  transition: background .2s; }
.punch details[open] summary::before {
  background: var(--orange);
  box-shadow: inset 0 0 0 3px var(--white); }
.punch .a { padding: 0 22px 20px 56px; color: var(--ink-soft); }

/* Site office (articles) */
.office { background: var(--paper-deep);
  border-top: var(--stroke) solid var(--ink); padding: 80px 0 88px; }
.office-head { display: flex; align-items: end; justify-content: space-between;
  gap: 24px; margin-bottom: 30px; }
.office-head .fig svg { width: 140px; height: auto; }
.office-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-bottom: 26px; }
.office-card { background: var(--white); border: var(--stroke) solid var(--ink);
  border-radius: var(--radius); padding: 22px; text-decoration: none;
  box-shadow: 4px 4px 0 rgba(20, 24, 31, 0.14);
  transition: transform .15s, box-shadow .15s; display: block; }
.office-card:hover, .office-card:focus-visible {
  transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(20,24,31,.2); }
.office-card h3 { color: var(--ink); font-size: 1.02rem; margin: 10px 0 6px;
  font-variation-settings: "wght" 740; }
.office-card p { color: var(--ink-soft); font-size: 0.9rem; }
.office .more { font-variation-settings: "wght" 700; }
@media (max-width: 860px) { .office-grid { grid-template-columns: 1fr; } }

/* Handover (contact) */
.handover { padding: 88px 0; background:
    url("images/texture-halftone-safety-orange.webp") right -140px bottom -140px/560px no-repeat,
    var(--paper); }
.hand-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px;
  align-items: start; margin-top: 34px; }
.hand-fig { display: flex; justify-content: center; margin-bottom: 18px; }
.hand-fig svg { width: 240px; height: auto; }
.hand-block { background: var(--white); border: var(--stroke) solid var(--ink);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px;
  box-shadow: 4px 4px 0 rgba(20, 24, 31, 0.14); }
.hand-block .tag { margin-bottom: 6px; }
.hand-block a.big { font-size: 1.5rem; font-variation-settings: "wght" 820;
  color: var(--ink); text-decoration: none; }
.hand-block a.big:hover { color: var(--orange-deep); }
.hand-block p { color: var(--ink-soft); font-size: 0.94rem; }
.workorder { background: var(--white); border: var(--stroke) solid var(--ink);
  border-radius: var(--radius); padding: 30px;
  box-shadow: 7px 7px 0 rgba(20, 24, 31, 0.18); }
.workorder .wo-head { display: flex; justify-content: space-between;
  align-items: baseline; border-bottom: 2px dashed var(--line);
  padding-bottom: 14px; margin-bottom: 20px; }
.workorder .wo-head b { font-variation-settings: "wght" 800; font-size: 1.15rem; }
.workorder .wo-head span { font-family: var(--font-m); font-size: 0.68rem;
  letter-spacing: 0.14em; color: var(--cobalt); }
.workorder label { display: block; font-family: var(--font-m);
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 6px; }
.workorder input, .workorder textarea { width: 100%;
  border: 2px solid var(--ink); border-radius: 9px; padding: 12px 14px;
  font: inherit; font-size: 0.96rem; background: var(--paper);
  margin-bottom: 16px; }
.workorder input:focus, .workorder textarea:focus { outline: 3px solid var(--cobalt);
  outline-offset: 1px; }
.workorder .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.workorder button { width: 100%; cursor: pointer;
  font: inherit; font-variation-settings: "wght" 820; font-size: 1.05rem;
  color: var(--ink); background: var(--orange);
  border: var(--stroke) solid var(--ink); border-radius: 12px;
  padding: 15px; box-shadow: 5px 5px 0 var(--ink);
  transition: transform .15s, box-shadow .15s; }
.workorder button:hover, .workorder button:focus-visible {
  transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
@media (max-width: 900px) { .hand-grid { grid-template-columns: 1fr; }
  .workorder .row2 { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { background: var(--ink); color: #b9bfca; padding: 46px 0;
  border-top: 6px solid var(--orange); }
.site-foot .wrap { display: grid; gap: 10px; justify-items: center;
  text-align: center; }
.site-foot .stamp { font-family: var(--font-m); font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange);
  border: 2px solid var(--orange); border-radius: 8px; padding: 8px 16px;
  transform: rotate(-2deg); }
.site-foot a { color: var(--paper); text-decoration: underline;
  text-underline-offset: 3px; font-variation-settings: "wght" 700; }
.site-foot a:hover { color: var(--orange); }
.site-foot .fine { font-size: 0.8rem; }

/* Scroll progress building (signature moment) */
.progress-build { position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 64px; pointer-events: none; }
.progress-build svg { width: 100%; height: auto; }
.progress-build .floor { opacity: 0.18; transition: opacity .4s; }
.progress-build .floor.on { opacity: 1; }
.progress-build .flag { opacity: 0; transform-origin: bottom center;
  transform: scale(0); transition: opacity .3s, transform .3s; }
.progress-build .flag.on { opacity: 1; transform: scale(1); }
@media (max-width: 700px) { .progress-build { display: none; } }

/* Character line style */
.fm { stroke: var(--ink); stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }
.fm-fill-ink { fill: var(--ink); stroke: none; }
.fm-hat { fill: var(--orange); stroke: var(--ink); stroke-width: 3; }
.fm-skin { fill: var(--white); stroke: var(--ink); stroke-width: 3; }
.fm-vest { fill: var(--orange); stroke: var(--ink); stroke-width: 3; }
.fm-blue { fill: var(--cobalt); stroke: var(--ink); stroke-width: 3; }
.fm-paper-fill { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
