/* Shared site chrome (header, menu, footer) and the content-page components. Builds on tokens.css, styles.css,
   landing.css and, on content pages, guides.css. See DESIGN.md. */

/* ---------- Header ---------- */
.site-header { display: block; }
.site-nav {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 24px; height: 100%;
}
.site-nav .mark { grid-column: 2; grid-row: 1; }
.nav-list { list-style: none; display: flex; align-items: center; column-gap: clamp(18px, 2.2vw, 30px); }
.nav-list-a { grid-column: 1; grid-row: 1; justify-self: start; }
.nav-list-b { grid-column: 3; grid-row: 1; justify-self: end; }
.site-nav .track-link[aria-current="page"] { color: var(--graphite); }
.site-nav .track-link[aria-current="page"]::before { transform: scaleX(1); }
.menu-toggle { display: none; }
.page-header { position: relative; }

/* Pinned copy on the homepage (styles for .bar itself are in landing.css). */
.bar { display: block; }
.bar .site-nav { height: 100%; }
.bar .mark { font-size: 19px; }

/* ---------- Compact menu ---------- */
.site-menu {
  position: absolute; z-index: 6; top: var(--nav-h); left: 0; right: 0;
  padding: 8px var(--pad-x) 24px; background: var(--panel); border-bottom: 1px solid var(--hairline);
}
.bar + .site-menu { position: fixed; top: 56px; }
.site-menu[hidden] { display: none; }
.site-menu-list { list-style: none; border-bottom: 1px solid var(--hairline); }
.site-menu-list li + li { border-top: 1px solid var(--hairline); }
.site-menu-list a {
  display: flex; align-items: center; min-height: 52px; font-family: var(--serif); font-size: 22px; line-height: 1.2;
  color: var(--graphite); text-decoration: none;
}
.site-menu-list a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 5px; }
.site-menu-list a:focus-visible { outline-offset: 2px; }
.site-menu-email { margin-top: 16px; font-size: 14px; color: var(--graphite-dim); }
.site-menu-email a { display: inline-flex; align-items: center; min-height: 44px; color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }

@media (max-width: 899px) {
  .site-nav { grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 10px; }
  .site-nav .mark { grid-column: 1; padding-left: 0; }
  .nav-list-a { display: none; }
  .nav-list-b { grid-column: 3; }
  .nav-list-b li:not(.nav-contact-item) { display: none; }
  .menu-toggle { display: inline-flex; grid-column: 4; grid-row: 1; justify-self: end; }
}
@media (min-width: 900px) {
  .site-menu { display: none !important; }
}

/* ---------- Footer ---------- */
.site-footer { display: block; margin-top: clamp(72px, 8vw, 120px); padding-top: 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 40px; }
.footer-contact p { font-size: 15px; line-height: 1.6; color: var(--graphite-dim); }
.footer-contact a, .footer-enquiry { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.footer-enquiry { font-size: inherit; line-height: inherit; padding: 0; }
.footer-enquiry:hover, .footer-contact a:hover { text-decoration-color: var(--graphite); }
.footer-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--hairline); }
.footer-head { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }
.footer-group ul { list-style: none; margin-top: 12px; }
.footer-group a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14.5px; line-height: 1.4; color: var(--graphite); text-decoration: none; }
.footer-group a:hover, .footer-group a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.site-footer .footer-note { margin-top: 32px; }

@media (max-width: 759px) {
  .footer-index { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
}

/* ---------- Content pages ---------- */
.content-page .guide-head { max-width: 920px; }
.lead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; margin-top: 28px; }
.lead-actions .race { margin-top: 0; }
.lead-note { margin-top: 12px; font-size: 13.5px; line-height: 1.6; color: var(--graphite-dim); }
.lead-note a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }

/* Illustrative example: one framed piece on the lifted surface, like the approval queue. */
.handover { max-width: 820px; margin: 0 0 8px; padding: 24px clamp(20px, 3vw, 32px) 20px; background: var(--panel); border: 1px solid var(--hairline); }
.guide-body .handover h2 { margin: 8px 0 14px; font-size: clamp(22px, 2.2vw, 28px); }
.handover-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }
.guide-body .handover dl, .handover dl { max-width: none; border-bottom: 1px solid var(--hairline); }
.handover dl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); column-gap: 24px; padding: 11px 0; border-top: 1px solid var(--hairline); }
.handover dt { font-size: 14px; font-weight: 500; color: var(--graphite); }
.handover dd { font-size: 14.5px; line-height: 1.6; color: var(--graphite-dim); }
.handover .handover-terms { margin-top: 20px; }
.handover .handover-terms dt { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); padding-top: 3px; }
.guide-body .handover p:not(.handover-label) { font-size: 14.5px; margin-top: 12px; }

/* Ruled rows: heading on the left, text on the right (services, work, pricing and about). */
.rows { list-style: none; border-bottom: 1px solid var(--hairline); }
.rows > li, .rows > .row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(28px, 5vw, 72px); padding: 26px 0 28px; border-top: 1px solid var(--hairline); align-items: baseline; }
.rows h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.2; letter-spacing: -0.005em; text-wrap: balance; }
.rows .row-text > p, .rows .row-text > ul { font-size: 15.5px; line-height: 1.65; color: var(--graphite-dim); max-width: 40em; }
.rows .row-text > * + * { margin-top: 12px; }
.rows .row-text ul { padding-left: 1.2em; }
.rows .row-text li + li { margin-top: 6px; }
.rows a:not(.track-link):not(.race) { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.rows .row-links { display: flex; flex-wrap: wrap; column-gap: 24px; }

/* Status and evidence for a piece of work. */
.status { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }
.proof dl, .future .row-text dl { margin-top: 4px; border-bottom: 1px solid var(--hairline); }
.proof dl > div, .future .row-text dl > div { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); column-gap: 20px; padding: 9px 0; border-top: 1px solid var(--hairline); }
.proof dt, .future .row-text dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); padding-top: 3px; }
.proof dd, .future .row-text dd { font-size: 15px; line-height: 1.6; color: var(--graphite-dim); }
.proof dd a, .future .row-text dd a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.proof .tick { margin-right: 14px; }
.proof h3 { display: flex; align-items: baseline; }

/* Section on a hub page: opens on the ruled line with end ticks. */
.hub-section { position: relative; margin-top: clamp(64px, 7vw, 104px); padding-top: clamp(36px, 4.4vw, 56px); }
.hub-section::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  border-left: 1px solid var(--hairline); border-right: 1px solid var(--hairline);
  background: linear-gradient(var(--hairline), var(--hairline)) center / 100% 1px no-repeat;
}
.hub-section > h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3vw, 42px); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; max-width: 18em; }
.hub-section > .hub-lede { margin-top: 18px; max-width: 40em; font-size: 16.5px; line-height: 1.65; color: var(--graphite-dim); text-wrap: pretty; }
.hub-section > .hub-lede a, .hub-section > p a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.hub-section > .rows, .hub-section > .table-scroll, .hub-section > .table-hint + .table-scroll { margin-top: 32px; }
.hub-section > p + p { margin-top: 14px; }
.hub-section > p { max-width: 42em; font-size: 15.5px; line-height: 1.65; color: var(--graphite-dim); }
.hub-section table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.hub-section th, .hub-section td { padding: 11px 16px 11px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.hub-section th:last-child, .hub-section td:last-child { padding-right: 0; }
.hub-section thead th { padding-top: 8px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite-dim); border-bottom-color: var(--track); vertical-align: bottom; }
.hub-section tbody th { font-weight: 400; }
.hub-section .num { text-align: right; white-space: nowrap; }
.hub-section tr.total th, .hub-section tr.total td { font-weight: 500; border-top: 1px solid var(--graphite); }
.hub-section td small, .guide-body td small { display: block; margin-top: 2px; font-size: 13px; color: var(--graphite-dim); }
.hub-section .table-hint { margin-top: 28px; }
.hub-section table[data-cols="3"] { min-width: 560px; }
.hub-section table[data-cols="4"], .hub-section table[data-cols="5"] { min-width: 680px; }

/* Screenshot of a working interface (fictional data). */
.screenshot { margin: 36px 0; max-width: 900px; }
.screenshot img { display: block; width: 100%; height: auto; outline: 1px solid var(--hairline); background: #fff; }
.screenshot figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--graphite-dim); }
.screenshot figcaption a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }

/* Case-study figures */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; max-width: 760px; margin: 32px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.figures > div { padding: 16px 0 18px; }
.figures dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }
.figures dd { margin-top: 6px; font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px); font-weight: 300; line-height: 1.1; color: var(--graphite); font-variant-numeric: tabular-nums; }

/* Small print: assumptions, offers, scope notes. */
.note { max-width: 680px; margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: var(--graphite-dim); }
.note a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.offer { max-width: 680px; margin-top: 20px; padding: 12px 0 12px 20px; border-left: 1px solid var(--graphite); font-size: 14.5px; line-height: 1.6; color: var(--graphite); }
.offer[hidden] { display: none; }

/* Andrew introduction (homepage and about). */
.person { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(40px, 7vw, 120px); align-items: start; }
.person-text p { max-width: 36em; }
.person-text p + p { margin-top: 14px; }
.person-text .track-link { margin-top: 10px; }
.person-role { margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }

@media (max-width: 959px) {
  .rows > li, .rows > .row, .person { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .person { row-gap: 20px; }
}
@media (max-width: 759px) {
  .handover { margin-left: calc(-1 * var(--pad-x) + 8px); margin-right: calc(-1 * var(--pad-x) + 8px); }
  .handover dl > div, .proof dl > div, .future .row-text dl > div { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .figures > div + div { border-top: 1px solid var(--hairline); }
  .hub-section .table-scroll { margin-right: calc(-1 * var(--pad-x)); padding-right: var(--pad-x); }
  .hub-section table[data-cols="3"] th:first-child, .hub-section table[data-cols="4"] th:first-child, .hub-section table[data-cols="5"] th:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--studio); box-shadow: inset -1px 0 0 var(--hairline); padding-right: 12px; width: 9.5rem; min-width: 8rem; max-width: 40vw;
  }
}

/* Numbered steps written as a ruled list (for example the MTD-ready week). */
.guide-body ol.steps { list-style: none; padding-left: 0; max-width: 680px; border-bottom: 1px solid var(--hairline); }
.guide-body ol.steps li { margin: 0; padding: 11px 0; border-top: 1px solid var(--hairline); }
.guide-body ol.steps strong { display: inline-block; min-width: 4.5rem; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }

/* A link that does something (download, prepared email, jump to a section), given a little more weight. */
.guide-body .action-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.guide-body .action-link + .action-link { margin-left: 24px; }
/* An enquiry opener inside a section: the same control as the closing one, set apart from the text above it. */
.guide-body .section-action { margin-top: 28px; }
.guide-body .section-action .race { text-decoration: none; }

.figures dd + dd { margin-top: 8px; font-family: var(--sans); font-weight: 400; font-size: 13.5px; line-height: 1.5; color: var(--graphite-dim); }
.guide-head .standfirst a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.guide-head .standfirst + .standfirst { margin-top: 12px; font-size: 16px; color: var(--graphite-dim); }

/* ---------- Homepage additions ---------- */
/* The first section after the hero continues its centreline; whichever section that is. */
.section.first::before { display: none; }
.section.build:not(.first)::before { display: block; }
.section.build:not(.first) .build-intro { text-align: left; }
.section.build:not(.first) .build-intro .lede { margin-left: 0; }
.section.first .work-head { max-width: 680px; margin: 0 auto; text-align: center; }
.section.first .work-head .lede { margin-left: auto; margin-right: auto; }
.work-promise { margin-top: 14px; }
.built-evidence { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; row-gap: 2px; margin-top: 10px; }
.section .built-evidence .status { margin: 0 4px 0 0; font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--graphite); }
.section .built-evidence .status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--graphite); }
.work-more { margin-top: clamp(32px, 4vw, 48px); }
.work-more .caption { margin-top: 10px; max-width: 40em; }
.route-links, .build-routes { display: flex; flex-wrap: wrap; column-gap: 28px; }
.finance-text .route-links { margin-top: 10px; }
.build-routes { margin-top: clamp(40px, 5vw, 64px); }
.noticed-more { margin-top: 4px; }
.section.andrew .person-text .lede { max-width: 34em; }
.section.andrew .person-text p + p { margin-top: 14px; }
.section.andrew h2 { max-width: 9em; }

/* ---------- Work ---------- */
.rows.proof > li > div:first-child h3 { display: flex; align-items: baseline; gap: 14px; }
.rows.proof .tick { flex: none; position: relative; top: -4px; }
.rows .status { margin-top: 8px; padding-left: 26px; font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--graphite); }
.rows.proof dl { margin-top: 0; }
.rows.proof dd ul { margin-top: 4px; padding-left: 1.1em; }
.rows.proof dd li + li { margin-top: 6px; }
.hub-section.future > .status { margin: 0 0 10px; }
.future-invite { margin-top: clamp(32px, 4vw, 48px); max-width: 40em; }
.future-invite > p:first-child { font-size: 17px; line-height: 1.6; color: var(--graphite); }
.future-invite .section-action { margin-top: 20px; }
.work-film { display: flex; flex-direction: column; align-items: flex-start; width: min(220px, 60vw); margin-top: 20px; text-align: left; }
.work-film:focus-visible { outline: none; }
.work-film img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; outline: 1px solid var(--hairline); transition: outline-color .3s; }
.work-film:hover img, .work-film:focus-visible img { outline-color: var(--graphite); }
.work-film .film-label { margin-top: 10px; font-size: 14px; }
.work-film:hover .film-label .ball, .work-film:focus-visible .film-label .ball { left: calc(100% - 5px); transform: rotate(540deg); }
.work-film:focus-visible .film-label::before { height: 2px; bottom: 8.5px; background: var(--graphite); }
.work-film:focus-visible .film-label .ball { box-shadow: 0 0 0 2.5px var(--studio), 0 0 0 3.5px var(--graphite); }
.work-film .film-length { font-size: 12.5px; color: var(--graphite-dim); }
@media (max-width: 759px) { .rows .status { padding-left: 26px; } }
/* A landscape film (PlateLedger): the same still, label and dialog as the Framewright film, at 16:9. */
.demo-film { margin-top: clamp(28px, 3.6vw, 44px); }
.film-landscape { width: min(100%, 720px); }
.film-landscape img { aspect-ratio: 16 / 9; }
.demo-film figcaption { margin-top: 12px; max-width: 46em; font-size: 13px; line-height: 1.5; color: var(--graphite-dim); }
.film-wide { width: min(calc(100vw - 32px), calc((100dvh - 190px) * 16 / 9 + 48px), 1040px); }
.film-wide .film-video { aspect-ratio: 16 / 9; }

/* ---------- Services ---------- */
.who-does { margin-top: 28px; border-bottom: 1px solid var(--hairline); }
.who-does > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(28px, 5vw, 72px); padding: 12px 0; border-top: 1px solid var(--hairline); }
.who-does dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); padding-top: 4px; }
.who-does dd { font-size: 15px; line-height: 1.6; color: var(--graphite); max-width: 40em; }
.hub-section .qa { max-width: none; margin-top: 0; }
.hub-section .qa:first-of-type { margin-top: 36px; }
.hub-section .qa > p, .hub-section .qa > h3, .hub-section .qa > div { max-width: 760px; }
.hub-section .qa > h3 { margin-top: 4px; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }
.hub-section .qa > p { font-size: 15px; line-height: 1.65; color: var(--graphite-dim); }
.hub-section .qa > p + p { margin-top: 10px; }
.scope-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); margin: 24px 0 28px; }
.scope-options article { padding-top: 16px; border-top: 1px solid var(--graphite); }
.scope-options h4 { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.25; }
.scope-options p, .scope-options li { font-size: 14.5px; line-height: 1.6; color: var(--graphite-dim); }
.scope-options p { margin-top: 10px; }
.scope-options .scope-fee { color: var(--graphite); }
.scope-options .scope-fee strong { font-family: var(--serif); font-weight: 300; font-size: 28px; color: var(--graphite); }
.scope-options ul { margin-top: 10px; padding-left: 1.1em; }
.scope-options li + li { margin-top: 6px; }
@media (max-width: 759px) {
  .who-does > div { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .scope-options { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
}
.who-label { margin-top: 44px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); }
.who-label + .who-does { margin-top: 10px; }
.content-page .table-hint:not(.is-needed) + .table-scroll { margin-top: 28px; }

/* ---------- About ---------- */
.person-section h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.014em; }
.person-text > p { font-size: 16px; line-height: 1.7; color: var(--graphite); max-width: 38em; }
.person-text > p + p { margin-top: 14px; }
.person-text .row-links { display: flex; flex-wrap: wrap; column-gap: 24px; margin-top: 16px; }
.person-text .row-links a { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
.person-text .qa { margin-top: 24px; max-width: 38em; }
.person-text .qa > p { font-size: 15px; }
.glance { max-width: 760px; margin: 8px 0 32px; border-bottom: 1px solid var(--hairline); }
.glance > div { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); column-gap: 20px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.glance dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-dim); padding-top: 3px; }
.glance dd { font-size: 15px; line-height: 1.6; color: var(--graphite); }
.glance dd a { text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 3px; }
@media (max-width: 759px) { .glance > div { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } }
