/* ACSL — Bold industrial system */
:root {
  --ink: #2b2b2b;
  --ink-2: #353535;
  --ink-3: #424242;
  --rule: #4f4f4f;
  --bone: #F4F5F7;
  --bone-2: #DDE1E6;
  --paper: #ECEEF1;
  --hiviz: #1E49C8;        /* ACSL blue — primary accent */
  --hiviz-red: #D6202A;    /* ACSL red — secondary accent */
  --steel: #8892A0;        /* silver-grey from wordmark */
  --muted: #7C8591;
  --danger: #D6202A;
  --ok: #1E49C8;
  --unit: 8px;
  --max: 1440px;
  --gutter: 32px;
  --density: 1;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

.mono { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; }
.display {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.92;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }

/* Top ribbon */
.ribbon {
  background: var(--ink);
  color: var(--bone);
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
}
.ribbon .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 32px;
}
.ribbon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 8px; box-shadow: 0 0 0 3px rgba(107,227,154,.15); }
.ribbon .pipe { color: var(--rule); padding: 0 14px; }
.ribbon a:hover { color: var(--hiviz); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink);
  color: var(--bone);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 128px;
  gap: 48px;
}
.logo {
  display: flex; align-items: center; gap: 14px;
}
.logo .mark {
  height: 56px; width: auto; padding: 0;
  display: block;
}
.logo .wm {
  display: flex; flex-direction: column; line-height: 1;
}
.logo .wm strong {
  font-family: "Archivo", sans-serif; font-weight: 900;
  font-size: 20px; letter-spacing: 0.04em; color: var(--bone);
}
.logo .wm small {
  font-family: "JetBrains Mono", monospace; font-size: 9px;
  color: var(--muted); letter-spacing: 0.18em; margin-top: 4px;
  text-transform: uppercase;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; justify-self: center; }
.nav ul a {
  display: block; padding: 16px 22px; font-size: 16px; font-weight: 500;
  border: 1px solid transparent; border-radius: 2px;
}
.nav ul a:hover { border-color: var(--rule); }
.nav ul a.active { background: var(--ink-3); border-color: var(--rule); }
.nav .cta { display: flex; gap: 12px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--bone);
  font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
  transition: transform .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn.hi { background: var(--hiviz); color: #fff; border-color: var(--hiviz); }
.btn.hi:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn.red { background: var(--hiviz-red); color: #fff; border-color: var(--hiviz-red); }
.btn.red:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.sm { padding: 10px 14px; font-size: 12px; }
.arr { width: 14px; height: 14px; }

/* Monospace eyebrow */
.eye {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eye .tick { width: 16px; height: 1px; background: currentColor; display: inline-block; }

/* Section scaffolding */
section { position: relative; }
.section-head {
  border-top: 1px solid var(--ink);
  padding: 40px 0 56px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 32px;
  align-items: start;
}
.section-head .idx { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; }
.section-head h2 { margin: 0; font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(32px, 4vw, 56px); line-height: 0.96; letter-spacing: -0.02em; }
.section-head .meta { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); text-align: right; letter-spacing: 0.1em; text-transform: uppercase; }

/* Imagery container */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, var(--ink-2) 0 12px, var(--ink) 12px 24px);
  color: var(--bone);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.ph.img { background: var(--ink); }
.ph.img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.05) contrast(1.02); }
.ph.img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(43,43,43,.15) 0%, transparent 35%, transparent 70%, rgba(43,43,43,.35) 100%);
}
.ph.paper {
  background:
    repeating-linear-gradient(135deg, var(--bone-2) 0 12px, var(--paper) 12px 24px);
  color: var(--ink);
  border-color: var(--ink);
}
.ph .label {
  position: absolute; left: 14px; top: 14px;
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em;
  background: var(--ink); color: var(--bone); padding: 4px 8px; text-transform: uppercase;
}
.ph.paper .label { background: var(--ink); color: var(--bone); }
.ph .crosshair {
  position: absolute; inset: 0;
  background:
    linear-gradient(currentColor, currentColor) center/1px 24px no-repeat,
    linear-gradient(currentColor, currentColor) center/24px 1px no-repeat;
  opacity: 0.4;
}

/* Footer */
footer {
  background: #4f4f4f; color: var(--bone);
  padding: 80px 0 32px; margin-top: 0;
  border-top: 1px solid var(--ink);
}
footer .grid12 { gap: 32px; }
footer h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 0 0 16px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer ul li { padding: 6px 0; font-size: 14px; }
footer ul a:hover { color: var(--hiviz); }
footer .bottom {
  border-top: 1px solid var(--rule);
  margin-top: 64px; padding-top: 24px;
  display: flex; justify-content: space-between; font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em;
}

/* Ruled hr */
.rule { height: 1px; background: var(--ink); border: 0; margin: 0; opacity: 0.2; }

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--ink); padding: 6px 10px; font-size: 12px;
  font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: 0.08em;
}
.chip.inv { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.chip.hi { background: var(--hiviz); border-color: var(--hiviz); color: #fff; }

/* Marquee */
.marq {
  background: var(--ink); color: var(--bone);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  overflow: hidden; padding: 18px 0;
}
.marq .track { display: flex; gap: 48px; white-space: nowrap; animation: scroll 40s linear infinite; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -0.01em; }
.marq .track span { display: inline-flex; align-items: center; gap: 48px; }
.marq .track .dot2 { width: 10px; height: 10px; background: var(--hiviz); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Utility */
.hi-underline { box-shadow: inset 0 -10px 0 var(--hiviz); color: #fff; }
.kbd { font-family: "JetBrains Mono", monospace; font-size: 11px; padding: 2px 6px; border: 1px solid currentColor; }

/* Big-type credentials/partner wall — for photo-light pages */
.wall {
  background: var(--ink); color: var(--bone);
  padding: 96px 0;
  border-top: 6px solid var(--hiviz);
  position: relative; overflow: hidden;
}
.wall.light { background: var(--paper); color: var(--ink); border-top-color: var(--ink); }
.wall .head {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 32px; align-items: end; margin-bottom: 56px;
  padding-bottom: 28px; border-bottom: 1px solid var(--rule);
}
.wall.light .head { border-bottom-color: var(--ink); }
.wall .head .idx { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; color: var(--hiviz); }
.wall.light .head .idx { color: var(--ink); }
.wall .head h2 { margin: 0; font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(32px, 4vw, 56px); line-height: 0.96; letter-spacing: -0.02em; }
.wall .head .meta { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); text-align: right; letter-spacing: 0.1em; text-transform: uppercase; }

.wall .grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.wall.light .grid { border-color: var(--ink); }
.wall .cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 20px 20px;
  min-height: 160px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  transition: background .15s;
}
.wall.light .cell { border-color: var(--ink); }
.wall .cell:hover { background: var(--ink-2); }
.wall.light .cell:hover { background: var(--bone-2); }
.wall .cell .kicker { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
.wall .cell .name {
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: clamp(22px, 2vw, 30px); line-height: 0.96;
  letter-spacing: -0.02em; margin-top: auto;
}
.wall .cell .tag { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--hiviz); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 10px; }
.wall.light .cell .tag { color: var(--hiviz); }

/* Stat band — for photo-light pages */
.statband {
  background: var(--paper); color: var(--ink);
  padding: 96px 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.statband .head {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 32px; align-items: end; margin-bottom: 56px;
}
.statband .head .idx { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; }
.statband .head h2 { margin: 0; font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(32px, 4vw, 56px); line-height: 0.96; letter-spacing: -0.02em; }
.statband .head .meta { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); text-align: right; letter-spacing: 0.1em; text-transform: uppercase; }
.statband .row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.statband .row > div { padding: 32px 20px 28px; border-right: 1px solid var(--ink); }
.statband .row > div:last-child { border-right: 0; }
.statband .row .n { font-family: "Archivo", sans-serif; font-weight: 900; font-size: clamp(56px, 6vw, 96px); line-height: 0.92; letter-spacing: -0.04em; }
.statband .row .n sup { font-size: 0.4em; vertical-align: top; color: var(--hiviz); margin-left: 4px; font-weight: 800; }
.statband .row .lb { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 12px; }
.statband .row .sub { font-size: 13px; color: var(--ink-2); margin-top: 12px; max-width: 28ch; }

@media (max-width: 900px) {
  .wall .grid { grid-template-columns: repeat(2, 1fr); }
  .wall .head, .statband .head { grid-template-columns: 1fr; }
  .wall .head .meta, .statband .head .meta { text-align: left; }
  .statband .row { grid-template-columns: repeat(2, 1fr); }
  .statband .row > div:nth-child(2) { border-right: 0; }
  .statband .row > div { border-bottom: 1px solid var(--ink); }
}

/* Spacing scale (density-aware) */
.pad-xl { padding: calc(96px * var(--density)) 0; }
.pad-lg { padding: calc(72px * var(--density)) 0; }
.pad-md { padding: calc(48px * var(--density)) 0; }

/* Responsive */
@media (max-width: 900px) {
  .grid12 { grid-template-columns: repeat(6, 1fr); }
  .nav .wrap { grid-template-columns: auto auto; height: 96px; }
  .nav ul { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .meta { text-align: left; }
}

/* ============================================================
   Mobile navigation + hamburger  (added)
   ============================================================ */
.nav-burger { display: none; }

@media (max-width: 900px) {
  /* Turn the nav bar into a simple flex row: logo | burger */
  .nav .wrap {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: space-between;
    height: 96px;
    gap: 16px;
  }
  .nav > .wrap > ul { display: none; }
  .nav > .wrap > .cta { display: none; }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px; height: 46px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 2px;
  }
  .nav-burger span {
    display: block; height: 2px; width: 22px; margin: 0 auto;
    background: var(--bone);
    transition: transform .3s cubic-bezier(0.22,1,0.36,1), opacity .2s ease;
  }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-menu {
    display: none;
    position: fixed;
    left: 0; right: 0; top: 96px; bottom: 0;
    background: var(--ink);
    z-index: 19;
    padding: 24px var(--gutter) 40px;
    overflow-y: auto;
    border-top: 1px solid var(--rule);
  }
  .nav.open .mobile-menu { display: block; }
  .mobile-menu ul { list-style: none; margin: 0; padding: 0; }
  .mobile-menu ul li { border-bottom: 1px solid var(--rule); }
  .mobile-menu ul a {
    display: block; padding: 18px 2px;
    font-size: 22px; font-weight: 600; color: var(--bone);
    font-family: "Archivo", sans-serif; letter-spacing: -0.01em;
  }
  .mobile-menu ul a:hover,
  .mobile-menu ul a.active { color: var(--hiviz); }
  .mobile-menu .cta {
    display: flex; flex-direction: column; gap: 12px; margin-top: 28px;
  }
  .mobile-menu .cta .btn { justify-content: center; padding: 16px 20px; font-size: 14px; }
}

/* ============================================================
   Scroll reveal  (added; only active when JS opts in)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s cubic-bezier(0.22,1,0.36,1),
                transform .8s cubic-bezier(0.22,1,0.36,1);
    will-change: opacity, transform;
  }
  html.js-reveal .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* Ensure the mobile menu list stacks vertically (override .nav ul flex) */
@media (max-width: 900px) {
  .nav .mobile-menu ul { display: flex; flex-direction: column; gap: 0; width: 100%; }
  .nav .mobile-menu ul li { width: 100%; }
  .nav .mobile-menu ul a { display: block; width: 100%; padding: 18px 2px; border: 0; border-radius: 0; }
}

/* Full-width menu CTAs on mobile */
@media (max-width: 900px) {
  .mobile-menu .cta { align-items: stretch; }
  .mobile-menu .cta .btn { width: 100%; }
}

/* Base state: mobile menu hidden on desktop (only shown when open on mobile) */
.mobile-menu { display: none; }

/* ============================================================
   Motion pack: hero stagger + card micro-interactions (added)
   ============================================================ */

/* Hero headline staggered fade-up (home) */
.hs-h1 .hs-line { display: block; }
.hs-h1.hs-animate .hs-line-in {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  animation: heroLineUp .9s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes heroLineUp { to { opacity: 1; transform: none; } }

/* Image zoom on hover (photo tiles) */
.ph.img img { transition: transform .6s cubic-bezier(0.22,1,0.36,1); }
.ph.img:hover img { transform: scale(1.045); }

/* Card lift on hover (service + project tiles) */
.svc, .projects .item {
  transition: transform .4s cubic-bezier(0.22,1,0.36,1);
  will-change: transform;
}
.svc:hover, .projects .item:hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  .hs-h1.hs-animate .hs-line-in { opacity: 1 !important; transform: none !important; animation: none !important; }
  .ph.img img, .svc, .projects .item { transition: none !important; }
  .ph.img:hover img, .svc:hover, .projects .item:hover { transform: none !important; }
}
