/* ============================================
   Revive Pipes Marketing Portal
   Shared Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ====== RESET ====== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ====== CSS VARIABLES ====== */
:root {
  --blue: #1565C0;
  --blue-deep: #0D47A1;
  --blue-light: #E8F1FB;
  --blue-pale: #F4F8FD;
  --green: #2E7D32;
  --green-brand: #3DA935;
  --green-light: #E8F5E9;
  --white: #ffffff;
  --gray-50: #FAFBFC;
  --gray-100: #F1F3F5;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 80px;
  --content-max: 1440px;
  --content-pad: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--white);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ====== SKIP LINK (a11y) ====== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--blue);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { left: 0; }

/* ====== NAVIGATION ====== */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 rgba(229, 231, 235, 0.7), 0 8px 32px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  height: 100%;
  display: flex;
  align-items: stretch;
}

.nav-panel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

/* Logo */
.nav-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: 18px;
  border-right: 1px solid var(--gray-200);
  margin-right: 18px;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-logo-link:hover {
  opacity: 0.75;
}

.nav-logo {
  height: 16px;
  width: auto;
}

/* Center Links */
.nav-center-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-start;   /* links sit next to the logo, not floating centered */
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-item {
  display: flex;
  position: relative;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  letter-spacing: 0.01em;
  transition: color 0.18s ease, background-color 0.18s ease;
  white-space: nowrap;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
  transform-origin: center;
}

.nav-link:hover {
  color: var(--gray-900);
  background: rgba(17, 24, 39, 0.04);
}

.nav-link.active {
  color: var(--blue);
  background: rgba(21, 101, 192, 0.05);
}

.nav-link.active::after {
  transform: scaleX(1);
}

/* Right side */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-left: 16px;
  border-left: 1px solid var(--gray-200);
  margin-left: 16px;
}

.nav-meta,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- User menu pill + dropdown ---- */
.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.nav-user-btn:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nav-user-btn.open {
  border-color: var(--gray-900);
  background: var(--gray-50);
}

.nav-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  flex-shrink: 0;
}

.nav-user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-chevron {
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform 0.2s ease;
}

.nav-user-btn.open .nav-user-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  z-index: 200;
}

.nav-user-dropdown-info {
  padding: 14px 16px 12px;
}

.nav-user-dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.nav-user-dropdown-email {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 0;
}

.nav-user-signout-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-user-signout-btn:hover {
  background: #FFF5F5;
  color: #C0392B;
}

/* CTA Button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--gray-900);
  color: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-cta:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-cta-icon {
  width: 16px;
  height: 16px;
  opacity: 0.75;
  flex-shrink: 0;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  padding: 9px;
  border-radius: 9px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nav-hamburger:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* ====== MOBILE MENU ====== */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-inner {
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 520px;
  margin: 0 auto;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--gray-50);
  border-radius: 12px;
  margin-bottom: 8px;
}

.mobile-menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.mobile-menu-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mobile-menu-user {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-menu-email {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 4px;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid var(--gray-200);
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mobile-signout:hover {
  background: #FFF5F5;
  border-color: #FECACA;
  color: #C0392B;
}

.mobile-link {
  display: block;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 12px;
  transition: color 0.15s ease, background-color 0.15s ease;
  letter-spacing: 0.01em;
}

.mobile-link:hover {
  color: var(--gray-900);
  background: var(--gray-50);
}

.mobile-link.active {
  color: var(--blue);
  background: rgba(21, 101, 192, 0.06);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 16px 0;
}

.mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
  background: var(--gray-900);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.mobile-cta:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
}

/* ====== FOOTER ====== */
.footer {
  padding: 40px var(--content-pad);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-text {
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ====== DARK PORTAL FOOTER (site-footer) ====== */
.site-footer {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(21, 101, 192, 0.18), transparent 34%),
    linear-gradient(180deg, #0c192d 0%, #07111f 100%);
  color: var(--white);
}

.site-footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #3DA935 48%, rgba(255, 255, 255, 0.28));
  opacity: 0.9;
}

.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 82%);
  opacity: 0.36;
}

.site-footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 34px var(--content-pad) 28px;
}

.sf-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0 0 24px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.65;
}

.sf-notice-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(61, 169, 53, 0.12);
  color: #7ed276;
}

.sf-notice-icon svg {
  width: 18px;
  height: 18px;
}

.sf-notice strong {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.sf-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-copy {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.48);
}

.sf-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.52);
  font-weight: 600;
}

@media (max-width: 640px) {
  .site-footer-inner {
    padding-top: 30px;
    padding-bottom: 26px;
  }

  .sf-notice {
    align-items: flex-start;
    padding-bottom: 24px;
  }

  .sf-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ====== COMMON PAGE HEADER ====== */
.page-header {
  padding: 72px var(--content-pad) 56px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-header-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

.page-header-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 16px;
}

.page-header-desc {
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 640px;
}

/* ====== SECTION ====== */
.section {
  padding: 0 var(--content-pad) 96px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* Focus treatment for keyboard users */
.nav-logo-link:focus-visible,
.nav-link:focus-visible,
.nav-cta:focus-visible,
.nav-hamburger:focus-visible,
.nav-user-btn:focus-visible,
.nav-user-signout-btn:focus-visible,
.mobile-link:focus-visible,
.mobile-cta:focus-visible,
.mobile-signout:focus-visible {
  outline: 3px solid rgba(21, 101, 192, 0.35);
  outline-offset: 3px;
}

.nav-logo-link:focus-visible,
.nav-link:focus-visible,
.mobile-link:focus-visible {
  border-radius: 10px;
}

/* Fallback when backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .nav {
    background: #fff;
  }

  .mobile-menu {
    background: #fff;
  }
}

/* ====== RESPONSIVE ====== */

/* Laptops / smaller desktops: narrower than the ~1440px content cap, the full link bar plus
   text actions don't fit. Compact the Invite CTA to its icon and tighten the right group so
   the bar never overflows. (Full "Invite a Colleague" label returns on wide screens.) */
@media (max-width: 1440px) {
  .nav-cta .nav-cta-text { display: none; }
  .nav-cta { padding: 9px 11px; }
  .nav-right { gap: 10px; padding-left: 14px; margin-left: 14px; }
}

/* Large screens */
@media (min-width: 1800px) {
  :root {
    --content-max: 1600px;
  }
}

/* Laptop */
@media (max-width: 1280px) {
  :root {
    --content-pad: 48px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --content-pad: 36px;
    --nav-height: 72px;
  }

  .nav-left { padding-right: 20px; margin-right: 0; border-right: none; }
  .nav-right { padding-left: 16px; margin-left: 0; border-left: none; gap: 10px; }
  .nav-center { display: none; }
  .nav-user-menu { display: none; }
  .nav-hamburger { display: flex; }
}

/* Small tablet / large phone */
@media (max-width: 768px) {
  :root {
    --content-pad: 24px;
  }

  .nav-cta .nav-cta-text { display: none; }
  .nav-cta { padding: 9px 11px; border-radius: 9px; }
  .nav-cta-icon { width: 18px; height: 18px; opacity: 1; }
  .mobile-menu-inner { padding: 28px 22px; }
  .mobile-link { padding: 15px 18px; font-size: 15px; }
  .mobile-cta { padding: 16px; font-size: 15px; }

  .page-header { padding-top: 48px; padding-bottom: 40px; }
  .page-header-desc { font-size: 15px; }
  .section { padding-bottom: 64px; }
  .footer { flex-direction: column; gap: 8px; text-align: center; padding: 28px var(--content-pad); }
  .footer-text { font-size: 13px; }
}

/* Phone */
@media (max-width: 480px) {
  :root {
    --content-pad: 20px;
    --nav-height: 64px;
  }

  .nav-logo { height: 16px; }
  .nav-left { padding-right: 12px; }
  .nav-right { padding-left: 12px; gap: 8px; }
  .nav-hamburger { width: 36px; height: 36px; padding: 8px; }
  .mobile-menu-inner { padding: 24px 18px; }
  .page-header-title { font-size: 28px; }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ====== PROTECTED VIDEO MODAL ====== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.video-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
}

.video-modal-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.video-modal-close svg {
  width: 22px;
  height: 22px;
}

.video-modal-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.video-modal-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.video-modal-status {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 600;
  background: #000;
}

.video-modal-close:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .video-modal {
    padding: 16px;
  }

  .video-modal-close {
    top: -48px;
    width: 40px;
    height: 40px;
  }
}

/* ====== CONTENT PROTECTION (applied to authenticated pages via content-protection.js) ====== */

/* Block text selection on protected pages, but keep form fields usable */
html.cp-protected,
html.cp-protected body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html.cp-protected input,
html.cp-protected textarea,
html.cp-protected select,
html.cp-protected [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Print / Save-as-PDF deterrent: hide everything, show a notice instead */
#cp-print-block {
  display: none;
}

@media print {
  html.cp-protected body > *:not(#cp-print-block) {
    display: none !important;
  }

  html.cp-protected #cp-print-block {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 40px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
  }
}

/* ====== NAV: CALL US ====== */
.nav-call {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--gray-800);
  white-space: nowrap;
  padding-right: 16px;
  border-right: 1px solid var(--gray-200);
}
.nav-call-ico {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-call-svg { animation: nav-ring 4s ease-in-out infinite; transform-origin: 50% 60%; }
.nav-call-live {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3DA935;
  border: 2px solid var(--white);
  animation: nav-live 2s ease-in-out infinite;
}
.nav-call-tx { display: flex; flex-direction: column; line-height: 1.15; }
.nav-call-s { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gray-400); }
.nav-call-n { font-size: 14px; font-weight: 800; color: var(--gray-900); }
.nav-call:hover .nav-call-n { color: var(--blue); }
.nav-call:focus-visible { outline: 3px solid rgba(21, 101, 192, 0.35); outline-offset: 3px; border-radius: 10px; }
@keyframes nav-ring { 0%,72%,100%{transform:rotate(0)} 74%{transform:rotate(-14deg)} 78%{transform:rotate(12deg)} 82%{transform:rotate(-9deg)} 86%{transform:rotate(7deg)} 90%{transform:rotate(0)} }
@keyframes nav-live { 0%,100%{box-shadow:0 0 0 0 rgba(61,169,53,0.5)} 70%{box-shadow:0 0 0 6px rgba(61,169,53,0)} }
.mobile-call { display: flex; align-items: center; gap: 10px; padding: 12px 4px; font-size: 15px; font-weight: 600; color: var(--gray-800); text-decoration: none; }
.mobile-call svg { color: var(--blue); flex-shrink: 0; }
/* Collapse to icon-only on tight nav widths */
@media (max-width: 880px) {
  .nav-call-tx { display: none; }
  .nav-call { padding-right: 0; border-right: 0; }
}

/* ====== CONTACT US WIDGET ====== */
.cw-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.cw-button {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(140deg, #1565C0, #0D47A1);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -8px rgba(21, 101, 192, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cw-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -8px rgba(21, 101, 192, 0.7);
}

.cw-button:focus-visible {
  outline: 3px solid rgba(21, 101, 192, 0.4);
  outline-offset: 3px;
}

.cw-button svg { width: 26px; height: 26px; }

/* Discreet identifier on the button */
.cw-button-id {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  white-space: nowrap;
}

.cw-panel {
  width: 360px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 30px 70px -24px rgba(10, 22, 40, 0.45), 0 4px 14px rgba(10, 22, 40, 0.08);
  overflow: hidden;
  animation: cw-rise 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw-panel[hidden] { display: none; }

@keyframes cw-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Header */
.cw-header {
  position: relative;
  flex-shrink: 0;
  padding: 18px 20px 16px;
  color: var(--white);
  background:
    radial-gradient(120% 120% at 90% 0%, rgba(21, 101, 192, 0.5), transparent 60%),
    linear-gradient(140deg, #0a1628, #13294a);
}

.cw-title { font-size: 18px; font-weight: 800; letter-spacing: -0.2px; margin-bottom: 5px; }
.cw-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.66); line-height: 1.5; max-width: 280px; }

.cw-reply {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 11px;
  border-radius: 100px;
}

.cw-reply i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3DA935;
  box-shadow: 0 0 0 3px rgba(61, 169, 53, 0.3);
  flex-shrink: 0;
}

.cw-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.cw-close:hover { background: rgba(255, 255, 255, 0.15); }
.cw-close:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.cw-close svg { width: 16px; height: 16px; }

/* Body / form */
.cw-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px 18px; }
.cw-field { margin-bottom: 13px; }

.cw-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 9px;
}

.cw-select,
.cw-textarea {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cw-select {
  padding: 12px 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.cw-textarea { padding: 13px 14px; line-height: 1.6; resize: none; min-height: 80px; }

.cw-select:focus,
.cw-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.cw-ident {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--gray-400);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.cw-ident svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; }
.cw-ident strong { color: var(--gray-600); font-weight: 600; }

.cw-send {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px -8px rgba(21, 101, 192, 0.55);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cw-send:hover { background: var(--blue-deep); transform: translateY(-1px); }
.cw-send:disabled { opacity: 0.6; cursor: default; transform: none; }
.cw-send:focus-visible { outline: 3px solid rgba(21, 101, 192, 0.4); outline-offset: 2px; }
.cw-send svg { width: 15px; height: 15px; }

.cw-status { font-size: 12px; color: var(--gray-500); min-height: 16px; margin-top: 10px; text-align: center; }
.cw-status--error { color: #C62828; }

/* Direct contact */
.cw-direct { margin-top: 16px; border-top: 1px solid var(--gray-100); padding-top: 14px; }
.cw-direct-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.cw-person { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.cw-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3DA935, #2E7D32);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.cw-person-name { font-size: 13px; font-weight: 700; color: var(--gray-900); }
.cw-person-role { font-size: 11.5px; color: var(--gray-500); }
.cw-dlinks { display: flex; flex-direction: column; gap: 9px; }
.cw-dlink {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
}
.cw-dlink:hover { color: var(--blue); }
.cw-dlink:focus-visible { outline: 2px solid rgba(21, 101, 192, 0.35); outline-offset: 2px; border-radius: 6px; }
.cw-dlink-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cw-dlink-ic svg { width: 15px; height: 15px; }

/* Success */
.cw-success { padding: 26px 24px 30px; text-align: center; }
.cw-success:focus { outline: none; }
.cw-success-ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(61, 169, 53, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.cw-success-ring svg { width: 30px; height: 30px; color: #3DA935; }
.cw-success-title { font-size: 19px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.cw-success-text { font-size: 13px; color: var(--gray-500); line-height: 1.6; max-width: 280px; margin: 0 auto; }
.cw-success-text strong { color: var(--gray-700); font-weight: 600; }
.cw-success-urgent { font-size: 12px; color: var(--gray-400); margin-top: 14px; }
.cw-success-urgent strong { color: var(--gray-600); }

@media (max-width: 640px) {
  /* Anchor the root to both side edges (no 100vw math) and stretch the panel
     to fill it; the button stays pinned to the right. */
  .cw-root { left: 16px; right: 16px; bottom: 16px; }
  .cw-button { width: 54px; height: 54px; align-self: flex-end; }
  .cw-panel { width: auto; max-width: none; align-self: stretch; max-height: calc(100vh - 100px); }
}

/* ====== CONTACT: attention bubbles ====== */
/* Pulse ("heartbeat") removed per client request — the contact button stays static. */
.cw-button::before { display: none; }

.cw-bubble {
  position: absolute;
  bottom: 74px;
  right: 0;
  background: var(--white);
  color: var(--gray-800);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 14px;
  box-shadow: 0 12px 30px -8px rgba(10, 22, 40, 0.3);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.cw-bubble.cw-bubble--show { opacity: 1; transform: translateY(0); }
.cw-bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: var(--white);
  transform: rotate(45deg);
  border-radius: 2px;
}

/* ====== CONTACT: "Get in touch" footer strip ====== */
.cstrip-wrap {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  z-index: 3;
  margin-bottom: -40px;
}
.cstrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-radius: 16px;
  padding: 16px 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: 0 18px 44px -26px rgba(10, 22, 40, 0.3);
}
.cstrip-txt {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--gray-700);
  line-height: 1.35;
}
.cstrip-txt strong { font-weight: 400; color: var(--gray-900); }
.cstrip-ctas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cstrip-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 100px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.cstrip-btn svg { width: 15px; height: 15px; }
.cstrip-btn-p { background: var(--blue); color: var(--white); box-shadow: 0 10px 22px -10px rgba(21, 101, 192, 0.5); }
.cstrip-btn-p:hover { transform: translateY(-2px); background: var(--blue-deep); }
.cstrip-btn-call { background: var(--white); color: var(--gray-900); border: 1.5px solid var(--gray-200); }
.cstrip-btn-call:hover { border-color: var(--gray-300); }
.cstrip-btn-call svg { color: var(--blue); }
.cstrip-btn-p:focus-visible, .cstrip-btn-call:focus-visible { outline: 3px solid rgba(21, 101, 192, 0.35); outline-offset: 2px; }
.site-footer--with-strip { padding-top: 64px; }
@media (max-width: 700px) {
  .cstrip { justify-content: center; text-align: center; }
  .cstrip-txt { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cw-button::before { animation: none; }
  .cw-bubble { display: none; }
  .nav-call-svg, .nav-call-live { animation: none; }
}

/* ====== INVITE A COLLEAGUE (side drawer / bottom sheet) ====== */
@keyframes invite-slide-x { from { transform: translateX(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes invite-slide-y { from { transform: translateY(60px); opacity: 0.5; } to { transform: none; opacity: 1; } }

.invite-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  background: rgba(10, 22, 40, 0.4);
  display: flex;
  justify-content: flex-end;
}
.invite-overlay[hidden] { display: none; }

.invite-panel {
  position: relative;
  width: 400px;
  max-width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  box-shadow: -30px 0 70px -30px rgba(10, 22, 40, 0.45);
  animation: invite-slide-x 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.invite-accent { height: 3px; background: linear-gradient(90deg, var(--blue), #3DA935); flex-shrink: 0; }
.invite-grab { display: none; }

.invite-head { position: relative; padding: 20px 22px 16px; border-bottom: 1px solid var(--gray-100); flex-shrink: 0; }
.invite-title { font-size: 18px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.2px; margin-bottom: 4px; }
.invite-sub { font-size: 12.5px; color: var(--gray-500); line-height: 1.5; max-width: 300px; }
.invite-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gray-200); background: var(--white); color: var(--gray-500);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.invite-close:hover { background: var(--gray-50); color: var(--gray-800); }
.invite-close:focus-visible { outline: 3px solid rgba(21, 101, 192, 0.35); outline-offset: 2px; }
.invite-close svg { width: 16px; height: 16px; }

.invite-body { padding: 18px 22px 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.invite-field { margin-bottom: 13px; }
.invite-field label { display: block; font-size: 12px; font-weight: 700; color: var(--gray-700); margin-bottom: 7px; }
.invite-req { color: var(--blue); }
.invite-input {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  color: var(--gray-800);
  padding: 11px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: 11px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea.invite-input { min-height: 64px; resize: none; line-height: 1.5; }
.invite-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12); }

.invite-by { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--gray-400); margin: 4px 0 2px; }
.invite-by svg { width: 13px; height: 13px; flex-shrink: 0; }
.invite-by strong { color: var(--gray-600); font-weight: 600; }

.invite-send {
  width: 100%; margin-top: 14px; padding: 14px;
  border: 0; border-radius: 12px;
  background: var(--blue); color: var(--white);
  font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(21, 101, 192, 0.55);
  transition: background-color 0.2s ease;
}
.invite-send:hover { background: var(--blue-deep); }
.invite-send:disabled { opacity: 0.6; cursor: default; }
.invite-send:focus-visible { outline: 3px solid rgba(21, 101, 192, 0.4); outline-offset: 2px; }

.invite-status { font-size: 12px; color: var(--gray-500); min-height: 16px; margin-top: 10px; text-align: center; }
.invite-status--error { color: #C62828; }

.invite-success { padding: 30px 8px; text-align: center; }
.invite-success:focus { outline: none; }
.invite-success-ring { width: 62px; height: 62px; border-radius: 50%; background: rgba(61, 169, 53, 0.12); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.invite-success-ring svg { width: 30px; height: 30px; color: #3DA935; }
.invite-success-title { font-size: 19px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.invite-success-text { font-size: 13px; color: var(--gray-500); line-height: 1.6; max-width: 290px; margin: 0 auto 18px; }
.invite-success-text strong { color: var(--gray-700); font-weight: 600; }
.invite-done { padding: 11px 26px; border-radius: 100px; border: 1.5px solid var(--gray-200); background: var(--white); font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; color: var(--gray-800); cursor: pointer; }
.invite-done:hover { border-color: var(--gray-300); }

body.invite-open { overflow: hidden; }

/* Mobile: bottom sheet */
@media (max-width: 600px) {
  .invite-overlay { align-items: flex-end; justify-content: center; }
  .invite-panel {
    width: 100%;
    height: auto;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -20px 50px -20px rgba(10, 22, 40, 0.4);
    animation: invite-slide-y 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .invite-accent { display: none; }
  .invite-grab { display: block; width: 38px; height: 4px; border-radius: 99px; background: var(--gray-300); margin: 9px auto 0; flex-shrink: 0; }
  .invite-head { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .invite-panel { animation: none; }
}

/* ====== UNIVERSAL FADE-IN-ON-SCROLL ======
   Driven by site-animations.js. Applies to every authenticated page; the
   script picks which selectors actually exist on the current page.
   The global prefers-reduced-motion rule further down neutralises the
   transition automatically. */
.fade-in-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

/* Discreet per-user identifier stamped under content images.
   z-index keeps it above placeholder/photo layers (which are typically
   absolute, inset:0 and rendered after the stamp). */
.cp-trace-id {
  position: absolute;
  bottom: 6px;
  left: 10px;
  z-index: 5;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.3px;
  color: rgba(107, 114, 128, 0.55);
  pointer-events: none;
  user-select: none;
}
