/* Shared design system for website-copy/* pages.
   Goal: unify layout, nav, buttons, motion, and core tokens without inventing claims. */

:root {
  /* Airy slate — muted blue-grays (not saturated “bright blue”, not heavy black) */
  --primary: #0f2744;
  --secondary: #1a4a6e;
  --accent: #4a8ca0;
  --accent-warm: #C97A5A;
  --light: #ffffff;
  --dark: #0a1628;
  --text-dark: #1e2933;
  --text-light: #ffffff;
  --warm-beige: #f8fafc;
  --warm-cream: #f8fafc;
  --paper: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-600: #5c6570;
  --gray-900: #1a2028;

  --gradient-warm: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-deep: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-warm) 100%);
  --gradient-signal: linear-gradient(135deg, var(--secondary) 0%, #7889a4 100%);

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1200px;
  --container-pad: 80px;

  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 40px;
  --spacing-2xl: 64px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 39, 68, 0.06), 0 1px 4px rgba(15, 39, 68, 0.04);
  --shadow-md: 0 2px 8px rgba(15, 39, 68, 0.08), 0 1px 3px rgba(15, 39, 68, 0.05);
  --shadow-lg: 0 4px 24px rgba(15, 39, 68, 0.10), 0 2px 8px rgba(15, 39, 68, 0.06);
  --shadow-xl: 0 8px 32px rgba(15, 39, 68, 0.12), 0 4px 12px rgba(15, 39, 68, 0.07);
  --shadow-glow: 0 0 40px rgba(26, 74, 110, 0.12), 0 0 80px rgba(26, 74, 110, 0.07);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  /* "Systems" accents for the AlliaLayer visuals (used only for diagrams/mock UI). */
  --sys-a: rgba(26, 74, 110, 0.95);
  --sys-b: rgba(15, 39, 68, 0.95);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image:
    radial-gradient(1000px 520px at 92% -5%, rgba(26, 74, 110, 0.045), transparent 58%),
    radial-gradient(800px 420px at 0% 100%, rgba(15, 39, 68, 0.035), transparent 55%);
  background-attachment: fixed;
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

@media (max-width: 1024px) {
  :root { --container-pad: 40px; }
}

@media (max-width: 768px) {
  :root { --container-pad: 24px; }
}

/* -------------------------------------------------------------------------- */
/* Navigation — shared across all pages                                       */
/* -------------------------------------------------------------------------- */

/* Fixed bar: avoid backdrop-filter on the top bar — WebKit often mis-paints link text (invisible until hover)
   when the bar sits over a dark hero (e.g. join.html). Near-opaque fill keeps the same look without the bug. */
/* Primary site header only. Do NOT style bare `nav` — pages like join.html use <nav> inside
   <footer class="footer-links">; fixed positioning + footer link colors produced white-on-white over the hero. */
nav#mainNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 20px 80px;
  z-index: 100000;
  isolation: isolate;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(15, 39, 68, 0.07);
  box-shadow: 0 1px 0 rgba(15, 39, 68, 0.04);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Color preview pages: top bar is a direct child <nav> without id */
body > nav:not(#mainNav) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 20px 80px;
  z-index: 100000;
  isolation: isolate;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

footer nav,
footer nav.footer-links {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  max-width: 100% !important;
  z-index: auto !important;
  isolation: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Mobile menu open: lock both root + body (body-only breaks position:fixed on iOS/WebKit) */
html.nav-scroll-locked,
html.nav-scroll-locked body {
  overflow: hidden !important;
  touch-action: none;
}

@media (max-width: 1024px) { nav#mainNav { padding: 18px 40px; } }
@media (max-width: 767px)  { nav#mainNav { padding: 15px 24px; } }

#mainNav.nav-scrolled,
nav#mainNav.nav-scrolled {
  background: rgba(255, 255, 255, 0.99) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 1px 0 rgba(15, 39, 68, 0.06), 0 4px 20px rgba(15, 39, 68, 0.05) !important;
}

.logo {
  position: relative;
  z-index: 10002;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  transition: opacity var(--transition-fast);
}
.logo img {
  height: 34px;
  width: auto;
  display: block;
}
.logo:hover { opacity: 0.78; }

.nav-links {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-dark) !important;
  text-decoration: none !important;
  font-weight: 500;
  font-size: clamp(13px, 0.95vw, 15px);
  font-family: var(--font-body);
  letter-spacing: -0.01em;
  padding: 8px 0;
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-warm);
  border-radius: 2px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--primary); font-weight: 600; }

/* Top bar only: never let long-page / footer / theme rules wash out link color (cache + WebKit) */
nav#mainNav .nav-links a,
nav#mainNav .nav-links a:visited {
  color: var(--text-dark) !important;
  -webkit-text-fill-color: var(--text-dark);
}
nav#mainNav .nav-links a.active {
  color: var(--primary) !important;
  -webkit-text-fill-color: var(--primary);
}

/* WebKit/Chrome: keep top-nav links painting correctly over dark .page-hero (higher specificity than .nav-links a) */
#mainNav ul#navLinks > li > a:link,
#mainNav ul#navLinks > li > a:visited {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  opacity: 1 !important;
}
#mainNav ul#navLinks > li > a:hover {
  color: #0f2744 !important;
  -webkit-text-fill-color: #0f2744 !important;
}
#mainNav ul#navLinks > li > a.active:link,
#mainNav ul#navLinks > li > a.active:visited {
  color: #0f2744 !important;
  -webkit-text-fill-color: #0f2744 !important;
}

/* join.html: path tabs + hero — reinforce top-nav paint without per-link JS (same colours as above) */
body.join-page #mainNav ul#navLinks > li > a:link,
body.join-page #mainNav ul#navLinks > li > a:visited {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  opacity: 1 !important;
}
body.join-page #mainNav ul#navLinks > li > a.active:link,
body.join-page #mainNav ul#navLinks > li > a.active:visited {
  color: #0f2744 !important;
  -webkit-text-fill-color: #0f2744 !important;
}

.cta-button {
  background: var(--gradient-warm);
  background-size: 200% auto;
  color: var(--text-light) !important;
  text-decoration: none !important;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: clamp(13px, 0.95vw, 15px);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background-position var(--transition-slow);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  will-change: transform;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background-position: right center;
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 10002;
}

.menu-toggle span {
  width: 26px;
  height: 2.5px;
  background: #2A3A32;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
}

.menu-toggle.open span:nth-child(1),
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.menu-toggle.open span:nth-child(2),
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3),
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Drawer only below 768px — at 768px many tablets used “desktop” width but got links parked off-screen */
@media (max-width: 767px) {
  .menu-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    /* Solid fill only — backdrop-filter on the drawer often leaves a “white sheet” compositing bug in WebKit */
    background: #fefcf9;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 8px;
    transition: right 0.3s ease, visibility 0s linear 0.3s;
    box-shadow: -4px 0 24px rgba(0,0,0,0.10);
    z-index: 10001;
    visibility: hidden;
    pointer-events: none;
  }

  .nav-links.open,
  .nav-links.active {
    right: 0;
    visibility: visible;
    pointer-events: auto;
    transition: right 0.3s ease, visibility 0s linear 0s;
  }
  .nav-links a { font-size: 17px; padding: 12px 0; }
  .cta-button { display: none; }
}

/* ≥768px: never use the off-canvas drawer for the main link row (fixes “nav slid away” after opening Join) */
@media (min-width: 768px) {
  #mainNav .nav-links,
  #mainNav #navLinks {
    position: static !important;
    inset: auto !important;
    right: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: clamp(16px, 2vw, 28px) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 2 !important;
  }
  #mainNav .cta-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ── Footer ── */
footer {
  background: linear-gradient(135deg, #0a1628 0%, #0f2744 100%);
  color: #ffffff;
  padding: 80px 60px 50px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none !important;
  transition: color 0.3s ease, transform 0.3s ease;
  font-size: clamp(14px,0.95vw,15px);
  font-weight: 500;
}
.footer-links a:hover { color: #5AB88A !important; }
.footer-text {
  color: rgba(245,240,235,0.5);
  font-size: 14px;
}
.mission-partner {
  margin-top: 50px;
  padding-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.2);
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.mission-partner h3 {
  font-size: clamp(24px,2.5vw,28px);
  color: rgba(255,255,255,0.95);
  margin-bottom: 20px;
  font-weight: 600;
}
.mission-partner p {
  font-size: clamp(16px,1.5vw,18px);
  color: rgba(255,255,255,0.85);
  line-height: 1.75;
  max-width: 800px;
  margin: 0 auto 30px;
}
.mission-partner-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
  color: rgba(255,255,255,0.95) !important;
  transition: all 0.3s ease;
  padding: 16px 28px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  margin-top: 20px;
}
.mission-partner-link:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.15);
  transform: translateY(-3px);
}
.mission-partner-logo {
  height: 44px;
  width: auto;
  opacity: 0.95;
}
.mission-partner-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mission-partner-arrow {
  font-size: 14px;
  opacity: 0.7;
  margin-left: 4px;
}

/* Footer social icons — <a href> defaults to blue; SVGs use fill="currentColor" */
footer .social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

footer .social-link,
footer span.social-link,
footer .social-link:link,
footer .social-link:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none !important;
  color: rgba(245, 240, 235, 0.9) !important;
  -webkit-text-fill-color: rgba(245, 240, 235, 0.9);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

footer .social-link svg path {
  fill: currentColor !important;
}

footer .social-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

footer .social-link:hover svg path {
  fill: currentColor !important;
}

/* ── Buttons ── */
.btn-primary {
  background: var(--gradient-warm);
  background-size: 200% auto;
  color: white;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-base);
  display: inline-block;
  box-shadow: var(--shadow-lg);
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: translate(-50%,-50%);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1), height 0.6s cubic-bezier(0.4,0,0.2,1);
}
.btn-primary:hover::before { width: 300px; height: 300px; }
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  background-position: right center;
}
.btn-primary:active { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-primary span { position: relative; z-index: 1; }

/* Section rhythm */
section {
  scroll-margin-top: 100px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------- */
/* AlliaLayer visual system (top lego layer storytelling)                      */
/* -------------------------------------------------------------------------- */

.allia-flow {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-2xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(15, 39, 68, 0.09);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.allia-flow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(100% 65% at 10% 0%, rgba(26, 74, 110, 0.05), transparent 50%),
    radial-gradient(90% 55% at 95% 100%, rgba(74, 140, 160, 0.035), transparent 48%);
  pointer-events: none;
  z-index: 0;
}

.allia-flow::after {
  content: none;
}

.allia-flow-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  padding: 22px;
  align-items: center;
}

.allia-flow--hero {
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.allia-flow--compact .allia-flow-inner {
  padding: 16px;
  gap: 14px;
}

.allia-flow--compact .tile {
  height: 32px;
  min-width: 78px;
  font-size: 12.5px;
}

.allia-flow-wrap {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.allia-flow-wrap.right {
  margin-left: auto;
  margin-right: 0;
}

.allia-flow-wrap.left {
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 960px) {
  .allia-flow-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .allia-flow-wrap,
  .allia-flow-wrap.right,
  .allia-flow-wrap.left {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

.allia-flow-panel {
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 1px solid rgba(15, 39, 68, 0.08);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.allia-flow-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 39, 68, 0.78);
  margin-bottom: 10px;
}

.tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tile {
  height: 34px;
  min-width: 86px;
  border-radius: 14px;
  background: rgba(15, 39, 68, 0.06);
  border: 1px solid rgba(15, 39, 68, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(30, 41, 51, 0.92);
}

.tile.soft {
  background: rgba(26, 74, 110, 0.08);
  border-color: rgba(26, 74, 110, 0.14);
}

.tile.accent {
  background: rgba(74, 140, 160, 0.10);
  border-color: rgba(74, 140, 160, 0.18);
}

.allia-core {
  min-width: 260px;
  border-radius: var(--radius-2xl);
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, rgba(15, 39, 68, 0.98), rgba(26, 74, 110, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.allia-core-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.allia-core-title {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
}

.lego-stack {
  display: grid;
  gap: 8px;
}

.lego {
  height: 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.lego:nth-child(2) { opacity: 0.9; transform: translateX(6px); }
.lego:nth-child(3) { opacity: 0.8; transform: translateX(12px); }

.connector {
  position: relative;
  width: 44px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(26, 74, 110, 0.22),
    rgba(26, 74, 110, 0.42) 48%,
    rgba(74, 140, 160, 0.35) 52%,
    rgba(26, 74, 110, 0.22)
  );
}

.connector::after {
  content: none;
}

@media (max-width: 960px) {
  .connector {
    width: 100%;
    height: 1px;
    opacity: 0.25;
  }
}

/* Systems underlay (foundational base blocks) */
.systems-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.system-block {
  height: 32px;
  border-radius: 14px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(15, 39, 68, 0.85), rgba(26, 74, 110, 0.75));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.system-block.alt {
  background: linear-gradient(135deg, rgba(26, 74, 110, 0.82), rgba(74, 140, 160, 0.55));
}

/* Middle column: connectors + Civium core (3-column allia-flow layout) */
.allia-flow-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.allia-flow--compact .allia-core {
  min-width: 200px;
  padding: 14px 14px 12px;
}

@media (max-width: 960px) {
  .allia-flow-mid {
    width: 100%;
    flex-direction: column;
  }
  .allia-flow-mid .connector {
    width: min(140px, 55%);
    height: 2px;
  }
}

.page-hero-visual .allia-flow {
  margin-top: 0;
}

.page-hero-allia-wrap {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
}

.page-hero-allia-wrap .visual-caption {
  margin-top: 14px;
  text-align: center;
}

.home-hero-flow-svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  margin-left: auto;
  border-radius: var(--radius-2xl);
}

/* Home: compact strip under hero (light background — uses default allia glass) */
.mini-layer-strip {
  padding: clamp(28px, 5vw, 48px) 0;
  background:
    radial-gradient(110% 70% at 50% 0%, rgba(26, 74, 110, 0.04), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--warm-cream));
  border-bottom: 1px solid rgba(15, 39, 68, 0.06);
}

.mini-layer-strip .container {
  max-width: 920px;
}

.mini-layer-flow-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(15, 39, 68, 0.07);
  box-shadow: var(--shadow-sm);
}

.mini-layer-strip .section-head {
  text-align: center;
  margin-bottom: clamp(18px, 3vw, 28px);
}

.mini-layer-strip .section-head h2 {
  font-size: clamp(20px, 2.2vw, 26px);
  margin: 0.35em 0 0;
}

.mini-layer-strip .section-head p {
  margin: 0.5em 0 0;
  color: rgba(30, 41, 51, 0.72);
  font-size: 15px;
}

/* Features / impact: architecture band */
.arch-band {
  padding: clamp(64px, 8vw, 104px) 0;
  background: linear-gradient(180deg, var(--warm-beige), var(--warm-cream));
  border-top: 1px solid rgba(15, 39, 68, 0.06);
  border-bottom: 1px solid rgba(15, 39, 68, 0.06);
}

.arch-band-diagram {
  margin-top: clamp(28px, 4vw, 44px);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature page: generic product chrome (not real UI) */
.feature-mock-scene {
  margin: 0 0 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 39, 68, 0.12);
  background: rgba(255, 255, 255, 0.65);
  overflow: hidden;
  font-size: 12px;
}

.feature-mock-chrome {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(15, 39, 68, 0.06);
  border-bottom: 1px solid rgba(15, 39, 68, 0.08);
}

.feature-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(15, 39, 68, 0.22);
}

.feature-mock-body {
  padding: 12px 14px 14px;
}

.feature-mock-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 39, 68, 0.5);
  margin-bottom: 10px;
}

.feature-mock-row {
  height: 7px;
  border-radius: 4px;
  background: rgba(15, 39, 68, 0.08);
  margin-bottom: 8px;
}

.feature-mock-body .feature-mock-row:nth-child(2) {
  width: 100%;
}

.feature-mock-body .feature-mock-row:nth-child(3) {
  width: 88%;
}

.feature-mock-body .feature-mock-row:nth-child(4) {
  width: 72%;
  margin-bottom: 0;
}

.feature-mock-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.feature-mock-pill {
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 39, 68, 0.07);
  border: 1px solid rgba(15, 39, 68, 0.1);
  font-size: 11px;
  font-weight: 600;
  color: rgba(30, 41, 51, 0.85);
  display: inline-flex;
  align-items: center;
}

/* About: subtle problem canvas */
.problem-canvas {
  position: relative;
}

.problem-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 12% 18%, rgba(44, 74, 62, 0.07), transparent 55%),
    radial-gradient(ellipse 55% 40% at 88% 85%, rgba(74, 140, 160, 0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.problem-canvas > .container {
  position: relative;
  z-index: 1;
}

/* Story: timeline highlight */
.timeline-item--spotlight {
  border-left: 4px solid rgba(74, 140, 160, 0.55);
  padding-left: 4px;
  margin-left: -8px;
}

.story-narrative-quote {
  margin: 0 0 clamp(32px, 5vw, 48px);
  padding: clamp(22px, 3vw, 32px) clamp(24px, 4vw, 40px);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(15, 39, 68, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 246, 243, 0.85));
  box-shadow: var(--shadow-md);
}

.story-narrative-quote p {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: rgba(15, 39, 68, 0.95);
}

.story-narrative-quote footer {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 39, 68, 0.5);
}

/* Impact: outcomes diagram strip */
.impact-flow-strip {
  padding: clamp(40px, 5vw, 56px) 0 0;
}

.impact-flow-strip .mini-layer-flow-svg {
  margin-top: 0;
}

/* Join: form focus polish */
.join-form-premium .form-input:focus-visible {
  outline: 2px solid rgba(44, 74, 62, 0.55);
  outline-offset: 2px;
  border-color: rgba(44, 74, 62, 0.35);
}

.join-form-premium .form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hero two-column helper (keeps story cohesive on mobile) */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}

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

/* -------------------------------------------------------------------------- */
/* Bento layout (premium SaaS “story tiles”)                                   */
/* -------------------------------------------------------------------------- */

.bento-section {
  padding: clamp(56px, 6vw, 96px) 0;
}

.bento-header {
  max-width: 860px;
  margin: 0 auto 26px;
  text-align: center;
}

.bento-header h2 {
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
}

.bento-header p {
  color: rgba(30, 41, 51, 0.85);
}

.bento-grid {
  --bento-gap: clamp(12px, 1.6vw, 20px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--bento-gap);
}

.features-footnote {
  font-size: 14px;
  font-style: italic;
  color: rgba(30, 41, 51, 0.52);
  margin: 0;
  max-width: 52ch;
}

.bento-card {
  grid-column: span 12;
  border-radius: var(--radius-2xl);
  background: #ffffff;
  border: 1px solid rgba(15, 39, 68, 0.08);
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  position: relative;
  padding: clamp(16px, 2.2vw, 26px);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.bento-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 39, 68, 0.11);
}

.bento-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 39, 68, 0.74);
  margin-bottom: 10px;
}

.bento-title {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  font-size: clamp(18px, 1.7vw, 24px);
  margin-bottom: 10px;
}

.bento-body {
  color: rgba(30, 41, 51, 0.88);
  margin: 0;
}

.bento-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(14px, 2vw, 22px);
  align-items: center;
}

@media (max-width: 960px) {
  .bento-split { grid-template-columns: 1fr; }
}

.bento-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bento-badge {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 39, 68, 0.06);
  border: 1px solid rgba(15, 39, 68, 0.10);
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(30, 41, 51, 0.92);
}

.bento-badge.soft {
  background: rgba(26, 74, 110, 0.08);
  border-color: rgba(26, 74, 110, 0.14);
}

.bento-badge.accent {
  background: rgba(74, 140, 160, 0.10);
  border-color: rgba(74, 140, 160, 0.18);
}

.bento-card .allia-flow {
  box-shadow: var(--shadow-sm);
}

.bento-card .allia-flow--hero {
  box-shadow: var(--shadow-lg);
}

/* Grid spans */
@media (min-width: 960px) {
  .bento-span-7 { grid-column: span 7; }
  .bento-span-6 { grid-column: span 6; }
  .bento-span-5 { grid-column: span 5; }
  .bento-span-4 { grid-column: span 4; }
}

/* Subtle background texture for “premium” depth */
.bento-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(800px 220px at 12% 12%, rgba(26, 74, 110, 0.10), transparent 60%),
    radial-gradient(700px 240px at 86% 20%, rgba(74, 140, 160, 0.10), transparent 60%),
    radial-gradient(900px 280px at 50% 90%, rgba(15, 39, 68, 0.08), transparent 60%);
  pointer-events: none;
  opacity: 0.9;
}

.bento-card > * {
  position: relative;
}

/* -------------------------------------------------------------------------- */
/* Futuristic-clean graphic layers (decorative only; no new claims)            */
/* -------------------------------------------------------------------------- */

:root {
  --fx-grid: rgba(15, 39, 68, 0.07);
  --fx-grid-strong: rgba(15, 39, 68, 0.11);
  --fx-noise: rgba(15, 39, 68, 0.045);
  --fx-holo: rgba(74, 140, 160, 0.18);
}

.fx-grid {
  position: relative;
}

.fx-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--fx-grid) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--fx-grid) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(900px 320px at 18% 8%, rgba(26, 74, 110, 0.10), transparent 60%),
    radial-gradient(820px 300px at 82% 14%, rgba(74, 140, 160, 0.10), transparent 62%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.92), rgba(0,0,0,0.35));
  opacity: 0.85;
}

.fx-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 10% 18%, var(--fx-noise), transparent 60%),
    radial-gradient(1px 1px at 34% 62%, var(--fx-noise), transparent 60%),
    radial-gradient(1px 1px at 76% 28%, var(--fx-noise), transparent 60%),
    radial-gradient(1px 1px at 86% 74%, var(--fx-noise), transparent 60%),
    radial-gradient(1px 1px at 52% 38%, var(--fx-noise), transparent 60%),
    radial-gradient(1px 1px at 18% 78%, var(--fx-noise), transparent 60%);
  opacity: 0.8;
  mix-blend-mode: multiply;
}

/* Crisp “holo” edge */
.fx-holo {
  position: relative;
}
.fx-holo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(26, 74, 110, 0.22), rgba(74, 140, 160, 0.18), rgba(15, 39, 68, 0.10));
  opacity: 0.55;
  mask-image: linear-gradient(#000, #000);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}

/* Circuit-like connector (pure decoration) */
.fx-circuit {
  position: relative;
}
.fx-circuit::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    radial-gradient(6px 6px at 18% 30%, rgba(26, 74, 110, 0.22), transparent 62%),
    radial-gradient(6px 6px at 78% 40%, rgba(74, 140, 160, 0.20), transparent 62%),
    radial-gradient(6px 6px at 56% 76%, rgba(15, 39, 68, 0.18), transparent 62%),
    linear-gradient(90deg, transparent 0%, var(--fx-grid-strong) 22%, transparent 45%) 0 22% / 100% 1px,
    linear-gradient(90deg, transparent 0%, var(--fx-grid-strong) 38%, transparent 58%) 0 62% / 100% 1px,
    linear-gradient(transparent 0%, var(--fx-grid-strong) 40%, transparent 62%) 22% 0 / 1px 100%,
    linear-gradient(transparent 0%, var(--fx-grid-strong) 20%, transparent 48%) 78% 0 / 1px 100%;
  opacity: 0.7;
  border-radius: calc(var(--radius-2xl) - 10px);
  mask-image: radial-gradient(80% 70% at 50% 40%, rgba(0,0,0,1), rgba(0,0,0,0.15));
}

/* -------------------------------------------------------------------------- */
/* Section header (shared)                                                     */
/* -------------------------------------------------------------------------- */

.section-head {
  max-width: 920px;
  margin: 0 auto clamp(24px, 3vw, 40px);
  text-align: center;
}

.section-head .kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 10px;
}

.section-head h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-size: clamp(28px, 3.2vw, 44px);
  margin: 0 0 16px;
}

.section-head p {
  margin: 0 auto;
  max-width: 760px;
  color: rgba(30, 41, 51, 0.86);
  font-size: clamp(16px, 1.2vw, 18px);
}

/* -------------------------------------------------------------------------- */
/* Product mock panel (neutral UI surface)                                     */
/* -------------------------------------------------------------------------- */

.mock-panel {
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46));
  border: 1px solid rgba(15, 39, 68, 0.14);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.mock-panel .mock-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 39, 68, 0.10);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.60));
}

.mock-dots {
  display: inline-flex;
  gap: 6px;
}
.mock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(15, 39, 68, 0.16);
  border: 1px solid rgba(15, 39, 68, 0.12);
}
.mock-dot.accent { background: rgba(74, 140, 160, 0.18); border-color: rgba(74, 140, 160, 0.18); }
.mock-dot.soft { background: rgba(26, 74, 110, 0.18); border-color: rgba(26, 74, 110, 0.18); }

.mock-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 39, 68, 0.70);
}

.mock-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.mock-row {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 12px;
  align-items: center;
}

.mock-metric {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(15, 39, 68, 0.10);
  background: rgba(15, 39, 68, 0.04);
  padding: 12px 12px 10px;
}

.mock-metric .label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(30, 41, 51, 0.80);
  margin-bottom: 8px;
}

.mock-bars {
  display: grid;
  gap: 8px;
}
.mock-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 39, 68, 0.08);
  overflow: hidden;
  border: 1px solid rgba(15, 39, 68, 0.08);
}
.mock-bar > span {
  display: block;
  height: 100%;
  width: 60%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(26, 74, 110, 0.55), rgba(74, 140, 160, 0.48));
}
.mock-bar:nth-child(2) > span { width: 42%; }
.mock-bar:nth-child(3) > span { width: 76%; }

@media (max-width: 960px) {
  .mock-row { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------- */
/* CTA bar (shared)                                                           */
/* -------------------------------------------------------------------------- */

.cta-bar {
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(15, 39, 68, 0.14);
  background: linear-gradient(135deg, rgba(15, 39, 68, 0.96), rgba(26, 74, 110, 0.92));
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  padding: clamp(18px, 2.8vw, 28px);
  color: rgba(255, 255, 255, 0.94);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cta-bar::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background:
    radial-gradient(700px 260px at 14% 24%, rgba(74, 140, 160, 0.22), transparent 60%),
    radial-gradient(760px 280px at 84% 22%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 34px 34px;
  opacity: 0.7;
}

.cta-bar > * { position: relative; }

.cta-bar h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  font-size: clamp(22px, 2.2vw, 30px);
}

.cta-bar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.cta-bar .actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .cta-bar { grid-template-columns: 1fr; }
  .cta-bar .actions { justify-content: flex-start; }
}

/* -------------------------------------------------------------------------- */
/* Section illustration banners                                                */
/* -------------------------------------------------------------------------- */

.illus-banner {
  width: 100%;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border: 1px solid rgba(15, 39, 68, 0.18);
  line-height: 0;
  margin-bottom: 0;
}

.illus-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-2xl);
  object-fit: cover;
  max-height: 360px;
}

.illus-banner--tall img { max-height: 480px; }
.illus-banner--short img { max-height: 240px; }

@keyframes illusFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.illus-banner {
  animation: illusFadeUp 0.75s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
  .illus-banner { animation: none; }
}

/* story arc strip above a section */
.illus-strip {
  padding: clamp(32px, 4vw, 56px) 0 0;
}

.illus-strip + section,
.illus-strip + .bento-section {
  padding-top: clamp(24px, 3vw, 40px);
}

/* -------------------------------------------------------------------------- */
/* Full-page narrative layout system                                           */
/* -------------------------------------------------------------------------- */

/* Page hero ---------------------------------------------------------------- */
.page-hero {
  padding: clamp(100px, 11vw, 160px) 0 clamp(56px, 7vw, 96px);
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.07), transparent 45%),
    radial-gradient(90% 60% at 100% 30%, rgba(26, 74, 110, 0.28), transparent 50%),
    radial-gradient(60% 50% at 85% 85%, rgba(201, 122, 90, 0.15), transparent 50%),
    linear-gradient(170deg, #0a1628 0%, #122538 35%, #1a4a6e 55%, #0a1628 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 40px 40px;
  pointer-events: none;
}

.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 960px) {
  .page-hero-inner { grid-template-columns: 1fr; }
}

.page-hero-text { color: rgba(255,255,255,0.96); }

/* Centered hero variant (e.g. team.html) */
.page-hero--center .container {
  text-align: center;
  max-width: 820px;
}
.page-hero--center .page-hero-h1 {
  margin: 16px auto 20px;
}
.page-hero--center .page-hero-sub {
  max-width: 560px;
  margin: 0 auto 32px;
}

.page-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 14px;
  display: block;
}

.page-hero-h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  font-size: clamp(42px, 5.5vw, 72px);
  color: #fff;
  margin: 0 0 20px;
  text-shadow: 0 2px 24px rgba(10, 22, 40, 0.45), 0 1px 6px rgba(10, 22, 40, 0.25);
}

.page-hero-sub {
  font-size: clamp(16px, 1.3vw, 19px);
  color: rgba(255,255,255,0.82);
  margin: 0 0 32px;
  max-width: 540px;
  line-height: 1.65;
}

.page-hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.page-hero-visual img,
.page-hero-visual svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), 0 8px 24px rgba(15, 39, 68, 0.12);
  display: block;
}
.page-hero-visual {
  overflow: visible;
  position: relative;
  z-index: 2; /* sit above .page-hero::before grid so lines never read as crossing the diagram */
}

/* Home hero: custom diagram in device frame; cap width for grid balance */
.page-hero-visual--home {
  width: 100%;
  justify-self: end;
}
@media (max-width: 960px) {
  .page-hero-visual--home {
    justify-self: center;
  }
}

/* -------------------------------------------------------------------------- */
/* Join page — path tabs, panels, feature tags (was unstyled = plain text)   */
/* -------------------------------------------------------------------------- */

.path-section {
  padding: clamp(64px, 7vw, 104px) 0;
  background: var(--warm-cream);
  position: relative;
}

.path-tabs {
  display: flex;
  justify-content: center;
  max-width: 520px;
  margin: 0 auto clamp(40px, 5vw, 56px);
  padding: 5px;
  gap: 4px;
  border-radius: 999px;
  background: rgba(15, 39, 68, 0.07);
  border: 1px solid rgba(15, 39, 68, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.path-tab {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 clamp(14px, 3vw, 22px);
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(30, 41, 51, 0.62);
  font-family: var(--font-body);
  font-size: clamp(14px, 1.1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.path-tab:hover {
  color: var(--primary);
}

.path-tab:focus-visible {
  outline: 2px solid rgba(26, 74, 110, 0.45);
  outline-offset: 2px;
}

.path-tab--active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
  color: var(--primary);
  box-shadow:
    0 4px 16px rgba(15, 39, 68, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.05);
}

.path-panel[hidden] {
  display: none !important;
}

.path-panel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-2xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(15, 39, 68, 0.1);
  box-shadow: var(--shadow-md), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.path-panel-text {
  min-width: 0;
}

.path-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26, 74, 110, 0.88);
  margin: 0 0 10px;
}

.path-clarify {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(30, 41, 51, 0.68);
  margin: 0 0 18px;
  max-width: 42em;
}

.path-headline {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  font-size: clamp(24px, 2.6vw, 34px);
  color: var(--primary);
  margin: 0 0 16px;
}

.path-body {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  color: rgba(30, 41, 51, 0.86);
  margin: 0 0 24px;
  max-width: 46em;
}

.path-panel-visual {
  min-width: 0;
}

.path-panel-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
  border: 1px solid rgba(15, 39, 68, 0.08);
  box-shadow: var(--shadow-md);
}
.path-panel-visual .device-frame img {
  border-radius: 0;
  box-shadow: none;
}
.path-panel-visual .device-frame {
  margin-bottom: 4px;
}

.path-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.path-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(15, 39, 68, 0.06);
  border: 1px solid rgba(15, 39, 68, 0.12);
  color: rgba(30, 41, 51, 0.9);
}

.path-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(26, 74, 110, 0.88);
  box-shadow: 0 0 0 2px rgba(26, 74, 110, 0.15);
  flex-shrink: 0;
}

.path-tag:nth-child(2)::before {
  background: rgba(15, 39, 68, 0.55);
  box-shadow: 0 0 0 2px rgba(15, 39, 68, 0.1);
}

.path-tag:nth-child(3)::before {
  background: rgba(74, 140, 160, 0.9);
  box-shadow: 0 0 0 2px rgba(74, 140, 160, 0.15);
}

.path-cta {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .path-panel-inner {
    grid-template-columns: 1fr;
  }

  .path-tags {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .path-tabs {
    flex-direction: column;
    border-radius: var(--radius-lg);
    max-width: none;
  }

  .path-tab {
    width: 100%;
  }
}

/* Allia flow inside dark hero */
.page-hero .allia-flow {
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  border-color: rgba(255,255,255,0.22);
  margin-top: clamp(28px, 4vw, 52px);
  position: relative;
  z-index: 1;
}

.page-hero .allia-flow-panel {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.page-hero .allia-flow-label {
  color: rgba(255,255,255,0.70);
}

.page-hero .tile {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.92);
}

.page-hero .tile.soft {
  background: rgba(26,74,110,0.28);
  border-color: rgba(26,74,110,0.36);
}

.page-hero .tile.accent {
  background: rgba(74,140,160,0.28);
  border-color: rgba(74,140,160,0.38);
}

.page-hero .connector {
  background: rgba(255,255,255,0.28);
}

/* Story arc ---------------------------------------------------------------- */
.arc-section {
  padding: clamp(64px, 7vw, 100px) 0;
  background: var(--warm-cream);
}

.arc-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
  margin-top: clamp(28px, 3.5vw, 44px);
}

@media (max-width: 1024px) {
  .arc-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2vw, 24px);
  }
  .arc-arrow { display: none; }
}

@media (max-width: 600px) {
  .arc-grid { grid-template-columns: 1fr; }
}

.arc-step {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(15, 39, 68, 0.10);
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.60));
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.arc-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(15, 39, 68, 0.20);
}

.arc-step-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.arc-step-body {
  padding: 16px 18px 20px;
}

.arc-num {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(15, 39, 68, 0.55);
  margin: 0 0 6px;
}

.arc-step h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 20px);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.arc-step p {
  font-size: 14px;
  color: rgba(42,58,50,0.80);
  margin: 0;
  line-height: 1.55;
}

.arc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  margin-top: 80px;
  font-size: 22px;
  color: rgba(15,39,68,0.30);
  font-weight: 300;
}

/* Launch banner ------------------------------------------------------------ */
/* First .launch-section definition removed — superseded by the dark version below */

.launch-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.launch-inner .page-kicker { margin-bottom: 6px; color: rgba(15,39,68,0.72); }

.launch-inner h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(18px, 1.8vw, 24px);
  margin: 0;
}

/* Story split sections ----------------------------------------------------- */
.story-section {
  padding: clamp(56px, 7vw, 112px) 0;
  background: var(--warm-cream);
}

.story-section--alt {
  background: linear-gradient(135deg, rgba(201, 122, 90, 0.04), rgba(26, 74, 110, 0.03));
}

/* Story page timeline (our-story) ------------------------------------------- */
.story-timeline {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  gap: clamp(24px, 3vw, 36px);
}

.story-timeline .bento-card.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.timeline-item__meta {
  text-align: right;
}

.timeline-item__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(74, 140, 160, 0.85);
  margin-bottom: 4px;
}

.timeline-item__num {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
  color: var(--primary);
}

.timeline-item__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

.timeline-item__text {
  font-size: 15px;
  color: rgba(30, 41, 51, 0.8);
  line-height: 1.7;
  margin: 0;
}

.bento-card.timeline-item--now {
  background: linear-gradient(135deg, rgba(15, 39, 68, 0.06), rgba(26, 74, 110, 0.07));
  border-color: rgba(15, 39, 68, 0.18);
}

.story-timeline-cta {
  text-align: center;
  margin-top: clamp(40px, 5vw, 60px);
}

@media (max-width: 560px) {
  .story-timeline .bento-card.timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-item__meta {
    text-align: left;
  }
}

/* -------------------------------------------------------------------------- */
/* NGO Top-Layer section — Civium sits on top of Salesforce/NetSuite          */
/* -------------------------------------------------------------------------- */

.layer-section {
  padding: clamp(72px, 8vw, 112px) 0;
  background: var(--warm-cream);
  position: relative;
}

.layer-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(40px, 5vw, 64px);
}

.layer-head .kicker {
  color: var(--accent-warm);
  display: block;
  margin-bottom: 10px;
}

.layer-head h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(26px, 3vw, 42px);
  color: var(--text-dark);
  margin: 0 0 16px;
  line-height: 1.1;
}

.layer-head p {
  font-size: clamp(15px, 1.1vw, 17px);
  color: rgba(42,58,50,0.72);
  line-height: 1.7;
  margin: 0;
}

.layer-stack-visual {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin: 0 0 clamp(32px, 4vw, 52px);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(15,39,68,0.08);
}

.layer-stack-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* Three-card architecture diagram */
.layer-cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .layer-cards {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .layer-card--connector {
    transform: rotate(0deg);
  }
}

.layer-card {
  border-radius: var(--radius-2xl);
  padding: clamp(20px, 2.5vw, 32px);
  position: relative;
}

.layer-card--base {
  background: linear-gradient(135deg, rgba(10,22,40,0.92), rgba(15,39,68,0.88));
  border: 1px solid rgba(26,74,110,0.20);
  box-shadow: var(--shadow-md);
  color: rgba(255,255,255,0.90);
}

.layer-card--base h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 20px);
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  color: rgba(255,255,255,0.96);
}

.layer-card--base p {
  font-size: 14px;
  color: rgba(255,255,255,0.68);
  line-height: 1.6;
  margin: 0;
}

.layer-card--civium {
  background: linear-gradient(135deg, rgba(15,39,68,0.96), rgba(26,74,110,0.90));
  border: 1px solid rgba(26,74,110,0.30);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  color: rgba(255,255,255,0.90);
}

.layer-card--civium h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 20px);
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  color: rgba(255,255,255,0.96);
}

.layer-card--civium p {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin: 0;
}

.layer-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.layer-card--base .layer-card-tag {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.14);
}

.layer-card--civium .layer-card-tag {
  background: rgba(74,140,160,0.18);
  color: rgba(74,140,160,0.90);
  border: 1px solid rgba(74,140,160,0.26);
}

/* Connector arrow between cards */
.layer-card--connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 20px;
  color: rgba(26,74,110,0.70);
  background: none;
  box-shadow: none;
}

.layer-connector-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(26,74,110,0.12);
  border: 1px solid rgba(26,74,110,0.24);
  display: flex;
  align-items: center;
  justify-content: center;
}

.layer-connector-icon svg {
  width: 16px;
  height: 16px;
  stroke: rgba(26,74,110,0.90);
}

.layer-card--connector span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(26,74,110,0.72);
  white-space: nowrap;
}

/* Civium bento badges inside layer card */
.layer-card--civium .bento-badge {
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.08);
}

.layer-card--civium .bento-badge.soft {
  background: rgba(26,74,110,0.22);
  border-color: rgba(26,74,110,0.30);
  color: rgba(255,255,255,0.85);
}

.layer-card--civium .bento-badge.accent {
  background: rgba(74,140,160,0.18);
  border-color: rgba(74,140,160,0.28);
  color: rgba(74,140,160,0.92);
}

/* -------------------------------------------------------------------------- */
/* Final CTA card — full-width integrated illustration + text                 */
/* -------------------------------------------------------------------------- */

.cta-section {
  padding: clamp(48px, 6vw, 96px) 0;
  background: var(--warm-cream);
}

.cta-card {
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, #0f2744 0%, #1a4a6e 50%, #122538 100%);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 360px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(26, 74, 110, 0.14);
  position: relative;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.cta-card:hover {
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(26, 74, 110, 0.20), 0 0 60px rgba(26, 74, 110, 0.12);
  transform: translateY(-2px);
}

@media (max-width: 820px) {
  .cta-card { grid-template-columns: 1fr; }
}

.cta-card-visual {
  overflow: hidden;
  position: relative;
  min-height: 280px;
}

.cta-card-visual:not(.cta-card-visual--brand):not(.cta-card-visual--glow) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.90;
}

/* Brand / pilot lockup (Home + Team bottom CTA): not a full-bleed photo */
.cta-card-visual--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 52px);
  background: radial-gradient(120% 100% at 30% 20%, rgba(90, 184, 138, 0.12), transparent 55%);
}

.cta-card-brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 28px);
  text-align: center;
  max-width: 22rem;
}

.cta-card-visual--brand img[src$="civium-logo-on-dark.svg"],
.cta-card-visual--brand img[src$="civium-logo.svg"] {
  width: min(220px, 86vw) !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  opacity: 1;
}

/* Home bottom CTA: custom glow art + wordmark (no partner logo) */
.cta-card-visual--glow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3.5vw, 40px);
  background: radial-gradient(130% 120% at 40% 30%, rgba(90, 184, 138, 0.14), transparent 58%);
}

.cta-card-glow-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.5vw, 22px);
  width: 100%;
  max-width: 28rem;
}

.cta-card-glow-figure {
  margin: 0;
  width: 100%;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid rgba(90, 184, 138, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 168, 75, 0.08);
}

.cta-card-glow-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(260px, 42vw);
  object-fit: contain;
  object-position: center;
  opacity: 1;
}

.cta-card-glow-wordmark {
  width: min(200px, 72%) !important;
  height: auto !important;
  object-fit: contain !important;
  opacity: 1;
}

.cta-card-brand-line {
  margin: 0;
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.35;
}

.cta-card-brand-sub {
  margin: 0;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 20rem;
}

.cta-card-body {
  padding: clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  color: rgba(255,255,255,0.95);
  position: relative;
  z-index: 1;
}

.cta-card-body .page-kicker {
  color: rgba(74,140,160,0.90);
  letter-spacing: 0.18em;
}

.cta-card-body h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.08;
  margin: 0;
  color: rgba(255,255,255,0.97);
}

.cta-card-body p {
  font-size: clamp(15px, 1.1vw, 17px);
  color: rgba(255,255,255,0.80);
  margin: 0;
  line-height: 1.65;
  max-width: 380px;
}

.cta-card-body .btn-primary {
  align-self: flex-start;
  margin-top: 6px;
}

.story-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.story-split--reverse .story-split-visual { order: 2; }
.story-split--reverse .story-split-text  { order: 1; }

@media (max-width: 960px) {
  .story-split { grid-template-columns: 1fr; }
  .story-split--reverse .story-split-visual { order: 0; }
  .story-split--reverse .story-split-text  { order: 0; }
}

.story-split-visual .illus-banner img {
  max-height: 420px;
}

/* Home — Why It Matters teaser: typographic panel (avoids duplicating illus-outputs below stack bridge) */
.story-split--impact-teaser .story-split-visual {
  align-self: stretch;
  display: flex;
}

.index-impact-teaser-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  padding: clamp(28px, 4vw, 40px);
  background: linear-gradient(145deg, var(--gray-50) 0%, var(--warm-beige) 55%, rgba(248, 246, 243, 0.92) 100%);
  border: 1px solid rgba(15, 39, 68, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.index-impact-teaser-kicker {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.index-impact-teaser-lead {
  margin: 0 0 20px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.65;
  color: var(--text-dark);
}

.index-impact-teaser-hint {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-600);
}

.index-impact-teaser-hint a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.index-impact-teaser-hint a:hover {
  color: var(--secondary);
}

/* Story-section section-head left-aligned variant */
.story-split-text .section-head {
  text-align: left;
  margin: 0 0 24px;
}

.story-split-text .section-head h2 {
  font-size: clamp(22px, 2.4vw, 32px);
}

/* Shared page-level section divider */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15,39,68,0.15), transparent);
}

/* Smooth dark-to-light transition bridge */
.page-hero + * {
  position: relative;
}

.page-hero + *::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(10,22,40,0.0), transparent);
  pointer-events: none;
  z-index: 0;
}

.transform-section + .story-section {
  position: relative;
}

.transform-section + .story-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(10,22,40,0.08), transparent);
  pointer-events: none;
}

/* Secondary button: ghost on dark .page-hero; subtle outline on light sections */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.btn-secondary span {
  position: relative;
  z-index: 1;
}

.page-hero .btn-secondary::before {
  display: none !important;
  content: none !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.80);
}

/* Light sections: outlined secondary (no white ghost) */
.story-section .btn-secondary,
.arc-section .btn-secondary,
.cta-section .btn-secondary,
.transform-section .btn-secondary,
.two-audiences-section .btn-secondary,
.join-contact-section .btn-secondary,
.path-section .btn-secondary,
.form-section .btn-secondary {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid rgba(15, 39, 68, 0.40);
  color: var(--primary);
  box-shadow: none;
}

.story-section .btn-secondary:hover,
.arc-section .btn-secondary:hover,
.cta-section .btn-secondary:hover,
.transform-section .btn-secondary:hover,
.two-audiences-section .btn-secondary:hover,
.join-contact-section .btn-secondary:hover,
.path-section .btn-secondary:hover,
.form-section .btn-secondary:hover {
  background: rgba(15, 39, 68, 0.06);
  border-color: rgba(15, 39, 68, 0.70);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Team avatar – make initials look intentional, not placeholder */
.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: 2px solid rgba(26, 74, 110, 0.30);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  color: rgba(255,255,255,0.95);
  letter-spacing: -0.02em;
  margin: 0 auto 12px;
  flex-shrink: 0;
}

.team-avatar::after {
  content: attr(data-initials);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  display: block;
}

/* Team member cards in story-section */
.story-section .team-member {
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.60));
  border: 1px solid rgba(15, 39, 68, 0.08);
  border-radius: var(--radius-2xl);
  padding: 22px 16px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.story-section .team-member:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.story-section .team-member h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.story-section .team-member p {
  font-size: 13px;
  color: rgba(42,58,50,0.68);
  margin: 0;
}

/* Mission statement – more refined */
.story-section .mission-statement {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 28px 32px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, rgba(15, 39, 68, 0.04), rgba(26, 74, 110, 0.06));
  border: 1px solid rgba(15, 39, 68, 0.08);
}

.story-section .mission-statement p {
  font-family: var(--font-heading);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.015em;
  color: rgba(42,58,50,0.85);
  margin: 0;
}

/* Unified kicker treatment across ALL sections */
.kicker,
.page-kicker,
.bento-kicker,
.arc-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-head .kicker,
.story-split-text .kicker,
.transform-head .kicker {
  display: block;
  color: var(--accent-warm);
  margin-bottom: 10px;
}

/* Remove the conflicting old `.bento-kicker` definition override */
.bento-kicker {
  color: rgba(15, 39, 68, 0.72);
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Launch section – make it feel dark & intentional */
.launch-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 50%, #152a42 100%);
  border-top: none;
  border-bottom: none;
  padding: clamp(28px, 3.5vw, 44px) 0;
  position: relative;
  overflow: hidden;
}

.launch-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 36px 36px;
  pointer-events: none;
}

/* Fade-in from cream above, fade-out to cream below */
.launch-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--warm-cream));
  pointer-events: none;
  z-index: 2;
}

.story-section + .launch-section {
  padding-top: clamp(32px, 4vw, 52px);
}

.launch-section > * { position: relative; z-index: 1; }

.launch-inner .page-kicker {
  color: rgba(74,140,160,0.85);
  margin-bottom: 6px;
  display: block;
}

.launch-inner h2 {
  color: rgba(255,255,255,0.96);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(18px, 1.8vw, 24px);
  margin: 0;
}


/* -------------------------------------------------------------------------- */
/* Before → After transformation section                                       */
/* -------------------------------------------------------------------------- */

.transform-section {
  padding: clamp(80px, 10vw, 140px) 0 calc(clamp(80px, 10vw, 140px) + 56px);
  background: linear-gradient(195deg, #0f2744 0%, #0a1628 60%, #060d18 100%);
  position: relative;
  overflow: hidden;
}

.transform-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 95% 55% at 50% 0%, rgba(255, 255, 255, 0.04), transparent 55%),
    radial-gradient(ellipse 70% 40% at 80% 20%, rgba(26, 74, 110, 0.10), transparent 50%),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px) 0 0 / 48px 48px;
  pointer-events: none;
}

/* Shape divider — dark section fades into light below */
.transform-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--warm-cream));
  pointer-events: none;
  z-index: 2;
}

.transform-section > * { position: relative; z-index: 1; }

/* Story section that follows a dark section — reduce top padding */
.transform-section + .story-section {
  padding-top: clamp(40px, 4vw, 60px);
}

/* Transform already fades to cream — don’t add a second tall “empty” band before stack */
.transform-section + .stack-section {
  padding-top: clamp(20px, 3vw, 36px);
}

/* Story section before the launch (dark) section — fade its bottom toward dark */
.story-section + .launch-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(to bottom, var(--warm-cream), transparent);
  pointer-events: none;
  z-index: 3;
}

/* After the launch section fade out — the story section should start with no harsh line */
.launch-section + .story-section {
  padding-top: clamp(40px, 4vw, 60px);
}

.transform-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.transform-head .kicker {
  color: var(--accent-warm);
}

.transform-head h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(28px, 3.2vw, 44px);
  color: #fff;
  margin: 8px 0 14px;
}

.transform-head p {
  color: rgba(255,255,255,0.72);
  font-size: clamp(15px, 1.2vw, 18px);
  max-width: 680px;
  margin: 0 auto;
}

.transform-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 2.5vw, 36px);
  align-items: center;
}

@media (max-width: 860px) {
  .transform-grid {
    grid-template-columns: 1fr;
  }
  .transform-arrow { transform: rotate(90deg); }
}

.transform-panel {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  position: relative;
}

.transform-panel--before {
  border-color: rgba(74,140,160,0.28);
  box-shadow: 0 0 40px rgba(74,140,160,0.12), var(--shadow-xl);
}

.transform-panel--after {
  border-color: rgba(26,74,110,0.32);
  box-shadow: 0 0 40px rgba(26,74,110,0.16), var(--shadow-xl);
}

.transform-panel img {
  width: 100%;
  display: block;
  height: auto;
  max-height: 320px;
  object-fit: cover;
}

.transform-panel-label {
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.transform-panel--before .transform-panel-label {
  background: rgba(74,140,160,0.14);
  color: rgba(74,140,160,0.90);
  border-top: 1px solid rgba(74,140,160,0.20);
}

.transform-panel--after .transform-panel-label {
  background: rgba(26,74,110,0.16);
  color: rgba(26,74,110,0.95);
  border-top: 1px solid rgba(26,74,110,0.22);
}

.transform-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.transform-panel--before .transform-label-dot { background: rgba(74,140,160,0.90); }
.transform-panel--after  .transform-label-dot { background: rgba(26,74,110,0.95);  }

.transform-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.28);
  flex-shrink: 0;
}

.transform-arrow svg {
  width: 32px;
  height: 32px;
  opacity: 0.55;
}

.transform-arrow span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.40);
}

/* Problem pill list (for "before" callouts) */
.problem-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.problem-pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(74,140,160,0.10);
  border: 1px solid rgba(74,140,160,0.22);
  font-size: 13px;
  font-weight: 600;
  color: rgba(74,140,160,0.90);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.solution-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.solution-pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(26,74,110,0.12);
  border: 1px solid rgba(26,74,110,0.24);
  font-size: 13px;
  font-weight: 600;
  color: rgba(26,74,110,0.95);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* -------------------------------------------------------------------------- */
/* Platform stack section — the "top layer" story                             */
/* -------------------------------------------------------------------------- */

.stack-section {
  padding: clamp(48px, 6vw, 96px) 0;
  background: var(--warm-cream);
  position: relative;
  overflow: hidden;
}

.stack-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(201, 122, 90, 0.06), transparent 50%),
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(26, 74, 110, 0.04), transparent 50%);
  pointer-events: none;
}

.stack-section::after {
  display: none;
}

.stack-section > * { position: relative; z-index: 1; }

.stack-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

@media (max-width: 860px) {
  .stack-inner { grid-template-columns: 1fr; }
}

.stack-visual {
  position: relative;
}

.stack-visual img,
.stack-visual svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  display: block;
}

.stack-text {
  color: var(--text-dark);
}

.stack-text .page-kicker {
  color: var(--accent-warm);
  margin-bottom: 14px;
  display: block;
}

.stack-text h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.08;
  margin: 0 0 18px;
  color: var(--primary);
}

.stack-text p {
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--gray-600);
  line-height: 1.68;
  margin: 0 0 28px;
  max-width: 480px;
}

/* Platform badges showing Salesforce / NetSuite */
.platform-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.01em;
}

.platform-badge .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(26,74,110,0.90);
  box-shadow: 0 0 6px rgba(26,74,110,0.60);
  flex-shrink: 0;
}

.platform-badge.badge-accent .badge-dot {
  background: rgba(74,140,160,0.90);
  box-shadow: 0 0 6px rgba(74,140,160,0.50);
}

/* Three-column benefit row */
.stack-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 500px) {
  .stack-benefits { grid-template-columns: 1fr; }
}

.stack-benefit {
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
}

.stack-benefit-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26,74,110,0.85);
  margin-bottom: 4px;
}

.stack-benefit p {
  font-size: 13px;
  color: rgba(255,255,255,0.68);
  margin: 0;
  line-height: 1.5;
}

/* Feature row below the stack split */
.stack-feature-row {
  margin-top: clamp(36px, 4.5vw, 56px);
}

.stack-section .layer-card--civium {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-2xl);
  padding: clamp(20px, 2.5vw, 28px) clamp(20px, 2.5vw, 32px);
}

.layer-card-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(26,74,110,0.85);
  margin-bottom: 12px;
}

/* Override bento-badge colours for light stack section */
.stack-section .bento-badge {
  background: rgba(15, 39, 68, 0.06);
  border-color: rgba(15, 39, 68, 0.10);
  color: var(--primary);
}

.stack-section .bento-badge.soft {
  background: rgba(26, 74, 110, 0.08);
  border-color: rgba(26, 74, 110, 0.14);
  color: var(--secondary);
}

.stack-section .bento-badge.accent {
  background: rgba(201, 122, 90, 0.10);
  border-color: rgba(201, 122, 90, 0.18);
  color: var(--accent-warm);
}

/* btn-primary on light stack section */
.stack-section .btn-primary {
  background: var(--gradient-warm);
  background-size: 200% auto;
  color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Team grid                                                                  */
/* -------------------------------------------------------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

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

/* -------------------------------------------------------------------------- */
/* Bento grid responsive column support (--bento-cols variable)               */
/* -------------------------------------------------------------------------- */

.bento-grid[style*="--bento-cols:2"] {
  grid-template-columns: 1fr 1fr;
}
.bento-grid[style*="--bento-cols:3"] {
  grid-template-columns: repeat(3, 1fr);
}
.bento-grid[style*="--bento-cols:2"] .bento-card,
.bento-grid[style*="--bento-cols:3"] .bento-card {
  grid-column: span 1;
}

@media (max-width: 860px) {
  .bento-grid[style*="--bento-cols:3"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .bento-grid[style*="--bento-cols:2"],
  .bento-grid[style*="--bento-cols:3"] {
    grid-template-columns: 1fr;
  }
}

/* Bento column utilities (avoid inline --bento-cols / margin) */
.bento-grid--cols-2 {
  margin-top: clamp(32px, 4vw, 48px);
  grid-template-columns: 1fr 1fr;
}
.bento-grid--cols-2 .bento-card {
  grid-column: span 1;
}
.bento-grid--cols-3 {
  margin-top: clamp(32px, 4vw, 52px);
  grid-template-columns: repeat(3, 1fr);
}
.bento-grid--cols-3 .bento-card {
  grid-column: span 1;
}
@media (max-width: 860px) {
  .bento-grid--cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .bento-grid--cols-2,
  .bento-grid--cols-3 {
    grid-template-columns: 1fr;
  }
}

.stack-diagram-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 39, 68, 0.08);
  box-shadow: var(--shadow-md);
  vertical-align: middle;
}

/* WebP + PNG fallbacks: <picture> should size like a plain <img> */
.page-hero-visual picture,
.page-hero-figure picture,
.stack-visual picture,
.path-panel-visual picture,
.cta-card-visual picture,
.two-audiences-visual picture,
.transform-visual-figure picture,
.mission-partner-link picture {
  display: block;
  width: 100%;
}

.team-avatar picture {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.btn-primary--mt-sm {
  margin-top: 8px;
}

.ngo-flow-caption {
  text-align: center;
  margin-top: clamp(20px, 3vw, 32px);
}
.ngo-flow-caption p {
  font-size: 14px;
  color: rgba(30, 41, 51, 0.52);
  font-style: italic;
  margin: 0;
}

.text-center-mt-lg {
  text-align: center;
  margin-top: clamp(36px, 4.5vw, 56px);
}

.join-form .form-field.is-collapsed {
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Challenge cards (about.html)                                               */
/* -------------------------------------------------------------------------- */

.challenge-card {
  padding: clamp(20px, 2.5vw, 30px);
}

.challenge-card .bento-title {
  margin-bottom: 8px;
}

/* -------------------------------------------------------------------------- */
/* NGO flow diagram — user perspective of Civium top layer                   */
/* -------------------------------------------------------------------------- */

.ngo-flow-section {
  padding: clamp(72px, 8vw, 112px) 0;
  background: var(--warm-cream);
}

.ngo-diagram {
  margin-top: clamp(36px, 4.5vw, 56px);
  display: grid;
  gap: 0;
}

/* Row 1: actor labels */
.ngo-diagram-actors {
  display: grid;
  grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr;
  gap: 0;
  align-items: end;
  padding-bottom: 10px;
}

/* Row 2: the layer blocks */
.ngo-diagram-blocks {
  display: grid;
  grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr;
  gap: 0;
  align-items: stretch;
}

.ngo-actor-label {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(42,58,50,0.55);
  padding-bottom: 8px;
}

.ngo-block {
  border-radius: var(--radius-xl);
  padding: clamp(14px, 2vw, 22px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.ngo-block--user {
  background: linear-gradient(135deg, rgba(248,246,243,1), rgba(255,255,255,0.9));
  border: 1.5px solid rgba(15,39,68,0.14);
  box-shadow: var(--shadow-sm);
}

.ngo-block--civium {
  background: linear-gradient(160deg, rgba(15,39,68,0.96), rgba(26,74,110,0.90));
  border: 1.5px solid rgba(26,74,110,0.40);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  color: rgba(255,255,255,0.95);
  z-index: 2;
  transform: translateY(-6px);
}

.ngo-block--platform {
  background: linear-gradient(135deg, rgba(10,22,40,0.88), rgba(15,39,68,0.80));
  border: 1.5px solid rgba(26,74,110,0.22);
  box-shadow: var(--shadow-md);
  color: rgba(255,255,255,0.88);
}

.ngo-block--output {
  background: linear-gradient(135deg, rgba(74,140,160,0.08), rgba(74,140,160,0.04));
  border: 1.5px solid rgba(74,140,160,0.22);
  box-shadow: var(--shadow-sm);
}

.ngo-block-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.ngo-block--user     .ngo-block-label { color: rgba(15,39,68,0.60); }
.ngo-block--civium   .ngo-block-label { color: rgba(74,140,160,0.85); }
.ngo-block--platform .ngo-block-label { color: rgba(26,74,110,0.85); }
.ngo-block--output   .ngo-block-label { color: rgba(74,140,160,0.80); }

.ngo-block-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0;
}

.ngo-block--user     .ngo-block-title { color: var(--primary); }
.ngo-block--civium   .ngo-block-title { color: rgba(255,255,255,0.97); }
.ngo-block--platform .ngo-block-title { color: rgba(255,255,255,0.95); }
.ngo-block--output   .ngo-block-title { color: rgba(74,140,160,0.92); }

.ngo-block-items {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  gap: 5px;
}

.ngo-block-items li {
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.ngo-block--user     .ngo-block-items li { color: rgba(42,58,50,0.75); }
.ngo-block--civium   .ngo-block-items li { color: rgba(255,255,255,0.78); }
.ngo-block--platform .ngo-block-items li { color: rgba(255,255,255,0.65); }
.ngo-block--output   .ngo-block-items li { color: rgba(74,140,160,0.85); }

.ngo-block-items li::before {
  content: "→";
  flex-shrink: 0;
  font-weight: 700;
  font-size: 10px;
  margin-top: 2px;
}

.ngo-block--user     .ngo-block-items li::before { color: rgba(15,39,68,0.45); }
.ngo-block--civium   .ngo-block-items li::before { color: rgba(74,140,160,0.75); }
.ngo-block--platform .ngo-block-items li::before { color: rgba(26,74,110,0.70); }
.ngo-block--output   .ngo-block-items li::before { color: rgba(74,140,160,0.70); }

/* Connector arrows between blocks */
.ngo-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 0 4px;
  transform: translateY(-3px);
}

.ngo-connector-line {
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(15,39,68,0.20), rgba(26,74,110,0.35), rgba(15,39,68,0.20));
  border-radius: 999px;
}

.ngo-connector-arrow {
  font-size: 13px;
  color: rgba(26,74,110,0.55);
  font-weight: 700;
  line-height: 1;
}

.ngo-connector-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15,39,68,0.38);
  white-space: nowrap;
  text-align: center;
  margin-top: 2px;
}

@media (max-width: 860px) {
  .ngo-diagram-actors,
  .ngo-diagram-blocks {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ngo-actor-label { text-align: left; padding-left: 2px; }
  .ngo-connector { flex-direction: row; padding: 6px 0; transform: none; }
  .ngo-connector-line { height: 1px; width: 20px; }
  .ngo-block--civium { transform: none; }
  .ngo-connector-label { display: none; }
}

/* -------------------------------------------------------------------------- */
/* Form polish — labels, inputs, contact card (Join)                          */
/* -------------------------------------------------------------------------- */

.join-contact-section {
  padding: clamp(72px, 8vw, 112px) 0;
  background: linear-gradient(180deg, var(--warm-cream) 0%, var(--gray-50) 50%, var(--warm-beige) 100%);
  position: relative;
}

.join-contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 39, 68, 0.12), transparent);
  pointer-events: none;
}

.join-contact-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.join-contact-card {
  position: relative;
  padding: clamp(36px, 5vw, 52px);
  border-radius: var(--radius-2xl);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(252, 250, 247, 0.94));
  border: 1px solid rgba(15, 39, 68, 0.1);
  box-shadow:
    0 28px 70px rgba(15, 39, 68, 0.07),
    0 8px 24px rgba(15, 39, 68, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.join-contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  opacity: 0.92;
}

.join-contact-card > * {
  position: relative;
  z-index: 1;
}

.join-contact-head {
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 36px);
}

.join-contact-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(26, 74, 110, 0.88);
  margin: 0 0 12px;
}

.join-contact-title {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-size: clamp(24px, 2.8vw, 32px);
  color: var(--primary);
  margin: 0;
}

.join-form {
  display: grid;
  gap: 20px;
}

.join-form .form-field {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(30, 41, 51, 0.85);
  letter-spacing: 0.01em;
}

.form-label .optional {
  opacity: 0.55;
  font-weight: 400;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 39, 68, 0.14);
  background: rgba(255, 255, 255, 0.95);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  color: var(--gray-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-input:hover {
  border-color: rgba(15, 39, 68, 0.22);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%232A3A32' stroke-opacity='0.55' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea.form-input {
  resize: vertical;
  min-height: 88px;
}

.join-form-submit {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.form-section input:focus,
.form-section textarea:focus,
.form-section select:focus {
  border-color: rgba(15, 39, 68, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(15, 39, 68, 0.1);
  outline: none;
}

.form-section input::placeholder,
.form-section textarea::placeholder {
  color: rgba(30, 41, 51, 0.38);
}

.form-success {
  display: none;
  text-align: center;
  padding: clamp(32px, 4vw, 52px);
  gap: 16px;
  flex-direction: column;
  align-items: center;
}

.form-success.visible {
  display: flex;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.form-success-icon svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
}

.form-success h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.03em;
  color: var(--primary);
  margin: 0;
}

.form-success p {
  font-size: 15px;
  color: rgba(42,58,50,0.75);
  margin: 0;
  max-width: 320px;
}

/* -------------------------------------------------------------------------- */
/* Reduced-motion: disable all animations & transitions                       */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bento-card, .section-head, .cta-card, .timeline-item,
  .feature-card, .outcome-card, .team-member, .stack-inner,
  .page-hero-text, .page-hero-visual, .mini-layer-strip,
  .mini-layer-flow-svg, .home-hero-flow-svg, .arch-band-diagram,
  .impact-flow-strip .mini-layer-flow-svg, .impact-flow-strip .section-head,
  .story-narrative-quote, .transform-head, .launch-inner, .two-audiences-inner {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Safe reveal: CSS-only, no JS required ── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.bento-card, .section-head, .cta-card, .timeline-item,
.feature-card, .outcome-card, .team-member, .stack-inner,
.page-hero-text, .page-hero-visual, .mini-layer-strip .section-head,
.mini-layer-flow-svg, .home-hero-flow-svg, .arch-band .section-head, .arch-band-diagram,
.impact-flow-strip .mini-layer-flow-svg, .impact-flow-strip .section-head,
.story-narrative-quote, .flow-step, .transform-panel,
.transform-head, .launch-inner, .two-audiences-inner {
  animation: revealUp 0.65s cubic-bezier(0.22,1,0.36,1) both;
}
.page-hero-visual {
  animation: revealUp 0.65s cubic-bezier(0.22,1,0.36,1) both, heroFloat 6s ease-in-out 1s infinite;
}
.page-hero-text  { animation-delay: 0s; }
.page-hero-visual { animation-delay: 0.15s; }
.section-head    { animation-delay: 0.05s; }
.stack-inner     { animation-delay: 0.1s; }
.cta-card        { animation-delay: 0.1s; }
.transform-head  { animation-delay: 0.02s; }
.launch-inner    { animation-delay: 0.04s; }
.two-audiences-inner { animation-delay: 0.08s; }
/* stagger siblings */
.bento-card:nth-child(2), .feature-card:nth-child(2), .team-member:nth-child(2), .flow-step:nth-child(2) { animation-delay: 0.1s; }
.bento-card:nth-child(3), .feature-card:nth-child(3), .team-member:nth-child(3), .flow-step:nth-child(3) { animation-delay: 0.2s; }
.bento-card:nth-child(4), .feature-card:nth-child(4), .team-member:nth-child(4) { animation-delay: 0.3s; }
.bento-card:nth-child(5), .team-member:nth-child(5) { animation-delay: 0.4s; }
.bento-card:nth-child(6), .team-member:nth-child(6) { animation-delay: 0.5s; }
.transform-panel:nth-child(2) { animation-delay: 0.15s; }
/* Other pages may still use .sr; never leave content invisible */
.sr-hidden, .sr { opacity: 1 !important; transform: none !important; }

/* ── Two-Audiences Section ── */
.two-audiences-section {
  padding: clamp(48px, 6vw, 96px) 0;
  background: var(--bg-light, #FEFCF9);
}
.two-audiences-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px,5vw,80px);
  align-items: center;
}
.two-audiences-visual {
  border-radius: var(--radius-2xl, 20px);
  overflow: hidden;
}
.two-audiences-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ta-block {
  padding: clamp(24px,3vw,36px) 0;
}
.ta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #3D9B72);
  margin-bottom: 12px;
}
.ta-statement {
  font-size: clamp(28px,3vw,38px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary, #0f2744);
  margin: 0 0 14px;
  font-family: var(--font-heading);
}
.ta-sub {
  font-size: clamp(14px,1.5vw,16px);
  line-height: 1.65;
  color: rgba(15,39,68,0.70);
  margin: 0 0 20px;
}
.ta-sub a {
  color: var(--primary, #0f2744);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ta-sub a:hover {
  color: var(--secondary, #1a4a6e);
}
.ta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent, #3D9B72);
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.18s;
}
.ta-link:hover { opacity: 0.72; }
.ta-divider {
  height: 1px;
  background: rgba(15,39,68,0.10);
  margin: 0;
}
@media (max-width: 768px) {
  .two-audiences-inner { grid-template-columns: 1fr; }
  .two-audiences-visual { max-height: 260px; }
}

/* Index layout utilities (replace inline style attrs) ---------------------- */
.index-card-pad-tight {
  padding: 18px 20px 22px;
}
.index-text-center-mt {
  text-align: center;
  margin-top: clamp(32px, 4vw, 48px);
}
.index-badge-row-mt {
  margin-top: 10px;
}
.index-text-center-mt-sm {
  text-align: center;
  margin-top: clamp(28px, 3.5vw, 44px);
}
.index-section-head-left {
  text-align: left;
  margin: 0 0 24px;
}
.index-bento-tight {
  --bento-gap: 12px;
  margin-bottom: 24px;
}
.index-bento-card-pad {
  padding: 18px;
}
.index-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: rgba(30, 41, 51, 0.84);
}
.index-btn-inline {
  display: inline-flex;
}
.index-team-grid-mt {
  margin-top: clamp(28px, 3.5vw, 48px);
}
.index-mission-mt {
  margin-top: 56px;
}
.index-cta-row {
  text-align: center;
  margin-top: var(--spacing-xl);
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Device frames + diagram captions (visual storytelling) ------------------- */
.page-hero-figure {
  margin: 0;
  width: 100%;
  max-width: min(100%, 520px);
  margin-left: auto;
  margin-right: 0;
}
.page-hero-figure.page-hero-figure--home {
  max-width: min(100%, 560px);
}
.page-hero-figure.story-hero-figure {
  max-width: min(100%, 600px);
  position: relative;
}
@media (max-width: 960px) {
  .page-hero-figure {
    margin-left: auto;
    margin-right: auto;
  }
}
.visual-caption {
  font-family: var(--font-body, "Source Sans 3", system-ui, sans-serif);
  font-size: clamp(11px, 2.5vw, 13px);
  line-height: 1.45;
  margin-top: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}
.visual-caption--on-light {
  color: rgba(30, 41, 51, 0.62);
}
.device-frame {
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), 0 8px 20px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.device-frame--light,
.stack-section .device-frame,
.two-audiences-section .device-frame,
.transform-section .device-frame {
  background: #fff;
  border-color: rgba(15, 39, 68, 0.08);
  box-shadow:
    0 12px 40px rgba(15, 39, 68, 0.10),
    0 4px 12px rgba(15, 39, 68, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.device-frame-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.device-frame--light .device-frame-chrome,
.stack-section .device-frame-chrome,
.two-audiences-section .device-frame-chrome {
  background: rgba(15, 39, 68, 0.06);
  border-bottom-color: rgba(15, 39, 68, 0.1);
}
.device-frame-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.device-frame--light .device-frame-dot,
.stack-section .device-frame-dot {
  background: rgba(15, 39, 68, 0.18);
}
.device-frame-body {
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.device-frame--light .device-frame-body,
.stack-section .device-frame-body,
.two-audiences-section .device-frame-body {
  background: #f8f9fb;
}
.page-hero-visual .device-frame img,
.page-hero-figure .device-frame img {
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  height: auto;
  display: block;
}
.stack-visual figure,
.two-audiences-visual figure,
.cta-card-visual figure {
  margin: 0;
  width: 100%;
}
.stack-visual .device-frame img,
.two-audiences-visual .device-frame img,
.cta-card-visual .device-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
.transform-visual-figure {
  margin: 0 0 12px;
  width: 100%;
}
.transform-visual-figure .device-frame {
  margin-bottom: 0;
}
.transform-visual-figure .device-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.illus-banner figure.illus-banner-figure {
  margin: 0;
}
.illus-banner .device-frame {
  margin: 0;
}
.illus-banner .device-frame img {
  border-radius: 0;
  box-shadow: none;
}

/* -------------------------------------------------------------------------- */
/* Our Story — wordless hero illustration (SVG only, no overlay copy)         */
/* -------------------------------------------------------------------------- */

.story-hero-card {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(15, 39, 68, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.story-hero-img-wrap {
  position: relative;
  line-height: 0;
}

.page-hero-visual .story-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
}

/* Screen-reader-only caption under wordless figure */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
