/*
 * British Legal Office — brand layer (option A "Chambers", D-011, D-012)
 *
 * Loaded after site.css, which is the Institute of AI component stylesheet
 * kept unchanged (D-013) so its fixes can be copied across as they are. Every
 * BLO difference lives here, in the same section order as the page:
 *   1 Type registers   4 Section shell      7 Roadmap      10 Footer
 *   2 Header and nav   5 Centred heads      8 Dated index  11 Logo
 *   3 Hero, page head  6 Ledger, columns    9 CTA plate    12 Forms
 * Tokens only (tokens.css). A few rules use !important to win over the
 * Institute's band-rhythm selector (:nth-child(even of …)), whose specificity
 * cannot be matched without repeating it; each is marked.
 */

/* 1 Type registers ------------------------------------------------------- */
/* Serif for headings, labels, buttons and navigation; Inter for paragraphs
   and UI text (D-012). Playfair Display SC sets lower case as small capitals,
   so labels are written in sentence case and never uppercased. */

h1 { font-family: var(--font-serif-sc); }

.label,
.split__label,
.site-footer__heading,
.mailbox-links__label,
.contact-details dt,
.entry__date {
  font-family: var(--font-serif-sc);
  font-size: var(--step--1);
  font-weight: var(--weight-label);
  text-transform: none;
  letter-spacing: var(--tracking-label);
}

.btn,
.site-nav__cta,
.link-arrow {
  font-family: var(--font-serif-sc);
  font-size: var(--step-0);
  font-weight: var(--weight-label);
  text-transform: none;
  letter-spacing: 0.04em;
}

.btn { padding-inline: var(--space-6); }

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--solid:hover {
  background: var(--plate-deep);
  border-color: var(--plate-deep);
  color: var(--accent-ink);
}

/* On slate (hero, page header, CTA plate): white button, slate text */
.plate .btn--solid {
  background: var(--plate-ink);
  border-color: var(--plate-ink);
  color: var(--plate);
}

.plate .btn--solid:hover {
  background: var(--surface);
  border-color: var(--surface);
  color: var(--plate);
}

/* 2 Header and nav: the slate bar of the logo ---------------------------- */

.site-header {
  background: var(--plate);
  color: var(--plate-ink);
  border-bottom: var(--rule-width) solid rgb(217 217 217 / 0.25);
}

.site-header :focus-visible { outline-color: var(--plate-accent); }

.site-header .logo-link { color: var(--plate-ink); }

.site-nav__list .site-nav__link {
  font-family: var(--font-serif-sc);
  font-size: var(--step-0);
  letter-spacing: var(--tracking-label);
  color: var(--plate-soft);
}

.site-nav__list .site-nav__link:hover,
.site-nav__list .site-nav__link[aria-current] {
  color: var(--plate-ink);
  border-bottom-color: var(--plate-rule);
}

.site-nav__list .site-nav__cta {
  color: var(--plate-ink);
  border-color: rgb(217 217 217 / 0.6);
}

.site-nav__list .site-nav__cta:hover {
  background: var(--plate-ink);
  border-color: var(--plate-ink);
  color: var(--plate);
}

/* Below 1024px: the native "Menu" disclosure; its panel stays on paper */
.site-nav__toggle {
  font-family: var(--font-serif-sc);
  letter-spacing: var(--tracking-label);
  color: var(--plate-ink);
}

.site-nav__panel :focus-visible { outline-color: var(--accent); }

.site-nav__menu-list .site-nav__link { font-family: var(--font-serif-sc); letter-spacing: var(--tracking-label); }

/* The header and the slate hero or page header read as one plate */
.site-header + main > .plate:first-child { border-top: 0; }

/* 3 Hero and page header: centred, as the logo ---------------------------- */

.hero {
  padding-block: var(--space-9) var(--space-10);
  text-align: center;
}

.hero__inner { justify-items: center; }

@media (min-width: 64rem) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
}

/* Eyebrow over the hero and page headers: the tagline register, Cardo italic */
.hero .label,
.page-header .split__label {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--step-1);
  letter-spacing: 0;
  color: var(--plate-soft);
}

.hero__title {
  font-family: var(--font-serif-sc);
  max-width: 18ch;
  margin-inline: auto;
}

/* The logo's hairline under the headline */
.hero__title::after,
.page-header__title::after {
  content: "";
  display: block;
  width: min(22rem, 70%);
  margin: var(--space-6) auto 0;
  border-top: 0.75px solid var(--plate-rule);
  opacity: 0.7;
}

.hero__lede {
  margin-inline: auto;
  max-width: 40rem;
  color: var(--plate-soft);
}

.hero__actions { justify-content: center; }

.page-header {
  padding-block: var(--space-9) var(--space-8);
  text-align: center;
}

.page-header__inner {
  display: grid;
  justify-items: center;
}

.page-header .split__head {
  display: grid;
  justify-items: center;
}

.page-header__title {
  font-size: var(--step-4);
  max-width: 22ch;
}

.page-header .punch {
  margin-top: var(--space-6);
  margin-inline: auto;
  max-width: 36rem;
  font-family: var(--font-sans);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
  color: var(--plate-soft);
}

@media (min-width: 48rem) {
  .page-header .punch { font-size: var(--step-1); }
}

.page-header .punch__em { color: var(--plate-ink); }

/* 4 Section shell: alternating paper bands, no inner hairlines ----------- */
/* Option A separates sections by shade (ground / surface, the Institute's
   band rhythm) without the rule at the top of each section. */

.section + .section > .wrap::before { content: none; }

.section + .section:not(.section--continued, .section--notice, .section--prose + .section--prose) {
  padding-top: var(--space-8);
}

/* 5 Centred section heads ------------------------------------------------- */
/* Every block head with a split--head (ledger, columns, roadmap) and the
   legacy section-head is centred above its content, with a short rule. */

.split--head {
  display: block;
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: var(--space-7);
  text-align: center;
}

.split--head .split__head { display: grid; justify-items: center; }

.split--head .split__body { margin-top: var(--space-4); }

.split--head .split__lede {
  margin-inline: auto;
  font-size: var(--step-1);
  color: var(--ink-soft);
}

/* The legacy section-head over a dated index (Insights); elsewhere (contact
   form, contact details, error links) it keeps the Institute layout. */
.section:has(.dated-index) > .wrap > .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.section:has(.dated-index) > .wrap > .section-head .lede { grid-column: 1; grid-row: auto; }

.split--head::after,
.section:has(.dated-index) > .wrap > .section-head::after {
  content: "";
  display: block;
  width: 3rem;
  margin: var(--space-6) auto 0;
  border-top: var(--rule-width) solid var(--ink-muted);
}

/* The `section` block (Home "About British Legal Office"): option A's centred
   statement. The heading is the statement, set in italic; body below. */
.split-block--section .split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  max-width: 46rem;
  text-align: center;
}

.split-block--section .split__head { display: grid; justify-items: center; }

.split-block--section .split__title {
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.3;
  max-width: none;
}

.split-block--section .split__body { grid-column: 1; }

.split-block--section .split__text { margin-inline: auto; }

/* 6 Ledger (services) and columns (values) -------------------------------- */
/* The ledger becomes option A's numbered list: two columns of roman-numbered
   entries, title over description, no arrows. */

.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  column-gap: var(--space-8);
  max-width: 64rem;
  margin-inline: auto;
  border-top: 0;
  counter-reset: ledger;
}

.ledger__item {
  border-top: var(--rule-width) solid var(--rule);
  border-bottom: 0;
  counter-increment: ledger;
}

.ledger__row,
.ledger__row:is(*) {
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  align-items: start;
  padding-block: var(--space-6);
}

.ledger__row::before {
  content: counter(ledger, upper-roman);
  grid-row: 1 / span 2;
  font-family: var(--font-serif);
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--ink-muted);
}

.ledger__title {
  grid-column: 2;
  font-size: var(--step-2);
  line-height: var(--leading-snug);
}

.ledger__desc { grid-column: 2; }

.ledger__arrow { display: none; }

@media (min-width: 64rem) {
  .ledger__row { grid-template-columns: 3rem minmax(0, 1fr); }
  .ledger__desc { grid-column: 2; }
}

.columns {
  border-top: 0;
  text-align: center;
}

.col__title {
  font-family: var(--font-serif-sc);
  font-size: var(--step-1);
  letter-spacing: var(--tracking-label);
}

/* 7 Roadmap (D-016) ------------------------------------------------------- */

.roadmap {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 60rem;
  border-top: var(--rule-width) solid var(--rule);
}

.roadmap__item {
  display: grid;
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-5);
  border-bottom: var(--rule-width) solid var(--rule);
}

@media (min-width: 48rem) {
  .roadmap__item {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 9rem; /* fixed: rows without a label stay aligned */
    align-items: baseline;
  }

  .roadmap__status { justify-self: end; }
}

.roadmap__title { font-size: var(--step-1); line-height: var(--leading-snug); }

.roadmap__desc { color: var(--ink-soft); }

.roadmap__more { margin-top: var(--space-6); text-align: center; }

/* Status labels: always text, never colour alone */
.status {
  display: inline-block;
  justify-self: start;
  padding: 0.3em 0.7em;
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: var(--weight-strong);
  line-height: var(--leading-snug);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-faint);
  border: var(--rule-width) solid var(--ink-faint);
}


.status--development,
.status--live { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* 8 Dated index (Insights) ------------------------------------------------ */

.dated-index { max-width: 60rem; margin-inline: auto; }

.entry__title { font-size: var(--step-1); line-height: var(--leading-snug); }

/* 9 CTA plate: the slate plate, centred ------------------------------------ */
/* !important: background must beat the band-rhythm selector (see header). */

.cta-band {
  background: var(--plate) !important;
  color: var(--plate-ink);
  text-align: center;
  padding-block: var(--space-9) !important;
}

.cta-band :focus-visible { outline-color: var(--plate-accent); }

.cta-band .split { display: block; max-width: 40rem; }

.cta-band .split__head { display: grid; justify-items: center; }

.cta-band .label { color: var(--plate-soft); }

.cta-band__title {
  font-family: var(--font-serif-sc);
  font-size: var(--step-3);
  color: var(--plate-ink);
}

.cta-band__body { margin-top: var(--space-4); }

.cta-band .split__lede { margin-inline: auto; color: var(--plate-soft); }

.cta-band__actions { justify-content: center; margin-top: var(--space-6); }

.cta-band .btn--solid {
  background: var(--plate-ink);
  border-color: var(--plate-ink);
  color: var(--plate);
}

.cta-band .btn--solid:hover {
  background: var(--surface);
  border-color: var(--surface);
  color: var(--plate);
}

/* A CTA plate straight before the footer: no gap between the two slates */
main > .cta-band:last-child { margin-bottom: 0; }

/* 10 Footer: letterhead on deep slate -------------------------------------- */

.site-footer {
  background: var(--plate-deep) !important; /* beats the Institute's --band footer */
  color: var(--plate-soft);
  --well: var(--plate);
  padding-top: var(--space-7);
}

.site-footer :focus-visible { outline-color: var(--plate-accent); }

.site-footer__top,
.site-footer__legal { border-top-color: rgb(217 217 217 / 0.2); }

.site-footer__top { border-top: 0; }

.site-footer .logo-link,
.site-footer__logo:hover { color: var(--plate-ink); }

.site-footer__heading,
.site-footer .mailbox-links__label,
.site-footer .contact-details dt { color: var(--plate-faint); }

.site-footer a,
.site-footer .link-list a { color: var(--plate-ink); }

.site-footer .link-list a:hover { color: var(--plate-ink); text-decoration: underline; }

.site-footer__identity {
  font-family: var(--font-serif-sc);
  letter-spacing: var(--tracking-label);
  color: var(--plate-ink);
}

.site-footer__tm,
.site-footer__disclaimer { color: var(--plate-soft); }

/* 11 Logo (D-004, D-017) ----------------------------------------------------- */
/* partials/logo.php: the outlined wordmark (header), and wordmark + rule +
   tagline (footer). The SVG is sized by width; currentColor throughout. */

.logo { display: inline-flex; font-size: inherit; }

.logo__wordmark {
  display: block;
  width: 100%;
  height: auto;
}

.logo--header { width: var(--step-logo); }

.logo--footer {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  width: var(--step-logo-footer);
}

.logo__rule {
  display: block;
  border-top: 0.75px solid var(--plate-rule);
  opacity: 0.8;
}

.logo__tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--step--1);
  line-height: 1.4;
  text-align: center;
  color: var(--plate-soft);
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .plate { background: none !important; color: var(--ink); }
}

/* 12 Forms: the select sits with the inputs --------------------------------- */

.field__label { font-family: var(--font-sans); }
