/* ============================================================
   FCE — "The Drawing Board" stylesheet
   Sections: tokens / base / sheet / type / nav / footer /
             components / story (Task 5-6) / pages (Tasks 7-9)
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  /* brand (fixed — CLAUDE.md §8.1) */
  --navy: #335177; --navy-deep: #243a55; --navy-dark: #1a2d42;
  --blue: #3B79C3; --light-blue: #8AB9D6; --extra-light-blue: #CDDAE9;
  --orange: #EB5D40; --light-orange: #FDB67B;
  --grey: #595959; --light-grey: #A6A6A6;
  /* drawing-office tokens */
  --paper: #faf9f7;
  --ink: var(--navy-dark);
  --ink-soft: var(--navy);
  --pen: var(--orange);              /* red-pen accent — use sparingly */
  --e-accent: var(--orange);         /* emblem structure: block frames + nodes */
  --e-line: var(--blue);             /* emblem construction linework (blueprint ink) */
  --line-hair: 1px;
  --line-rule: 1.5px;
  --nav-height: 72px;
  --grid-pitch: 48px;
  --grid-ink: rgba(51, 81, 119, 0.07);
  --grid-ink-dark: rgba(138, 185, 214, 0.09);
  /* night ground (mirrors looks/home.css --hn-* — the whole site now sits on
     the night desk; PAPER artefacts keep --paper/--ink inside them) */
  --night: #0d1826;                          /* == --hn-black */
  --night-2: #0a141f;                        /* == --hn-black-2 (deeper wells) */
  --night-line: rgba(138, 185, 214, 0.16);   /* == --hn-line — hairlines on dark */
  --night-hair: rgba(138, 185, 214, 0.22);   /* stronger dark hairline (scrolled nav) */
  --night-edge: rgba(138, 185, 214, 0.5);    /* == --hn-edge — lit edges/borders */
  /* documents-on-a-desk lift for paper artefacts */
  --paper-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --paper-shadow-hover: 0 16px 52px rgba(0, 0, 0, 0.46);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --head: 'Archivo', sans-serif;
  --body: 'DM Sans', sans-serif;
  --measure: 62ch;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: var(--body); color: var(--paper);
  background: var(--night); overflow-x: hidden; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }

::selection { background: var(--pen); color: var(--paper); }

/* focus-visible — keyboard-navigable, invisible to mouse users.
   light-orange reads on both the night ground and inside paper artefacts. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-hamburger:focus-visible {
  outline: 2px solid var(--light-orange);
  outline-offset: 3px;
}

/* the sheet: faint setting-out grid — now the DARK (blueprint) variant,
   since the site ground is the night desk */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-ink-dark) var(--line-hair), transparent var(--line-hair)),
    linear-gradient(90deg, var(--grid-ink-dark) var(--line-hair), transparent var(--line-hair));
  background-size: var(--grid-pitch) var(--grid-pitch);
}
/* .sheet-dark now harmonises with the night ground (was --navy-dark) so the
   footer + CTA band read as the same desk the rest of the site sits on */
.sheet-dark {
  background: var(--night); color: var(--paper);
  background-image:
    linear-gradient(var(--grid-ink-dark) var(--line-hair), transparent var(--line-hair)),
    linear-gradient(90deg, var(--grid-ink-dark) var(--line-hair), transparent var(--line-hair));
  background-size: var(--grid-pitch) var(--grid-pitch);
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--head); color: inherit; line-height: 1.05; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; text-wrap: balance; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { max-width: var(--measure); }
.mono-label {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--light-blue);
}
/* inside PAPER artefacts a mono-label reverts to ink so it reads on the sheet */
.sheet-card .mono-label, .proof-sheet .mono-label,
.office-form .mono-label, .addl-card .mono-label { color: var(--ink-soft); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: var(--line-hair) solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
/* nav rides over the night ground on every page — light text, dark blur when
   scrolled (promoted from looks/home.css's body.home-night nav treatment so it
   is now GLOBAL; the homepage looks identical, only the scope changed). */
.nav.scrolled { background: rgba(13, 24, 38, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--night-hair); }
.mark { display: inline-flex; align-items: center; color: var(--paper); }
.mark .emblem { display: block; }
.mark--nav .emblem { height: 44px; width: auto; }
.mark--nav { color: var(--paper); }
.mark--footer { color: var(--paper); }
.mark--footer .emblem { height: 40px; width: auto; }
.nav-menu { display: flex; gap: 32px; }
.nav-menu a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--extra-light-blue); position: relative;
  padding: 4px 0; transition: color .2s var(--ease);
}
.nav-menu a.active, .nav-menu a:hover { color: var(--paper); }
.nav-menu a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  border-top: var(--line-rule) solid var(--pen);
}
.nav-cta {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paper); border: var(--line-rule) solid var(--orange);
  padding: 9px 18px; transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-cta:hover { background: var(--orange); color: var(--night); border-color: var(--orange); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--paper); margin: 5px 0; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.mobile-menu {
  display: none; position: fixed; inset: var(--nav-height) 0 0 0; z-index: 999;
  background: var(--night); padding: 40px; flex-direction: column; gap: 22px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--mono); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--extra-light-blue); border-bottom: 2px solid transparent; padding-bottom: 2px; transition: color .2s var(--ease), border-color .2s var(--ease); }
.mobile-menu a:hover { color: var(--paper); border-bottom-color: var(--pen); }

/* ---------- title block ---------- */
.title-block {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, auto));
  width: fit-content; border: var(--line-rule) solid currentColor;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
}
.tb-cell { padding: 7px 14px; border-right: var(--line-hair) solid currentColor; }
.tb-cell:last-child { border-right: 0; }
.tb-cell b { display: block; font-weight: 600; text-transform: uppercase; font-size: 0.6rem; opacity: 0.6; }
.title-block--sheet { width: 100%; margin-top: 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- annotation strip (lighter page-head device) ---------- */
.anno-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--light-blue);
}
.anno-strip::before { content: ''; width: 34px; border-top: var(--line-rule) solid var(--pen); }
.anno-strip span + span::before { content: '\00B7'; margin-right: 14px; opacity: 0.5; }

/* ---------- dimension line ---------- */
.dim {
  position: relative; display: flex; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
}
/* .dim doubles as a section heading (h2.dim on about/faq) — pin the weight and
   margin so the heading element's UA defaults don't alter the label's look */
h2.dim, h3.dim { font-weight: 400; margin: 0; line-height: 1.4; }
/* a drawing sub-head: the label leads, one hairline runs out to the right
   (the old centred dimension-line-with-end-ticks read as a mistake) */
.dim::after { content: ''; flex: 1; border-top: var(--line-hair) solid currentColor; opacity: 0.35; }
.dim-label { white-space: nowrap; }

/* ---------- hatching ---------- */
.hatch {
  background-image: repeating-linear-gradient(45deg,
    rgba(51, 81, 119, 0.18) 0 1px, transparent 1px 7px);
}
.sheet-dark .hatch {
  background-image: repeating-linear-gradient(45deg,
    rgba(138, 185, 214, 0.22) 0 1px, transparent 1px 7px);
}

/* ---------- leader annotation ---------- */
.leader { position: relative; padding-left: 44px; }
.leader::before {
  content: ''; position: absolute; left: 0; top: 0.62em; width: 32px;
  border-top: var(--line-hair) solid var(--pen);
}
.leader::after {
  content: ''; position: absolute; left: 30px; top: calc(0.62em - 2.5px);
  width: 6px; height: 6px; background: var(--pen);
}

/* ---------- buttons ----------
   Contrast pass 2026-07-10: white-on-orange (.btn default) measured
   ~3.2:1 — fails WCAG AA for normal text (needs 4.5:1). Orange stays as
   the border/identity accent; fill flips to ink/paper, which clears
   13:1. Hover inverts to transparent + ink text (reads against the
   paper page background). On .sheet-dark (navy) the light-on-dark pen
   text also fails at this size, and ink-on-navy would be invisible, so
   the button flips the other way: paper fill + ink text by default,
   with hover going transparent + paper text against the navy sheet. */
/* On the night ground the button is a lit paper chip: paper fill + night text,
   orange identity border; hover empties to a paper outline. (Promoted from the
   homepage .home-night .btn treatment.) Inside a PAPER artefact — the two
   office forms — it flips dark so it doesn't vanish on the sheet (see forms). */
.btn {
  display: inline-block; font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--night); background: var(--paper); padding: 15px 32px;
  border: var(--line-rule) solid var(--orange); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: transparent; color: var(--paper); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: var(--paper); color: var(--night); border-color: var(--paper); }
.sheet-dark .btn { background: var(--paper); color: var(--night); border-color: var(--orange); }
.sheet-dark .btn:hover { background: transparent; color: var(--paper); border-color: var(--orange); }

/* ---------- reveal (inner pages) ---------- */
/* Gated on html.js: with no JavaScript there is no observer to add .visible,
   so the hidden state must only apply when JS is present — otherwise the
   content (whole projects grid, homepage sections) stays blank without JS.
   Scoped to :not(.visible) so the hidden rule stops matching the moment the
   observer adds .visible — otherwise `html.js .reveal` would out-specify
   `.reveal.visible` and pin everything at opacity:0. */
.reveal { transition: opacity .6s ease, transform .6s ease; }
html.js .reveal:not(.visible) { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal:not(.visible) { opacity: 1; transform: none; }
  .reveal { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- flash ---------- */
.flash-messages { position: fixed; top: calc(var(--nav-height) + 12px); left: 50%; transform: translateX(-50%);
  z-index: 1001; width: min(92%, 620px); }
.flash-message { font-family: var(--mono); font-size: 0.8rem; padding: 14px 18px;
  border: var(--line-rule) solid var(--ink); background: var(--paper); margin-bottom: 8px; }
.flash-message.error { border-color: var(--pen); color: var(--ink); border-left-width: 4px; }
.flash-message.success { border-color: var(--navy); color: var(--navy); }
/* neutral notices (e.g. a user-initiated payment cancel — not an error) */
.flash-message.notice { border-color: var(--navy); color: var(--ink); }

/* ---------- footer: the sheet's title block ---------- */
.footer {
  position: relative; margin-top: 0; overflow: hidden;
  padding: 48px clamp(20px, 4vw, 56px) 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.footer.sheet-dark { border-top: var(--line-rule) solid var(--night-line); }

/* the title block proper: a bordered grid of cells */
.footer-tb {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  border: var(--line-rule) solid rgba(138, 185, 214, 0.45);
  background: rgba(10, 20, 31, 0.5);
}
.footer-tb-cell {
  display: flex; flex-direction: column; gap: 9px; padding: 22px 22px 24px;
  border-right: var(--line-hair) solid rgba(138, 185, 214, 0.3);
  min-width: 0;
}
.footer-tb-cell:last-child { border-right: 0; }
.footer-tb-head {
  font-family: var(--mono); font-weight: 600; font-size: 0.62rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--light-blue);
  margin-bottom: 4px;
}
.footer-tb-cell a {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em;
  color: var(--extra-light-blue); width: fit-content;
  transition: color .2s var(--ease);
}
.footer-tb-cell a:hover { color: var(--paper); }
.footer-tb-brand { justify-content: space-between; gap: 18px; }
.mark--footer { align-self: flex-start; width: 100%; }
.mark--footer .emblem {
  width: min(100%, 250px); height: auto;
  aspect-ratio: 1893.54 / 680.31;   /* the lockup's true proportions */
}
.footer-contact {
  font-style: normal; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em;
  color: var(--extra-light-blue);
}
.footer-tb-contact a[href^="tel"],
.footer-tb-contact a[href^="mailto"] { color: var(--paper); }
.footer-tb-cta {
  margin-top: 8px; border: var(--line-rule) solid var(--pen);
  padding: 9px 16px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--paper) !important; transition: background .2s var(--ease);
}
.footer-tb-cta:hover { background: var(--pen); color: var(--navy-dark) !important; }

.footer-base {
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; justify-content: space-between;
  padding-top: 16px; margin-top: 0;
}
.footer-trust {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--extra-light-blue);
}
.footer-copy {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  color: var(--light-blue);
}
@media (max-width: 900px) {
  .footer-tb { grid-template-columns: 1fr 1fr; }
  .footer-tb-cell { border-bottom: var(--line-hair) solid rgba(138, 185, 214, 0.3); }
  .footer-tb-cell:nth-child(2n) { border-right: 0; }
  .footer-tb-cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 540px) {
  .footer-tb { grid-template-columns: 1fr; }
  .footer-tb-cell { border-right: 0 !important; }
  .footer-tb-cell:last-child { border-bottom: 0; }
  .footer-mega { margin-top: 22px; }
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em;
  background: var(--ink); color: var(--paper); padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* ---------- hero actions ---------- */
.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-phone { color: var(--ink); border-bottom: var(--line-rule) solid var(--pen); padding-bottom: 2px; }
.hero-phone:hover { color: var(--ink); border-bottom-width: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav-menu, .nav-cta { display: none; }
  .nav-hamburger { display: block; }
  :root { --grid-pitch: 36px; }
}

/* ---------- story (homepage narrative) ---------- */
.story { position: relative; }
.story-canvas {
  position: sticky; top: 0; height: 100vh; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; pointer-events: none; color: var(--ink);
  transition: color .45s var(--ease);
}
/* night mylar: navy sheet + blueprint grid faded in by the scroll engine as
   the mark resolves (JS drives opacity; z:-1 keeps it under the emblem SVG).
   Static/no-JS/reduced-motion never see it — opacity stays 0. */
.story-night {
  position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: var(--navy-dark);
  background-image:
    linear-gradient(var(--grid-ink-dark) var(--line-hair), transparent var(--line-hair)),
    linear-gradient(90deg, var(--grid-ink-dark) var(--line-hair), transparent var(--line-hair));
  background-size: var(--grid-pitch) var(--grid-pitch);
}
.story--night .story-canvas { color: var(--paper); }  /* wordmark resolves white on navy */
.story-canvas .emblem { width: min(92vw, 1500px); height: auto; opacity: 0.16; }
/* when the Task 6 scroll engine is live it controls what is drawn — restore full ink */
html.story-live .story-canvas .emblem { opacity: 1; }

.chapters { position: relative; z-index: 1; margin-top: -100vh; }
.chapter {
  min-height: 108vh; display: flex; align-items: center;
  padding: 0 clamp(20px, 6vw, 96px);
}
.chapter-inner {
  max-width: 700px; display: grid; gap: 26px;
  background: rgba(250, 249, 247, 0.9); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  padding: clamp(28px, 4vw, 44px); border: var(--line-hair) solid rgba(51, 81, 119, 0.14);
}
.chapter--hero .chapter-inner { gap: 28px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; padding: 0; }
.chapter--hero { min-height: 100vh; }
.chapter--hero h1 .amp { color: var(--pen); }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  animation: cue 2.2s var(--ease) infinite;
}
.scroll-cue-arrow { display: inline-block; color: var(--pen); }
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; } }

.dim-grid { display: grid; gap: 18px; max-width: 460px; }
/* dimension linework in blueprint blue (ticks/lines inherit); values stay ink */
.dim-grid .dim { color: var(--blue); }
.dim-grid .dim-label { color: var(--ink); }

.service-callouts { display: grid; gap: 16px; }
/* five families = the five blocks of the mark: a compact responsive grid */
.service-callouts--five { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.service-callouts--five .service-callout { padding: 18px 20px; }
.service-callouts--five .service-callout:hover { transform: translateY(-3px); }
.service-callouts--five .service-callout h3 { font-size: 1.05rem; }
.service-callouts--five .service-callout p { font-size: 0.82rem; }
.service-callout {
  display: grid; gap: 8px; padding: 22px 24px;
  border: var(--line-hair) solid var(--ink-soft); background: var(--paper);
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}
.service-callout .mono-label { color: var(--ink); border-bottom: 2px solid var(--pen); padding-bottom: 2px; }
.service-callout h3 { margin-top: 2px; }
.service-callout p { color: var(--grey); font-size: 0.95rem; }
/* hover wash matches the services page's additional-services cards */
.service-callout:hover { border-color: var(--pen); transform: translateX(4px); background: var(--extra-light-blue); }

.proof-sheet {
  border: var(--line-rule) solid var(--ink); width: fit-content; background: var(--paper);
  color: var(--ink); box-shadow: var(--paper-shadow);
}
.proof-sheet img, .proof-sheet-void { width: min(560px, 78vw); height: 320px; object-fit: cover; }
.proof-sheet .title-block {
  border: 0; border-top: var(--line-rule) solid var(--ink); width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(90px, auto));
}
/* proof/detail links live on the night ground (services proof, contact aside,
   privacy prose) — light-orange text over the orange rule reads on dark */
.proof-link {
  display: inline-block; margin-top: -4px; color: var(--light-orange);
  border-bottom: var(--line-rule) solid var(--pen); transition: opacity .2s var(--ease);
}
.proof-link:hover { opacity: 0.7; }

.margin-note {
  max-width: 400px; font-style: italic; color: var(--ink-soft);
  border-left: var(--line-rule) solid var(--pen); padding-left: 18px; display: grid; gap: 8px;
}
.margin-note p { font-size: 1.02rem; }

.chapter--resolve .chapter-inner { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; padding: 0; }
.chapter--resolve h2 { margin-bottom: 4px; }
.resolve-contact { display: flex; gap: 28px; flex-wrap: wrap; }
.resolve-contact .mono-label { color: var(--ink); }
/* on night mylar the resolve chapter flips to paper ink (transitions smooth
   the class toggle; the orange .btn already holds on navy) */
.chapter--resolve h2, .resolve-contact .mono-label { transition: color .45s var(--ease); }
.story--night .chapter--resolve h2,
.story--night .resolve-contact .mono-label { color: var(--paper); }

/* On mobile the story reads in stages: opaque content cards with tall gaps
   between them — the emblem evolves in the gaps, not behind the text. */
@media (max-width: 760px) {
  .chapter { min-height: 0; padding: 0 18px; margin: 44vh 0; }
  .chapter--hero { min-height: 100vh; margin: 0 0 38vh; }
  .chapter--resolve { margin-bottom: 20vh; }
  .chapter-inner {
    padding: 24px 20px; background: var(--paper);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border: var(--line-hair) solid rgba(51, 81, 119, 0.25);
  }
  .chapter--hero .chapter-inner { background: transparent; border: 0; padding: 0; }
  .chapter--resolve .chapter-inner { background: var(--paper); border: var(--line-hair) solid rgba(51, 81, 119, 0.25); padding: 24px 20px;
    transition: background .45s var(--ease), border-color .45s var(--ease); }
  /* mobile resolve card joins the night sheet instead of staying paper */
  .story--night .chapter--resolve .chapter-inner { background: var(--navy-dark); border-color: rgba(138, 185, 214, 0.35); }
  .story-canvas .emblem { width: min(150vw, 900px); }
}

/* ---------- emblem layers ----------
   .e-exact is the VERBATIM brand emblem path: it is what nav, footer, and
   the static/no-JS/reduced-motion homepage display — pixel-true logo.
   .e-construction (hairlines, frames, nodes) exists for the scroll engine,
   which draws it and then cross-fades to .e-exact at the finale. */
.emblem .e-construction { visibility: hidden; }
html.story-live .story-canvas .e-construction { visibility: visible; }
.story-canvas .e-wordmark { transition: opacity .3s linear; }
.story { height: 660vh; }
@media (max-width: 760px) { .story { height: 560vh; } }

/* ---------- inner pages ---------- */
/* head and body share one centred 1160px column so wide screens don't
   leave the whole page hanging off the left edge */
.page-head {
  padding: 150px clamp(20px, 6vw, 96px) 40px; display: grid; gap: 20px;
  border-bottom: var(--line-hair) solid var(--night-line);
  max-width: 1160px; margin-inline: auto;
}
.page-body { padding: 40px clamp(20px, 6vw, 96px) 110px; max-width: 1160px;
  margin-inline: auto; }

/* ---------- SERVICES: descending through the mark ----------
   A sticky F-glyph rail (left, desktop) beside five family sheets. Each sheet
   is a NIGHT surface (paper text, blueprint rules) carrying its discipline
   cube as the section figure and a paper proof artefact. */
.services-main {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px); align-items: start;
}
/* sticky signature rail — the mark as a table of contents */
.svc-rail {
  position: sticky; top: calc(var(--nav-height) + 34px);
  display: grid; gap: 14px; justify-items: center;
}
.svc-rail-label { writing-mode: vertical-rl; letter-spacing: 0.2em; color: var(--light-blue); }
.svc-rail-glyph { width: clamp(64px, 5vw, 78px); height: auto; overflow: visible; }
.svc-rail-cell { cursor: pointer; }
.svc-rail-cell rect { fill: rgba(138, 185, 214, 0.25); transition: fill .25s var(--ease); }
.svc-rail-cell:hover rect,
.svc-rail-cell:focus-visible rect { fill: var(--light-orange); }
.svc-rail-cell.is-active rect { fill: var(--orange); }
.svc-rail-cell:focus-visible { outline: 2px solid var(--light-orange); outline-offset: 3px; }
/* the rail is navigation — it functions with reduced motion, just no fade */
@media (prefers-reduced-motion: reduce) { .svc-rail-cell rect { transition: none; } }

.svc-sheets { min-width: 0; }

.detail-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-areas: "main figure" "main proof";
  grid-template-rows: auto 1fr; align-items: start;
  gap: 26px clamp(32px, 4.5vw, 64px);
  padding: clamp(40px, 6vw, 72px) 0; border-bottom: var(--line-hair) solid var(--night-line);
}
.detail-sheet:first-child { padding-top: 24px; }
.detail-sheet:last-of-type { border-bottom: 0; }
/* ALTERNATE: even sheets flip the figure/proof column to the left */
.detail-sheet:nth-of-type(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  grid-template-areas: "figure main" "proof main";
}
.detail-main { grid-area: main; display: grid; gap: 16px; align-content: start; }
.svc-cube { grid-area: figure; align-self: start; justify-self: center; }
.svc-proof { grid-area: proof; align-self: start; }

/* sheet head: this family's block of the mark, filled, + its sheet number */
.svc-sheet-head { display: flex; align-items: center; gap: 14px; }
.svc-glyph { width: 26px; height: auto; flex: none; }
.svc-glyph rect { fill: rgba(138, 185, 214, 0.25); }
.svc-glyph rect.is-this { fill: var(--orange); }

/* proof point — a PAPER artefact sheet on the night desk (matches .sheet-card) */
.svc-proof {
  display: grid; gap: 12px; align-content: start;
  background: var(--paper); color: var(--ink);
  border: var(--line-rule) solid var(--ink); box-shadow: var(--paper-shadow);
  padding: 22px 22px 24px;
}
.svc-proof .mono-label { color: var(--ink-soft); }
.svc-proof h3 { color: var(--ink); font-size: 1.2rem; }
.svc-proof-loc { color: var(--ink-soft); }
.svc-proof-tb {
  display: flex; flex-wrap: wrap; margin: 4px 0 2px;
  border: var(--line-hair) solid rgba(51, 81, 119, 0.28);
}
.svc-proof-cell { flex: 1 1 90px; padding: 10px 12px; }
.svc-proof-cell + .svc-proof-cell { border-left: var(--line-hair) solid rgba(51, 81, 119, 0.28); }
.svc-proof-cell b { display: block; font-family: var(--head); font-weight: 700; font-size: 1.35rem; color: var(--ink); line-height: 1; }
.svc-proof-cell span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
/* on the paper artefact the proof link flips to ink+pen so it reads on the sheet */
.svc-proof .proof-link { color: var(--ink); border-bottom-color: var(--pen); }

.callout-tags { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.addl { padding-top: 44px; display: grid; gap: 26px; }
/* the grid gaps are the night hairline; each .addl-card is a PAPER artefact */
.addl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px;
  background: var(--night-line); border: var(--line-hair) solid var(--night-line);
  box-shadow: var(--paper-shadow); }
.addl-card { background: var(--paper); color: var(--ink); padding: 22px; display: grid; gap: 8px; }
.addl-card p { color: var(--grey); }
.addl-card:hover { background: var(--extra-light-blue); }
/* the capability list — scannable noun phrases, small orange block markers */
.svc-list {
  list-style: none; margin: 4px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px;
}
.svc-list li {
  position: relative; padding-left: 16px;
  font-size: 0.92rem; line-height: 1.35; color: var(--extra-light-blue);
}
.svc-list li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 7px; height: 7px; background: var(--orange);
}
@media (max-width: 560px) { .svc-list { grid-template-columns: 1fr; } }

/* below 900px the sticky rail hides — sheets carry their own headers, no
   mobile scrolljack — and the layout drops to a single reading column. */
@media (max-width: 900px) {
  .svc-rail { display: none; }
  .services-main { grid-template-columns: 1fr; gap: 0; }
}
.services-body { padding-bottom: 44px; }
@media (max-width: 760px) {
  .services-body { padding-top: 8px; }
  .detail-sheet:first-child { padding-top: 0; }
  .svc-cube.cube-scene .lc-stage { height: 178px; }
  .detail-sheet,
  .detail-sheet:nth-of-type(even) {
    grid-template-columns: 1fr;
    /* the figure leads on mobile — see the discipline before you read it */
    grid-template-areas: "figure" "main" "proof";
    grid-template-rows: auto;
  }
  .svc-cube { justify-self: center; }
}

/* about */
.about-history, .about-values, .about-quotes { display: grid; gap: 22px; }
.about-history { margin-bottom: 56px; }
/* background text beside the practice-record card, so the opening of the
   page isn't a wall of paragraphs */
.about-split { display: grid; gap: clamp(24px, 4vw, 60px) ;
  grid-template-columns: minmax(0, 640px) auto; align-items: start; }
.about-split-text { display: grid; gap: 22px; }
.about-record { color: var(--light-blue);
  grid-template-columns: 1fr; width: min(100%, 250px); }
.about-record .tb-cell { border-right: 0;
  border-bottom: var(--line-hair) solid currentColor; padding: 11px 16px; }
.about-record .tb-cell:last-child { border-bottom: 0; }
.about-record .tb-cell span { color: var(--paper); font-size: 0.92rem; }
@media (max-width: 760px) {
  .about-split { grid-template-columns: 1fr; }
  .about-record { width: 100%; }
}
.about-values { margin-bottom: 64px; }
.about-history p { font-size: 1.08rem; line-height: 1.7; color: var(--extra-light-blue); }
.values-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px; background: var(--night-line); border: var(--line-hair) solid var(--night-line);
}
.value-card { background: var(--paper); color: var(--ink); padding: 26px; display: grid; gap: 10px; align-content: start; }
.value-card p { color: var(--grey); font-size: 0.98rem; }
.about-quotes { margin-top: 72px; }
.quotes-head { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.quotes-head .dim { flex: 1; }
/* pause/resume control — only meaningful with JS; hidden otherwise and when
   there's no motion to pause (reduced-motion). Drawing-office chip styling. */
.quote-toggle { display: none; }
.js .quote-toggle {
  display: block; flex: none; width: 34px; height: 34px; cursor: pointer;
  position: relative; background: transparent;
  border: var(--line-rule) solid var(--night-edge);
  transition: border-color .2s var(--ease);
}
.js .quote-toggle:hover { border-color: var(--pen); }
/* default (playing, aria-pressed=false): a pause glyph — the button pauses */
.quote-toggle::before, .quote-toggle::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 3px; height: 12px; background: var(--light-orange);
}
.quote-toggle::before { transform: translate(-140%, -50%); }
.quote-toggle::after  { transform: translate(40%, -50%); }
/* pressed (paused): a play triangle — the button resumes */
.quote-toggle[aria-pressed="true"]::before {
  width: 0; height: 0; background: transparent;
  border-left: 11px solid var(--light-orange);
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
  transform: translate(-40%, -50%);
}
.quote-toggle[aria-pressed="true"]::after { content: none; }
@media (prefers-reduced-motion: reduce) { .js .quote-toggle { display: none; } }
.quote-ticker { overflow: hidden; }
.quote-track {
  display: flex; width: max-content;
  animation: quotes-roll 70s linear infinite;
}
/* pause on hover, keyboard focus within the ticker, or the explicit toggle */
.quote-ticker:hover .quote-track,
.quote-ticker:focus-within .quote-track,
.quote-ticker.is-paused .quote-track { animation-play-state: paused; }
@keyframes quotes-roll { to { transform: translateX(-50%); } }
.quote-card {
  margin: 0 20px 0 0; width: 320px; flex: none;
  background: var(--paper); color: var(--ink);
  border: var(--line-rule) solid var(--ink); box-shadow: var(--paper-shadow);
  padding: 22px; display: grid; gap: 14px; align-content: space-between;
}
@media (prefers-reduced-motion: reduce) {
  .quote-track { animation: none; }
  .quote-ticker { overflow-x: auto; }
}
.quote-card blockquote { margin: 0; }
.quote-card p { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }

/* projects */
/* sector filter tabs — drawing tabs echoing the nav active-underline treatment */
.proj-tabs { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: 34px; }
.proj-tab {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--extra-light-blue); position: relative;
  padding: 4px 0; transition: color .2s var(--ease);
}
.proj-tab:hover, .proj-tab.active { color: var(--paper); }
.proj-tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  border-top: var(--line-rule) solid var(--pen);
}
.proj-empty { margin-bottom: 34px; color: var(--extra-light-blue); }
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.sheet-grid--related { grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
/* PAPER ARTEFACT: a drawing sheet sitting on the night desk — paper ground,
   ink text within, a gentle drop shadow lifting it off the dark. */
.sheet-card { display: grid; border: var(--line-rule) solid var(--ink); background: var(--paper);
  color: var(--ink); box-shadow: var(--paper-shadow);
  transition: box-shadow .25s, transform .25s; }
a.sheet-card:hover { transform: translateY(-3px); box-shadow: var(--paper-shadow-hover); }
.sheet-card-img img, .sheet-card-void { width: 100%; height: 230px; object-fit: cover; }
/* the drawing develops — card photos rest as linework, resolve on hover/in-view.
   Gated on html.js so no-JS pages are always fully developed. */
.js .sheet-card-img { position: relative; }
.js .sheet-card-img img { filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease); }
/* :has(picture) — only photo cards develop; image-less .sheet-card-void cards
   keep their plain hatch instead of a permanent grid+navy wash over it */
.js .sheet-card-img:has(picture)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(to right, rgba(138, 185, 214, 0.14) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(to bottom, rgba(138, 185, 214, 0.14) 0 1px, transparent 1px 40px),
    rgba(51, 81, 119, 0.5);
  mix-blend-mode: multiply;
  transition: opacity .6s var(--ease);
}
.js .sheet-card:hover .sheet-card-img img,
.js .sheet-card:focus-visible .sheet-card-img img,
.js .sheet-card-img.developed img { filter: none; }
.js .sheet-card:hover .sheet-card-img::after,
.js .sheet-card:focus-visible .sheet-card-img::after,
.js .sheet-card-img.developed::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .js .sheet-card-img img { filter: none; transition: none; }
  .js .sheet-card-img::after { content: none; }
}
.sheet-card .title-block { border: 0; border-top: var(--line-rule) solid var(--ink); width: 100%; }
.sheet-card-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 14px;
  border-top: var(--line-hair) solid rgba(51,81,119,0.25); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px 40px; margin-bottom: 40px; }
.lede { font-size: 1.12rem; line-height: 1.8; margin-bottom: 34px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin: 44px 0 70px; }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.related { display: grid; gap: 8px; }
@media (max-width: 760px) {
  .sheet-grid, .sheet-grid--related { grid-template-columns: 1fr; }
}

/* people */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 30px; margin-top: 26px; }
.people-grid--lead { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.person-photo img, .person-void { width: 100%; height: 300px; object-fit: cover; object-position: top; }
.person-bio { padding: 16px; display: grid; gap: 10px; }
/* photo-less staff: hatched void + initials stamped like a title-block cell */
.person-void { display: grid; place-items: center; }
.person-monogram {
  font-family: var(--mono); font-size: 1.6rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--pen);
  border: var(--line-rule) solid var(--pen);
  padding: 12px 12px 12px calc(12px + 0.22em);
  background: var(--paper);
}

/* forms */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
/* PAPER ARTEFACT: the enquiry/payment form is a sheet on the night desk —
   ink text within, and its submit button flips DARK so it doesn't vanish on
   the paper (the global .btn is a paper chip tuned for the night ground). */
.office-form { display: grid; gap: 22px; border: var(--line-rule) solid var(--ink);
  padding: 34px; background: var(--paper); color: var(--ink);
  box-shadow: var(--paper-shadow); height: fit-content; }
.office-form .btn { background: var(--ink); color: var(--paper); border-color: var(--orange); }
.office-form .btn:hover { background: transparent; color: var(--ink); }
.office-form--narrow { max-width: 460px; }
.field { display: grid; gap: 8px; }
.field input, .field textarea {
  font-family: var(--mono); font-size: 0.95rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: var(--line-rule) solid var(--ink-soft);
  padding: 8px 2px; outline: none;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--pen); }
/* Keyboard focus needs a cue independent of the border colour: an invalid
   field is already orange-bordered, so a hue change alone would make the
   focused-and-invalid state indistinguishable. Give it a real outline. */
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--light-orange); outline-offset: 2px;
}
.hp-field { position: absolute; left: -9999px; }
.contact-card { display: grid; gap: 18px; align-content: start; }
/* 404 decorative box sits on the night ground — light edge + light hatch */
.err-void { width: min(420px, 80vw); height: 120px; border: var(--line-rule) solid var(--night-edge); }
.err-void.hatch {
  background-image: repeating-linear-gradient(45deg,
    rgba(138, 185, 214, 0.22) 0 1px, transparent 1px 7px);
}
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }

/* field-level validation errors */
.field-error {
  display: block; margin-top: 2px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink);
  border-left: 3px solid var(--pen); padding-left: 8px;
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-bottom-color: var(--pen);
}

/* enquiry form as a title-block sheet (spec 2026-07-14): the fields are the
   bordered cells of a drawing title block — same idiom as .title-block on the
   project sheets. Layout only; the .field semantics are unchanged. */
.office-form--tb { padding: 0; gap: 0; grid-template-columns: repeat(3, 1fr); }
.office-form--tb .field {
  padding: 14px 16px 16px;
  border-bottom: var(--line-hair) solid rgba(51, 81, 119, 0.35);
}
.office-form--tb .field--email, .office-form--tb .field--phone {
  border-left: var(--line-hair) solid rgba(51, 81, 119, 0.35);
}
.office-form--tb .field--message { grid-column: 1 / -1; }
.office-form--tb .form-note {
  grid-column: 1 / span 2; align-self: center; padding: 12px 16px;
  font-size: 0.68rem; color: var(--ink-soft); max-width: none;
}
.office-form--tb .btn {
  grid-column: 3; margin: 6px; padding: 14px 18px; justify-self: stretch;
}
/* Collapse to one column at 760px — the same breakpoint where .contact-layout
   stacks — so the 3-column title-block form never gets squeezed into the narrow
   1.4fr sub-column in the tablet range (561–760px). */
@media (max-width: 760px) {
  .office-form--tb { grid-template-columns: 1fr; }
  .office-form--tb .field--email, .office-form--tb .field--phone { border-left: 0; }
  .office-form--tb .field--message, .office-form--tb .form-note,
  .office-form--tb .btn { grid-column: auto; }
}

/* contact map — a real Google embed, graded like a print. The embed is visual
   only (aria-hidden, no pointer events); a full-figure link on top opens the
   real Maps app. Grade studies live on /lab/map — the contact figure wears
   the chosen .map-grade--* class. */
/* the map is its own full-width sheet — the location plan of the drawing set */
.site-location { margin-top: 72px; display: grid; gap: 22px; justify-items: start; }
.map-sheet { position: relative; margin: 0; width: 100%;
  border: var(--line-hair) solid var(--night-edge); background: var(--paper);
  padding: 6px; box-shadow: var(--paper-shadow); }
.map-sheet iframe { display: block; width: 100%; height: clamp(320px, 42vw, 480px); border: 0; }
/* the live JS map (key set): night cartography needs a night mount */
.map-sheet--live { background: var(--night); }
.map-canvas { width: 100%; height: clamp(360px, 46vw, 560px); background: var(--night); }
/* the on-map leader label (map.js OverlayView) — night chip, red-pen rule;
   clickable: opens the Google Business listing like the boundary does */
.map-leader { position: absolute; transform: translate(8px, -50%);
  white-space: nowrap; pointer-events: auto; cursor: pointer;
  background: var(--night); color: var(--paper); padding: 5px 10px;
  border-left: var(--line-rule) solid var(--pen); }
/* phone: the anchor sits east of centre, so extending rightward pushed the
   label off screen — float it above the anchor instead */
@media (max-width: 700px) {
  .map-leader { transform: translate(-70%, calc(-100% - 8px)); }
}
.map-leader:hover { border-left-color: var(--light-orange); }
/* the site card (map.js OverlayView): click the boundary/leader and the
   familiar place card pops up — paper sheet, Directions + listing actions */
.map-card { position: absolute; transform: translate(-50%, -112%);
  width: max-content; max-width: 260px; display: grid; gap: 6px;
  background: var(--paper); color: var(--ink); padding: 14px 16px 14px;
  border: var(--line-rule) solid var(--ink); box-shadow: var(--paper-shadow); }
.map-card b { font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; padding-right: 18px; }
.map-card-head { display: flex; align-items: center; gap: 9px; }
.map-card-glyph { width: 22px; flex: none; }
.map-card-glyph .emblem { display: block; width: 100%; height: auto; }
.map-card-tel { font-family: var(--mono); font-size: 0.74rem; color: var(--ink);
  width: fit-content; border-bottom: var(--line-rule) solid var(--light-orange);
  padding-bottom: 1px; }
.map-card > span { font-family: var(--mono); font-size: 0.7rem; color: var(--grey); }
.map-card-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.map-card-btn { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 8px 12px; background: var(--ink);
  color: var(--paper); border: var(--line-rule) solid var(--orange); }
.map-card-btn:hover { background: transparent; color: var(--ink); }
.map-card-btn--ghost { background: transparent; color: var(--ink);
  border-color: var(--ink); }
.map-card-btn--ghost:hover { border-color: var(--orange); }
.map-card-close { position: absolute; top: 4px; right: 6px; border: 0;
  background: transparent; cursor: pointer; color: var(--grey);
  font-size: 1.1rem; line-height: 1; padding: 4px; }
.map-card-close:hover { color: var(--pen); }
.map-leader span { display: block; }
.map-leader span:first-child { font-size: 0.62rem; opacity: 0.75; }
/* drafting furniture: north arrow in the sheet corner */
.map-north { position: absolute; top: 18px; right: 18px; z-index: 2;
  pointer-events: none; display: flex; flex-direction: column;
  align-items: center; gap: 3px; color: var(--light-blue);
  font-family: var(--mono); font-size: 0.85rem; }
.map-north svg { width: 36px; height: auto; }
@media (max-width: 620px) {
  .map-canvas { height: clamp(320px, 70vw, 420px); }
}
.map-open { position: absolute; inset: 0; z-index: 3; }
.map-open:focus-visible { outline: 2px solid var(--pen); outline-offset: -2px; }
.map-open-label { position: absolute; right: 14px; bottom: 14px;
  color: var(--paper); background: var(--night); padding: 4px 8px;
  border-left: var(--line-rule) solid var(--pen); }
.map-anno { position: absolute; top: 14px; left: 14px; z-index: 4; pointer-events: none;
  color: var(--paper); background: var(--night); padding: 4px 8px;
  border-left: var(--line-rule) solid var(--pen); }

/* the grades (studies on /lab/map; shared classes so promotion is one edit) */
.map-grade--muted iframe { filter: saturate(0.35) contrast(1.06); }
.map-grade--grey iframe { filter: grayscale(1) contrast(1.08) brightness(1.03); }
.map-grade--cyan iframe { filter: grayscale(1) sepia(1) hue-rotate(175deg) saturate(2.2) brightness(0.95); }
.map-grade--sepia iframe { filter: sepia(0.5) saturate(0.55) contrast(1.03); }
.map-grade--negative iframe { filter: invert(0.89) hue-rotate(180deg) saturate(0.55) contrast(0.92); }
.map-grade--navywash iframe { filter: saturate(0.4); }
.map-grade--navywash .lab-map-frame::after, .map-sheet.map-grade--navywash::after {
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(to right, rgba(138, 185, 214, 0.16) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(to bottom, rgba(138, 185, 214, 0.16) 0 1px, transparent 1px 40px),
    rgba(51, 81, 119, 0.18);
}
.map-sheet.map-grade--navywash::after { inset: 6px; }
.map-grade--navywash .lab-map-frame::after { inset: 6px; }

/* the pen marker — FCE's own annotation over the graded map: an orange square
   on the office with a leader to a small paper label (the only orange on a
   grey grade). Decorative; positioned at the embed's centre = the pin. */
.map-pen { position: absolute; left: 50%; top: 50%; z-index: 2;
  transform: translate(-5px, -5px); display: flex; align-items: center;
  pointer-events: none; }
.map-pen i { flex: none; width: 10px; height: 10px; background: var(--pen); }
.map-pen b { position: relative; margin-left: 30px; padding: 2px 7px;
  background: var(--paper); color: var(--ink); font-weight: 500; }
.map-pen b::before { content: ''; position: absolute; right: 100%; top: 50%;
  width: 30px; border-top: 1.5px solid var(--pen); }

/* ---------- faq ---------- */
.faq-group + .faq-group { margin-top: 56px; }
.faq-group .dim { margin-bottom: 6px; }
/* each Q&A is a PAPER artefact — a small answer sheet on the night desk */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--paper); color: var(--ink);
  border: var(--line-hair) solid var(--ink);
  box-shadow: var(--paper-shadow);
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.05rem; font-weight: 600; flex: 1; }
.faq-marker {
  flex: none; position: relative; width: 16px; height: 16px;
}
.faq-marker::before, .faq-marker::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  background: var(--pen); transform: translate(-50%, -50%);
}
.faq-marker::before { width: 14px; height: var(--line-rule); }
.faq-marker::after { width: var(--line-rule); height: 14px; transition: transform .2s var(--ease); }
.faq-item[open] .faq-marker::after { transform: translate(-50%, -50%) scaleY(0); }
.faq-answer { position: relative; max-width: var(--measure); padding: 0 22px 24px; display: grid; gap: 14px; color: var(--grey); }
.faq-answer p:first-child { margin-top: 0; }
.rfi-no { flex: none; color: var(--ink-soft); }
.faq-answer ul { display: grid; gap: 6px; padding-left: 20px; }
.faq-stamp { position: absolute; top: -8px; right: 22px; color: var(--pen);
  border: var(--line-rule) solid var(--pen); padding: 3px 9px;
  text-transform: uppercase; letter-spacing: 0.14em;
  transform: rotate(-4deg); opacity: 0; }
.faq-item[open] .faq-stamp { opacity: 1; transition: opacity .25s var(--ease) .1s; }
@media (prefers-reduced-motion: reduce) { .faq-item[open] .faq-stamp { transition: none; } }

/* ---------- service icon (detail-sheet annotation) ---------- */
/* the icon frame sits on the night detail-main — light edge + light hatch */
.service-icon {
  width: 84px; height: 84px; padding: 12px; border: var(--line-rule) solid var(--night-edge);
  display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
}
.service-icon.hatch {
  background-image: repeating-linear-gradient(45deg,
    rgba(138, 185, 214, 0.22) 0 1px, transparent 1px 7px);
}
.service-icon img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- how we work (revision strip) ---------- */
.howwework { padding-top: 56px; display: grid; gap: 28px; }
.rev-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.rev-step {
  position: relative; padding: 0 26px; display: grid; gap: 10px; align-content: start;
}
.rev-step:first-child { padding-left: 0; }
.rev-step:last-child { padding-right: 0; }
.rev-step + .rev-step::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  border-left: var(--line-hair) solid var(--night-line);
}
.rev-tag { color: var(--light-blue); }
.rev-letter { color: var(--paper); font-weight: 700; border-bottom: 2px solid var(--pen); }
.rev-step p { color: var(--extra-light-blue); }
@media (max-width: 860px) {
  .rev-steps { grid-template-columns: 1fr; gap: 28px; }
  .rev-step { padding: 0 0 0 22px; }
  .rev-step:first-child { padding-left: 22px; }
  .rev-step + .rev-step::before {
    left: 0; top: 0; bottom: 0; border-left: var(--line-rule) solid var(--pen);
  }
}

/* ---------- CTA band (shared) ---------- */
.cta-band { padding: 56px clamp(20px, 6vw, 96px); }
.cta-band-inner {
  max-width: 1160px; margin: 0 auto; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 24px 40px;
}
.cta-band-line { font-family: var(--head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 700; color: var(--paper); max-width: none; }
.cta-band-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.cta-band-phone { color: var(--paper); }
.cta-band-phone:hover { color: var(--light-orange); }
@media (max-width: 640px) {
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
  .cta-band-actions { width: 100%; justify-content: space-between; }
}

/* ---------- dev look experiments (?look=) — remove before launch ---------- */
/* photo: duotone hero wash — the built work as atmosphere behind the sheet */
.chapter--hero { position: relative; }
.chapter--hero .chapter-inner { position: relative; z-index: 1; }
.hero-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05); opacity: 0.30;
}
.hero-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    var(--paper) 8%, rgba(250, 249, 247, 0.72) 46%, rgba(36, 58, 85, 0.28) 100%);
}
@media (max-width: 760px) {
  .hero-photo img { opacity: 0.22; }
  .hero-photo::after { background: linear-gradient(180deg,
    var(--paper) 12%, rgba(250, 249, 247, 0.7) 55%, rgba(36, 58, 85, 0.3) 100%); }
}

/* journey: drawn -> designed -> built triptych */
.look-journey .story { height: 780vh; }
@media (max-width: 760px) { .look-journey .story { height: 660vh; } }
.chapter-inner--wide { max-width: 1080px; }
.journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
.journey-panel { display: grid; gap: 12px; position: relative; }
.journey-panel img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: var(--line-rule) solid var(--ink); background: #fff;
}
.journey-panel:first-child img { object-fit: contain; padding: 6px; }
.journey-panel + .journey-panel::before {
  content: ''; position: absolute; top: 38%; left: -26px; width: 26px;
  border-top: var(--line-hair) solid var(--pen);
}
.journey-panel figcaption { color: var(--ink); }
@media (max-width: 760px) {
  .journey { grid-template-columns: 1fr; gap: 30px; }
  .journey-panel + .journey-panel::before {
    top: -16px; left: 24px; width: 0; height: 16px;
    border-top: 0; border-left: var(--line-hair) solid var(--pen);
  }
}

/* the switcher bar itself */
/* dev switcher — a small lit panel on the night desk */
.looks-bar {
  position: fixed; left: 14px; bottom: 14px; z-index: 1500;
  display: flex; gap: 14px; align-items: center;
  background: var(--night-2); border: var(--line-rule) solid var(--night-edge);
  padding: 8px 14px; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.looks-bar span { color: var(--light-blue); opacity: 0.7; }
.looks-bar a { color: var(--extra-light-blue); }
.looks-bar a:hover { color: var(--paper); }
.looks-bar a.active { color: var(--paper); border-bottom: 2px solid var(--pen); }

/* ---------- pinned scrollytelling look (?look=pinned) ---------- */
/* The emblem assembles AT its final-lockup position from the first pixel:
   the canvas keeps its default centred layout and the engine holds the
   identity transform, so the mark builds exactly where the finished FUREY
   lockup will stand — the wordmark simply joins it at the end. Content
   chapters crossfade in place; the scale rule reads out progress.
   Desktop only — mobile keeps the gap-staged flow. */
.look-pinned .story { height: 560vh; }
@media (min-width: 761px) {
  html.story-live .look-pinned .chapter--resolve {
    align-items: flex-end; padding-bottom: 9vh;   /* sit clear of the lockup */
  }
  html.story-live .look-pinned .chapters {
    position: sticky; top: 0; height: 100vh; margin-top: -100vh; z-index: 1;
  }
  html.story-live .look-pinned .chapter {
    position: absolute; inset: 0; min-height: 0;
    display: flex; align-items: center; opacity: 0;
    will-change: opacity, transform;
  }
  html.story-live .look-pinned .chapter .chapter-inner {
    background: transparent; border: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .look-pinned .scale-rule {
    position: absolute; left: clamp(16px, 3vw, 40px); top: 16vh; bottom: 16vh;
    border-left: var(--line-hair) solid var(--ink-soft); opacity: 0.55;
  }
  .look-pinned .scale-rule .scale-tick {
    position: absolute; left: -5px; top: calc(var(--p, 0) * 100%);
    width: 10px; border-top: var(--line-rule) solid var(--pen);
  }
  /* night finale flips the rule + late chapter text to paper via existing
     .story--night rules; the rule line inherits currentColor treatments */
  .story--night.look-pinned .scale-rule,
  .look-pinned .story--night .scale-rule { border-left-color: var(--light-blue); }
}

/* ---------- discipline blocks (services) ----------
   Five stylised CSS-3D buildings (transform-style: preserve-3d, faces via
   rotateX/Y), one per family, each keyed to its engineering discipline.
   Fixed dimetric camera (rotateX/rotateZ on .db-block). The blocks no longer
   live in a "choose a discipline" intro row — each is now the section figure
   of its family sheet (.svc-cube in templates/services.html). .discipline-blocks
   is retained as the wrapper class on the sheets container, carrying the --db-*
   tokens that cascade into every cube. Derived shades mirror the file's rgba()
   tokens. */
.discipline-blocks {
  --db-s: 108px;                                  /* cube edge — the section figure */
  --db-half: calc(var(--db-s) / 2);
  --db-rise: 0px;                                 /* per-block ground-plane offset (unused now) */
  /* NIGHT restyle: the cubes are lit navy volumes on the night ground, mirroring
     the homepage F-model. Three derived navy values give clear top>front>side
     value ordering so the blocks read as solids on #0d1826; edges/hatches switch
     to light-blue ink so they don't vanish. */
  --db-roof: #35527a;                             /* lit roof face — brightest lifted navy */
  --db-wall: #22364e;                             /* solid wall face — mid navy */
  --db-wall-dk: #16273b;                          /* shadowed wall face — == --hn-roof */
  --db-mem: var(--orange);                        /* structural steel members */
  --db-edge: var(--night-edge);                   /* light hairline on faces (was ink) */
  --db-mem-ink: rgba(138, 185, 214, 0.30);        /* faint light frame ink */
  --db-earth: rgba(138, 185, 214, 0.16);          /* strata / groundworks hatch (light) */
  --db-water: rgba(58, 121, 195, 0.30);           /* translucent flood plane */
  --db-water-edge: rgba(138, 185, 214, 0.5);
}

/* the section figure — a flat stage holding one cube; the stage must NOT be
   transformed itself (a transform here would flatten the cube's 3D). */
.svc-cube { display: block; }
.db-stage {
  display: block; width: var(--db-s); height: calc(var(--db-s) + 44px);
  position: relative;
}

/* the cuboid — dimetric camera baked in. */
.db-block {
  position: absolute; left: 50%; top: 50%;
  width: var(--db-s); height: var(--db-s); margin: calc(var(--db-half) * -1);
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-45deg) translateZ(var(--db-rise));
}

/* faces — centred-cube recipe (mirrors static/css/looks/v3.css) */
.db-face {
  position: absolute; inset: 0; width: var(--db-s); height: var(--db-s);
  background: var(--db-wall); border: var(--line-hair) solid var(--db-edge);
}
.db-face--top   { background: var(--db-roof); transform: rotateX(90deg) translateZ(var(--db-half)); }
.db-face--front { transform: translateZ(var(--db-half)); }
.db-face--back  { background: var(--db-wall-dk); transform: rotateY(180deg) translateZ(var(--db-half)); }
.db-face--right { background: var(--db-wall-dk); transform: rotateY(90deg)  translateZ(var(--db-half)); }
.db-face--left  { transform: rotateY(-90deg) translateZ(var(--db-half)); }

/* ---- 01 · STRUCTURAL — skeletal steel frame (open, no solid walls) ----
   orange columns + beams on faint ink hairlines, plus a diagonal
   cross-brace baked into two visible faces. Translucent fills let the
   back of the frame read through = "the bones of a building". */
.block--structural .db-face--front,
.block--structural .db-face--back,
.block--structural .db-face--left,
.block--structural .db-face--right {
  background:
    /* diagonal cross-brace */
    linear-gradient(to top right, transparent calc(50% - 1.5px), var(--db-mem) calc(50% - 1.5px), var(--db-mem) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    /* columns (orange verticals) */
    repeating-linear-gradient(90deg, var(--db-mem) 0 2px, transparent 2px calc(100% / 3)),
    /* beams (orange horizontals) */
    repeating-linear-gradient(0deg, var(--db-mem) 0 2px, transparent 2px calc(100% / 3)),
    rgba(250, 249, 247, 0.06);
  border-color: var(--db-mem-ink);
}
.block--structural .db-face--top {
  background:
    repeating-linear-gradient(90deg, var(--db-mem-ink) 0 1px, transparent 1px calc(100% / 3)),
    repeating-linear-gradient(0deg, var(--db-mem-ink) 0 1px, transparent 1px calc(100% / 3)),
    rgba(58, 121, 195, 0.16);
}

/* ---- 02 · CIVIL — solid block on groundworks ----
   ::after = hatched earth/strata plinth (reuses the 45° hatch language);
   ::before = a road strip with a dashed centreline running past the base. */
.block--civil .db-block::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 176%; height: 176%;
  transform: translate(-50%, -50%) translateZ(calc(var(--db-half) * -1));
  background:
    repeating-linear-gradient(45deg, var(--db-earth) 0 1px, transparent 1px 7px),
    rgba(138, 185, 214, 0.05);
  border: var(--line-hair) solid var(--db-edge);
}
.block--civil .db-block::before {
  content: ''; position: absolute; left: -70%; top: 50%; width: 240%; height: 30%;
  transform: translateY(-50%) translateZ(calc(var(--db-half) * -1 + 1px));
  background:
    repeating-linear-gradient(90deg, var(--paper) 0 12px, transparent 12px 24px) center / 100% 2px no-repeat,
    var(--db-wall);
}

/* ---- 03 · PLANNING — the block sits inside a site red-line, north-arrowed ----
   ::before on the block = a dashed orange planning red-line boundary drawn on
   the ground plane around the footprint; the stage's own pseudos carry a crisp,
   screen-space north arrow (shaft + head) and its "N" at the top corner. */
.block--planning .db-block::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 208%; height: 208%;
  transform: translate(-50%, -50%) translateZ(calc(var(--db-half) * -1));
  border: 2px dashed var(--orange);
  background: rgba(235, 93, 64, 0.045);
}
.block--planning .db-stage::after {              /* north arrow — shaft + head */
  content: ''; position: absolute; top: 4px; right: 14px;
  width: 12px; height: 22px; background: var(--orange);
  clip-path: polygon(50% 0, 100% 34%, 62% 34%, 62% 100%, 38% 100%, 38% 34%, 0 34%);
}
.block--planning .db-stage::before {             /* the "N" beside the arrow */
  content: 'N'; position: absolute; top: 3px; right: 28px;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  line-height: 1; color: var(--orange);
}

/* ---- 04 · COMPLIANCE — an inspection stamp on the front face ----
   front-face ::before = a small orange stamp panel with a title-block header
   rule (mini title-block vibe); ::after = a bold, drawing-style check/tick
   drawn as two straight strokes meeting via clip-path. Architectural, not
   office clipart. */
.block--compliance .db-face--front { background: var(--db-wall); }
.block--compliance .db-face--front::before {
  content: ''; position: absolute; right: 11%; bottom: 12%; width: 44%; height: 36%;
  background:
    linear-gradient(var(--orange), var(--orange)) left 32% / 100% 1.5px no-repeat,
    rgba(235, 93, 64, 0.13);
  border: 1.5px solid var(--orange);
}
.block--compliance .db-face--front::after {
  content: ''; position: absolute; right: 20%; bottom: 16%; width: 24%; height: 22%;
  background: var(--orange);
  clip-path: polygon(10% 50%, 0 64%, 40% 100%, 100% 24%, 86% 12%, 38% 74%);
}

/* ---- 05 · ASSESSMENTS — a cutaway: one vertical slice removed ----
   the front face is split: the left cut plane carries the site's 45° section
   hatch (section convention = "we look inside"), the right band is the recessed
   void where the slice was taken out, revealing the inner wall behind. */
.block--assessments .db-face--front { background: var(--db-wall); }
.block--assessments .db-face--front::before {    /* cut plane with section hatch */
  content: ''; position: absolute; inset: 0 38% 0 0;
  background:
    repeating-linear-gradient(45deg, rgba(235, 93, 64, 0.75) 0 1.5px, transparent 1.5px 8px),
    var(--db-roof);
  border-right: 1.5px solid var(--orange);
}
.block--assessments .db-face--front::after {     /* the removed slice — recessed void */
  content: ''; position: absolute; inset: 0 0 0 62%;
  background: var(--db-wall-dk);
  box-shadow: inset 2px 0 0 -1px rgba(138, 185, 214, 0.45);
}

/* ---- responsive: the cube figure shrinks as the sheet column narrows ---- */
@media (max-width: 1100px) {
  .discipline-blocks { --db-s: 92px; }
}
@media (max-width: 520px) {
  .discipline-blocks { --db-s: 78px; }
}

/* ---------- emblem-glyph wayfinding ---------- */
/* 404: the mark with a block missing */
.err-glyph { width: 96px; height: auto; margin: 10px 0 6px; }
.err-glyph rect { fill: var(--orange); }
.err-glyph rect.is-missing {
  fill: none; stroke: var(--light-blue); stroke-width: 2.5;
  stroke-dasharray: 7 6; opacity: 0.8;
}

/* project prev/next: the mark rotated becomes the arrow */
.sheet-nav {
  display: flex; justify-content: space-between; gap: 24px;
  margin-top: 64px; padding-top: 28px;
  border-top: var(--line-hair) solid rgba(138, 185, 214, 0.3);
}
.sheet-nav-link { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sheet-nav-glyph { width: 30px; height: auto; flex-shrink: 0;
  color: rgba(138, 185, 214, 0.55); transition: color .2s var(--ease), transform .25s var(--ease); }
.sheet-nav-link:hover .sheet-nav-glyph,
.sheet-nav-link:focus-visible .sheet-nav-glyph { color: var(--orange); }
.sheet-nav-link:hover .sheet-nav-glyph--prev { transform: translateX(-4px); }
.sheet-nav-link:hover .sheet-nav-glyph--next { transform: translateX(4px); }
.sheet-nav-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-nav-meta b { color: var(--light-blue); }
.sheet-nav-meta span:last-child {
  font-family: var(--head); font-weight: 700; color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-nav-link--next { text-align: right; }
.sheet-nav-link--next .sheet-nav-meta { align-items: flex-end; }

/* ---------- gallery lightbox ---------- */
.lightbox { border: var(--line-rule) solid var(--night-edge); background: var(--night);
  padding: 16px; max-width: min(92vw, 1100px); }
.lightbox::backdrop { background: rgba(26, 45, 66, 0.85); }
.lightbox img { display: block; max-width: 100%; max-height: 76vh; }
.lightbox figcaption { color: var(--paper); margin-top: 10px; }
.lb-btn { position: absolute; background: var(--night); border: var(--line-rule) solid var(--night-edge);
  color: var(--paper); cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; }
.lb-btn:hover { border-color: var(--pen); color: var(--pen); }
.lb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.lb-close { top: 10px; right: 10px; font-size: 1.2rem; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-fade .18s var(--ease); }
  @keyframes lb-fade { from { opacity: 0; } }
}
