/*
Theme Name: NW Law Associates
Author: EGK TECH SOLUTIONS
Author URI: https://egktech.co.tz/
Description: Custom theme for NW Law Associates, Dar es Salaam. Pages are built from Secure Custom Fields sections. Requires the Secure Custom Fields plugin. Bilingual (English/Kiswahili) with Polylang.
Version: 1.0.1
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.2
License: Proprietary
Text Domain: nwlaw
*/

/* ---------- Fonts (self-hosted; no third-party font requests) ---------- */
@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap; src: url(assets/fonts/archivo-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url(assets/fonts/archivo-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url(assets/fonts/archivo-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url(assets/fonts/archivo-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 400; font-display: swap; src: url(assets/fonts/newsreader-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 400; font-style: italic; font-display: swap; src: url(assets/fonts/newsreader-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 500; font-display: swap; src: url(assets/fonts/newsreader-latin-500-normal.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Layout: a 12-col feel on a 1240px measure; the diagonal is the only ornament. */
  --ink: #0B0E13;      /* black — logo's upper triangle */
  --navy: #12284A;     /* primary — logo's lower triangle */
  --deep: #0B1A33;     /* darker navy for large dark areas */
  --blue: #1F4F8F;     /* links, focus, interactive accents (still in the navy family) */
  --steel: #5E6B7D;    /* grey — secondary text, rules */
  --mist: #C7CDD6;     /* light grey — text on dark, borders on dark */
  --line: #E1E5EB;     /* hairlines on light */
  --paper: #F4F6F8;    /* alternate section ground (cool grey, biased to navy) */
  --white: #FFFFFF;
  --note-bg: #FFF4D6;  /* editor notes: deliberately off-brand so they can't pass as content */
  --note-ink: #6B4E00;
  --error: #A12C2C;
  --ok: #1E6B45;

  --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Newsreader", Georgia, "Times New Roman", serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 4rem);

  --measure: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-section: clamp(56px, 8vw, 112px);
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--f-sans);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--white); }
.skip-link { position: absolute; left: 16px; top: -100px; background: var(--ink); color: var(--white); padding: 10px 16px; z-index: 100; }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: var(--white); }
.section--navy { background: var(--navy); color: var(--white); }
.stack > * + * { margin-top: 1rem; }

.eyebrow { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel); }
.on-dark .eyebrow, .section--ink .eyebrow, .section--navy .eyebrow { color: var(--mist); }
.lede { font-family: var(--f-serif); font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); line-height: 1.5; color: #2A3442; max-width: 46ch; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 56px); max-width: 760px; }
.section-head--split { max-width: none; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1fr auto; column-gap: 40px; } }

/* Placeholder copy: anything in brackets that the firm must supply */
.tbc { color: var(--steel); background: linear-gradient(transparent 60%, rgba(94,107,125,.14) 60%); font-style: normal; }
.on-dark .tbc, .section--ink .tbc, .section--navy .tbc, .site-footer .tbc { color: var(--mist); background: linear-gradient(transparent 60%, rgba(199,205,214,.18) 60%); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border: 1.5px solid transparent; border-radius: 0;
  font: 600 0.9375rem/1.2 var(--f-sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--ink); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--mist); color: var(--ink); }
.btn--outline-light { border-color: rgba(255,255,255,.6); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--ink); }
.btn .arrow, .link-arrow .arrow { width: 16px; height: 16px; transition: transform .2s; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--navy); }
.link-arrow:hover { color: var(--blue); }
.on-dark .link-arrow, .section--ink .link-arrow, .section--navy .link-arrow { color: var(--white); }

/* ---------- Editor notes (in WP: shown only to logged-in editors) ---------- */
.ed-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--note-bg); color: var(--note-ink); border-left: 4px solid #D9A400;
  padding: 12px 16px; font-size: 0.875rem; line-height: 1.5; margin-block: 16px; max-width: 760px;
}
.ed-note__label { flex: none; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 0.6875rem; padding-top: 2px; }
.ed-note a { color: inherit; }


/* ---------- Header ---------- */
.site-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: block; flex: none; margin-right: auto; }
.brand img { height: 40px; width: auto; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
  background: none; border: 1.5px solid var(--line); font: 600 0.875rem var(--f-sans); color: var(--ink); cursor: pointer;
}
.nav-toggle .bars { width: 18px; height: 12px; position: relative; border-block: 2px solid currentColor; }
.nav-toggle .bars::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(11,14,19,.35);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
.site-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav li a[aria-current="page"] { color: var(--navy); font-weight: 700; }
.site-nav .nav-cta { padding: 16px var(--gutter) 0; }
.site-nav .nav-cta .btn { width: 100%; }
.lang { display: flex; align-items: center; gap: 2px; font-size: 0.8125rem; font-weight: 600; letter-spacing: .06em; }
.lang a, .lang span { padding: 6px 7px; text-decoration: none; color: var(--steel); }
.lang [aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px var(--navy); }
.header-cta { display: none; }
@media (max-width: 599px) { .brand img { height: 32px; } }
.utility-bar { background: var(--ink); color: var(--mist); font-size: 0.8125rem; }
.utility-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.utility-bar__contact { display: none; list-style: none; margin: 0; padding: 0; gap: 24px; }
@media (min-width: 760px) { .utility-bar__contact { display: flex; } }
.utility-bar .lang { margin-left: auto; }
.utility-bar .lang a, .utility-bar .lang span { color: var(--mist); }
.utility-bar .lang a:hover { color: var(--white); }
.utility-bar .lang [aria-current="true"] { color: var(--white); box-shadow: inset 0 -2px var(--white); }
@media (max-width: 479px) { .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .nav-toggle { padding: 8px 12px; } }

@media (min-width: 1200px) {
  .brand img { height: 36px; }
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; box-shadow: none; border: 0; background: none; max-height: none; overflow: visible; }
  .site-nav ul { display: flex; gap: 2px; padding: 0; }
  .site-nav li a { border: 0; padding: 10px 9px; font-size: 0.9375rem; position: relative; white-space: nowrap; }
  .site-nav li a::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 4px; height: 2px; background: var(--navy); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
  .site-nav li a:hover::after, .site-nav li a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav .nav-cta { display: none; }
  .header-cta { display: inline-flex; min-height: 44px; padding: 10px 18px; white-space: nowrap; }
}

/* ---------- Hero (home) ---------- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; isolation: isolate; }
/* The logo's diagonal at architectural scale: a navy triangle filling the lower-right. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--navy);
  clip-path: polygon(100% 18%, 100% 100%, 22% 100%);
}
.hero__w {
  position: absolute; z-index: -1; right: -0.04em; bottom: -0.2em; font: 700 clamp(14rem, 34vw, 34rem)/1 var(--f-sans);
  color: rgba(255,255,255,.045); letter-spacing: -0.05em; pointer-events: none; user-select: none;
}
.hero .wrap { padding-block: clamp(72px, 11vw, 148px) clamp(64px, 9vw, 120px); display: grid; gap: 28px; }
.hero h1 { max-width: 15ch; }
.hero .lede { color: #D5DBE3; max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: clamp(24px, 4vw, 48px); padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); font-size: 0.875rem; color: var(--mist); max-width: 760px; }
.hero__meta strong { color: var(--white); font-weight: 600; display: block; font-size: 0.75rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; }

/* ---------- Page header (inner pages) ---------- */
.page-head { position: relative; background: var(--ink); color: var(--white); overflow: hidden; isolation: isolate; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--navy); clip-path: polygon(100% 0, 100% 100%, 55% 100%); }
.page-head .wrap { padding-block: clamp(40px, 6vw, 80px) clamp(44px, 6vw, 84px); display: grid; gap: 16px; }
.page-head h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.4rem); max-width: 20ch; }
.page-head .lede { color: #D5DBE3; }
.crumbs { font-size: 0.8125rem; color: var(--mist); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 4px; opacity: .5; }
.crumbs a { color: var(--mist); text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Intro / statement ---------- */
.intro { display: grid; gap: 32px; }
.intro__statement { font-family: var(--f-serif); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.35rem); line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.intro__body { display: grid; gap: 16px; color: #2A3442; max-width: 60ch; }
@media (min-width: 900px) { .intro { grid-template-columns: 1.25fr 1fr; gap: 72px; align-items: start; } }

/* ---------- Practice area cards ---------- */
.pa-grid { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 640px) { .pa-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pa-grid { grid-template-columns: repeat(3, 1fr); } }
.pa-card {
  position: relative; display: grid; gap: 14px; align-content: start; padding: 32px 28px 30px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white);
  color: var(--ink); text-decoration: none; min-width: 0; transition: background-color .25s;
}
.pa-card::after { /* the diagonal corner, revealed on hover */
  content: ""; position: absolute; top: 0; right: 0; width: 44px; height: 44px; background: var(--navy);
  clip-path: polygon(0 0, 100% 0, 100% 100%); transform: scale(0); transform-origin: top right; transition: transform .25s;
}
.pa-card:hover { background: var(--paper); color: var(--ink); }
.pa-card:hover::after, .pa-card:focus-visible::after { transform: scale(1); }
.pa-card__icon { width: 40px; height: 40px; color: var(--navy); }
.pa-card h3 { font-size: 1.2rem; }
.pa-card p { color: #3D4756; font-size: 0.975rem; line-height: 1.6; }
.pa-card .link-arrow { margin-top: 6px; font-size: 0.9rem; }
.section--paper .pa-card { background: var(--white); }

/* ---------- Approach (three columns) ---------- */
.approach { display: grid; gap: 1px; background: rgba(255,255,255,.14); }
@media (min-width: 900px) { .approach { grid-template-columns: repeat(3, 1fr); } }
.approach > div { background: var(--deep); padding: 32px 28px; display: grid; gap: 12px; align-content: start; }
.approach h3 { font-size: 1.15rem; }
.approach p { color: #C9D1DC; font-size: 0.975rem; }
.approach .mark { width: 28px; height: 28px; }

/* ---------- Sectors ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li, .chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line);
  background: var(--white); font-size: 0.9375rem; font-weight: 500; color: var(--ink);
}
.chip { cursor: pointer; font-family: inherit; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip:hover { border-color: var(--navy); }

/* ---------- Matter (Our work) cards ---------- */
.matters { display: grid; gap: 20px; }
@media (min-width: 760px) { .matters { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .matters--3 { grid-template-columns: repeat(3, 1fr); } }
.matter {
  position: relative; display: grid; gap: 14px; align-content: start; padding: 28px 26px 26px; background: var(--white);
  border: 1px solid var(--line); min-width: 0;
}
.matter::before { content: ""; position: absolute; left: -1px; top: -1px; width: 22px; height: 22px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 0 100%); }
.matter__tags { display: grid; gap: 2px; font-size: 0.75rem; line-height: 1.45; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.matter__tags span:first-child { color: var(--navy); }
.matter h3 { font-size: 1.15rem; }
.matter p { color: #3D4756; font-size: 0.975rem; }
.matter__client { font-size: 0.875rem; color: var(--steel); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }

/* ---------- Client strip ---------- */
.clients { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 700px) { .clients { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .clients { grid-template-columns: repeat(6, 1fr); } }
.clients img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: contain; background: var(--white); filter: grayscale(1); opacity: .9; }

/* ---------- Insight cards ---------- */
.insights { display: grid; gap: 32px 24px; }
@media (min-width: 760px) { .insights { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .insights { grid-template-columns: repeat(3, 1fr); } }
.insight { display: grid; gap: 12px; align-content: start; color: var(--ink); text-decoration: none; min-width: 0; }
.insight img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.insight__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.72rem; line-height: 1.45; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.insight h3 { font-size: 1.2rem; transition: color .2s; }
.insight:hover h3 { color: var(--blue); }
.insight p { color: #3D4756; font-size: 0.975rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; background: var(--navy); color: var(--white); overflow: hidden; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); clip-path: polygon(0 0, 38% 0, 0 100%); }
.cta-band .wrap { padding-block: clamp(48px, 7vw, 88px); display: grid; gap: 24px; align-items: center; }
.cta-band h2 { max-width: 20ch; }
.cta-band p { color: #D5DBE3; max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .cta-band .wrap { grid-template-columns: 1fr auto; gap: 48px; } }

/* ---------- People ---------- */
.people-tools { display: grid; gap: 14px; margin-bottom: 32px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 32px 24px; }
.person-card { display: grid; gap: 10px; align-content: start; min-width: 0; }
.person-card[hidden] { display: none; }
.person-card a.person-card__link { display: grid; gap: 10px; color: var(--ink); text-decoration: none; }
.person-card__photo { position: relative; overflow: hidden; background: var(--paper); }
.person-card__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s; }
.person-card__photo::after { content: ""; position: absolute; right: 0; bottom: 0; width: 34%; aspect-ratio: 1; background: var(--navy); clip-path: polygon(100% 0, 100% 100%, 0 100%); opacity: 0; transition: opacity .25s; }
.person-card a:hover .person-card__photo::after, .person-card a:focus-visible .person-card__photo::after { opacity: 1; }
.person-card h3 { font-size: 1.125rem; margin-top: 6px; }
.person-card__role { font-size: 0.9rem; color: var(--steel); }
.person-card__areas { font-size: 0.8125rem; color: #3D4756; }
.empty-state { padding: 32px; background: var(--paper); border-left: 4px solid var(--navy); }

/* Modal (people profiles). Each person also has a real page — the modal is progressive enhancement. */
.modal { border: 0; padding: 0; width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--white); color: var(--ink); box-shadow: 0 40px 80px -20px rgba(11,14,19,.5); }
.modal::backdrop { background: rgba(11,14,19,.72); }
.modal__inner { display: grid; overflow: auto; max-height: calc(100vh - 32px); }
@media (min-width: 760px) { .modal__inner { grid-template-columns: 300px 1fr; } }
.modal__photo { background: #E6E9EE; }
.modal__photo img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 5; }
@media (max-width: 759px) { .modal__photo img { aspect-ratio: 16 / 10; object-position: top; } }
.modal__body { padding: clamp(24px, 4vw, 44px); display: grid; gap: 16px; align-content: start; min-width: 0; }
.modal__close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: var(--ink); color: var(--white); font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 2; }
.modal__close:hover { background: var(--navy); }

/* Definition list used for profile facts */
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .facts > div { grid-template-columns: 170px 1fr; gap: 16px; } }
.facts dt { font-size: 0.75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); padding-top: 3px; }
.facts dd { margin: 0; font-size: 0.975rem; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Two-column content layouts ---------- */
.layout-aside { display: grid; gap: 48px; }
@media (min-width: 980px) { .layout-aside { grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; } }
.prose { max-width: 68ch; font-size: 1.0625rem; color: #222B37; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-2); margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--navy); font-family: var(--f-serif); font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.prose--serif { font-family: var(--f-serif); font-size: 1.2rem; line-height: 1.7; }
.prose--serif h2, .prose--serif h3 { font-family: var(--f-sans); }
.aside-box { background: var(--paper); padding: 28px; display: grid; gap: 14px; align-content: start; }
.aside-box h2, .aside-box h3 { font-size: 1.05rem; letter-spacing: 0; }
.aside-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.aside-box li a, .aside-box li span { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.aside-box li a:hover { color: var(--blue); }
.aside-box li a[aria-current="page"] { font-weight: 700; color: var(--navy); }
.sticky-aside { align-self: start; }
@media (min-width: 980px) { .sticky-aside { position: sticky; top: calc(var(--header-h) + 24px); } }

.related { display: grid; gap: 16px; }
.sub-section { padding-top: clamp(40px, 5vw, 64px); margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.mini-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 24px; }

/* ---------- Values / about ---------- */
.values { display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: v; }
.values > div { display: grid; gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 800px) { .values > div { grid-template-columns: 280px 1fr; gap: 40px; } }
.values h3 { font-size: 1.15rem; }
.values p { color: #3D4756; max-width: 62ch; }

/* ---------- Steps (a true sequence: what happens after a booking request) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; background: var(--navy); color: var(--white); font-weight: 700; font-size: 0.875rem; }
.steps strong { display: block; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 20px; }
@media (min-width: 680px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
.field { display: grid; gap: 7px; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.9375rem; padding: 0; }
.field .req { color: var(--error); margin-left: 2px; }
.field .hint { font-size: 0.8125rem; color: var(--steel); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: 400 1rem/1.4 var(--f-sans); color: var(--ink);
  background: var(--white); border: 1.5px solid #C3CAD4; border-radius: 0; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2312284A' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--steel); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31,79,143,.25); }
.field input[type="file"] { padding: 10px; min-height: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field .error { color: var(--error); font-size: 0.8125rem; font-weight: 600; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 10px; }
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio span { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px; border: 1.5px solid #C3CAD4; cursor: pointer; font-weight: 500; }
.radio span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--steel); }
.radio input:checked + span { border-color: var(--navy); background: #EEF2F8; }
.radio input:checked + span::before { border: 5px solid var(--navy); }
.radio input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; } /* honeypot */

/* The advocate–client notice. Required tick-box; deliberately prominent. */
.notice {
  display: grid; gap: 12px; padding: 18px 20px; background: var(--paper); border-left: 4px solid var(--ink); font-size: 0.9375rem;
}
.notice p { color: #222B37; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form-foot small { color: var(--steel); }
.form-status { padding: 16px 18px; font-weight: 500; }
.form-status.is-ok { background: #E6F2EB; color: var(--ok); border-left: 4px solid var(--ok); }
.form-status.is-error { background: #F8E8E8; color: var(--error); border-left: 4px solid var(--error); }

.contact-cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-cards > div { background: var(--white); padding: 20px 22px; display: grid; gap: 4px; }
.contact-cards dt { font-size: 0.75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.contact-cards dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.map-ph { position: relative; aspect-ratio: 16 / 10; background: var(--paper); overflow: hidden; display: grid; place-items: center; text-align: center; color: var(--steel); font-size: 0.875rem; padding: 16px; }

/* ---------- Careers ---------- */
.vacancies { display: grid; gap: 0; border-top: 1px solid var(--line); }
.vacancy { display: grid; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 800px) { .vacancy { grid-template-columns: 1fr auto; align-items: center; gap: 32px; } }
.vacancy__type { font-size: 0.75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.vacancy h3 { font-size: 1.2rem; }
.vacancy p { color: #3D4756; font-size: 0.975rem; max-width: 64ch; }

/* ---------- Article (insight single) ---------- */
.article-head .wrap { max-width: calc(860px + 2 * var(--gutter)); }
.article-figure { margin: 0 0 40px; }
.article-figure img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.byline { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-block: 1px solid var(--line); margin-bottom: 32px; font-size: 0.9375rem; }
.byline img { width: 48px; height: 48px; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9D1DC; font-size: 0.9375rem; }
.site-footer a { color: #E4E9EF; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-top { display: grid; gap: 40px; padding-block: clamp(48px, 6vw, 80px) 40px; }
@media (min-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-top h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mist); margin-bottom: 14px; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand { display: grid; gap: 18px; align-content: start; }
.footer-brand img { height: 46px; width: auto; }
.footer-brand p { max-width: 36ch; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.12); padding-block: 22px; font-size: 0.8125rem; color: #A9B3C0; line-height: 1.6; }
.footer-disclaimer p { max-width: 110ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px 26px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.8125rem; color: #A9B3C0; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.notice .error { color: var(--error); font-size: 0.8125rem; font-weight: 600; }

/* ==========================================================================
   WordPress additions (not in the static prototype)
   ========================================================================== */
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; word-wrap: normal !important; }
.screen-reader-text:focus { position: static !important; width: auto; height: auto; clip: auto; }

/* Items hidden from visitors but shown to logged-in editors */
.is-hidden-public { outline: 2px dashed #D9A400; outline-offset: 4px; }
.badge-hidden { display: inline-block; background: var(--note-bg); color: var(--note-ink); font-size: 0.6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; }

/* Language switcher (Polylang) inside the utility bar */
.lang ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }

/* Vacancy details */
.vacancy details { margin-top: 6px; }
.vacancy summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.vacancy details[open] summary { margin-bottom: 10px; }

/* Pagination */
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination a.page-numbers:hover { border-color: var(--navy); }

/* Search form */
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; border: 1.5px solid #C3CAD4; border-radius: 0; }
.search-form .search-submit { min-height: 48px; padding: 0 20px; border: 0; background: var(--navy); color: var(--white); font: 600 0.9375rem var(--f-sans); cursor: pointer; }

/* Content from the editor */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption, figure { max-width: 100%; }
.wp-caption-text, figcaption { font-size: 0.875rem; color: var(--steel); margin-top: 6px; }
.prose img { height: auto; }
.prose a { color: var(--blue); }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

.notice-404 { display: grid; gap: 20px; max-width: 640px; }
.form-status:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.cards-empty { color: var(--steel); }
.aside-box--navy { background: var(--navy); color: var(--white); }
.aside-box--navy p { color: #D5DBE3; font-size: 0.95rem; }
.article-disclaimer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--steel); }
.form-privacy { font-size: 0.875rem; color: var(--steel); }
.form-foot .req { color: var(--error); }
a.chip { color: var(--ink); }
a.chip[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chips li:has(> a.chip) { padding: 0; border: 0; min-height: 0; }
.clients > div { position: relative; }
.clients .badge-hidden { position: absolute; left: 6px; bottom: 6px; }
.matter .badge-hidden { justify-self: start; }
.prose--wide { max-width: none; }
.byline .is-placeholder, .byline img { width: 48px; height: 48px; object-fit: cover; }
@media (max-width: 759px) { .utility-bar:not(.has-lang) { display: none; } }
