/* Direction 8: Drawing sheet.
   Loaded after site-soft.css + palette-refined.css.
   - Heron's drafting language: sheet frame, ruler ticks, crosshairs, mono
     annotations, pinned callouts, a title block, nav as drawing cells.
   - Material layout grid: 4/8/12 columns, 16/32/200 margins, 840/1040 bodies.
   - Material colour: primary (espresso) on nav/bars, secondary (apricot) on the
     one primary action and selection, orange only as signal lines and pins,
     no bright colour on body text, error red outside the brand.
   - Material shape scheme (below), one unique shape for the primary action.
   - Material peer transition on the chapter tabs; off under reduced motion. */

/* ---------- Layout grid (Material M2 breakpoint system) ---------- */
:root { --margin: 16px; --gutter: 16px; --cols: 4; }
@media (min-width: 600px) { :root { --margin: 32px; --gutter: 24px; --cols: 8; } }
@media (min-width: 905px) { :root { --cols: 12; } }
.wrap { width: auto; max-width: none; margin-inline: auto; padding-inline: var(--margin); }
@media (min-width: 905px) and (max-width: 1239px) { .wrap { max-width: 840px; padding-inline: 0; } }
@media (min-width: 1240px) and (max-width: 1439px) { .wrap { padding-inline: 200px; } }
@media (min-width: 1440px) { .wrap { max-width: 1040px; padding-inline: 0; } }
.grid12 { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); }

/* Column guides: faint in open areas (behind panels), full overlay on toggle */
.guides { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.guides-inner { height: 100%; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); }
.guides-inner span { border-inline: 1px solid rgba(108, 52, 40, 0.07); }
.guides-inner span:nth-child(n + 5) { display: none; }
@media (min-width: 600px) { .guides-inner span:nth-child(-n + 8) { display: block; } }
@media (min-width: 905px) { .guides-inner span:nth-child(n) { display: block; } }
.show-grid .guides { z-index: 60; }
.show-grid .guides-inner span { background: rgba(224, 123, 57, 0.12); border-color: rgba(224, 123, 57, 0.5); }
body > :not(.guides):not(.skip):not(.thumb-bar) { position: relative; z-index: 1; }
.grid-toggle { margin-left: 0.5rem; font: inherit; font-size: 0.8125rem; color: #f3f2f1; background: transparent; border: 1px solid #f3f2f1; border-radius: 999px; padding: 0.15rem 0.7rem; cursor: pointer; }

/* ---------- Shape scheme (Material shape categories) ---------- */
:root {
  --shape-small: 999px;   /* chips, tags, buttons, nav pills: the rope */
  --shape-medium: 8px;    /* cards, board, panels: absolute size, content-height safe */
  --shape-large: 0;       /* sheets and full-width sections: square, with crosshairs */
  --radius: var(--shape-medium);
  --radius-lg: var(--shape-medium);
}
.board, .metric, .quote, .contact-aside, .people-list li, .accred-list li, .job-card, .site-photo img { border-radius: var(--shape-medium); }

/* ---------- Header: drawing cells ---------- */
.site-header { padding-block: 0; border-bottom: 1px solid var(--rule); background: var(--bg); }
.header-row { min-height: 64px; gap: 0; align-items: stretch; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; padding-block: 0.75rem; letter-spacing: -0.02em; }
.wordmark span { background: none; padding: 0; }
.knot { width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--ink); stroke-width: 2; }
.menu-toggle { align-self: center; }
@media (min-width: 56em) {
  .site-nav { margin-left: auto; align-self: stretch; }
  .site-nav ul { display: flex; gap: 0; height: 100%; }
  .site-nav li { display: flex; }
  .site-nav a {
    position: relative; min-width: 7.5rem; height: 100%; padding: 0.65rem 1rem 1.4rem; align-items: flex-start;
    border-radius: 0; background: none; border-left: 1px solid var(--rule);
    font: 500 0.8125rem/1 var(--font-data); text-transform: uppercase; letter-spacing: 0.02em;
  }
  .site-nav a::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 6px; height: 6px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .site-nav a:hover { background: var(--surface); color: var(--ink); }
  .site-nav a[aria-current="page"] { background: var(--nav-current); color: var(--on-nav-current); }
  .site-nav a[aria-current="page"]::after { border-color: var(--on-nav-current); }
  .nav-cta a { background: var(--accent); color: var(--on-accent); }
  .nav-cta a:hover { background: var(--accent); text-decoration: underline; }
}

/* ---------- The sheet ---------- */
.sheet { position: relative; margin-top: 1.5rem; border: 1px solid var(--rule); border-radius: var(--shape-large); background: var(--bg); }
.sheet::before, .sheet::after { content: "+"; position: absolute; font: 400 1rem/1 var(--font-data); color: var(--ink); }
.sheet::before { top: -0.55rem; left: -0.35rem; }
.sheet::after { top: -0.55rem; right: -0.35rem; }
.ruler {
  height: 14px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 80px) left bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 8px) left bottom / 100% 6px no-repeat;
}
.ruler + .title-block, .drawing + .ruler { border-top: 1px solid var(--rule); }
.ruler:first-child { border-bottom: 1px solid var(--rule); transform: scaleY(-1); }

.drawing { position: relative; margin: 0; }
.drawing-frame { position: relative; }
.drawing-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(0.85) contrast(1.02); }
.dims { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--bar); stroke-width: 2; vector-effect: non-scaling-stroke; }
.dims path { vector-effect: non-scaling-stroke; }
.dim-label { position: absolute; font-size: 0.75rem; background: var(--bg); color: var(--ink); padding: 0.2rem 0.45rem; border: 1px solid var(--bar); border-radius: var(--shape-small); }
.dim-h { left: 50%; top: 86%; transform: translate(-50%, -50%); }
.dim-v { left: 4%; top: 67%; transform: translate(-50%, -50%) rotate(-90deg); }

/* Pins: Heron-style callouts. On phones the labels move into a legend list. */
.pins { list-style: none; margin: 0; padding: 0; }
.pin { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; gap: 0.5rem; transform: translate(-0.7rem, -50%); }
.pin-n { flex: none; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 600 0.75rem/1 var(--font-data); outline: 2px solid var(--ink); }
/* FINDING-003: labels are text, so apricot (espresso on it 6.1:1), not orange (3.27:1) */
.pin-label { background: var(--board); color: var(--on-board); font: 400 0.75rem/1.3 var(--font-data); padding: 0.4rem 0.55rem; border-radius: 4px; max-width: 14rem; }
.pin-label b { display: block; font-weight: 500; color: var(--on-board-muted); }
.pin:nth-child(2) { flex-direction: row-reverse; transform: translate(calc(-100% + 0.7rem), -50%); }
.pin:nth-child(3) { flex-direction: row-reverse; transform: translate(calc(-100% + 0.7rem), -50%); }
.marker { display: none; }
@media (max-width: 47.99em) {
  /* Phone: letter markers stay on the photo; the callouts become a legend */
  .marker { display: grid; position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); }
  .pins { display: grid; gap: 0.5rem; padding: 0.75rem var(--margin); border-top: 1px solid var(--rule); }
  .pin, .pin:nth-child(n) { position: static; transform: none; flex-direction: row; align-items: flex-start; }
  .pin-label { background: none; color: var(--ink); padding: 0; max-width: none; font-size: 0.8125rem; }
  .pin-label b { color: var(--ink); display: inline; margin-right: 0.35rem; }
  .dim-label { display: none; }
}

/* Title block: the drawing's own title panel */
.title-block { display: grid; grid-template-columns: 1fr; }
.tb-cell { padding: 1rem var(--margin); border-top: 1px solid var(--rule); }
.tb-cell:first-child { border-top: 0; }
@media (min-width: 905px) {
  .title-block { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tb-cell { border-top: 0; border-left: 1px solid var(--rule); padding: 1.25rem; }
  .tb-title { grid-column: span 7; border-left: 0; }
  .tb-meta { grid-column: span 5; }
  .title-block .tb-cta { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); flex-direction: row; align-items: center; justify-content: space-between; }
  .title-block .tb-cta p { max-width: 48ch; }
  .title-block .tb-cta .cta-tag { align-self: center; white-space: nowrap; }
}
.crumbs-plain { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.75rem; }
.crumbs-plain a { color: var(--muted); }
.tb-title h1 { margin: 0; font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase; font-variation-settings: "opsz" 96, "wdth" 75; }
.tb-meta { margin: 0; font-size: 0.8125rem; }
.tb-meta div { display: grid; grid-template-columns: 5.5rem 1fr; padding-block: 0.25rem; border-bottom: 1px dashed var(--rule); }
.tb-meta dt { color: var(--muted); text-transform: uppercase; }
.tb-meta dd { margin: 0; }
.tb-cta { display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }
.tb-cta p { margin: 0; font-size: 0.9375rem; }

/* The unique shape: the primary action is an asymmetric tag (Material:
   "a unique shape stands out"), everything else small is a symmetric pill. */
.cta-tag {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px;
  padding: 0.6rem 1.1rem 0.6rem 1.25rem; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--on-accent);
  border-radius: 999px 6px 6px 999px; box-shadow: 4px 4px 0 var(--ink);
}
.cta-tag:hover { color: var(--on-accent); box-shadow: 2px 2px 0 var(--ink); transform: translate(2px, 2px); }
.enquire .button { border-radius: 999px 6px 6px 999px; background: var(--accent); color: var(--on-accent); box-shadow: 4px 4px 0 var(--ink); }
.enquire .button:hover { background: var(--accent); color: var(--on-accent); box-shadow: 2px 2px 0 var(--ink); transform: translate(2px, 2px); }
.thumb-bar a + a { border-radius: 999px 6px 6px 999px; }

/* ---------- Intro, aligned to the 12-column grid ---------- */
@media (min-width: 905px) {
  .intro-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .intro-grid > :first-child { grid-column: span 5; }
  .intro-grid > .board { grid-column: span 7; }
  .enquire-grid { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; column-gap: var(--gutter); }
  .enquire-grid > .form-col { grid-column: span 8; }
  .enquire-grid > .contact-aside { grid-column: span 4; }
}
.jobs, .people-list, .accred-list { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gutter); }
.jobs > li, .accred-list > li { grid-column: span 4; }
.people-list > li { grid-column: span 4; }
@media (min-width: 905px) { .people-list > li { grid-column: span 6; } }

/* Sections at full width are "large": square. No crosshair here: the section
   is anchored to the screen edges, and Material keeps edge corners unshaped. */

/* ---------- Chapter tabs (peer transition) ---------- */
.chapters-tabs { padding-block: 3.5rem 1rem; }
.tablist { display: none; }
.js .tablist { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.5rem; }
.tablist [role="tab"] {
  min-height: 44px; padding: 0 1.1rem; font: 600 0.9375rem/1 var(--font-body); color: var(--ink);
  background: var(--card); border: 1px solid transparent; border-radius: var(--shape-small); cursor: pointer;
}
.tablist [role="tab"] .mono { color: var(--muted); margin-right: 0.3rem; }
.tablist [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tablist [role="tab"][aria-selected="true"] .mono { color: var(--on-accent); }
.tablist [role="tab"]:hover { border-color: var(--ink); }
.panels { position: relative; overflow: hidden; border-top: 1px solid var(--ink); }
.chapter-panel { display: grid; gap: 0.5rem var(--gutter); padding-top: 2rem; }
@media (min-width: 905px) {
  .chapter-panel { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .panel-h { grid-column: span 4; }
  .chapter-panel .ch-body { grid-column: span 8; }
}
.panel-h { margin: 0; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.012em; font-variation-settings: "opsz" 96, "wdth" 80; }
.no-js .chapter-panel + .chapter-panel { border-top: 1px solid var(--ink); margin-top: 2rem; }
.js .chapter-panel[data-inactive] { display: none; }
.js .chapter-panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .chapter-panel.from-right { animation: peer-in-right 260ms cubic-bezier(0.2, 0, 0, 1); }
  .chapter-panel.from-left { animation: peer-in-left 260ms cubic-bezier(0.2, 0, 0, 1); }
}
@keyframes peer-in-right { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes peer-in-left { from { transform: translateX(-48px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Top-level navigation between pages: fade through (Material), where the
   browser supports cross-document view transitions. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 90ms ease-in both fade-out; }
  ::view-transition-new(root) { animation: 210ms ease-out 90ms both fade-in; }
}
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

.nw { white-space: nowrap; }

/* Polish: heavy Bricolage at wdth 80 touched at -0.03em tracking */
.section-h, .enquire-title, .taped { letter-spacing: -0.012em; }

/* Polish: the big figure's tracking was also spacing the % away from the 8 */
.metric-big span { letter-spacing: 0; margin-left: -0.04em; }

/* Polish: keep file type and size together, e.g. "(PDF, 4.6 MB)" */
.file-meta { white-space: nowrap; }

/* Polish: balance taped card titles so no word is left alone on a line */
.taped-sm { text-wrap: balance; }

/* Polish: when cards stack on phones, the photo-less card sizes to its content */
@media (max-width: 599px) { .job-card-plain { aspect-ratio: auto; } }

/* Concept-site wordmark (the knot belongs to the studio, not the client) */
.wordmark .amp { color: var(--bar); }
.mock-banner a { color: #f3f2f1; }

/* FINDING-005: yellow focus is 1.03:1 against apricot, so every focus state
   keeps the black companion ring (the GOV.UK pattern in base.css). */
.enquire .button:focus-visible { background: var(--focus); color: #0b0c0c; outline: 3px solid var(--focus); outline-offset: 0; box-shadow: 0 0 0 6px #0b0c0c; transform: none; }
.job-card:focus-within, .card:focus-within { outline: 3px solid var(--focus); outline-offset: 0; box-shadow: 0 0 0 6px #0b0c0c; }

/* FINDING-006: the programme timeline follows Material's 905px breakpoint and
   sizes its columns as shares of the body, so the bars scale with the
   840/1040px body instead of getting what fixed rem columns leave over.
   Three columns: stage with its dates beneath (4), bar (6), note (4). */
@media (min-width: 905px) {
  .g-row, .g-scale { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 4fr); column-gap: var(--gutter); row-gap: 0.2rem; }
  .g-stage { grid-column: 1; grid-row: 1; }
  .g-when { grid-column: 1; grid-row: 2; text-align: left; padding-left: 2.2rem; }
  .g-bar { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .g-did { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .g-scale { display: grid; color: var(--muted); font-size: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--ink); }
  .g-scale span { grid-row: 1; grid-column: 2; justify-self: start; }
  .g-scale span:nth-child(2) { margin-left: calc(6 / 26 * 100%); }
  .g-scale span:nth-child(3) { margin-left: calc(18 / 26 * 100%); }
}

/* FINDING-007: no heading outranks the h1 (h1 tops out at 3.75rem) */
.enquire-title { font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.25rem); }
