/* The site's type, one copy for every page (Ray, 2026-11-12: "update the fonts and titles as agreed").
   Loaded last in each page's head, after the page's own styles, so it decides. The !important marks are
   deliberate: each page still carries its own older heading sizes, and this file must win over all of them.

   - Text: Archivo everywhere. IBM Plex Mono only for small labels, dates and sources.
   - Page titles, article titles and Insights card titles: the title block (class dtitle), sized by title-block.js.
   - Section headings: bold Archivo on the classical scale (Bringhurst): 36 and 21, 26 and 19 on a phone. */

/* Corners, one system for every page (Ray, 2026-12-03: "never ever change a design principle for 1 element without
   assessing the entire piece"; standing rule: no pills). Every border-radius on the site is one of these (or 0, square):
   - control 6px: buttons of every kind, the top bar and its menu, form fields, tags, chips, badges, labels, toggles,
     icon tiles, focus rings, and any small box sitting inside a card.
   - box 12px: cards, panels, figures and chart boxes, the closing box, the enquiry dialog, the cookie notice, accordions.
     Twice the control, so a card reads one step softer than the buttons it holds, never a pebble beside them.
   - mark 3px: line ends, meter bars, legend keys, chart cells and text highlights.
   - 50% only for true circles: dots, bullets, avatars, the spinner, timeline nodes.
   Audit: docs/audits/2026-12-03-corner-radius-audit.md */
:root { --r-control: 6px; --r-box: 12px; --r-mark: 3px; }

body { font-family: 'Archivo', system-ui, sans-serif; }

/* section headings; a person's name over a profile is a label, sized with the card headings (Ray: "why is my name bigger?") */
h1:not(.dtitle), h2:not(.dtitle):not(.profile-name) {
  font-family: 'Archivo', sans-serif !important; font-weight: 700 !important; font-size: 36px !important;
  line-height: 1.12 !important; letter-spacing: -0.02em !important; font-stretch: 100% !important;
}
h3, h2.profile-name {
  font-family: 'Archivo', sans-serif !important; font-weight: 600 !important; font-size: 21px !important;
  line-height: 1.3 !important; letter-spacing: -0.01em !important; font-stretch: 100% !important;
}

/* the title block: up to 720 wide, never wider than its column; title-block.js sets one size for every title */
.dtitle {
  width: 720px !important; max-width: 100% !important; min-height: 0; height: auto;
  display: flex !important; flex-direction: column; justify-content: flex-start;
  font-family: 'Archivo', sans-serif !important; font-weight: 700 !important; letter-spacing: 0 !important;
  margin-left: 0; margin-right: 0; padding: 0 !important; text-wrap: nowrap;
}
.dtitle > .dl { display: block; width: max-content; white-space: nowrap; font-weight: 700; letter-spacing: -0.02em; color: inherit; }
.dtitle > .dl * { font-weight: inherit !important; font-size: inherit !important; font-stretch: inherit !important; letter-spacing: inherit !important; line-height: inherit !important; }
.dtitle > .dl > .word:last-child { margin-right: 0 !important; }

@media (max-width: 640px) {
  h1:not(.dtitle), h2:not(.dtitle):not(.profile-name) { font-size: 26px !important; }
  h3, h2.profile-name { font-size: 19px !important; }
  .dtitle { width: 100% !important; }
}

/* a page's own rules for spans, highlights or hero words must not change a title line's box */
/* (the maturity page's chart legend also uses the name "key", with no height: that flattened its title's key line) */
.dtitle > .dl { width: max-content !important; max-width: none !important; height: auto !important; padding: 0 !important; margin: 0 !important; border: 0 !important; }
.dtitle > .dl .word, .dtitle > .dl .word-inner { vertical-align: top; }
/* a title too long for its column wraps its lines rather than shrinking below a readable size (title-block.js) */
.dtitle.wrap > .dl { width: auto !important; white-space: normal !important; }
/* the block's width never depends on its own lines, so a page that sizes a column by its content cannot shrink it in a loop */
.dtitle { contain: inline-size; }

/* coloured words in a title take the logo's blue-to-purple, the same two colours and direction as the mark
   (Ray, 2026-11-12: "why dont we use the same color effect as the logo"). Titles only: links, buttons and small
   text stay flat blue, where a gradient would blur at small size and a link needs one plain colour.
   One exception, Ray's choice 2026-11-19: the line of service links (.ways-line, at the end of this file). */
.dtitle .pop {
  background: linear-gradient(135deg, #1A4FD8 0%, #7C3AED 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* article and tool titles: a squared block (title-block.js), its key line in the logo's blue-to-purple.
   Articles 520 wide (Ray, 2026-11-12: "good size for articles"); tool pages 400, where 520 was "too big". */
.dtitle.flat { width: 520px !important; }
.dtitle.flat.tool { width: 400px !important; }
.dtitle.flat > .dl.key {
  background: linear-gradient(135deg, #1A4FD8 0%, #7C3AED 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
@media (max-width: 640px) { .dtitle.flat, .dtitle.flat.tool { width: 100% !important; } }

/* every table on the site: rows alternate between the page colour and white, so a row reads across without
   losing its place (Ray, 2026-11-12: "when tables are made, we need to alternate shades for readability") */
table tbody tr:nth-child(even) > th, table tbody tr:nth-child(even) > td { background: #FFFFFF; }
/* a title on an Insights card spans 80% of the card, whatever the card's width; the lines size to the block,
   so this sets the type 20% below a full-width title (Ray, 2026-11-12: "too big, reduce by 20%") */
.ins-card .dtitle.flat { width: 80% !important; }

/* service links as one line of names in the logo's blue-to-purple (Ray, 2026-11-19, chosen over the pills on the
   home page: "option 2 lines work for me better if we make the gradient text colour like our branding", then "apply
   that to all pills across the website"). This is the one exception to the titles-only gradient rule above: the
   colour runs once across the whole line (title-block.js sets each name's share), so each name is close to one
   colour and does not blur. A pale wash with no edge sits behind the line, for where it crosses the home page film.
   Markup: <div class="ways-line"><a href="..."><span>Name</span></a>...</div> */
.ways-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; position: relative; isolation: isolate; }
.ways-line::before { content: ""; position: absolute; inset: -12px -28px; background: rgba(245,244,240,0.7); filter: blur(16px); border-radius: var(--r-box); z-index: -1; pointer-events: none; }
.ways-line a { font-family: 'Archivo', sans-serif; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: #1A4FD8; text-decoration: none; padding: 2px 0; background: none; border: 0; border-radius: 0; }
.ways-line a + a::before { content: ""; display: inline-block; width: 1px; height: 14px; background: rgba(17,17,17,0.25); margin: 0 14px; vertical-align: -1px; }
.ways-line a span { position: relative; padding-bottom: 3px; background: linear-gradient(135deg, #1A4FD8 0%, #7C3AED 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #1A4FD8; }
.ways-line a span::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: linear-gradient(90deg, #1A4FD8, #7C3AED); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(0.23,1,0.32,1); }
@media (hover: hover) and (pointer: fine) { .ways-line a:hover span::after { transform: scaleX(1); } }
.ways-line a:focus-visible { outline: 2px solid #1A4FD8; outline-offset: 3px; border-radius: var(--r-control); }
/* Phones (Ray, 2026-11-20: the stacked names "look awful on mobile", then "more glassy ... more classy than a simple
   box"). A frosted glass panel: soft white wash, blur of what sits behind, a light top edge and a faint violet shadow.
   Each service is a row with its number, its name and a chevron (Lucide chevron-right) in a small glass circle;
   separators are inset and fade at the ends; rows are 52px tall to tap and settle in one after another on load.
   div.ways-line outranks the pages' own .hero-ways and .six-ways rules. */
@media (max-width: 640px) {
  div.ways-line { counter-reset: way; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; width: 100%; max-width: 440px; padding: 6px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.34) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.32); border-radius: var(--r-box);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 24px 48px -34px rgba(60,40,160,0.32); }
  div.ways-line::before { display: none; }
  div.ways-line a { counter-increment: way; position: relative; display: grid; grid-template-columns: 26px 1fr 28px; align-items: center; gap: 10px;
    min-height: 52px; padding: 0 14px 0 18px; font-size: 15.5px; letter-spacing: -0.012em;
    transition: background-color .2s ease; animation: wayIn .5s cubic-bezier(0.23,1,0.32,1) both; }
  div.ways-line a::before { content: counter(way, decimal-leading-zero); display: block; width: auto; height: auto; margin: 0; background: none;
    font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: rgba(17,17,17,0.45); font-variant-numeric: tabular-nums; }
  div.ways-line a + a::before { width: auto; height: auto; margin: 0; background: none; }
  div.ways-line a + a { background-image: linear-gradient(90deg, transparent, rgba(17,17,17,0.09) 12%, rgba(17,17,17,0.09) 88%, transparent);
    background-size: calc(100% - 32px) 1px; background-position: top center; background-repeat: no-repeat; }
  div.ways-line a span { position: relative; padding: 8px 0; line-height: 1.25; }
  div.ways-line a span::after { display: none; }
  div.ways-line a::after { content: ""; justify-self: end; width: 28px; height: 28px; border-radius: var(--r-control); box-sizing: border-box;
    background: rgba(255,255,255,0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='url(%23g)' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%231A4FD8'/%3E%3Cstop offset='1' stop-color='%237C3AED'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
    border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 1px 2px rgba(40,30,120,0.08);
    transition: transform .2s cubic-bezier(0.23,1,0.32,1); }
  div.ways-line a:active { background-color: rgba(255,255,255,0.45); }
  div.ways-line a:active::after { transform: translateX(3px); }
  div.ways-line a { animation-delay: calc(var(--i, 0) * 40ms); }
  div.ways-line a:focus-visible { outline: 2px solid #1A4FD8; outline-offset: -3px; border-radius: var(--r-control); }
  div.ways-line a.is-current { background-color: rgba(255,255,255,0.5); }
  div.ways-line a.is-current::before { color: #1A4FD8; }
}
.ways-toggle { display: none; }  /* the stack's button exists on phones only */
/* Phones, the stack (Ray, 2026-11-20: "a multicard ... piled up that expand when pressed to minimise space use").
   title-block.js adds .stack and a button over the pile. Closed: the first service on its own glass card, the other
   four tucked behind it, each a little lower and smaller, so their edges show. Pressed: the cards slide apart into
   the list, and each row is then a link. Exit and entry use the drawer curve (ease-drawer, emil-design-eng). */
@media (max-width: 640px) {
  div.ways-line.stack { position: relative; padding: 0; gap: 8px; background: none; border: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  div.ways-line.stack a { position: relative; z-index: calc(10 - var(--i, 0)); border-radius: var(--r-box); max-height: 120px; overflow: hidden;
    background-color: transparent; background-image: linear-gradient(180deg, rgba(255,255,255,0.66) 0%, rgba(255,255,255,0.38) 100%);
    background-size: auto; -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.32); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 18px 36px -28px rgba(60,40,160,0.32);
    transition: transform .5s cubic-bezier(0.32,0.72,0,1), margin-top .5s cubic-bezier(0.32,0.72,0,1), max-height .5s cubic-bezier(0.32,0.72,0,1), opacity .3s ease; }
  div.ways-line.stack:not(.open) { padding-bottom: 34px; }
  div.ways-line.stack:not(.open) a:not(:first-of-type) { margin-top: -60px; max-height: 52px;
    transform: translateY(calc(var(--i) * 8px)) scale(calc(1 - var(--i) * 0.05)); opacity: calc(1 - var(--i) * 0.12);
    border-color: rgba(255,255,255,0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 6px 14px -10px rgba(60,40,160,0.35); }
  /* tucked cards lie a little askew, like cards put down by hand (Ray, 2026-11-20: "stacked like unorganised cards") */
  div.ways-line.stack:not(.open) a:nth-of-type(1) { transform: rotate(-0.6deg); }
  div.ways-line.stack:not(.open) a:nth-of-type(2) { transform: translate(-7px, 9px) rotate(-3deg) scale(0.97); }
  div.ways-line.stack:not(.open) a:nth-of-type(3) { transform: translate(9px, 15px) rotate(2.4deg) scale(0.94); }
  div.ways-line.stack:not(.open) a:nth-of-type(4) { transform: translate(-4px, 21px) rotate(-1.6deg) scale(0.91); }
  div.ways-line.stack:not(.open) a:nth-of-type(5) { transform: translate(6px, 26px) rotate(3.4deg) scale(0.88); }
  div.ways-line.stack:not(.open) a:not(:first-of-type) span,
  div.ways-line.stack:not(.open) a:not(:first-of-type)::before,
  div.ways-line.stack:not(.open) a:not(:first-of-type)::after { opacity: 0; }
  div.ways-line.stack a span, div.ways-line.stack a::before { transition: opacity .25s ease .12s; }
  div.ways-line.stack:not(.open) a:first-of-type::after { transform: rotate(90deg); }
  div.ways-line.stack:not(.open) .ways-toggle:active ~ a:first-of-type { transform: rotate(-0.6deg) scale(0.98); }
  div.ways-line.stack:not(.open) .ways-toggle { display: block; position: absolute; inset: 0; z-index: 20; margin: 0; padding: 0;
    background: transparent; border: 0; border-radius: var(--r-box); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  div.ways-line.stack:not(.open) .ways-toggle:active ~ a:first-of-type { transform: scale(0.98); }
  div.ways-line .ways-toggle:focus-visible { outline: 2px solid #1A4FD8; outline-offset: 2px; }
}
/* Services sits on the plain light page, not on the home film: glass would vanish there, so its cards are solid white
   with a fine grey edge and a soft grey shadow, and the tucked cards keep their edge (Ray, 2026-11-20) */
@media (max-width: 640px) {
  div.six-ways.ways-line.stack a { background-image: none; background-color: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none;
    border: 1px solid rgba(17,17,17,0.08); box-shadow: 0 1px 2px rgba(17,17,17,0.05), 0 12px 26px -20px rgba(17,17,17,0.28); }
  div.six-ways.ways-line.stack:not(.open) a:not(:first-of-type) { border-color: rgba(17,17,17,0.1);
    box-shadow: 0 1px 2px rgba(17,17,17,0.05), 0 8px 18px -14px rgba(17,17,17,0.3); }
  div.six-ways.ways-line.stack a::after { background-color: #F5F4F0; border-color: rgba(17,17,17,0.06); }
  div.six-ways.ways-line.stack a:active { background-color: #F7F7FB; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) { div.ways-line.stack a { transition: opacity .2s ease; } }
/* the label above the home and Gulf titles takes the same glass as the list below it, so the two read as one family
   (Ray, 2026-11-20: "a grey box on top and a bright below, doesnt it look patchy?") */
@media (max-width: 640px) {
  div.hero-eyebrow { color: rgba(17,17,17,0.55);
    background: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.34) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.32); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 12px 28px -24px rgba(60,40,160,0.3); }
}
@keyframes wayIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { div.ways-line a { animation: none; } }
@media (prefers-reduced-motion: reduce) { .ways-line a span::after { transition: none; } }

/* Phones, every page (Ray, 2026-11-19: "the footer does not look right on mobile, please check the website").
   The footer was one long column of 13px links, 700px tall, with side margins that differed page to page.
   On a phone it is now the brand on top, then Navigation and Connect side by side, at readable sizes.
   Small uppercase labels and card captions come up to 12 and 13px. */
@media (max-width: 640px) {
  footer .container { grid-template-columns: 1fr 1fr !important; gap: 28px 20px !important; padding: 0 20px !important; }
  footer .footer-brand { grid-column: 1 / -1; }
  footer .footer-brand p { font-size: 14px; max-width: none; }
  footer .footer-col h4 { font-size: 12px; }
  footer .footer-col a, footer .footer-col .soon, footer .footer-col button { font-size: 14px; min-height: 40px; }
  footer .footer-bottom { font-size: 12px; grid-column: 1 / -1; }
  .hero-eyebrow, .section-label, .eyebrow, .b-tag, .bento-tag { font-size: 12px; }
  /* pages set .page-hero .eyebrow and .cta-section .eyebrow at 11px, which outranks the line above */
  .eyebrow, .eyebrow a { font-size: 12px !important; }
  .career-org, .stack-meta-item span, .t-author { font-size: 13px; }
  /* the enquiry form, on every page that carries it */
  .form-field .form-label { font-size: 13px; } .modal-right .f-or { font-size: 12px; }
}

/* The footer's Contact entry sits last under Navigation on every page (2026-11-19). On pages with the enquiry
   form it is a button that opens it; this gives that button the look of the links beside it where a page has
   no style of its own (low specificity, so a page's own rule still wins). */
:where(footer .footer-col) button.footer-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: 13px; color: rgba(255,255,255,0.6); cursor: pointer; text-align: left; display: flex; align-items: center; min-height: 44px; transition: color .2s; }
:where(footer .footer-col) button.footer-link:hover { color: #fff; }
@media (max-width: 640px) { footer .footer-col button.footer-link { font-size: 14px; min-height: 40px; } }
/* Reduced motion: the page entrance (fade-up, defined in each page) shows at once (2026-12-03, accessibility check found it still moving). */
@media (prefers-reduced-motion: reduce) { html .fade-up, html .fade-up.visible { opacity: 1; animation: none; transform: none; } }
/* Phones: the cookie notice is fixed over the foot of the screen until answered, so an enquiry dialog keeps room under its send button to scroll it clear (2026-12-03, it covered the button). */
@media (max-width: 640px) { body:has(.vs-cookie.in) :is(.modal-inner, .modal-body) { padding-bottom: 280px; } }
