/* =========================================================
   Blackhill Technologies - design system
   Navy #1F2D56 carries the weight. Yellow #FFE709 is accent only.
   ========================================================= */

:root {
  --navy:    #1F2D56;
  --navy-90: #16213F;
  --navy-95: #131C36;
  --yellow:  #FFE709;
  --yellow-press: #E0CB00;
  --white:   #FFFFFF;
  --ink:     #2A2E35;
  --paper:   #F6F6F2;
  --tint:    #F4F6FA;
  --grey:    #5C616B;
  --border:  #E3E3DD;
  --hairline-dark: rgba(255,255,255,.16);
  --error:   #A4262C;

  --font-head: 'Century Gothic', 'AppleGothic', 'Trebuchet MS', sans-serif;
  --font-body: Calibri, 'Gill Sans', 'Gill Sans MT', sans-serif;

  --fs-display: clamp(2.6rem, 1.8rem + 2.4vw, 3.4rem);
  --fs-h1-sub:  clamp(2.2rem, 1.7rem + 1.6vw, 2.75rem);
  --fs-h2:      clamp(1.8rem, 1.45rem + 1.2vw, 2.25rem);
  --fs-h3:      1.3rem;
  --fs-lead:    1.1875rem;
  --fs-body:    1.0625rem;

  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 48px; --sp-6: 64px; --sp-7: 96px; --sp-8: 128px;

  --shadow: 0 4px 16px rgba(0,8,21,.08);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { font-size: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-size: 0.85em;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2px 6px;
}

::selection { background: var(--yellow); color: var(--navy); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 2px; }
.hero :focus-visible,
.page-head :focus-visible,
.svc-hero :focus-visible,
.auto-band :focus-visible,
.cta-band :focus-visible,
.site-footer :focus-visible,
.tier-featured :focus-visible { outline-color: var(--yellow); }
main:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 24px;
  top: -100%;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 0 0 3px 3px;
  border-bottom: 3px solid var(--yellow);
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }

/* Top utility bar (email + social), sits above the nav inside the sticky header */
.topbar { background: var(--navy-95); }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding: 5px 0;
}
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #C5CBDD;
  font-size: 0.85rem;
  font-weight: 500;
}
.topbar a:hover { color: var(--yellow); text-decoration: none; }
.topbar-ico { flex-shrink: 0; }
.topbar-social {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  transition: height .2s ease;
}
.site-header.is-scrolled .nav { height: 62px; }

.brand { display: flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 38px; width: auto; display: block; transition: height .2s ease; }
.site-header.is-scrolled .brand-logo { height: 31px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 10px 16px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 3px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--border); text-decoration: none; }
.nav-links a.active { border-bottom-color: var(--yellow); }
.nav-cta { margin-left: 12px; }
.nav-cta a { padding: 9px 18px; border-bottom: 2px solid var(--yellow); }
.nav-cta a:hover { border-bottom-color: var(--yellow-press); }

/* ---------- Nav dropdown ---------- */
.nav-has-dropdown { position: relative; }
.nav-dropdown-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  line-height: 1.65;
  transition: border-color .15s;
}
.nav-dropdown-label:hover { border-bottom-color: var(--border); }
.dropdown-caret { flex-shrink: 0; transition: transform .15s; }
[aria-expanded="true"].nav-dropdown-label .dropdown-caret,
.nav-has-dropdown.is-open .dropdown-caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  border: 1px solid rgba(255,231,9,.18);
  border-radius: 4px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, visibility .15s;
  z-index: 200;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}
@media (hover: hover) {
  .nav-has-dropdown:hover .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-has-dropdown:hover .nav-dropdown-label { border-bottom-color: var(--border); }
  .nav-has-dropdown:hover .dropdown-caret { transform: rotate(180deg); }
}
.nav-has-dropdown.is-open .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; }

.nav-dropdown li { margin: 0; }
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
  border-bottom: none !important;
  transition: background .1s, color .1s;
}
.nav-dropdown a:hover { background: rgba(255,255,255,.1); color: var(--yellow); text-decoration: none; }
.nav-dropdown-img { width: 22px; height: 22px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: 3px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
}
.nav-toggle-bar + .nav-toggle-bar { margin-top: 5px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: .03em;
  border-radius: 3px;
  border: 2px solid var(--navy);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-90); color: var(--white); text-decoration: none; }
.btn-primary:active { background: var(--navy-95); }
.btn-yellow { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--yellow-press); border-color: var(--yellow-press); color: var(--navy); text-decoration: none; }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); text-decoration: none; }
.btn-group { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 3px solid var(--yellow);
  padding-bottom: 4px;
  margin-bottom: 18px;
}
.eyebrow-light { color: var(--white); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 76vh;
  text-align: center;
  overflow: hidden;
  background-color: var(--navy);
  color: var(--white);
  padding: 96px 0;
}
/* Background sits on a pseudo-element so it can drift slowly without moving the text */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(19,28,54,.72), rgba(19,28,54,.84)),
    url('../Images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1);
  animation: hero-zoom 26s ease-in-out infinite alternate;
}
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }
.hero .container { width: 100%; position: relative; z-index: 1; }
.hero-copy { max-width: 860px; margin: 0 auto; }
/* Staggered entrance for the hero content (scoped to .js so content is never hidden without scripts) */
.js .hero-copy > * {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-rise .7s cubic-bezier(.2,.6,.2,1) forwards;
}
.js .hero-copy > *:nth-child(1) { animation-delay: .10s; }
.js .hero-copy > *:nth-child(2) { animation-delay: .20s; }
.js .hero-copy > *:nth-child(3) { animation-delay: .32s; }
.js .hero-copy > *:nth-child(4) { animation-delay: .44s; }
@keyframes hero-rise { to { opacity: 1; transform: none; } }
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 1.3rem + 2.3vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -.015em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--yellow); }
.hero p {
  font-size: var(--fs-lead);
  max-width: 60ch;
  margin: 0 auto 36px;
  color: #DCE0EA;
}
.hero .btn-group { justify-content: center; }

/* ---------- Page head (subpages) ---------- */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 88px 0 72px;
  border-bottom: 4px solid var(--yellow);
}
.page-head h1 {
  color: var(--white);
  font-size: var(--fs-h1-sub);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 14px;
}
.page-head h1 .accent { color: var(--yellow); }
.page-head p {
  color: #D9DDE8;
  font-size: 1.125rem;
  max-width: 100%;
  margin: 0;
}

/* ---------- Services hero (two-column with quick-nav) ---------- */
.svc-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  border-bottom: 4px solid var(--yellow);
  padding: 88px 0 80px;
  background-color: var(--navy);
  background-image:
    radial-gradient(circle at 86% 18%, rgba(255,231,9,.12), transparent 44%),
    linear-gradient(155deg, var(--navy-90), var(--navy) 60%, var(--navy-95));
}
/* Faint pixel grid, fading downward, for texture */
.svc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1.5px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 72%);
          mask-image: linear-gradient(180deg, #000, transparent 72%);
  pointer-events: none;
}
.svc-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: center;
}
/* Keep hero content above the decorative grid (covers the single-column Careers header too) */
.svc-hero > .container { position: relative; z-index: 1; }
/* Single-column variant: centre the content so the band is not lopsided */
.svc-hero-solo { text-align: center; }
.svc-hero-solo .svc-hero-copy { max-width: 720px; margin: 0 auto; }
.svc-hero-solo .svc-hero-copy p { max-width: 60ch; margin-left: auto; margin-right: auto; }
.svc-hero-solo .btn-group { justify-content: center; }
.svc-hero h1 {
  color: var(--white);
  font-size: var(--fs-h1-sub);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 16px;
}
.svc-hero h1 .accent { color: var(--yellow); }
.svc-hero p { color: #D9DDE8; font-size: 1.125rem; line-height: 1.6; margin: 0 0 30px; max-width: 56ch; }

.svc-hero-nav { display: grid; gap: 12px; }
.svc-hero-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  color: var(--white);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.svc-hero-tile:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,231,9,.55);
  transform: translateX(4px);
  text-decoration: none;
}
.svc-hero-ico {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 3px;
  background: rgba(255,231,9,.12);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
}
.svc-hero-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svc-hero-label { font-family: var(--font-head); font-weight: 700; font-size: 0.98rem; }
.svc-hero-arrow { margin-left: auto; color: rgba(255,255,255,.5); transition: color .18s ease, transform .18s ease; }
.svc-hero-tile:hover .svc-hero-arrow { color: var(--yellow); transform: translateX(3px); }

/* Entrance, scoped to .js. Uses `backwards` fill (not forwards) so the tile
   hover transform is not overridden by a filling animation. */
.js .svc-hero-copy { animation: svc-hero-in .6s cubic-bezier(.2,.6,.2,1) .05s backwards; }
.js .svc-hero-tile { animation: svc-hero-in .55s cubic-bezier(.2,.6,.2,1) backwards; }
.js .svc-hero-tile:nth-child(1) { animation-delay: .18s; }
.js .svc-hero-tile:nth-child(2) { animation-delay: .27s; }
.js .svc-hero-tile:nth-child(3) { animation-delay: .36s; }
.js .svc-hero-tile:nth-child(4) { animation-delay: .45s; }
@keyframes svc-hero-in { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Stack strip ---------- */
.stack-strip {
  background: var(--tint);
  border-top: 1px solid rgba(31,45,86,.12);
  border-bottom: 1px solid rgba(31,45,86,.12);
  padding: 20px 0;
  overflow: hidden;
}
.stack-strip .container {
  display: flex;
  align-items: center;
  gap: 28px;
}
.stack-kicker {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(31,45,86,.75);
  white-space: nowrap;
}
.stack-marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.stack-track {
  display: flex;
  width: max-content;
  animation: stack-scroll 38s linear infinite;
}
.stack-marquee:hover .stack-track { animation-play-state: paused; }
.stack-list {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.stack-list li {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
}
.stack-list li::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--yellow);
  margin: 0 20px;
}
@keyframes stack-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section { padding: var(--sp-7) 0; }
.section-alt { background: var(--paper); }
.section-head { max-width: none; margin: 0 0 56px; }
.section-head h2 { font-size: var(--fs-h2); letter-spacing: -.01em; margin: 0 0 12px; }
.section-head p { color: var(--grey); font-size: var(--fs-lead); max-width: 130ch; margin: 0; }

/* ---------- Capabilities (editorial) ---------- */
.capabilities { padding: 112px 0; }
.cap-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 72px;
  align-items: start;
}
.cap-intro { position: sticky; top: 104px; }
.cap-intro h2 { font-size: var(--fs-h2); letter-spacing: -.01em; margin: 6px 0 20px; }
.cap-intro p { color: var(--grey); font-size: 1.08rem; max-width: 62ch; margin: 0 0 28px; }
.cap-cta {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 3px;
}
.cap-cta::after { content: " \2192"; display: inline-block; transition: transform .15s ease; }
.cap-cta:hover { text-decoration: none; }
.cap-cta:hover::after { transform: translateX(4px); }

.cap-list { border-top: 1px solid var(--border); }
.cap-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.cap-index {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -1px;
}
.cap-index::after {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  background: var(--yellow);
  margin-top: 14px;
}
.cap-title { font-size: 1.5rem; margin: 0 0 10px; }
.cap-row-intro {
  color: var(--grey);
  font-size: 1.08rem;
  max-width: 62ch;
  margin: 0 0 22px;
}
.cap-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}
.cap-tags li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 0.98rem;
  color: var(--navy);
  break-inside: avoid;
}
.cap-tags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 8px; height: 8px;
  background: var(--yellow);
  border: 1px solid var(--navy);
}

/* ---------- Engagement model ---------- */
.engage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.engage-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--navy);
  border-radius: 3px;
  padding: 28px 26px;
}
.step-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 14px;
}
.step-num::after {
  content: "";
  display: block;
  width: 22px; height: 3px;
  background: var(--yellow);
  margin-top: 8px;
}
.engage-step h3 { font-size: 1.2rem; margin: 0 0 8px; }
.engage-step p { color: var(--grey); font-size: 0.98rem; margin: 0; }
.engage-cta { margin-top: 40px; }

/* ---------- Pillars (why / standards) ---------- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.pillar {
  position: relative;
  border-left: 2px solid var(--navy);
  padding: 2px 0 2px 26px;
}
.pillar::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0;
  width: 8px; height: 8px;
  background: var(--yellow);
  border: 1px solid var(--navy);
}
.pillar h3 { font-size: 1.15rem; margin: 0 0 8px; }
.pillar p { color: var(--grey); font-size: 0.98rem; max-width: 38ch; margin: 0; }

/* ---------- Service tiers ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: start;
}
.tier-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 32px 28px;
  position: relative;
}
.tier-featured {
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--white);
}
.tier-featured h3 { color: var(--white); }
.tier-featured .tier-summary { color: #C9CEE0; }
.tier-flag {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 2px;
}
.tier-card h3 { font-size: 1.4rem; margin: 0 0 6px; }
.tier-summary { color: var(--grey); margin: 0 0 18px; }
.tier-list { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--border); }
.tier-featured .tier-list { border-top-color: var(--hairline-dark); }
.tier-list li { padding: 7px 0 7px 24px; position: relative; }
.tier-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--navy);
  font-weight: bold;
}
.tier-featured .tier-list li::before { color: var(--yellow); }
.tier-note { text-align: center; margin: 40px 0 0; color: var(--grey); }
.tier-note a { font-weight: 600; }

/* ---------- CTA panel ---------- */
.cta-band {
  background: var(--white);
  padding: var(--sp-7) 0;
}
.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--navy);
  color: var(--white);
  border-top: 4px solid var(--yellow);
  border-radius: 4px;
  padding: 52px 56px;
}
.cta-panel h2 { color: var(--white); font-size: 1.75rem; letter-spacing: -.01em; margin: 0 0 6px; }
.cta-panel p { color: #C9CEE0; font-size: var(--fs-body); margin: 0; }

/* ---------- Solutions marketplace ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; }
.filter-chip {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 9px 16px;
  background: var(--white);
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--navy); text-decoration: none; }
.filter-chip[aria-current="true"] {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: inset 0 -3px 0 var(--yellow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.app-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--navy);
  border-radius: 3px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease, border-top-color .15s ease;
}
.app-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-top-color: var(--yellow);
}
.app-card.is-hidden { display: none; }

.app-mark {
  position: relative;
  width: 44px; height: 44px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 2px;
  margin-bottom: 16px;
}
.app-mark::after {
  content: "";
  position: absolute;
  right: 4px; bottom: 4px;
  width: 7px; height: 7px;
  background: var(--yellow);
}
.app-mark::before {
  content: "";
  position: absolute;
  right: 13px; bottom: 4px;
  width: 7px; height: 7px;
  background: rgba(255,255,255,.35);
}
.app-mark-img { width: 52px; height: 52px; object-fit: contain; border-radius: 4px; margin-bottom: 16px; }
.app-mark-outline {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: 1.5rem;
}
.app-mark-outline::before, .app-mark-outline::after { content: none; }

.app-card .tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 9px;
  margin-bottom: 12px;
}
.app-card h3 { font-size: 1.25rem; margin: 0 0 6px; }
.app-card p { color: var(--grey); margin: 0 0 20px; flex-grow: 1; }
.card-link {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
}
.card-link::before { content: ""; position: absolute; inset: 0; }
.card-link .ext-ico { margin-left: 6px; transition: transform .15s ease; vertical-align: -1px; }
.app-card:hover .ext-ico { transform: translate(2px, -2px); }
.app-card:has(.card-link:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }
.app-card:has(.card-link:focus-visible) .card-link:focus-visible { outline: none; }

.card-invite { border: 1px dashed var(--navy); border-top: 1px dashed var(--navy); background: var(--paper); }
.card-invite:hover { border-style: solid; border-top-color: var(--navy); }
.card-invite .card-link::after { content: " \2192"; }

.empty-state {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 56px 40px;
}
.empty-state h2 { font-size: 1.6rem; margin: 0 0 12px; }
.empty-state p { color: var(--grey); margin: 0 0 28px; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }

.form-note { color: var(--grey); font-size: 0.95rem; margin: 0 0 24px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 0.95rem;
}
.optional { font-weight: 400; color: var(--grey); font-size: 0.85rem; text-transform: lowercase; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31,45,86,.15);
}
textarea.form-control { resize: vertical; min-height: 140px; }
.form-control.input-validation-error { border-color: var(--error); border-width: 2px; padding: 10px 13px; }
.field-validation-error { display: block; color: var(--error); font-size: 0.85rem; font-weight: 600; margin-top: 5px; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.alert-success {
  background: var(--paper);
  border-left: 4px solid var(--navy);
  border-radius: 3px;
  padding: 24px 28px;
}
.alert-success strong {
  display: block;
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.alert-success p { margin: 0 0 18px; color: var(--ink); }

.contact-info .eyebrow { margin-bottom: 8px; }
.contact-info h2 { font-size: 1.6rem; margin: 0; }
.contact-info ul { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-info li { margin-bottom: 18px; }
.contact-info .label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--grey);
  margin-bottom: 2px;
}

.next-steps-block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.next-steps-block h3 { font-size: 1.05rem; margin: 0 0 18px; }
.next-steps { list-style: none; margin: 0; padding: 0; }
.next-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 10px 0;
}
.next-steps .step-num { margin: 0; font-size: 1.1rem; }
.next-steps .step-num::after { width: 18px; margin-top: 6px; }
.next-steps p { margin: 0; color: var(--ink); font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #C9CEE0;
  margin-top: auto;
  padding: 32px 0;
}
.footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom small { color: #9AA2BD; }
.footer-bottom small a { color: #C9CEE0; }
.footer-bottom small a:hover { color: var(--yellow); text-decoration: none; }
.footer-social {
  display: inline-flex;
  align-items: center;
  color: #C9CEE0;
  flex-shrink: 0;
}
.footer-social:hover { color: var(--yellow); }

.req-id { color: var(--grey); margin-top: 32px; }

/* ---------- Reveal motion (hidden state only when JS is running) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s cubic-bezier(.2,.6,.2,1), transform .5s cubic-bezier(.2,.6,.2,1);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: 60ms; }
.js .reveal:nth-child(3) { transition-delay: 120ms; }
.js .reveal:nth-child(4) { transition-delay: 180ms; }

/* ---------- Centred section head ---------- */
.section-head.center {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.section-head.center p { max-width: 72ch; margin-left: auto; margin-right: auto; }

/* Smooth-scroll anchors clear the sticky header */
[id] { scroll-margin-top: 130px; }

/* ---------- What we do (service cards) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: 3px;
  padding: 30px 26px;
  color: var(--ink);
  transition: box-shadow .15s ease, transform .15s ease, border-top-color .15s ease;
}
.feature-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-top-color: var(--yellow);
}
.feature-card:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.feature-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 3px;
  background: var(--navy);
  color: var(--white);
  margin-bottom: 18px;
  transition: transform .18s ease;
}
.feature-icon::after {
  content: "";
  position: absolute;
  right: 4px; bottom: 4px;
  width: 6px; height: 6px;
  background: var(--yellow);
}
.feature-icon svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-card:hover .feature-icon { transform: translateY(-2px); }
.feature-card h3 { font-size: 1.2rem; margin: 0 0 10px; }
.feature-card p { color: var(--grey); font-size: 0.96rem; margin: 0 0 18px; flex-grow: 1; }
.feature-more {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
}
.feature-more::after { content: " \2192"; display: inline-block; transition: transform .15s ease; }
.feature-card:hover .feature-more::after { transform: translateX(4px); }
.center-cta { text-align: center; margin: 48px 0 0; }

/* ---------- Why partner (benefit cards) ---------- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.benefit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 32px 28px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.benefit-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 3px;
  background: var(--tint);
  border-bottom: 3px solid var(--yellow);
  color: var(--navy);
  margin-bottom: 20px;
}
.benefit-icon svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.benefit-card h3 { font-size: 1.2rem; margin: 0 0 10px; }
.benefit-card p { color: var(--grey); font-size: 0.96rem; margin: 0; }

/* ---------- Services (rich service cards) ---------- */
.svc-tabs {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 26px;
  align-items: start;
}
.svc-tab-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 5px;
  padding: 18px 22px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.svc-tab-arrow { flex-shrink: 0; color: var(--grey); transition: color .2s ease; }
.svc-tab:hover { border-color: #CFD4E0; }
.svc-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(31, 45, 86, .2);
}
.svc-tab.is-active .svc-tab-arrow { color: var(--yellow); }

.svc-tab-panels { position: relative; }
.svc-tab-panel {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 40px 38px 34px;
  box-shadow: 0 1px 2px rgba(16, 24, 48, .04);
}
.svc-tab-panel[hidden] { display: none; }

/* Large faint index, sits as a watermark in the corner */
.svc-num {
  position: absolute;
  top: 30px; right: 34px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.7rem;
  line-height: 1;
  color: rgba(31, 45, 86, .07);
  letter-spacing: -2px;
}
.svc-head { margin-bottom: 24px; }
.svc-icon {
  position: relative;
  width: 60px; height: 60px;
  border-radius: 4px;
  background: linear-gradient(145deg, var(--navy), var(--navy-90));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(31, 45, 86, .24);
}
.svc-icon::after {
  content: "";
  position: absolute;
  right: 6px; bottom: 6px;
  width: 7px; height: 7px;
  background: var(--yellow);
}
.svc-icon svg {
  width: 29px; height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svc-tab-panel h3 { font-size: 1.5rem; letter-spacing: -.015em; margin: 0 0 12px; }
.svc-summary { color: var(--grey); font-size: 1.02rem; line-height: 1.6; margin: 0 0 26px; }
.svc-caps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}
.svc-caps li {
  position: relative;
  padding-left: 26px;
}
.svc-caps li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--navy);
  font-weight: bold;
}
.svc-cap-title { display: block; font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.svc-cap-desc { display: block; color: var(--grey); font-size: 0.95rem; line-height: 1.5; margin-top: 2px; }

/* ---------- Business process automation band ---------- */
.auto-band { background: var(--navy); color: var(--white); }
.auto-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.auto-copy h2 { color: var(--white); font-size: var(--fs-h2); letter-spacing: -.01em; margin: 8px 0 16px; }
.auto-copy p { color: #C9CEE0; font-size: 1.08rem; margin: 0 0 28px; max-width: 54ch; }
.auto-points { list-style: none; margin: 0; padding: 0; }
.auto-points li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-bottom: 1px solid var(--hairline-dark);
  color: #EAEDF5;
  font-size: 1.05rem;
}
.auto-points li:last-child { border-bottom: none; }
.auto-points li::before {
  content: "\2713";
  position: absolute;
  left: 4px; top: 13px;
  color: var(--yellow);
  font-weight: bold;
}

/* ---------- Careers (open positions) ---------- */
.job-list { display: grid; gap: 18px; }
.job-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy);
  border-radius: 3px;
  padding: 26px 30px;
}
.job-card h3 { font-size: 1.25rem; margin: 0 0 6px; }
.job-meta {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--grey);
}
.job-card .job-main p { color: var(--grey); margin: 10px 0 0; }
.job-card .job-main { flex: 1 1 280px; }

/* CTA panel supports an eyebrow + constrains the text column */
.cta-panel > div { max-width: 64ch; }
.cta-panel .eyebrow { margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cap-layout { grid-template-columns: 1fr; gap: 40px; }
  .cap-intro { position: static; }
  .engage-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 860px) {
  .pillar-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 800px) {
  .hero { min-height: 58vh; padding: 72px 0; }
  .section { padding: var(--sp-6) 0; }
  .capabilities { padding: var(--sp-6) 0; }
  .page-head { padding: 64px 0 56px; }
  .svc-hero { padding: 60px 0 56px; }
  .svc-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .cta-band { padding: var(--sp-6) 0; }
  .cta-panel { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .cap-tags { columns: 1; }
  .svc-tabs { grid-template-columns: 1fr; }
  .svc-tab-list { flex-direction: row; overflow-x: auto; }
  .svc-tab { flex-shrink: 0; }
  .svc-tab-panel { padding: 32px 26px 28px; }
  .auto-inner { grid-template-columns: 1fr; gap: 36px; }

  .nav { height: auto; min-height: 64px; flex-wrap: wrap; }
  .site-header.is-scrolled .nav { height: auto; min-height: 64px; }
  .brand-logo, .site-header.is-scrolled .brand-logo { height: 30px; }
  .js .nav-toggle { display: block; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--navy);
    box-shadow: var(--shadow);
  }
  .js .nav-open .site-nav { display: block; }
  .js .site-nav .nav-links { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; }
  .js .site-nav .nav-links a { padding: 14px 8px; border-bottom: 1px solid var(--border); }
  .js .site-nav .nav-links a.active { border-bottom: 3px solid var(--yellow); }
  .js .nav-cta { margin: 16px 0 0; }
  .js .nav-cta a { display: block; text-align: center; padding: 13px 28px; border-bottom: 2px solid var(--yellow); }
  /* Dropdown in mobile nav */
  .js .nav-has-dropdown { position: static; }
  .js .nav-dropdown-label {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 14px 8px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .js .nav-dropdown-label:hover { border-bottom-color: var(--border); }
  .js .nav-dropdown {
    position: static;
    transform: none;
    background: var(--navy);
    border: none;
    border-radius: 0;
    min-width: 0;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease, visibility .25s;
    box-shadow: none;
  }
  .js .nav-has-dropdown.is-open .nav-dropdown {
    visibility: visible;
    pointer-events: auto;
    max-height: 280px;
  }
  .js .nav-dropdown a {
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .engage-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .stack-strip .container { gap: 12px; }
}

@media (max-width: 520px) {
  .topbar-social-text { display: none; }
  .topbar a { font-size: 0.8rem; }
  .topbar-inner { min-height: 34px; }
}

@media (max-width: 560px) {
  .cap-row { grid-template-columns: 1fr; gap: 16px; }
  .cap-index { font-size: 2rem; }
  .cap-index::after { margin-top: 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .reveal { opacity: 1; transform: none; }
  .app-card:hover,
  .feature-card:hover,
  .benefit-card:hover { transform: none; }
}
