/* ─────────────────────────────────────────────────────────────────────────
   IR Advantage — shared site chrome (Stage 2B, Sep 2026)

   Loaded on every page, after /assets/brand/tokens.css (the synced design
   system v2 variables) and before the page's own stylesheet. It owns:
   base accessibility, the nav and the footer. Nothing else — each page
   keeps its own layout CSS.

   Colours are tokens only (see docs: no hand-written hex in new CSS).
   ───────────────────────────────────────────────────────────────────────── */

/* ── Base accessibility (was assets/css/a11y.css, Stage 2A) ─────────────── */

/* Keyboard focus: a two-tone ring that stays visible on light surfaces and
   on navy/charcoal alike. --focus-ring flips to gold inside .on-dark and
   .on-footer (design system v2), so the companion ring flips the other way.
   Mouse clicks don't show it. */
:root { --focus-ring-2: var(--gold); }
.on-dark, .on-footer { --focus-ring-2: var(--navy); }

:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
  box-shadow: 0 0 0 var(--focus-width) var(--focus-ring-2);
}

/* Skip link: first element in <body>, visible only when focused. */
.skip-link {
  position: absolute; left: var(--space-4); top: -200px; z-index: 10000;
  background: var(--gold); color: var(--navy);
  font: var(--fw-bold) var(--fs-body-sm)/1 var(--font-body);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-xs);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

/* Reduced motion: animations finish instantly (so entrance fades end visible),
   scroll-reveals show immediately. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── Nav ────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-inverse);
  transition: all var(--dur-base) var(--ease-standard);
  border-bottom: 1px solid rgba(254, 182, 0, 0);
}
.nav.scrolled {
  background: var(--bg-inverse); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(254, 182, 0, 0.3);
}
.nav-inner {
  max-width: var(--content-max); margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between;
  height: 88px; transition: height var(--dur-base) var(--ease-standard);
}
.nav.scrolled .nav-inner { height: 64px; }
.nav-logo-img { height: 36px; width: auto; }
.nav.scrolled .nav-logo-img { height: 30px; }

.nav-links { display: flex; align-items: center; gap: var(--space-8); list-style: none; }
.nav-links a {
  font-size: 13px; font-weight: var(--fw-semibold); letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--fg-on-dark-2);
  transition: color var(--dur-fast); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px; background: var(--gold); transition: width 0.25s;
}
.nav-links a:hover { color: var(--fg-on-dark); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--fg-on-dark); }
.nav-links a.active::after,
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-cta {
  color: var(--navy) !important; background: var(--gold);
  padding: 10px 24px; border-radius: var(--radius-xs);
  transition: all 0.25s !important; font-weight: var(--fw-bold) !important;
}
.nav-cta:hover { background: var(--white) !important; }
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: var(--space-2); background: none; border: none;
  position: relative; width: 40px; height: 36px;
  justify-content: center; align-items: center;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--fg-on-dark);
  transition: transform var(--dur-base) var(--ease-standard), opacity 0.25s ease;
  transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown (ready for the competency-suite release: one <li class="nav-has-drop">
   with a nested <ul class="nav-drop">). Desktop: hover/focus panel. Mobile: the
   panel is inlined into the menu column, so it can never exceed the viewport. */
.nav-has-drop { position: relative; }
.nav-drop {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 1;
  display: none; min-width: 260px; max-width: calc(100vw - 40px);
  list-style: none; padding: var(--space-3) 0;
  background: var(--bg-inverse); border: 1px solid var(--border-on-dark);
  border-top: 2px solid var(--gold); border-radius: var(--radius-xs);
  box-shadow: var(--shadow-2);
}
.nav-has-drop:hover > .nav-drop,
.nav-has-drop:focus-within > .nav-drop { display: block; }
.nav-drop a {
  display: block; padding: var(--space-2) var(--space-5);
  text-transform: none; letter-spacing: 0; font-size: var(--fs-body-sm);
}
.nav-drop a::after { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.mobile-ready {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    /* The full-screen variant on some pages sets bottom: 0, which leaves the
       panel a definite height of zero. Reset it. */
    bottom: auto;
    background: var(--bg-inverse); padding: 0 var(--space-8); gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease-standard), padding 0.4s var(--ease-standard);
  }
  .nav-links.open { max-height: 80vh; overflow-y: auto; padding: var(--space-6) var(--space-8); gap: var(--space-5); }
  .nav-links.mobile-ready a {
    opacity: 0; transform: translateY(-8px);
    transition: opacity var(--dur-base) ease, transform var(--dur-base) ease;
  }
  .nav-links.open a { opacity: 1; transform: translateY(0); }
  .nav-links.open > li:nth-child(1) a { transition-delay: 0.05s; }
  .nav-links.open > li:nth-child(2) a { transition-delay: 0.10s; }
  .nav-links.open > li:nth-child(3) a { transition-delay: 0.15s; }
  .nav-links.open > li:nth-child(4) a { transition-delay: 0.20s; }
  .nav-links.open > li:nth-child(5) a { transition-delay: 0.25s; }
  .nav-links.open > li:nth-child(6) a { transition-delay: 0.30s; }
  .nav-links.open > li:nth-child(7) a { transition-delay: 0.35s; }
  .nav-links.open > li:nth-child(8) a { transition-delay: 0.40s; }

  /* Dropdown inlined in the mobile panel — no absolute positioning, no overflow. */
  .nav-drop {
    position: static; display: block; min-width: 0; max-width: none;
    padding: var(--space-2) 0 var(--space-2) var(--space-4);
    background: none; border: none; border-left: 1px solid var(--border-on-dark);
    border-radius: 0; box-shadow: none; margin-top: var(--space-3);
  }
  .nav-drop a { padding: var(--space-2) 0; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
/* .footer carries .on-footer (design system v2): charcoal surface, 2px gold
   top border, and the footer foreground tokens. */

.footer { padding: var(--space-16) 0 var(--space-8); font-size: 14px; }
.footer-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-8);
}
.footer-logo { height: 32px; width: auto; margin-bottom: var(--space-3); }
.footer-tagline {
  font-family: var(--font-logo); font-style: italic; font-size: 14px;
  color: var(--fg-2);
}
.footer-links { display: flex; gap: var(--space-12); }
.footer-col h4 {
  font-size: 11px; font-weight: var(--fw-bold); letter-spacing: 2px;
  text-transform: uppercase; color: var(--fg-2); margin-bottom: var(--space-4);
}
.footer-col a, .footer-contact a {
  display: block; font-size: 14px; color: var(--fg-link);
  margin-bottom: 10px; transition: color var(--dur-fast) ease;
}
.footer-contact a { margin-bottom: var(--space-2); }
.footer-col a:hover, .footer-contact a:hover, .footer-nav a:hover { color: var(--fg-accent); }
.footer-address { display: block; font-size: 14px; color: var(--fg-2); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.footer-nav a {
  font-size: 13px; font-weight: var(--fw-semibold); letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--fg-link);
  transition: color var(--dur-fast) ease;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: var(--space-10); padding-top: var(--space-6); text-align: center;
}
.footer-bottom p { font-size: 12px; color: var(--fg-2); }

@media (max-width: 900px) {
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: var(--space-8); }
  .footer-contact { text-align: left; }
}

/* ── Client wall (decision D4, Stage 2C) ────────────────────────────────── */
/* Replaces the scrolling marquee on the homepage, the paid landing page and the
   results page: one static, wrapping row. Marks sit at 70% grey and take their
   colour on hover or keyboard focus. Markup: src/_includes/partials/client-wall.njk */

.client-wall-section {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hair);
  padding: var(--space-8) 0;
}
.client-wall-label {
  max-width: var(--content-max); margin: 0 auto var(--space-6);
  padding: 0 clamp(20px, 4vw, 40px); text-align: center;
  font-size: 13px; font-weight: var(--fw-bold); letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--fg-3);
}
.client-wall-label strong { color: var(--navy); font-weight: var(--fw-bold); }
.client-wall {
  max-width: var(--content-max); margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px); list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: var(--space-4) 28px;
}
.client-wall img {
  display: block; height: 30px; width: auto; max-width: 100%;
  opacity: 0.7; filter: grayscale(100%);
  transition: opacity var(--dur-base) var(--ease-standard),
              filter var(--dur-base) var(--ease-standard);
}
.client-wall img.square { height: 38px; }   /* optical balance for square marks */
.client-wall img:hover,
.client-wall li:focus-within img { opacity: 1; filter: none; }

@media (max-width: 600px) {
  .client-wall { gap: var(--space-4) var(--space-5); }
  .client-wall img { height: 24px; }
  .client-wall img.square { height: 30px; }
}
