/* Shared nav + footer stylesheet for pillar hub / leaf / cross-cutting pages.
   Extracted from the canonical about.html style block so every page carrying
   the RA-NAV-CANONICAL / RA-FOOTER-CANONICAL markers renders with the same
   header and footer chrome without duplicating hundreds of lines of CSS
   inside each new page. Selectors below assume the design tokens
   (--red, --charcoal, --black, --font-head, --font-body, etc.) are already
   defined by the host page's :root block. */

/* =============================================
   NAV — canonical
   ============================================= */
.ra-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.07);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.ra-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  padding: 0 48px;
  max-width: 1440px;
  margin: 0 auto;
  transition: height 0.3s ease;
}
.ra-nav.scrolled .ra-nav__inner { height: 88px; }
.ra-nav__logo { display: flex; align-items: center; text-decoration: none; }
.ra-nav__logo img { height: 76px; width: auto; display: block; transition: height 0.3s ease; }
.ra-nav.scrolled .ra-nav__logo img { height: 68px; }
.ra-nav__links { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.ra-nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  opacity: 0.7;
  transition: opacity 0.2s;
  position: relative;
}
.ra-nav__links a:hover,
.ra-nav__links a.is-current { opacity: 1; }
.ra-nav__links a.is-current::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.ra-nav__links .has-drop { position: relative; }
.ra-nav__links .has-drop > a { cursor: pointer; }
.ra-drop {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  list-style: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  z-index: 1002;
}
.has-drop:hover .ra-drop,
.has-drop:focus-within .ra-drop {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.ra-drop a {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 7px;
  opacity: 1;
  color: var(--charcoal);
}
.ra-drop a:hover { background: var(--grey-light); color: var(--red); }
.ra-drop a::after { display: none !important; }

/* 3-level flyout — Services mega */
.ra-drop--l2 { min-width: 220px; }
.ra-drop--l2 > li { position: relative; list-style: none; }
.ra-drop--l2 .has-drop-l3 > a { display: flex !important; align-items: center; justify-content: space-between; gap: 14px; }
.ra-drop--l2 .has-drop-l3 > a .ra-drop__arrow { font-size: 9px; opacity: 0.35; transition: opacity .2s ease-out, transform .2s ease-out; }
.ra-drop--l2 .has-drop-l3:hover > a { background: var(--grey-light); }
.ra-drop--l2 .has-drop-l3:hover > a .ra-drop__arrow { opacity: 1; transform: translateX(3px); color: var(--red); }
.ra-drop--l3 {
  position: absolute;
  top: -8px;
  left: calc(100% + 6px);
  transform: translateX(-6px);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 8px;
  min-width: 230px;
  list-style: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease-out, transform .2s ease-out;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  z-index: 1003;
}
.has-drop-l3:hover > .ra-drop--l3,
.has-drop-l3:focus-within > .ra-drop--l3 { opacity: 1; pointer-events: auto; transform: translateX(0); }
.ra-drop--l3 a { display: block; padding: 9px 14px; font-size: 13px; border-radius: 7px; opacity: 1; color: var(--charcoal); white-space: nowrap; }
.ra-drop--l3 a:hover { background: var(--grey-light); color: var(--red); }
.ra-drop--l3 a.is-current { background: rgba(201,28,29,0.08); color: var(--red); font-weight: 600; }
.ra-drop--l3 a::after { display: none !important; }

.ra-nav__right { display: flex; align-items: center; gap: 16px; }

.ra-nav__hamburger {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}
.ra-nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  transition: transform 0.25s ease, opacity 0.2s ease;
  border-radius: 2px;
}
.ra-nav.is-open .ra-nav__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ra-nav.is-open .ra-nav__hamburger span:nth-child(2) { opacity: 0; }
.ra-nav.is-open .ra-nav__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.ra-nav__cta-mobile { display: none; }

.ra-nav__services-toggle,
.ra-nav__l2-toggle { display: none; }

/* =============================================
   FOOTER — canonical
   ============================================= */
.ra-footer { background: var(--black); padding: 80px 0 0; color: rgba(255,255,255,0.5); }
.ra-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ra-footer__logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  background: #fff;
  padding: 10px 18px;
  border-radius: 10px;
}
.ra-footer__logo img { height: 68px; width: auto; display: block; }
.ra-footer__brand p {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.ra-footer__tagline {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
}
.ra-footer__social { display: flex; gap: 10px; margin-top: 24px; }
.ra-footer__social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.ra-footer__social a:hover { background: var(--red); color: white; }
.ra-footer__nav h5 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.ra-footer__nav ul { list-style: none; margin: 0; padding: 0; }
.ra-footer__nav ul li { margin-bottom: 12px; }
.ra-footer__nav ul a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.ra-footer__nav ul a:hover { color: white; }
.ra-footer__cta {
  align-self: start;
  background: rgba(237,42,49,0.08);
  border: 1px solid rgba(237,42,49,0.15);
  border-radius: 16px;
  padding: 32px 28px;
}
.ra-footer__cta h4 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
  line-height: 1.3;
}
.ra-footer__cta p {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
  line-height: 1.6;
}
.ra-footer__bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ra-footer__copyright {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}
.ra-footer__copyright a { color: rgba(255,255,255,0.35); }
.ra-footer__copyright a:hover { color: white; }

/* Services column — collapsible groups (mirrors homepage/about) */
.ra-footer__nav--services .ra-footer__svc { list-style: none; margin: 0; padding: 0; }
.ra-footer__nav--services .ra-footer__svc-group { margin-bottom: 4px; }
.ra-footer__nav--services .ra-footer__svc-group:last-child { margin-bottom: 0; }
.ra-footer__nav--services .ra-footer__svc-parent {
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 8px 0; cursor: pointer;
  transition: color .2s; line-height: 1.2;
}
.ra-footer__nav--services .ra-footer__svc-parent:hover { color: var(--red); }
.ra-footer__nav--services .ra-footer__svc-caret {
  font-size: 11px; color: rgba(255,255,255,0.45);
  transition: transform .28s ease, color .2s; margin-left: 8px;
  flex-shrink: 0; display: inline-block;
}
.ra-footer__nav--services .ra-footer__svc-children {
  list-style: none; margin: 0; padding: 0;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .32s ease, opacity .22s ease, margin-top .22s ease;
  margin-top: 0;
}
.ra-footer__nav--services .ra-footer__svc-group:hover .ra-footer__svc-children,
.ra-footer__nav--services .ra-footer__svc-group:focus-within .ra-footer__svc-children {
  max-height: 260px; opacity: 1; margin-top: 4px; margin-bottom: 6px;
}
.ra-footer__nav--services .ra-footer__svc-group:hover .ra-footer__svc-caret,
.ra-footer__nav--services .ra-footer__svc-group:focus-within .ra-footer__svc-caret {
  transform: rotate(180deg); color: #fff;
}
.ra-footer__nav--services .ra-footer__svc-children li { margin-bottom: 6px; }
.ra-footer__nav--services .ra-footer__svc-children li:last-child { margin-bottom: 0; }
.ra-footer__nav--services .ra-footer__svc-children a {
  font-size: 13px; color: rgba(255,255,255,0.5);
  padding-left: 2px; display: block; transition: color .2s;
}
.ra-footer__nav--services .ra-footer__svc-children a:hover { color: #fff; }

/* =============================================
   MOBILE — nav collapses to hamburger, footer stacks
   ============================================= */
@media (max-width: 768px) {
  .ra-nav__inner { height: 72px !important; padding: 0 16px !important; }
  .ra-nav__logo img,
  .ra-nav.scrolled .ra-nav__logo img {
    height: 48px !important; max-height: 48px !important;
    width: auto !important; max-width: 180px !important;
    object-fit: contain !important; display: block !important;
  }
  .ra-nav__links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column !important;
    padding: 16px 20px;
    gap: 4px !important;
    border-top: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    list-style: none;
    margin: 0;
    z-index: 1001;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .ra-nav.is-open .ra-nav__links { display: flex !important; }
  .ra-nav__links li { width: 100%; }
  .ra-nav__links a { display: block; padding: 12px 4px; font-size: 15px; }

  .ra-nav__links .ra-drop {
    position: static;
    display: block;
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 16px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    min-width: 0;
  }
  .ra-nav__links .ra-drop a { padding: 10px 4px; font-size: 14px; opacity: 0.75; }

  .ra-nav__logo { order: 1; flex: 0 1 auto; }
  .ra-nav__right { order: 2; display: flex !important; align-items: center; gap: 8px; margin-left: auto; }
  .ra-nav__hamburger { display: flex !important; order: 3; margin: 0 0 0 4px; }
  .ra-nav__cta { display: none !important; }
  .ra-nav__cta-mobile { display: inline-flex !important; padding: 10px 14px !important; font-size: 12px !important; white-space: nowrap; }

  /* NAV-3L-MOBILE */
  .ra-nav__links .ra-drop--l2 {
    position: static; display: block; background: transparent;
    box-shadow: none; border: 0; padding: 0 0 0 12px;
    opacity: 1; pointer-events: auto; transform: none; min-width: 0;
  }
  .ra-nav__links .ra-drop--l2 .has-drop-l3 > a {
    padding: 10px 4px !important; font-size: 14px !important;
    opacity: 0.85; display: flex !important; align-items: center;
    justify-content: space-between; gap: 14px;
  }
  .ra-nav__links .ra-drop--l2 .has-drop-l3 > a .ra-drop__arrow { transition: transform .2s; }
  .ra-nav__links .ra-drop--l2 .has-drop-l3.is-open > a .ra-drop__arrow { transform: rotate(90deg); color: var(--red); }
  .ra-nav__links .ra-drop--l3 {
    position: static; display: none; background: transparent;
    box-shadow: none; border: 0; padding: 0 0 8px 14px;
    opacity: 1; pointer-events: auto; transform: none;
    min-width: 0; margin: 0;
  }
  .ra-nav__links .ra-drop--l2 .has-drop-l3.is-open > .ra-drop--l3 { display: block; }
  .ra-nav__links .ra-drop--l3 a { padding: 9px 4px; font-size: 13px; opacity: 0.75; white-space: normal; display: block; }

  .has-drop, .has-drop-l3 { display: flex !important; flex-wrap: wrap !important; align-items: center !important; width: 100% !important; }
  .has-drop > a, .has-drop-l3 > a { flex: 1 1 auto !important; }
  .has-drop > .ra-drop, .has-drop-l3 > .ra-drop { flex: 1 0 100% !important; }

  .ra-nav__services-toggle,
  .ra-nav__l2-toggle {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    background: transparent; border: 0;
    color: var(--charcoal, #2b2b2b);
    padding: 10px 14px;
    font-size: 14px; line-height: 1;
    cursor: pointer;
    flex: 0 0 auto !important;
    min-width: 44px; min-height: 44px;
    transition: transform 0.3s ease, color 0.2s ease;
  }
  .ra-nav__services-toggle.open,
  .ra-nav__l2-toggle.open { transform: rotate(180deg); color: var(--red); }

  /* Footer stacks */
  .ra-footer { padding: 60px 0 0; }
  .ra-footer__inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    padding-bottom: 40px;
  }
  .ra-footer__cta .btn { width: 100%; justify-content: center; }
  .ra-footer__bottom { flex-direction: column; gap: 10px; text-align: center; }
  .ra-footer__nav--services .ra-footer__svc-children { max-height: 260px; opacity: 1; margin-top: 4px; }
  .ra-footer__nav--services .ra-footer__svc-caret { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ra-nav,
  .ra-nav__inner,
  .ra-nav__logo img,
  .ra-drop,
  .ra-drop--l3,
  .ra-footer__nav--services .ra-footer__svc-children,
  .ra-footer__nav--services .ra-footer__svc-caret { transition: none !important; }
}
