/* ============================================================
 * Deltadesh — Visual enhancement layer (27 features)
 * Loads after styles.css to add the premium tier on top.
 * ============================================================ */

/* ============================================================
   Logo cards — show a brand mark on a clean tile, never cover-cropped.
   Applied (via .card-logo) wherever a project/sector/insight/news
   card only has a logo instead of a real photo.
   ============================================================ */
.card-logo img {
  object-fit: contain !important;
  background: #ffffff;
  padding: clamp(16px, 3vw, 32px);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Collapse any homepage section whose JS mount rendered nothing
   (e.g. testimonials/awards hidden pending verification) — no empty gaps. */
.testimonials-section:empty,
.awards-section:empty,
[data-testimonials]:empty,
[data-awards]:empty,
[data-before-after-showcase]:empty,
[data-homepage-insights]:empty {
  display: none !important;
}

/* Text-only project cards (no photo available) — look intentional, not broken */
.directory-card.card-textonly {
  border-left: 3px solid var(--gold);
  background: var(--white);
  min-height: 0;
}
.directory-card.card-textonly > div {
  padding: 22px 22px 24px;
}
.directory-card.card-textonly h3 {
  margin: 6px 0 4px;
}

/* ============================================================
   Per-page hero backgrounds (no more identical building everywhere)
   Photos where a strong relevant image exists; refined brand
   gradients elsewhere. Loaded after styles.css so these win over
   the global .page-hero default.
   ============================================================ */

/* Eyebrow sits on dark hero backgrounds here — use bright gold,
   not the dark text-gold reserved for white backgrounds. */
.hero-content .eyebrow,
.page-hero .eyebrow,
.people-hero .eyebrow {
  color: var(--gold);
}

/* --- Photo heroes (relevant imagery) --- */
[data-page="projects"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.92), rgba(15, 46, 120, 0.72)),
    url("assets/images/projects/qatar-news-big.jpg?v=hero2") center/cover;
}
[data-sectors-index] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.92), rgba(15, 46, 120, 0.72)),
    url("assets/images/projects/sm-building.jpg?v=hero2") center/cover;
}
[data-page="gallery"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(38, 58, 99, 0.66)),
    url("assets/images/projects/swissotel-front.jpg?v=hero2") center/cover;
}
[data-page="careers"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.7)),
    url("assets/images/projects/office-1.jpg?v=hero2") center/cover;
}
[data-page="how-we-work"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.7)),
    url("assets/images/projects/office-2.jpg?v=hero2") center/cover;
}

/* --- Gradient heroes (distinct tone per page, premium, no photo) --- */
[data-page="profile"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.66)),
    url("assets/images/projects/sm-building.jpg?v=hero3") center/cover;
}
[data-page="services"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.66)),
    url("assets/images/projects/swissotel-tower.jpg?v=hero3") center/cover;
}
[data-insights-index] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.66)),
    url("assets/images/projects/aga-khan-academy-green-court.jpg?v=hero3") center/cover;
}
[data-news-index] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.66)),
    url("assets/images/projects/aga-khan-academy-construction.jpg?v=hero3") center/cover;
}
[data-page="clients"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.66)),
    url("assets/images/projects/qatar-news-big.jpg?v=hero3") center/cover;
}
[data-page="maturity-index"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.9), rgba(15, 46, 120, 0.66)),
    url("assets/images/projects/swissotel-front.jpg?v=hero3") center/cover;
}
[data-page="search"] .page-hero {
  background:
    linear-gradient(115deg, rgba(8, 24, 66, 0.92), rgba(15, 46, 120, 0.72)),
    url("assets/images/projects/aga-khan-academy-courtyard.jpg?v=hero3") center/cover;
}

/* ── 0. Accessibility tokens (WCAG 2.1 AA) ─────────────────────
   --gold-text is the text-safe variant of brand gold.
   Contrast vs white = 6.0:1 (passes 4.5:1 normal text).
   Keep --gold (#f5a400) for backgrounds, accents, and decoration. */
:root {
  --gold-text: #8a5800;
}

/* Audit fix #1 — eyebrow text uses the contrast-safe gold */
.eyebrow {
  color: var(--gold-text);
}

/* Audit fix #2 — skip-to-content link (visible on focus only) */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 16px;
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transform: translateY(-110%);
  transition: transform 160ms ease;
  z-index: 1000;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Audit fix #7 — visible focus indicator on header nav links */
#primary-nav a:focus-visible,
.header-cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Audit fix #8 — touch-target size for nav links (44x44 minimum) */
#primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
}

/* Audit fix #4 — no-JS fallback message inside people-page mounts */
.people-fallback {
  padding: 28px 24px;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 4px;
}

.people-fallback a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── 1. Typography upgrade — Inter body + Exo display headlines ── */
:root {
  --font-display: "Exo", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  font-feature-settings:
    "ss01" on,
    "cv11" on;
}

h1,
h2,
.hero-content h1,
.case-study-hero h1,
.sector-hero h1,
.insight-hero h1,
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3,
.scope-output h3,
.directory-card h3,
.case-study-block h3 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-body);
  font-feature-settings: "tnum" on;
}

/* ── 2. Dark mode CSS variables + toggle ── */
:root[data-theme="dark"] {
  --ink: #e8edf6;
  --muted: #9aa6bf;
  --line: #1f2a44;
  --paper: #0a1226;
  --white: #0f1830;
  --blue: #5c8bff;
  --blue-dark: #3866d8;
  --blue-deep: #050b1c;
  --blue-soft: #11203f;
  --gold: #ffc34d;
  --gold-dark: #e6a832;
  --steel: #1a2545;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 32px 80px rgba(0, 0, 0, 0.7);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(255, 195, 77, 0.04), transparent 30rem),
    linear-gradient(180deg, #0a1226 0, var(--paper) 30rem);
}

:root[data-theme="dark"] .site-header {
  background:
    linear-gradient(90deg, rgba(15, 24, 48, 0.96), rgba(17, 32, 63, 0.92)),
    linear-gradient(180deg, rgba(255, 195, 77, 0.05), transparent);
  border-bottom: 1px solid var(--line);
}

:root[data-theme="dark"] nav {
  color: #d9e0ef;
}

:root[data-theme="dark"] .brand-logo {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(5, 11, 28, 0.6) 48%, rgba(0, 0, 0, 0.2)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease;
  color: var(--ink);
  font-size: 16px;
}
.theme-toggle:hover {
  background: var(--blue-soft);
  transform: scale(1.08);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── 18. Sector identity colors ── */
:root {
  --sector-embassies: #b8852a;
  --sector-factories: #2e6cb8;
  --sector-offices: #5840a3;
  --sector-hospitality: #a83a5d;
  --sector-education: #2a8068;
  --sector-development: #c75a1f;
}

[data-sector-color="embassies"] {
  --sector-accent: var(--sector-embassies);
}
[data-sector-color="factories"] {
  --sector-accent: var(--sector-factories);
}
[data-sector-color="offices"] {
  --sector-accent: var(--sector-offices);
}
[data-sector-color="hospitality"] {
  --sector-accent: var(--sector-hospitality);
}
[data-sector-color="education"] {
  --sector-accent: var(--sector-education);
}
[data-sector-color="development"] {
  --sector-accent: var(--sector-development);
}

.sector-card[data-sector-color] .sector-card-link,
.sector-hero[data-sector-color] .eyebrow,
.case-study-section[data-sector-color] .eyebrow,
.case-study-facts[data-sector-color] {
  color: var(--sector-accent, var(--gold));
}
.case-study-facts[data-sector-color] {
  border-top-color: var(--sector-accent, var(--gold));
}
.sector-card[data-sector-color] {
  border-top: 4px solid var(--sector-accent);
}

/* ── 7. Custom cursor ── */
@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-enabled {
    cursor: none;
  }
  body.custom-cursor-enabled a,
  body.custom-cursor-enabled button,
  body.custom-cursor-enabled input,
  body.custom-cursor-enabled select,
  body.custom-cursor-enabled textarea,
  body.custom-cursor-enabled [data-magnetic] {
    cursor: none;
  }

  .cursor-dot,
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
    transition: opacity 200ms ease;
    mix-blend-mode: difference;
  }
  .cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    transition:
      transform 80ms linear,
      width 200ms ease,
      height 200ms ease,
      background 200ms ease,
      opacity 200ms ease;
  }
  .cursor-ring {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    transition:
      transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
      width 280ms ease,
      height 280ms ease,
      border-color 200ms ease,
      opacity 200ms ease;
  }
  body.cursor-hover .cursor-dot {
    width: 0;
    height: 0;
    opacity: 0;
  }
  body.cursor-hover .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: var(--blue);
    background: rgba(255, 195, 77, 0.1);
  }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}

/* ── 24. Loader ── */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: var(--blue-deep);
  opacity: 1;
  transition: opacity 600ms ease;
}
.app-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.app-loader-inner {
  text-align: center;
  color: var(--white);
}
.app-loader-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--gold);
  animation: loader-spin 800ms linear infinite;
}
.app-loader-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  opacity: 0.86;
}
.app-loader-text::after {
  content: "";
  animation: loader-dots 1.4s infinite;
}
@keyframes loader-spin {
  to {
    transform: rotate(1turn);
  }
}
@keyframes loader-dots {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "...";
  }
}

/* ── Canvas hero ── */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.65;
  mix-blend-mode: screen;
}

/* ── 3. Animated counters — visual cue ── */
.metrics-band strong[data-counter] {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-variation-settings:
    "SOFT" 40,
    "opsz" 144;
}

/* ── 4. Client logo marquee ── */
.client-marquee {
  position: relative;
  overflow: hidden;
  padding: 36px 0;
  background: var(--white);
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.client-marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: marquee-scroll 56s linear infinite;
}
.client-marquee:hover .client-marquee-track {
  animation-play-state: paused;
}
.client-marquee-item {
  display: grid;
  place-items: center;
  height: 60px;
  flex: 0 0 auto;
}
.client-marquee-item img {
  height: 100%;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.55);
  transition: filter 280ms ease;
}
.client-marquee-item:hover img {
  filter: grayscale(0) opacity(1);
}
@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .client-marquee-track {
    animation: none;
  }
}

/* ── 5. Blur-up image placeholder ── */
.blur-up {
  background-size: cover;
  background-position: center;
  transition: filter 600ms ease;
  filter: blur(14px);
}
.blur-up.is-loaded {
  filter: blur(0);
}

/* ── 26. Magnetic buttons / microinteractions ── */
[data-magnetic] {
  position: relative;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.text-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.text-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}
.text-reveal.is-visible > span {
  transform: translateY(0);
}

.parallax-img {
  transition: transform 80ms linear;
  will-change: transform;
}

/* ── 11. Bangladesh project map ── */
.bd-map-section {
  background: linear-gradient(180deg, var(--blue-soft), var(--white));
  position: relative;
}
.bd-map-wrap {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}
.bd-map-svg {
  position: relative;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.bd-map-svg svg {
  width: 100%;
  height: auto;
  display: block;
}
.bd-map-svg .bd-region {
  fill: var(--blue-soft);
  stroke: var(--blue);
  stroke-width: 0.8;
  transition: fill 240ms ease;
}
.bd-map-svg .bd-region:hover {
  fill: rgba(245, 164, 0, 0.16);
}
.bd-map-pin {
  cursor: pointer;
}
.bd-map-pin circle {
  fill: var(--gold);
  stroke: var(--white);
  stroke-width: 2;
  transition:
    r 240ms ease,
    fill 240ms ease;
}
.bd-map-pin:hover circle,
.bd-map-pin.is-active circle {
  fill: var(--blue);
}
.bd-map-pin .pin-pulse {
  fill: var(--gold);
  opacity: 0.4;
  transform-origin: center;
  animation: pin-pulse 2.4s ease-out infinite;
}
@keyframes pin-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}
.bd-map-info {
  position: sticky;
  top: 100px;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 280px;
}
.bd-map-info h3 {
  margin: 0 0 8px;
  color: var(--blue-dark);
}
.bd-map-info .bd-map-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.bd-map-info p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}
.bd-map-info img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
}
.bd-map-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.bd-map-city-chip {
  padding: 6px 12px;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-dark);
}

/* ── 12. Cost benchmark tool ── */
.cost-tool {
  position: relative;
  padding: clamp(40px, 5vw, 64px);
  background:
    radial-gradient(circle at top right, rgba(245, 164, 0, 0.12), transparent 20rem),
    linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
.cost-tool::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.7;
}
.cost-tool > * {
  position: relative;
  z-index: 1;
}
.cost-tool h2 {
  color: var(--white);
}
.cost-tool-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  margin-top: 28px;
}
.cost-tool-controls {
  display: grid;
  gap: 18px;
}
.cost-tool-controls label {
  color: rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 8px;
}
.cost-tool-controls select,
.cost-tool-controls input[type="range"] {
  width: 100%;
}
.cost-tool-result {
  padding: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}
.cost-tool-range {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  margin: 12px 0 14px;
  font-variant-numeric: tabular-nums;
}
.cost-tool-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
  margin: 14px 0 0;
}
.cost-tool-breakdown {
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
}
.cost-tool-breakdown div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cost-tool-breakdown strong {
  color: var(--white);
  font-weight: 700;
}

/* ── 15. Timeline ── */
.timeline {
  position: relative;
  margin-top: 40px;
}
.timeline-track {
  position: relative;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 24px 4px 40px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.timeline-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-soft), var(--gold), var(--blue-soft));
  z-index: 0;
}
.timeline-item {
  flex: 0 0 280px;
  scroll-snap-align: center;
  position: relative;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1;
}
.timeline-item-year {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
}
.timeline-item h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--blue-dark);
  line-height: 1.3;
}
.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* ── 16. Before/after slider ── */
.before-after {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  user-select: none;
  background: var(--paper);
}
.before-after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.before-after .after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
  will-change: clip-path;
}
.before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--gold);
  cursor: ew-resize;
  z-index: 2;
}
.before-after-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--blue-dark);
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.before-after-handle::after {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  color: var(--blue-dark);
  font-weight: 800;
  z-index: 1;
}
.before-after-label {
  position: absolute;
  top: 14px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
}
.before-after-label.before {
  left: 14px;
}
.before-after-label.after {
  right: 14px;
}

/* ── 14. Sticky-scroll case study narrative ── */
.scroll-narrative {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  padding-block: 60px;
}
.scroll-narrative-visual {
  position: sticky;
  top: 110px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}
.scroll-narrative-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  position: absolute;
  inset: 0;
  transition: opacity 600ms ease;
}
.scroll-narrative-visual img.is-active {
  opacity: 1;
}
.scroll-narrative-chapters {
  display: grid;
  gap: 80px;
  padding-bottom: 30vh;
}
.scroll-narrative-chapter {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.scroll-narrative-chapter h3 {
  margin-bottom: 16px;
  color: var(--blue-dark);
  font-size: clamp(24px, 2.4vw, 32px);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.scroll-narrative-chapter p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 17px;
}

/* ── 17. Project dashboard mockup ── */
.dashboard-mock {
  background: var(--blue-deep);
  padding: clamp(40px, 4vw, 64px);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  box-shadow: var(--shadow-strong);
}
.dashboard-mock-window {
  background: #0f1830;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dashboard-mock-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.dashboard-mock-titlebar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  display: inline-block;
}
.dashboard-mock-titlebar i:nth-child(2) {
  background: #ffbd2e;
}
.dashboard-mock-titlebar i:nth-child(3) {
  background: #27c93f;
}
.dashboard-mock-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 480px;
}
.dashboard-mock-sidebar {
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
.dashboard-mock-sidebar h4 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dashboard-mock-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.dashboard-mock-sidebar li {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  cursor: default;
}
.dashboard-mock-sidebar li.is-active {
  background: rgba(92, 139, 255, 0.18);
  color: var(--white);
}
.dashboard-mock-main {
  padding: 24px;
  display: grid;
  gap: 18px;
}
.dashboard-mock-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dashboard-mock-stat {
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}
.dashboard-mock-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  margin-bottom: 3px;
}
.dashboard-mock-stat span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dashboard-mock-chart {
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  min-height: 220px;
}
.dashboard-mock-chart-title {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dashboard-mock-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  height: 140px;
  align-items: end;
}
.dashboard-mock-bars div {
  background: linear-gradient(180deg, var(--gold), var(--blue));
  border-radius: 2px;
  opacity: 0.8;
}

/* ── 25. Performance: reduce paint hits ── */
img {
  content-visibility: auto;
}

/* ── 22. Scroll-driven progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9998;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 50;
  animation: scroll-progress linear;
  animation-timeline: scroll();
}
@supports not (animation-timeline: scroll()) {
  .scroll-progress {
    display: none;
  }
}
@keyframes scroll-progress {
  to {
    transform: scaleX(1);
  }
}

/* ── 23. Container queries — adaptive cards ── */
.directory-grid,
.insights-grid,
.sector-card-grid {
  container-type: inline-size;
  container-name: cards;
}
@container cards (max-width: 720px) {
  .directory-card,
  .insight-card,
  .sector-card {
    grid-template-columns: 1fr;
  }
}

/* ── View Transitions (#8 #21) ── */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 320ms;
}
::view-transition-old(root) {
  animation-name: fade-out;
}
::view-transition-new(root) {
  animation-name: fade-in;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}

/* ── 9. Footer enrichment ── */
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  transition:
    background 180ms,
    color 180ms;
}
.footer-socials a:hover {
  background: var(--gold);
  color: var(--blue-deep);
}
.footer-socials svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.footer-statements {
  grid-column: 1 / -1;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.footer-statements a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms;
}
.footer-statements a:hover {
  border-bottom-color: var(--gold);
}

/* ── 27. Sound system control ── */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  margin-left: 6px;
  transition:
    background 180ms,
    opacity 180ms;
}
.sound-toggle:hover {
  background: var(--blue-soft);
}
.sound-toggle[aria-pressed="false"] {
  opacity: 0.55;
}
.sound-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Mobile adjustments for new components ── */
@media (max-width: 1100px) {
  .bd-map-wrap,
  .cost-tool-grid,
  .scroll-narrative,
  .dashboard-mock-body {
    grid-template-columns: 1fr;
  }
  .bd-map-info {
    position: static;
  }
  .scroll-narrative-visual {
    position: relative;
    top: 0;
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 780px) {
  .dashboard-mock-stats {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-mock-sidebar {
    display: none;
  }
  .timeline-item {
    flex: 0 0 220px;
  }
}

/* ============================================================
   Site-wide: active nav indicator
   ============================================================ */
#primary-nav a.is-active {
  color: var(--blue-dark);
  background: var(--blue-soft);
  position: relative;
}

#primary-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* ============================================================
   Admin panel — new controls for People fields
   ============================================================ */

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-dark);
}

.admin-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  margin: 0;
}

.admin-image-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.admin-image-preview {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
}

.admin-image-upload {
  display: inline-flex;
  cursor: pointer;
}

.admin-image-upload .button {
  cursor: pointer;
}

/* ============================================================
   People page — premium consultancy redesign
   ============================================================ */

.people-hero {
  position: relative;
  padding: clamp(72px, 9vw, 120px) clamp(18px, 4vw, 58px) clamp(56px, 7vw, 84px);
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(8, 24, 66, 0.92) 0%, rgba(15, 46, 120, 0.82) 55%, rgba(38, 58, 99, 0.68) 100%),
    url("assets/images/projects/sm-building.jpg") center/cover;
  overflow: hidden;
}

.people-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(245, 164, 0, 0) 65%);
}

.people-hero-inner {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

.people-hero h1 {
  margin: 0 0 22px;
  max-width: 880px;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.people-hero-lead {
  max-width: 760px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
}

.people-hero-trust {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.people-hero-trust li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.5;
}

.people-hero-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 2px;
  background: var(--gold);
}

.people-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.people-hero-actions .button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.people-hero-actions .button.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Section lead text under headings */
.section-lead {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

/* ----------- Leadership grid ----------- */
.people-leadership {
  background: var(--white);
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.leadership-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
}

.leadership-card:hover,
.leadership-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(24, 63, 157, 0.35);
  box-shadow: 0 18px 40px rgba(8, 24, 66, 0.12);
  outline: none;
}

.leadership-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.leadership-card.is-active-modal {
  border-color: var(--blue);
  box-shadow:
    0 0 0 2px rgba(24, 63, 157, 0.18),
    0 18px 40px rgba(8, 24, 66, 0.14);
}

.leadership-card.is-active-modal .leadership-card-photo::after {
  transform: scaleX(1);
}

.leadership-card-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--blue-soft);
  overflow: hidden;
}

.leadership-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.leadership-card:hover .leadership-card-photo img {
  transform: scale(1.04);
}

.leadership-card-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms ease;
}

.leadership-card:hover .leadership-card-photo::after {
  transform: scaleX(1);
}

.leadership-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

.leadership-card-role {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.leadership-card-name {
  margin: 0;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  color: var(--blue-dark);
}

.leadership-card-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.leadership-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.leadership-card-tags span {
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
}

.leadership-card-cta {
  margin-top: 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leadership-card-cta::after {
  content: "→";
  transition: transform 220ms ease;
}

.leadership-card:hover .leadership-card-cta::after {
  transform: translateX(3px);
}

/* ----------- Leadership modal ----------- */
.leadership-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
}

.leadership-modal[hidden] {
  display: none;
}

.leadership-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 66, 0.62);
  backdrop-filter: blur(6px);
  animation: fade-in 200ms ease;
}

.leadership-modal-card {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(8, 24, 66, 0.4);
  animation: modal-rise 240ms ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.leadership-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition:
    border-color 180ms ease,
    color 180ms ease;
}

.leadership-modal-close:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.leadership-modal-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.leadership-modal-body.is-switching {
  opacity: 0;
  transform: translateX(8px);
}

.leadership-modal-photo {
  background: var(--blue-soft);
}

.leadership-modal-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.leadership-modal-content {
  padding: 36px 40px 40px;
}

.leadership-modal-content .leadership-card-role {
  display: block;
  margin-bottom: 8px;
}

.leadership-modal-content h2 {
  margin: 0 0 6px;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
  color: var(--blue-dark);
}

.leadership-modal-content .modal-role {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 22px;
}

.leadership-modal-content .modal-section {
  margin: 18px 0 0;
}

.leadership-modal-content .modal-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.leadership-modal-content .modal-section p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.leadership-modal-content .modal-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.leadership-modal-content .modal-section ul li {
  margin-bottom: 4px;
}

.leadership-modal-content .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leadership-modal-content .modal-tags li {
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  margin: 0;
}

.leadership-modal-actions {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-copy-link {
  cursor: pointer;
  background: var(--white);
  color: var(--blue);
  border: 1px solid var(--line);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.modal-copy-link:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.modal-copy-link.is-copied {
  background: var(--gold);
  color: var(--blue-dark);
  border-color: var(--gold-dark);
}

.leadership-modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.modal-nav-btn {
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.modal-nav-btn:hover:not([disabled]) {
  border-color: var(--blue);
  color: var(--blue);
}

.modal-nav-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-nav-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-kbd-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  letter-spacing: 0.04em;
}

.modal-kbd-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: "Inter", monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-dark);
  line-height: 1.4;
}

.directory-clear {
  padding: 6px 12px;
  margin-left: 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.directory-clear:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-soft);
}

.directory-clear[hidden] {
  display: none;
}

/* ----------- Directory toolbar + cards ----------- */
.people-directory {
  background: var(--paper);
}

.directory-toolbar {
  position: sticky;
  top: 82px; /* offset below sticky .site-header */
  z-index: 15;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) 1fr;
  gap: 10px;
  padding: 14px;
  margin-bottom: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(8, 24, 66, 0.04);
}

.directory-toolbar input,
.directory-toolbar select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color 180ms ease;
}

.directory-toolbar input:focus-visible,
.directory-toolbar select:focus-visible {
  border-color: var(--blue);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.directory-meta {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.directory-grid-people {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.directory-card-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 18px 22px;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.directory-card-person:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 63, 157, 0.3);
  box-shadow: 0 12px 28px rgba(8, 24, 66, 0.08);
}

.directory-card-person .dc-photo {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--blue-soft);
  overflow: hidden;
  margin-bottom: 14px;
}

.directory-card-person .dc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.directory-card-person .dc-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.directory-card-person .dc-name {
  margin: 0 0 4px;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: var(--blue-dark);
}

.directory-card-person .dc-role {
  margin: 0;
  color: var(--gold-text, var(--gold-dark));
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}

.directory-card-person .dc-dept {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 2px;
}

.directory-card-person .dc-experience {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

.directory-card-person .dc-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
  width: 100%;
}

.directory-card-person .dc-tags span {
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 999px;
}

.directory-empty,
.leadership-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 4px;
}

.leadership-empty .eyebrow {
  margin-bottom: 8px;
}

.leadership-empty p:last-child {
  margin: 0;
  max-width: 460px;
  margin-inline: auto;
  font-size: 14px;
  line-height: 1.55;
}

.directory-mark {
  background: rgba(245, 164, 0, 0.22);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: inherit;
}

.latest-appointment-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 18px;
  padding: 14px 22px;
  margin-bottom: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  color: var(--blue-dark);
}

.latest-appointment-callout:hover {
  border-color: var(--blue);
  border-left-color: var(--gold);
  box-shadow: 0 10px 24px rgba(8, 24, 66, 0.08);
  transform: translateY(-2px);
}

.latest-appointment-callout .eyebrow {
  grid-column: 1;
  margin: 0;
  color: var(--gold-dark);
}

.latest-appointment-callout strong {
  grid-column: 1;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--blue-dark);
  line-height: 1.35;
}

.latest-appointment-callout .callout-link {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .latest-appointment-callout {
    grid-template-columns: 1fr;
    padding: 14px 18px;
  }
  .latest-appointment-callout .callout-link {
    grid-row: auto;
    grid-column: 1;
    margin-top: 4px;
  }
}

/* ----------- Capability section ----------- */
.team-capability {
  background: linear-gradient(180deg, var(--blue-soft) 0%, var(--white) 100%);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.capability-card {
  padding: 26px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
}

.capability-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(8, 24, 66, 0.08);
}

.capability-card h3 {
  margin: 0 0 10px;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  color: var(--blue-dark);
}

.capability-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.capability-card.capability-wide {
  grid-column: span 3;
  border-left-width: 3px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-color: var(--gold);
  color: var(--white);
}

.capability-card.capability-wide h3 {
  color: var(--white);
}

.capability-card.capability-wide p {
  color: rgba(255, 255, 255, 0.86);
}

.capability-support {
  margin-top: 38px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.capability-support .eyebrow {
  margin-bottom: 16px;
}

.capability-support ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.capability-support li {
  position: relative;
  padding: 6px 14px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  background: var(--blue-soft);
  border-radius: 999px;
}

/* ----------- Trust stats ----------- */
.people-trust {
  background: var(--white);
}

.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
}

.trust-stat {
  position: relative;
  padding: 32px 26px;
  border-right: 1px solid var(--line);
  border-top: 3px solid var(--gold);
}

.trust-stat:last-child {
  border-right: none;
}

.trust-stat strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  color: var(--blue);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
}

.trust-stat span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ----------- Final CTA ----------- */
.people-cta {
  padding: clamp(56px, 7vw, 88px) clamp(18px, 4vw, 58px);
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: var(--white);
  text-align: center;
}

.people-cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.people-cta h2 {
  margin: 0 0 14px;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.18;
  color: var(--white);
  max-width: none;
}

.people-cta p {
  margin: 0 auto 26px;
  max-width: 580px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.6;
}

.people-cta .button.primary {
  background: var(--gold);
  color: var(--blue-dark);
  box-shadow: 0 14px 34px rgba(245, 164, 0, 0.3);
}

.people-cta .button.primary:hover {
  background: var(--gold-dark);
  color: var(--white);
}

/* ----------- Responsive ----------- */
@media (max-width: 1100px) {
  .leadership-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .directory-grid-people {
    grid-template-columns: repeat(5, 1fr);
  }
  .directory-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .capability-card.capability-wide {
    grid-column: span 2;
  }
  .trust-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-stat:nth-child(2) {
    border-right: none;
  }
  .trust-stat:nth-child(3),
  .trust-stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .leadership-modal-body {
    grid-template-columns: 1fr;
  }
  .leadership-modal-photo img {
    aspect-ratio: 5 / 3;
  }
  .leadership-modal-content {
    padding: 26px 24px 30px;
  }
}

@media (max-width: 680px) {
  .leadership-grid {
    grid-template-columns: 1fr;
  }
  .directory-grid-people {
    grid-template-columns: repeat(3, 1fr);
  }
  .directory-toolbar {
    grid-template-columns: 1fr;
  }
  .capability-grid {
    grid-template-columns: 1fr;
  }
  .capability-card.capability-wide {
    grid-column: span 1;
  }
  .trust-stats {
    grid-template-columns: 1fr;
  }
  .trust-stat {
    border-right: none;
    border-top: 3px solid var(--gold);
  }
  .trust-stat + .trust-stat {
    border-top: 1px solid var(--line);
  }
  .directory-card-person .dc-body {
    padding: 14px;
  }
  .directory-card-person .dc-name {
    font-size: 15px;
  }
  .directory-card-person .dc-role {
    font-size: 12px;
  }
}

/* ----------- Directory secondary toolbar + grouped view ----------- */
.directory-toolbar-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 0 4px;
}

.directory-toolbar-secondary .directory-meta {
  margin: 0;
}

.directory-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px; /* WCAG 2.2 — 2.5.8 target size for the checkbox hit area */
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  cursor: pointer;
}

/* WCAG 2.2 — 2.4.11 Focus Not Obscured: keep anchored/tab-focused targets
   clear of the sticky header (header ~82px + breathing room). */
html {
  scroll-padding-top: 96px;
}

.directory-group-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  margin: 0;
}

.directory-group + .directory-group {
  margin-top: 28px;
}

.directory-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.directory-group-header h3 {
  margin: 0;
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: var(--blue-dark);
}

.directory-group-header span {
  color: var(--muted);
  font-size: 13px;
}

/* ----------- Insight byline: leader link ----------- */
.author-leader-link {
  color: var(--gold-dark);
  text-decoration: underline;
  text-decoration-color: rgba(245, 164, 0, 0.4);
  text-underline-offset: 2px;
  transition: text-decoration-color 180ms ease;
}

.author-leader-link:hover {
  text-decoration-color: var(--gold);
}

/* ----------- Initials avatar fallback (broken/missing photos) ----------- */
.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  font-family: "Exo", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 3vw, 38px);
  letter-spacing: 0.04em;
}

.dc-photo .avatar-fallback {
  font-size: clamp(20px, 2.4vw, 28px);
}

.leadership-modal-photo .avatar-fallback {
  position: relative;
  aspect-ratio: 4 / 5;
  font-size: clamp(28px, 4vw, 48px);
}

/* ============================================================
   Company history timeline (Profile page) — vertical timeline
   reusing the brand gold accent + card tokens.
   ============================================================ */
.history-section {
  background: var(--white);
}

.history-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.history-timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 7px;
  width: 2px;
  background: var(--line);
}

.history-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding: 0 0 30px 32px;
}

.history-item:last-child {
  padding-bottom: 0;
}

.history-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--line);
}

.history-year {
  align-self: start;
  min-width: 64px;
  color: var(--gold);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
  padding-top: 1px;
}

.history-title {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 20px;
  line-height: 1.22;
}

.history-detail {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
  max-width: 70ch;
}

/* ============================================================
   Methodology (How We Work page) — intro + pillars (service-grid)
   + process (why-grid) reuse existing components; HSE checklist
   is a new tag-style list keyed to the brand tokens.
   ============================================================ */
.hse-section {
  background: var(--white);
}

.hse-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hse-item {
  position: relative;
  padding: 16px 18px 16px 44px;
  background: linear-gradient(180deg, rgba(234, 240, 251, 0.6), rgba(255, 255, 255, 0.8));
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.hse-item::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: 800;
}

@media (max-width: 900px) {
  .hse-checklist {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .hse-checklist {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ----------- Contact page: leader-context banner ----------- */
.contact-leader-banner {
  margin: 0 0 22px;
  padding: 18px 22px;
  background: var(--blue-soft);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
}

.contact-leader-banner .eyebrow {
  margin-bottom: 6px;
}

.contact-leader-banner p:last-child {
  margin: 0;
  color: var(--blue-dark);
  font-size: 15px;
  line-height: 1.55;
}

/* ----------- Client directory logos ----------- */
.client-name-grid .client-logo {
  display: block;
  height: 30px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  margin: 0 0 10px;
}

/* ----------- Footer: two offices side by side ----------- */
.footer-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  row-gap: 2px;
  align-content: start;
}

.footer-contact h4 {
  grid-column: 1 / -1;
}

.footer-contact p {
  margin: 0;
}

@media (max-width: 600px) {
  .footer-contact {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
}

/* ----------- Skeleton loading state ----------- */
.skeleton-card {
  pointer-events: none;
  cursor: default;
}

.skeleton-card .leadership-card-body,
.skeleton-card .dc-body {
  gap: 10px;
}

.skeleton-photo {
  background: linear-gradient(110deg, #eef1f7 30%, #f7f9fd 50%, #eef1f7 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-bar {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(110deg, #eef1f7 30%, #f7f9fd 50%, #eef1f7 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-bar-sm {
  width: 35%;
  height: 10px;
}

.skeleton-bar-md {
  width: 65%;
  height: 12px;
}

.skeleton-bar-lg {
  width: 85%;
  height: 18px;
}

.skeleton-toolbar {
  align-items: center;
  pointer-events: none;
}

.skeleton-toolbar .skeleton-bar {
  height: 38px;
  width: 100%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-photo,
  .skeleton-bar {
    animation: none;
    background: #eef1f7;
  }
}

/* ----------- Print styles (People page) ----------- */
@media print {
  .site-header,
  .people-hero-actions,
  .leadership-modal,
  .leadership-modal-nav,
  .directory-toolbar,
  .directory-toolbar-secondary,
  .people-cta,
  .leadership-card-cta,
  .menu-button,
  .header-cta {
    display: none !important;
  }

  body {
    background: white;
  }

  .people-hero {
    color: black;
    background: white;
    padding: 20px 0;
    border-bottom: 2px solid #000;
  }

  .people-hero h1,
  .people-hero-lead,
  .people-hero-trust li {
    color: black;
  }

  .leadership-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    page-break-inside: avoid;
  }

  .leadership-card,
  .directory-card-person,
  .capability-card {
    page-break-inside: avoid;
    border: 1px solid #999;
    box-shadow: none !important;
    transform: none !important;
  }

  .leadership-card-summary {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .directory-grid-people {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .directory-card-person {
    break-inside: avoid;
  }

  .trust-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .trust-stat strong {
    color: black;
  }

  .capability-card.capability-wide {
    background: white;
    color: black;
    border: 1px solid #999;
  }

  .capability-card.capability-wide h3,
  .capability-card.capability-wide p {
    color: black;
  }
}

/* ----------- Motion + hover guards (a11y / touch) ----------- */
@media (prefers-reduced-motion: reduce) {
  .leadership-card,
  .leadership-card-photo img,
  .leadership-card-photo::after,
  .leadership-card-cta::after,
  .directory-card-person,
  .capability-card,
  .leadership-modal-backdrop,
  .leadership-modal-card {
    transition: none !important;
    animation: none !important;
  }
  .leadership-card:hover,
  .directory-card-person:hover,
  .capability-card:hover {
    transform: none;
  }
}

@media (hover: none) {
  .leadership-card:hover,
  .directory-card-person:hover,
  .capability-card:hover {
    transform: none;
    box-shadow: none;
  }
  .leadership-card:hover .leadership-card-photo img,
  .leadership-card:hover .leadership-card-photo::after,
  .leadership-card:hover .leadership-card-cta::after {
    transform: none;
  }
}

/* ============================================================
   Brand "Since 2009" line + hero motto
   ============================================================ */
.brand-text .brand-since {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content > p.hero-motto:not(.eyebrow) {
  margin: 0 0 18px;
  max-width: 640px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 880px) {
  .brand-text .brand-since {
    display: none;
  }
}

/* ── Fix 1: SEO/no-JS fallback block (injected by serve.mjs as <div data-seo-ssr>) ──
   It was rendering as an unstyled, edge-to-edge raw <h1>+<p> at the top of every page,
   above the real styled hero. Keep it in the DOM for crawlers/no-JS, but hide it
   visually (every page already has a proper visible hero/heading). */
[data-seo-ssr] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Fix 2: team / leadership photos ──
   The square source headshots were rendering in tall boxes and cropping to the
   forehead (faces cut off). Force a uniform square box so the full headshot shows. */
.people-grid:not(.directory) article img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover;
  object-position: center 25%;
}

/* ── Light footer (full-colour logo on a light background) ── */
.site-footer { background: #f5f8fd; color: var(--muted); border-top: 3px solid var(--gold); }
.site-footer strong { color: var(--ink); }
.footer-brand p { color: var(--muted); }
.footer-contact h4 { color: var(--blue-dark); }
.footer-contact p { color: var(--muted); }
.footer-contact a { color: #8a5800; }
.footer-contact a:hover { color: var(--ink); }
.footer-bottom { color: var(--muted); border-top: 1px solid var(--line); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--ink); }
