/* ============================================================================
   Clean Ducts: "the air" design system
   Part of the AMPM Group family (Big Shoulders + Archivo, stamp/kicker chrome,
   day-arc timeline). Building Services owns the day, Gemini owns the night,
   Clean Ducts owns the air, the loop that never stops.
   Fully fluid: the design-canvas mock was fixed-pixel desktop; everything here
   scales with clamp() and collapses cleanly to a single column on mobile.
   ========================================================================= */

:root {
  --ink:        #14262b;   /* deep teal-black body text */
  --ink-2:      rgba(20,38,43,0.75);
  --line:       rgba(20,38,43,0.25);
  --paper:      #f8f7f1;   /* warm cream page */
  --paper-cool: #eef4f3;   /* cool fresh-air tint (top of page) */
  --panel:      rgba(248,247,241,0.6);
  --night:      #101820;   /* near-black base of the day arc */
  --night-2:    #1d3f4c;
  --night-text: #f0ece0;
  --night-dim:  rgba(240,236,224,0.8);

  --accent:     #0b6e8f;   /* clean-air teal, the Clean Ducts signature */
  --air:        #8fd2df;   /* bright air blue, highlights on dark */
  --fire:       #b8541f;   /* rust, the fire-safety family cue */

  --d-display: "Big Shoulders Display", "Archivo", sans-serif;
  --d-body:    "Archivo", "Helvetica Neue", sans-serif;

  --pad-x:  clamp(20px, 5.5vw, 56px);
  --gap-sec: clamp(64px, 10vw, 100px);   /* vertical rhythm between sections */
  --maxw: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--d-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; }

/* shared inner width + horizontal padding */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad-x); }

/* the fresh-air wash at the very top of a light page */
.sky { background: linear-gradient(180deg, var(--paper-cool) 0%, var(--paper) clamp(120px, 14vh, 240px)); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px var(--pad-x);
  border-bottom: 1px solid rgba(20,38,43,0.2);
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(20,38,43,0.65);
}
.topbar .muted { color: rgba(20,38,43,0.65); }
@media (max-width: 680px) { .topbar .hide-sm { display: none; } .topbar { justify-content: center; text-align: center; } }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease;
}
.site-head.stuck {
  background: rgba(248,247,241,0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(20,38,43,0.06);
}
.site-head.stuck .topbar { display: none; }
.navrow {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 32px);
  padding: clamp(14px, 2vw, 22px) var(--pad-x);
}
.brand {
  font-family: var(--d-display); font-weight: 800;
  font-size: clamp(22px, 3vw, 28px); letter-spacing: 0.02em; text-transform: uppercase;
  white-space: nowrap;
}
.nav {
  display: flex; gap: clamp(16px, 2.4vw, 30px);
  font-size: 14px; font-weight: 600; color: rgba(20,38,43,0.85);
}
.nav a { padding-bottom: 2px; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }
.callpill {
  font-family: var(--d-display); font-weight: 700; font-size: clamp(15px, 1.6vw, 18px);
  letter-spacing: 0.05em; border: 2px solid var(--ink); padding: 11px 16px; white-space: nowrap;
}
.callpill:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 380px) {
  .brand { font-size: 18px; }
  .callpill { font-size: 13px; padding: 10px 10px; letter-spacing: 0.02em; }
  .burger { width: 42px; height: 42px; }
  .navrow { gap: 10px; }
}

/* Desktop: the nav sits inline in the navrow. Mobile (≤1000px): it becomes a
   drawer under the sticky header, toggled by the burger button; visibility is
   driven by html[data-menu-open] set in Header.astro's script. The nav is a
   SIBLING of the burger, never inside a <details> (a closed details hides its
   content regardless of CSS, which once shipped a desktop site with no menu). */
.nav { margin-left: auto; }
.burger {
  display: none; margin-left: auto; cursor: pointer;
  width: 46px; height: 44px; padding: 10px 9px;
  background: none; border: 2px solid var(--ink);
  flex-direction: column; justify-content: space-between; align-items: stretch;
}
.burger span { display: block; height: 3px; background: var(--ink); transition: transform .22s ease, opacity .18s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
@media (max-width: 1000px) {
  .burger { display: flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; z-index: 60;
    background: var(--paper); border-top: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(20,38,43,0.16);
    padding: 4px var(--pad-x) 12px;
  }
  html[data-menu-open] .nav { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a:last-child { border-bottom: 0; }
}

/* ── Day-arc marker (time + label) ─────────────────────────────────────── */
.daymark {
  font-family: var(--d-display); font-weight: 700;
  font-size: clamp(20px, 2.6vw, 27px);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.daymark span {
  font-family: var(--d-body); font-size: 11px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.72;
}
.on-dark .daymark span { opacity: 0.62; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; font-family: var(--d-display); font-weight: 700;
  font-size: clamp(16px, 1.7vw, 19px); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 15px 28px; cursor: pointer; border: 2px solid transparent; transition: transform .12s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--ink); color: var(--paper-cool); }
.btn-solid:hover { color: var(--paper-cool); opacity: 0.92; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-air { background: var(--air); color: var(--night); }
.btn-air:hover { color: var(--night); }
.btn-ghost-light { border-color: var(--night-text); color: var(--night-text); }
.btn-ghost-light:hover { background: var(--night-text); color: var(--night); }

/* ── Section headings ──────────────────────────────────────────────────── */
.h-xl { font-family: var(--d-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(46px, 13vw, 150px); line-height: 0.89; letter-spacing: 0.005em; }
.h-lg { font-family: var(--d-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(38px, 8vw, 88px); line-height: 0.92; }
.h-md { font-family: var(--d-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(34px, 6.4vw, 72px); line-height: 0.92; }
.h-sm { font-family: var(--d-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 5vw, 56px); line-height: 0.92; }
.lede { font-size: clamp(17px, 2vw, 21px); line-height: 1.55; font-weight: 500; }
.section { padding-top: var(--gap-sec); }

/* ── Home hero ─────────────────────────────────────────────────────────── */
.hero { padding: clamp(36px, 6vw, 56px) var(--pad-x) clamp(40px, 6vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin-top: clamp(24px, 4vw, 44px); align-items: start; }
.hero h1 { margin-top: 18px; max-width: 11ch; }
.hero figure { margin: 0; }
.hero figure img { width: 100%; height: clamp(220px, 30vw, 340px); object-fit: cover; display: block; }
.figcap { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.72; margin-top: 10px; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.microcopy { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; margin-top: 20px; opacity: 0.78; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

/* ── Discipline ribbon (6 coloured service links) ──────────────────────── */
.ribbon { display: flex; margin: 0 var(--pad-x); min-height: 60px; flex-wrap: wrap; }
.ribbon a {
  flex: 1 1 24%; color: #fff; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 14px 16px; font-family: var(--d-display); font-weight: 700;
  font-size: clamp(13px, 1.4vw, 16px); letter-spacing: 0.05em; text-transform: uppercase;
}
.ribbon a small { font-family: var(--d-body); font-size: 10px; opacity: 0.8; }
.ribbon a:hover { color: #fff; filter: brightness(1.08); }
.ribbon a:nth-child(1){ background:#0b6e8f; } .ribbon a:nth-child(2){ background:#15809a; }
.ribbon a:nth-child(3){ background:#1f8ba3; } .ribbon a:nth-child(4){ background:#2f97ab; }
.ribbon a:nth-child(5){ background:#45a3b2; } .ribbon a:nth-child(6){ background:#5cafba; color:var(--night); }
.ribbon a:nth-child(6):hover{ color:var(--night); } .ribbon a:nth-child(7){ background:#74bcc2; color:var(--night); }
.ribbon a:nth-child(7):hover{ color:var(--night); } .ribbon a:nth-child(8){ background:#8dc9cb; color:var(--night); }
.ribbon a:nth-child(8):hover{ color:var(--night); }
.ribbon-cap { display: flex; justify-content: space-between; gap: 12px; margin: 12px var(--pad-x) 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.55; flex-wrap: wrap; }
@media (max-width: 720px) { .ribbon a { flex-basis: 50%; } }
@media (max-width: 440px) { .ribbon a { flex-basis: 100%; } }

/* ── Stat wall (bordered N-up) ─────────────────────────────────────────── */
.statwall { margin: clamp(36px, 6vw, 52px) var(--pad-x) 0; display: grid;
  grid-template-columns: repeat(4, 1fr); border: 3px solid var(--ink); background: var(--panel); }
.statwall > div { padding: 24px 24px 22px; border-right: 3px solid var(--ink); }
.statwall > div:last-child { border-right: 0; }
.statwall .num { font-family: var(--d-display); font-weight: 800; font-size: clamp(38px, 4.4vw, 54px); line-height: 0.95; }
.statwall .cap { font-size: 13px; font-weight: 600; margin-top: 8px; opacity: 0.8; }
@media (max-width: 860px) {
  .statwall { grid-template-columns: 1fr 1fr; }
  .statwall > div:nth-child(2) { border-right: 0; }
  .statwall > div:nth-child(1), .statwall > div:nth-child(2) { border-bottom: 3px solid var(--ink); }
}
@media (max-width: 480px) {
  .statwall { grid-template-columns: 1fr; }
  .statwall > div { border-right: 0; border-bottom: 3px solid var(--ink); }
  .statwall > div:last-child { border-bottom: 0; }
}

/* ── Service ledger (home) ─────────────────────────────────────────────── */
.ledger { display: flex; flex-direction: column; }
.ledger a {
  display: grid; grid-template-columns: 120px 1fr 1.2fr 60px; gap: clamp(16px, 3vw, 32px);
  align-items: center; border-top: 3px solid var(--ink); padding: 24px 0;
}
.ledger a:last-child { border-bottom: 3px solid var(--ink); }
.ledger .n { font-family: var(--d-display); font-weight: 800; font-size: clamp(40px, 5vw, 64px); line-height: 1; color: var(--accent); }
.ledger .t { font-family: var(--d-display); font-weight: 700; font-size: clamp(24px, 3.4vw, 36px); line-height: 0.95; text-transform: uppercase; }
.ledger .d { font-size: 15px; line-height: 1.55; font-weight: 500; opacity: 0.85; }
.ledger .arrow { font-family: var(--d-display); font-weight: 800; font-size: 40px; text-align: right; }
.ledger a:hover .arrow { color: var(--accent); transform: translateX(4px); transition: transform .12s; }
@media (max-width: 900px) {
  .ledger a { grid-template-columns: 64px 1fr; grid-template-areas: "n t" "d d"; row-gap: 12px; }
  .ledger .n { grid-area: n; } .ledger .t { grid-area: t; align-self: center; }
  .ledger .d { grid-area: d; } .ledger .arrow { display: none; }
}

/* ── Panel grids (process 3-up, method 4-up) ───────────────────────────── */
.panels { display: grid; border: 3px solid var(--ink); background: var(--panel); }
.panels.p3 { grid-template-columns: repeat(3, 1fr); }
.panels > div { padding: 30px 32px; border-right: 3px solid var(--ink); }
.panels > div:last-child { border-right: 0; }
.panels .head { font-family: var(--d-display); font-weight: 800; font-size: clamp(24px, 3vw, 30px); text-transform: uppercase; margin-bottom: 10px; }
.panels .head .n { color: var(--accent); }
.panels p { font-size: 14.5px; line-height: 1.6; font-weight: 500; margin: 0; opacity: 0.82; }
@media (max-width: 820px) {
  .panels.p3 { grid-template-columns: 1fr; }
  .panels > div { border-right: 0; border-bottom: 3px solid var(--ink); }
  .panels > div:last-child { border-bottom: 0; }
}

.method { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 3px solid var(--ink); }
.method > div { padding: 24px 28px 28px; border-right: 1px solid var(--line); }
.method > div:last-child { border-right: 0; }
.method .n { font-family: var(--d-display); font-weight: 800; font-size: clamp(34px, 4vw, 44px); color: var(--accent); }
.method .w { font-family: var(--d-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 24px); text-transform: uppercase; margin: 8px 0; }
.method p { font-size: 13.5px; line-height: 1.55; font-weight: 500; margin: 0; opacity: 0.78; }
@media (max-width: 820px) { .method { grid-template-columns: 1fr 1fr; }
  .method > div:nth-child(2) { border-right: 0; } }
@media (max-width: 460px) { .method { grid-template-columns: 1fr; } .method > div { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ── Evidence block (dark, with job log) ───────────────────────────────── */
.evidence { margin-top: 22px; background: var(--night); color: #e9f2f2; padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.evidence h2 { color: #fff; margin-bottom: 16px; }
.evidence p { font-size: 15.5px; line-height: 1.6; font-weight: 500; margin: 0; color: rgba(233,242,242,0.75); }
.joblog { border: 2px solid rgba(233,242,242,0.3); padding: 26px 30px; }
.joblog .lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--air); margin-bottom: 14px; }
.joblog .rows { font-size: 13.5px; font-weight: 600; line-height: 2.05; color: rgba(233,242,242,0.8); }
.joblog strong { color: #fff; }
@media (max-width: 820px) { .evidence { grid-template-columns: 1fr; } }

/* ── Case study cards ──────────────────────────────────────────────────── */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cases .t { font-family: var(--d-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 24px); text-transform: uppercase; line-height: 0.98; margin: 16px 0 6px; }
.cases p { font-size: 13.5px; font-weight: 500; line-height: 1.5; margin: 0; opacity: 0.75; }
@media (max-width: 820px) { .cases { grid-template-columns: 1fr; } }

/* ── Sector chips ──────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 12px; max-width: 1100px; }
.chips a { border: 2px solid var(--ink); padding: 12px 20px; font-family: var(--d-display);
  font-weight: 700; font-size: clamp(15px, 1.7vw, 18px); letter-spacing: 0.04em; text-transform: uppercase; }
.chips a:hover { background: var(--ink); color: var(--paper); }
.textlink { display: inline-block; margin-top: 24px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 2px solid var(--ink); padding-bottom: 3px; }

/* ── Sectors page: tier grids ──────────────────────────────────────────── */
.tiergrid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 3px solid var(--ink); }
.tiergrid > div { padding: 22px 28px 24px; border-bottom: 1px solid var(--line); }
.tiergrid > div:nth-child(3n+1) { padding-left: 0; }
.tiergrid > div:nth-child(3n) { padding-right: 0; }
.tiergrid .t { font-family: var(--d-display); font-weight: 700; font-size: clamp(19px, 2.2vw, 23px); text-transform: uppercase; margin-bottom: 6px; }
.tiergrid p { font-size: 13.5px; line-height: 1.55; font-weight: 500; margin: 0; opacity: 0.75; }
@media (max-width: 820px) { .tiergrid { grid-template-columns: 1fr 1fr; }
  .tiergrid > div { padding: 20px 22px 22px !important; } }
@media (max-width: 520px) { .tiergrid { grid-template-columns: 1fr; }
  .tiergrid > div { padding: 18px 0 20px !important; } }

/* ── Clients grid ──────────────────────────────────────────────────────── */
.clients { display: grid; grid-template-columns: repeat(4, 1fr); border: 3px solid var(--ink); background: var(--panel); }
.clients > div { padding: 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.clients .nm { font-family: var(--d-display); font-weight: 700; font-size: clamp(18px, 2vw, 21px); text-transform: uppercase; }
.clients .wt { font-size: 12px; font-weight: 500; opacity: 0.7; margin-top: 4px; }
@media (max-width: 820px) { .clients { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .clients { grid-template-columns: 1fr; } }

/* ── Services page detail blocks (alternating) ─────────────────────────── */
.svc { padding-top: clamp(56px, 8vw, 88px); }
.svc-inner { border-top: 3px solid var(--ink); padding-top: 28px; display: grid;
  grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.svc-inner.flip { grid-template-columns: 0.9fr 1.1fr; }
.svc-head { display: flex; align-items: baseline; gap: 20px; }
.svc-head .n { font-family: var(--d-display); font-weight: 800; font-size: clamp(48px, 6vw, 72px); line-height: 1; color: var(--accent); }
.svc-kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.svc-kicker.fire { color: var(--fire); }
.svc p.body { font-size: 16.5px; line-height: 1.6; font-weight: 500; margin: 24px 0 0; max-width: 58ch; }
.svc-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 26px; border-top: 1px solid var(--line); }
.svc-scope div { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.svc figure { margin: 0; }
.svc figure img { width: 100%; height: clamp(220px, 26vw, 300px); object-fit: cover; display: block; }
@media (max-width: 820px) {
  .svc-inner, .svc-inner.flip { grid-template-columns: 1fr; }
  .svc-inner.flip figure { order: -1; }
  .svc-scope { grid-template-columns: 1fr; }
}

/* ── Group "air shift" cards ───────────────────────────────────────────── */
.groupcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.groupcards a, .groupcards .self { border: 3px solid rgba(240,236,224,0.9); padding: 28px 30px; color: var(--night-text); display: block; }
.groupcards .self { border-color: var(--air); color: var(--air); }
.groupcards .shift { font-family: var(--d-display); font-size: clamp(17px, 2vw, 20px); font-weight: 700; letter-spacing: 0.06em; opacity: 0.7; }
.groupcards .self .shift { opacity: 1; }
.groupcards .nm { font-family: var(--d-display); font-weight: 800; font-size: clamp(24px, 3vw, 30px); text-transform: uppercase; margin: 10px 0 8px; }
.groupcards .self .nm { color: #fff; }
.groupcards p { font-size: 13.5px; line-height: 1.55; font-weight: 500; margin: 0; color: var(--night-dim); }
.groupcards .self p { color: rgba(240,236,224,0.85); }
@media (max-width: 820px) { .groupcards { grid-template-columns: 1fr; } }

/* ── Home group ledger (the AMPM Group box) ────────────────────────────── */
.group-two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .group-two { grid-template-columns: 1fr; } }
.grouplist { border: 3px solid rgba(240,236,224,0.9); padding: 30px 34px; }
.grouplist .hd { font-family: var(--d-display); font-weight: 800; font-size: clamp(24px, 3vw, 30px); letter-spacing: 0.02em; text-transform: uppercase; }
.grouplist .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid rgba(240,236,224,0.35); padding: 14px 0; font-size: 14.5px; font-weight: 600; }
.grouplist .row:first-of-type { margin-top: 20px; }
.grouplist .row .sh { font-family: var(--d-display); font-size: clamp(15px, 1.8vw, 18px); letter-spacing: 0.06em; opacity: 0.7; white-space: nowrap; }
.grouplist .row.now { color: var(--air); }

/* ── Night zone (dark tail: group + CTA + footer) ──────────────────────────
   The day arc ends here. Two rules keep the transition soft:
   1. the ramp starts on the exact page cream (--paper) so there is no seam
      where the light section ends;
   2. it runs over --fade of scroll with many closely spaced stops, so nightfall
      is gradual instead of a hard band (and it does not colour-band).
   padding-top reserves that scroll, and every stop is a fraction of --fade, so
   the ramp always matches the space it is given at any viewport size. */
.nightzone {
  --fade: clamp(340px, 46vh, 620px);
  margin-top: var(--gap-sec);
  padding-top: var(--fade);
  color: var(--night-text);
  background-color: var(--night);
  background-repeat: no-repeat;
  background-image: linear-gradient(180deg,
    var(--paper)   0,
    #f6f7f3        calc(var(--fade) * 0.08),
    #f1f5f4        calc(var(--fade) * 0.17),
    #e8f0f0        calc(var(--fade) * 0.27),
    #dae8ea        calc(var(--fade) * 0.37),
    #c6dade        calc(var(--fade) * 0.46),
    #aec8d0        calc(var(--fade) * 0.55),
    #93b2be        calc(var(--fade) * 0.64),
    #7899a8        calc(var(--fade) * 0.72),
    #5d7f92        calc(var(--fade) * 0.80),
    #43667a        calc(var(--fade) * 0.87),
    #2d5266        calc(var(--fade) * 0.93),
    var(--night-2) calc(var(--fade) * 0.98),
    #142c38        calc(var(--fade) * 1.04),
    var(--night)   calc(var(--fade) * 1.12));
}
/* interior pages carry a shorter tail, so they get a shorter (still soft) ramp */
.nightzone.short { --fade: clamp(280px, 36vh, 480px); }
/* phones: keep the wash but cut the dead-scroll before the CTA */
@media (max-width: 700px) {
  .nightzone { --fade: clamp(180px, 26vh, 280px); }
  .nightzone.short { --fade: clamp(150px, 22vh, 240px); }
}
.nightzone .section { padding-top: clamp(72px, 10vw, 120px); }

/* ── CTA band ──────────────────────────────────────────────────────────── */
.cta h2 { color: #fff; margin: 16px 0 26px; }
.cta .lede { color: var(--night-dim); max-width: 54ch; margin: 0 0 40px; }
.cta-actions { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); flex-wrap: wrap; }
.bignum { font-family: var(--d-display); font-weight: 800; font-size: clamp(38px, 8vw, 64px);
  letter-spacing: 0.03em; color: #fff; border: 4px solid var(--night-text); padding: 8px 30px; white-space: nowrap; }
.bignum:hover { color: var(--night); background: var(--night-text); }
/* compact inline CTA used on interior pages */
.cta-inline { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-inline .bignum { border-width: 3px; font-size: clamp(30px, 5vw, 44px); padding: 6px 24px; }

/* ── Contact form ──────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); margin-top: clamp(28px, 4vw, 44px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }
.field input, .field textarea {
  border: 2px solid var(--ink); background: rgba(255,255,255,0.7); padding: 14px 16px;
  font-family: var(--d-body); font-size: 16px; font-weight: 500; color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.form-stack { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.info-card { border: 3px solid var(--ink); padding: 26px 30px; background: var(--panel); }
.info-card .lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; margin-bottom: 10px; }
.info-card .big { font-family: var(--d-display); font-weight: 800; font-size: clamp(38px, 6vw, 56px); letter-spacing: 0.03em; display: block; }
.info-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 460px) { .info-2 { grid-template-columns: 1fr; } }
.info-sm { border: 2px solid rgba(20,38,43,0.4); padding: 20px 24px; }
.info-sm .t { font-family: var(--d-display); font-weight: 700; font-size: 22px; text-transform: uppercase; margin-bottom: 8px; }
.info-sm .a { font-size: 13.5px; line-height: 1.6; font-weight: 500; opacity: 0.85; }
.hours .r { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; padding: 6px 0; border-bottom: 1px solid rgba(20,38,43,0.2); }
.hours .r:last-child { border-bottom: 0; }
.formnote { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; opacity: 0.6; }
.banner { border: 2px solid var(--accent); background: rgba(11,110,143,0.08); padding: 12px 16px; font-size: 14px; font-weight: 600; }
.banner.err { border-color: var(--fire); background: rgba(184,84,31,0.08); }

/* ── Inline lead form (dark CTA band on service/sector pages) ──────────── */
.leadform { max-width: 640px; margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .lf-row { grid-template-columns: 1fr; } }
.lf-field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(240,236,224,0.75); }
.lf-field input, .lf-field textarea {
  border: 2px solid rgba(240,236,224,0.45); background: rgba(255,255,255,0.06);
  padding: 12px 14px; font-family: var(--d-body); font-size: 16px; font-weight: 500;
  color: var(--night-text); }
.lf-field input::placeholder, .lf-field textarea::placeholder { color: rgba(240,236,224,0.35); }
.lf-field input:focus, .lf-field textarea:focus { outline: 2px solid var(--air); outline-offset: 0; border-color: var(--air); }
.lf-field textarea { resize: vertical; }
.lf-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lf-note { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: rgba(240,236,224,0.6); }

/* ── PPC landing hero on service pages ─────────────────────────────────── */
.svc-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .svc-hero { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin-top: 10px;
  font-size: clamp(15px, 1.7vw, 17px); font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px;
  background: var(--accent);
  clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 16%, 84% 2%, 40% 70%); }
.hero-form-card { border: 3px solid var(--ink); background: rgba(255,255,255,0.55);
  padding: clamp(20px, 3vw, 28px); margin-top: 14px; }
.hfc-title { font-family: var(--d-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 28px);
  text-transform: uppercase; margin-bottom: 4px; }
.hero-form-card .leadform { margin-top: 14px; max-width: none; }
/* light form variant (cream background) */
.leadform-light .lf-field { color: rgba(20,38,43,0.75); }
.leadform-light .lf-field input, .leadform-light .lf-field textarea {
  border-color: var(--ink); background: rgba(255,255,255,0.85); color: var(--ink); }
.leadform-light .lf-field input::placeholder, .leadform-light .lf-field textarea::placeholder { color: rgba(20,38,43,0.4); }
.leadform-light .lf-field input:focus, .leadform-light .lf-field textarea:focus { outline-color: var(--accent); border-color: var(--accent); }
.leadform-light .lf-note { color: rgba(20,38,43,0.65); }
.lf-privacy { font-size: 11.5px; font-weight: 500; opacity: 0.6; letter-spacing: 0.02em; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: clamp(20px, 3vw, 28px);
  padding-top: 14px; border-top: 2px solid var(--line);
  font-family: var(--d-display); font-weight: 700; font-size: clamp(13px, 1.5vw, 16px);
  letter-spacing: 0.05em; text-transform: uppercase; color: rgba(20,38,43,0.8); }
.midcta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border: 3px solid var(--ink); background: var(--panel); padding: 20px 24px; margin-top: clamp(36px, 5vw, 52px); }
.midcta span { font-family: var(--d-display); font-weight: 700; font-size: clamp(18px, 2.2vw, 24px); text-transform: uppercase; }

/* ── Sticky mobile call bar ────────────────────────────────────────────── */
.sticky-call { display: none; }
@media (max-width: 1000px) {
  .sticky-call { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: flex; box-shadow: 0 -6px 20px rgba(16,24,32,0.25); }
  .sticky-call a { flex: 1; text-align: center; padding: 15px 10px;
    font-family: var(--d-display); font-weight: 700; font-size: 16px;
    letter-spacing: 0.05em; text-transform: uppercase; }
  .sc-phone { background: var(--ink); color: var(--paper-cool); }
  .sc-phone:hover { color: var(--paper-cool); }
  .sc-form { background: var(--air); color: var(--night); }
  .sc-form:hover { color: var(--night); }
  /* keep the bar clear of page content and the iOS home indicator */
  body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .sticky-call { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer { color: var(--night-dim); padding-bottom: 44px; }
.footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 36px;
  border-top: 2px solid rgba(240,236,224,0.4); padding-top: 36px; }
.footer .brandline { font-family: var(--d-display); font-weight: 800; font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--night-text); }
.footer p { font-size: 12.5px; line-height: 1.6; font-weight: 500; margin: 12px 0 0; max-width: 32ch; }
.footer .h { font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 12px; opacity: 0.7; }
.footer .lnks { display: flex; flex-direction: column; gap: 12px; font-size: 14px; font-weight: 600; }
.footer .lnks a { color: rgba(240,236,224,0.85); }
.footer .lnks a:hover { color: #fff; }
.footer address { font-size: 12.5px; line-height: 1.7; font-weight: 500; font-style: normal; }
.footer address strong { color: var(--night-text); }
.footer .base { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 18px;
  border-top: 1px solid rgba(240,236,224,0.25); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; flex-wrap: wrap; }
@media (max-width: 820px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer .cols { grid-template-columns: 1fr; } }

/* ── Reveal-on-scroll ──────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .btn:hover { transform: none; } }

/* ── Prose (ported markdown bodies: sectors, services, articles, cases) ──── */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--d-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 3.6vw, 38px); line-height: 1.0; letter-spacing: 0.01em;
  margin-top: 1.9em; margin-bottom: 0.5em; }
.prose h3 { font-family: var(--d-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 25px); line-height: 1.05; margin-top: 1.5em; margin-bottom: 0.3em; }
.prose p, .prose li { font-size: clamp(15.5px, 1.7vw, 17px); line-height: 1.65; font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(11,110,143,0.4); }
.prose a:hover { border-color: var(--accent); }
.prose blockquote { border-left: 4px solid var(--accent); padding: 4px 0 4px 20px; margin-left: 0;
  font-size: clamp(17px, 2vw, 20px); font-weight: 500; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--panel); font-weight: 700; }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 2em 0; }

/* content hero + interior layout */
.chero { padding-bottom: 0; }
.chero .lede { margin-top: clamp(20px, 3vw, 32px); max-width: 60ch; }
.body-wrap { padding-top: clamp(32px, 5vw, 56px); }
.related { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.related a { border: 2px solid var(--ink); padding: 9px 16px; font-family: var(--d-display);
  font-weight: 700; font-size: clamp(13px, 1.4vw, 15px); letter-spacing: 0.03em; text-transform: uppercase; }
.related a:hover { background: var(--ink); color: var(--paper); }
.meta-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; padding-top: 18px; border-top: 3px solid var(--ink); }
.meta-row div { min-width: 120px; }
.meta-row .k { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.6; }
.meta-row .v { font-family: var(--d-display); font-weight: 700; font-size: clamp(17px, 2vw, 21px); text-transform: uppercase; margin-top: 4px; }

/* hub card grids (services / sectors / projects / blog) */
.cardgrid { display: grid; gap: 20px; margin-top: clamp(28px, 4vw, 44px); }
.cardgrid.c3 { grid-template-columns: repeat(3, 1fr); }
.cardgrid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .cardgrid.c3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cardgrid.c3, .cardgrid.c2 { grid-template-columns: 1fr; } }
.card { border: 3px solid var(--ink); padding: 24px 26px 26px; display: flex; flex-direction: column; background: var(--panel); }
.card:hover { background: #fff; }
.card .knum { font-family: var(--d-display); font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); color: var(--accent); line-height: 1; }
.card .kkick { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.card .ktitle { font-family: var(--d-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 27px); line-height: 0.98; text-transform: uppercase; margin: 8px 0 8px; }
.card .kbody { font-size: 14px; line-height: 1.5; font-weight: 500; opacity: 0.82; margin: 0 0 16px; }
.card .kgo { margin-top: auto; font-family: var(--d-display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.card:hover .kgo { text-decoration: underline; }

/* utility */
.on-dark { color: var(--night-text); }
.mt-sm { margin-top: 20px; } .mt-md { margin-top: 32px; }
.maxw-60 { max-width: 60ch; } .maxw-56 { max-width: 56ch; } .maxw-64 { max-width: 64ch; }
.dimlede { opacity: 0.72; }

/* --- generated imagery layer (2026-08-12) ----------------------------------
   Set-back hero underlay for .chero (sector/article/areas heroes): image sits
   behind the sky gradient, masked left so the headline column stays calm, and
   fades to --paper at the bottom so the hero hands off seamlessly. Subjects
   are composed right-third for exactly this. */
.chero { position: relative; overflow: hidden; }
.chero .chero-img { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.chero .chero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 42%;
  opacity: 0.5; filter: saturate(0.88); display: block; }
.chero .chero-img::after { content: ''; position: absolute; inset: 0; background:
  linear-gradient(97deg, var(--paper-cool) 24%, color-mix(in srgb, var(--paper-cool) 62%, transparent) 52%, color-mix(in srgb, var(--paper-cool) 12%, transparent) 100%),
  linear-gradient(180deg, color-mix(in srgb, var(--paper) 0%, transparent) 62%, var(--paper) 100%); }
.chero > *:not(.chero-img) { position: relative; z-index: 1; }
@media (max-width: 700px) { .chero .chero-img img { opacity: 0.34; object-position: 66% 42%; } }

/* Editorial inset floated inside long service prose (4:3). */
.prose .prose-inset { float: right; width: min(46%, 380px); margin: 6px 0 18px 28px; }
.prose .prose-inset img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border-radius: 12px; box-shadow: 0 14px 34px rgba(11,110,143,0.16); }
.prose h2 { clear: right; }
@media (max-width: 700px) { .prose .prose-inset { float: none; width: 100%; margin: 18px 0; } }

/* Article/case feature image above the prose, and card thumbnails. */
.feature-fig { margin: 0 0 clamp(28px, 4vw, 40px); }
.feature-fig img { width: 100%; max-height: 420px; object-fit: cover; display: block; border-radius: 12px; }
.card .card-img { width: calc(100% + 52px); margin: -24px -26px 16px; display: block;
  aspect-ratio: 16 / 9; object-fit: cover; }
