/* ==========================================================================
   RIYALABS.AI · SITE STYLES
   Nexus-inspired direction · Light glassy · Periwinkle/Indigo · Geist 300
   Shared across all pages — link via <link rel="stylesheet" href=".../site.css">
   ========================================================================== */
:root {
  --primary:        #E0E7FF;
  --secondary:      #6366F1;
  --tertiary:       #FB7185;
  --neutral:        #E2E8F0;
  --bg:             #FFFFFF;
  --surface:        #E0E7FF;
  --text-primary:   #0F172A;
  --text-secondary: #4F46E5;
  --border:         #E2E8F0;
  --accent:         #E0E7FF;

  --bg-soft:        #F8FAFF;
  --bg-tint:        #F1F4FF;
  --text-muted:     #475569;
  --text-faint:     #64748B;

  --glow:           rgba(99, 102, 241, 0.40);
  --glow-soft:      rgba(99, 102, 241, 0.15);
  --glow-faint:     rgba(99, 102, 241, 0.06);

  --geist: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --geist-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --serif: 'Instrument Serif', 'Times New Roman', serif;

  --s-1:  4px;  --s-2: 6px;  --s-3: 8px;  --s-4: 12px;
  --s-6:  24px; --s-8: 32px; --s-10: 40px; --s-20: 80px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 8px 2px var(--glow);
  --shadow-glow-soft: 0 0 24px 4px var(--glow-soft);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--geist);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--surface); color: var(--text-secondary); }

/* Ambient backdrop — soft periwinkle aurora */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 80% 0%, rgba(224, 231, 255, 0.55), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 100%, rgba(251, 113, 133, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(99, 102, 241, 0.05), transparent 60%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 75%);
}

.shell { width: min(1280px, 100% - 32px); margin-inline: auto; }
.shell-narrow { width: min(1080px, 100% - 32px); margin-inline: auto; }
section { padding-block: 80px; position: relative; }

@media (max-width: 768px) {
  section { padding-block: 56px; }
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
.display-xl {
  font-family: var(--geist);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  margin: 0;
}
.display-lg {
  font-family: var(--geist);
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  margin: 0;
}
.display-md {
  font-family: var(--geist);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin: 0;
}
.display-sm {
  font-family: var(--geist);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0;
}
.body-lg {
  font-family: var(--geist);
  font-size: 18px;
  line-height: 28px;
  color: var(--text-muted);
}
.body-md {
  font-family: var(--geist);
  font-size: 16px;
  line-height: 26px;
  color: var(--text-muted);
}
.body-sm {
  font-family: var(--geist);
  font-size: 14px;
  line-height: 22px;
  color: var(--text-muted);
}
.label-md {
  font-family: var(--geist);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
}
.label-mono {
  font-family: var(--geist-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 18px;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.italic-accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
}
.text-primary { color: var(--text-primary); }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-indigo { color: var(--text-secondary); }

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--geist-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(224, 231, 255, 0.5);
  border: 1px solid rgba(224, 231, 255, 0.85);
}
.eyebrow.with-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  animation: pulse 2s ease-in-out infinite;
}

/* ==========================================================================
   BUTTONS — pill, per spec
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--geist);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  transition: transform 300ms var(--ease),
              box-shadow 500ms var(--ease),
              background-color 300ms var(--ease),
              border-color 300ms var(--ease),
              color 300ms var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform 300ms var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm), var(--shadow-md);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm), var(--shadow-md), var(--shadow-glow);
  border-color: var(--secondary);
}
.btn-indigo {
  background: var(--secondary);
  color: var(--bg);
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm), 0 4px 12px -2px rgba(99, 102, 241, 0.45);
}
.btn-indigo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm), 0 8px 20px -2px rgba(99, 102, 241, 0.55), 0 0 12px 2px rgba(99, 102, 241, 0.30);
  background: #4F46E5;
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-tint); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.large { padding: 14px 28px; font-size: 15px; }

/* ==========================================================================
   GRADIENT BORDER SHELL (signature Nexus)
   ========================================================================== */
.shell-edge {
  position: relative;
  padding: 1px;
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(239, 246, 255, 0.55) 45%,
    rgba(0, 0, 0, 0) 75%);
}
.shell-edge.card {
  border-radius: 16px;
  background: radial-gradient(ellipse 100% 60% at 50% 0%,
    rgba(99, 102, 241, 0.30) 0%,
    rgba(239, 246, 255, 0.55) 25%,
    rgba(0, 0, 0, 0) 70%);
}
.shell-edge.card-strong {
  border-radius: 20px;
  padding: 1.5px;
  background: radial-gradient(ellipse 80% 100% at 50% 0%,
    rgba(99, 102, 241, 0.55) 0%,
    rgba(224, 231, 255, 0.75) 30%,
    rgba(255, 255, 255, 0.20) 60%,
    rgba(0, 0, 0, 0) 80%);
}
.shell-edge > .inner {
  background: var(--bg);
  border-radius: inherit;
}
.shell-edge.card > .inner { border-radius: 15px; }
.shell-edge.card-strong > .inner { border-radius: 18px; }

.glass {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 12px;
}
.glass.tint {
  background: rgba(224, 231, 255, 0.40);
  border-color: rgba(224, 231, 255, 0.85);
}

/* ==========================================================================
   NAV + MEGA-PANELS (Glean-style hybrid)
   ========================================================================== */
/* V1 full-width nav — Linear / Vercel pattern. Replaces the floating pill
   so every page lands on the same flat hairline bar as the home page. */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
  margin-top: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid #EEEEEE;
}
.nav {
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
  height: 64px;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}
/* === Riyalabs.ai BRAND — Live face cube + wordmark with coral underscore ===
   Matches the home page exactly so the lockup never changes across pages. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--geist);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #0A0A0A;
  padding-left: 0;
}
.brand-mark {
  display: inline-block;
  width: 50px;
  height: 50px;
  border-radius: 0;
  background: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><polygon points='20,4 32,10 20,16 8,10' fill='%23A5B4FC'/><polygon points='8,10 20,16 20,30 8,24' fill='%234F46E5'/><polygon points='32,10 20,16 20,30 32,24' fill='%23FB7185'/><path d='M 20 4 L 8 10 L 20 16 L 32 10 Z M 20 16 L 20 30' stroke='%23FFFFFF' stroke-width='0.5' fill='none' opacity='0.35'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  box-shadow: none;
  font-size: 0;
  color: transparent;
  position: relative;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(251, 113, 133, 0.30));
}
.brand-mark::after { display: none; }
.brand-text {
  position: relative;
  display: inline-flex;
  align-items: baseline;
}
.brand-text .ai {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: #FB7185;
  font-size: 1.05em;
  position: relative;
  margin-right: 24px;
}
.brand-text .ai::after {
  content: '';
  position: absolute;
  left: calc(100% + 6px);
  bottom: 0.15em;
  width: 17px;
  height: 4px;
  background: #FB7185;
  border-radius: 2px;
}

.nav-menu {
  display: flex;
  gap: 4px;
  justify-content: center;
  font-family: var(--geist);
  font-size: 14px;
  color: #525252;
  position: relative;
}
.nav-tab,
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #525252;
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.nav-tab:hover,
.nav-link:hover,
.nav-tab[aria-expanded="true"] {
  background: #F5F5F5;
  color: #0A0A0A;
}
.nav-tab[aria-current="page"],
.nav-link[aria-current="page"] {
  color: #0A0A0A;
}
.nav-tab .caret {
  width: 10px;
  height: 10px;
  opacity: 0.5;
  transition: transform 200ms var(--ease);
}
.nav-tab[aria-expanded="true"] .caret { transform: rotate(180deg); }

.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-right .btn {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 6px;
}
.nav-right .btn-indigo {
  background: #0A0A0A;
  color: #FFFFFF;
  border: 1px solid #0A0A0A;
  box-shadow: none;
}
.nav-right .btn-indigo:hover {
  background: #262626;
  transform: translateY(-1px);
}
.nav-right .btn-ghost {
  color: #525252;
  border-color: transparent;
}
.nav-right .btn-ghost:hover {
  color: #0A0A0A;
  background: transparent;
}

/* Mega panel container */
.mega-host {
  position: relative;
  z-index: 49;
}
.mega-panel {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(1180px, calc(100% - 32px));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
  z-index: 60;
}
.mega-panel.open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  pointer-events: auto;
}
/* Invisible hit-area extending above the panel so the cursor can cross the gap
   from nav-tab → panel without triggering a close. */
.mega-panel.open::before {
  content: '';
  position: absolute;
  top: -32px;
  left: 0;
  right: 0;
  height: 36px;
  background: transparent;
}
.mega-panel .grid {
  display: grid;
  gap: 24px;
}
.mega-panel .grid.cols-2 { grid-template-columns: 1fr 1fr; }
.mega-panel .grid.cols-3 { grid-template-columns: 1.2fr 1fr 1fr; }
.mega-col h4 {
  font-family: var(--geist-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.mega-link {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  align-items: start;
  transition: background-color 200ms var(--ease);
}
.mega-link:hover { background: var(--bg-tint); }
.mega-link .ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}
.mega-link .ic svg { width: 18px; height: 18px; }
.mega-link .ttl {
  font-family: var(--geist);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}
.mega-link .sub {
  font-family: var(--geist);
  font-size: 12px;
  line-height: 17px;
  color: var(--text-muted);
  margin-top: 3px;
}
.mega-feature {
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(224, 231, 255, 0.6), rgba(255, 255, 255, 0.4));
  border: 1px solid rgba(224, 231, 255, 0.85);
}
.mega-feature .label-mono { margin-bottom: 8px; display: inline-block; }
.mega-feature .ttl {
  font-family: var(--geist);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.mega-feature p {
  font-family: var(--geist);
  font-size: 13px;
  line-height: 19px;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.mega-feature a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--geist);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.mega-feature a:hover { text-decoration: underline; }

.mega-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms var(--ease), visibility 200ms;
  z-index: 55;
}
.mega-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================================
   PAGE HEADER (shared by deep pages)
   ========================================================================== */
.page-header {
  padding-top: 32px;
  padding-bottom: 40px;
  text-align: left;
}
@media (max-width: 768px) {
  .page-header { padding-top: 20px; padding-bottom: 28px; }
}
.page-header .eyebrow { margin-bottom: 24px; }
.page-header h1 {
  font-family: var(--geist);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0;
  max-width: 880px;
}
.page-header h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--text-secondary); }
.page-header .sub {
  font-family: var(--geist);
  font-size: 18px;
  line-height: 28px;
  color: var(--text-muted);
  margin: 24px 0 0;
  max-width: 720px;
}

/* ==========================================================================
   COMMON CARDS, CHIPS, ICONS
   ========================================================================== */
.card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 300ms var(--ease), box-shadow 500ms var(--ease), border-color 300ms var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--surface);
  border-color: var(--primary);
}
.card .ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-tint);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.card .ic svg { width: 18px; height: 18px; }
.card h3 {
  font-family: var(--geist);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.card p {
  font-family: var(--geist);
  font-size: 14px;
  line-height: 22px;
  color: var(--text-muted);
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--geist);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(224, 231, 255, 0.85);
}

.kicker {
  font-family: var(--geist-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Generic icon SVG sizing */
.ic-md { width: 18px; height: 18px; }
.ic-lg { width: 22px; height: 22px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(248, 250, 255, 0.5);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.foot-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.foot-col h4 {
  font-family: var(--geist-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 10px; font-family: var(--geist); font-size: 14px; }
.foot-col li a {
  color: var(--text-primary);
  transition: color 200ms var(--ease);
}
.foot-col li a:hover { color: var(--text-secondary); }
.foot-lead .brand { margin-bottom: 16px; }
.foot-lead .brand .brand-text { font-size: 18px; }
.foot-lead p {
  font-family: var(--geist);
  font-size: 14px;
  line-height: 22px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 16px 0 0;
}
.foot-lead p em { font-family: var(--serif); font-style: italic; color: var(--text-secondary); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
  font-family: var(--geist-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.foot-bottom .accent { color: var(--secondary); }

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

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0; }
}
@keyframes flow {
  to { background-position: -200% 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
/* Catch-all: any child past the first 8 still fades in (just without a
   personalised delay). Stops large grids (like 28 integrations) from
   leaving everything after #8 invisible forever. */
.stagger.in > * { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }
.stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.10s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.15s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.20s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.25s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.30s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.35s; }
.stagger.in > *:nth-child(8) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   BREADCRUMBS — auto-injected by site.js based on URL path
   Shows "Home / Resources / Article" etc. so users know where they are.
   ========================================================================== */
.breadcrumbs {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  border-bottom: 1px solid #F1F5F9;
  font-family: var(--geist);
  font-size: 13px;
  padding: 9px 0;
}
.breadcrumbs .shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  color: #737373;
}
.breadcrumbs li a {
  color: #737373;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.breadcrumbs li a:hover {
  color: #0A0A0A;
  background: #F5F5F5;
}
.breadcrumbs li.current {
  color: #0A0A0A;
  padding: 4px 8px;
  font-weight: 500;
}
.breadcrumbs li .sep {
  color: #CBD5E1;
  padding: 0 2px;
  user-select: none;
}
.breadcrumbs .home-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  opacity: 0.7;
}
@media (max-width: 540px) {
  .breadcrumbs { font-size: 12px; padding: 8px 0; }
  .breadcrumbs li a, .breadcrumbs li.current { padding: 4px 6px; }
  .breadcrumbs .shell { padding: 0 16px; }
}

/* ==========================================================================
   RESPONSIVE NAV — hamburger + slide-down menu on mobile
   ========================================================================== */
/* Mobile sub-menu accordions are injected into every page's nav by site.js.
   They must stay hidden on desktop — only the @media (max-width:1000px) block
   below turns them on. */
.nav-submenu { display: none; }
.nav-hamburger {
  display: none;
  appearance: none;
  border: none;
  background: transparent;
  width: 42px;
  height: 42px;
  padding: 10px 8px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 8px;
  margin-left: 4px;
  transition: background 0.15s ease;
}
.nav-hamburger:hover { background: #F5F5F5; }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #0A0A0A;
  border-radius: 1px;
  transition: transform 200ms ease, opacity 200ms ease;
  transform-origin: center;
}
body.mobile-nav-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.mobile-nav-open .nav-hamburger span:nth-child(2) { opacity: 0; }
body.mobile-nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1000px) {
  .nav-hamburger { display: flex; }
  /* CRITICAL FIX: .nav-wrap has backdrop-filter on desktop which creates a
     containing block, trapping any position:fixed descendant inside it
     (max 64px tall). Strip the filter on mobile so .nav-menu can actually
     position itself relative to the viewport. The blur isn't visually
     important on mobile anyway — the menu is a solid sheet. */
  .nav-wrap {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0; /* extend all the way to the bottom — no page leak */
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 16px 20px 32px;
    /* Fully opaque white. No transparency / no backdrop blur — those caused
       the page underneath to bleed through and made the menu look greyed-out. */
    background: #FFFFFF;
    border-bottom: 1px solid #EEEEEE;
    box-shadow: 0 16px 28px -16px rgba(15, 23, 42, 0.14);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 60; /* above the sticky nav (z:50) so nothing peeks through */
  }
  /* Lock body scroll while the menu is open — otherwise tapping items can
     jiggle the page underneath and the menu can feel unstable. */
  body.mobile-nav-open { overflow: hidden; }
  .nav-menu a {
    padding: 16px 12px;
    border-radius: 10px;
    font-size: 17px;
    color: #0A0A0A;
    border-bottom: 1px solid #F4F4F4;
    justify-content: space-between;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
  }
  .nav-menu a:last-child { border-bottom: none; }
  .nav-menu a:active { background: #F5F5F5; }
  /* The whole tab row is a tap target on mobile — feedback shows that. */
  .nav-menu .nav-tab[data-panel] {
    cursor: pointer;
    transition: background-color 120ms ease;
  }
  .nav-menu .nav-tab[data-panel].submenu-open {
    background: #F5F5F5;
    color: #4F46E5;
  }
  .nav-tab .caret {
    width: 16px;
    height: 16px;
    opacity: 0.45;
    transition: transform 220ms ease, opacity 200ms ease;
    flex-shrink: 0;
    pointer-events: none; /* JS handles tap on whole row */
  }
  .nav-tab.submenu-open .caret {
    transform: rotate(180deg);
    opacity: 1;
    color: #4F46E5;
  }

  /* Inline accordion sub-menu under each section tab.
     Uses max-height + opacity transition so opening/closing is smooth and
     never flickers (no display:none toggles). JS sets inline max-height to
     scrollHeight when opening; we clamp the transition. */
  .nav-submenu {
    display: flex;
    flex-direction: column;
    padding: 0 0 0 14px;
    margin: 0 0 4px 16px;
    border-left: 2px solid #E5E7EB;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 260ms ease, opacity 220ms ease, padding 220ms ease, margin 220ms ease;
  }
  .nav-submenu.open {
    opacity: 1;
    padding: 6px 0 10px 14px;
    margin: -2px 0 8px 16px;
  }
  .nav-submenu-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 2px;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    text-decoration: none;
    border-bottom: none !important;
    color: #0A0A0A;
  }
  .nav-submenu-link:active { background: #F5F5F5; }
  /* "See all in X" link uses a single-line row layout with arrow on the right */
  .nav-submenu-overview {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(99, 102, 241, 0.08) !important;
    margin-bottom: 6px;
    padding: 12px 14px !important;
  }
  .nav-submenu-overview .nav-submenu-ttl { color: #4F46E5; }
  .nav-submenu-arrow {
    color: #4F46E5;
    font-size: 16px;
    line-height: 1;
    opacity: 0.85;
    flex-shrink: 0;
  }
  .nav-submenu-ttl {
    display: block;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #0A0A0A;
    line-height: 1.3;
  }
  .nav-submenu-sub {
    display: block;
    font-family: 'Geist', sans-serif;
    font-size: 12.5px;
    color: #737373;
    margin-top: 3px;
    line-height: 1.4;
  }

  .mega-panel { display: none; }
  .nav-right { gap: 6px; }
  body.mobile-nav-open .nav-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
@media (max-width: 600px) {
  /* The mobile menu carries its own CTA — collapse the nav CTA to keep the
     bar uncluttered and ensure the hamburger never gets pushed off-screen. */
  .nav-right .btn-indigo,
  .nav-right .btn-ghost { display: none; }
}
@media (max-width: 540px) {
  .nav-right .btn-ghost { display: none; }
}

/* ==========================================================================
   CONSERVATIVE SECTION SPACING — trims the obvious dead-air gaps between
   sections without rewriting any card padding or section-head internals.
   Tested values, easy to dial back if needed.
   ========================================================================== */
section { padding-block: 64px; }
@media (max-width: 768px) { section { padding-block: 44px; } }

/* ==========================================================================
   ENGINE CARDS — icon inline with title (was stacked above with margin).
   Uses CSS Grid so we don't touch the HTML. Description and tag span both
   columns underneath the icon-title row.
   Covers .engine (product subpages, index Capabilities) AND .engine-tile
   (solutions/use-cases.html). Selectors carry !important so they beat per-
   page inline overrides that try to set display:flex; flex-direction:column.
   ========================================================================== */
.engines-grid .engine,
.engines-grid .engine-tile,
.engine,
.engine-tile {
  display: grid !important;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 0;
  align-items: center;
}
.engines-grid .engine > .ic,
.engines-grid .engine-tile > .ic,
.engine > .ic,
.engine-tile > .ic {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0 !important;
  align-self: center;
}

/* ==========================================================================
   GENERIC INLINE-ICON CARD PATTERN — applies the same grid layout to every
   stacked-icon card family across the site. One source of truth: edit here
   to change behaviour anywhere.

   Card families included:
   - .work-card        (enterprise team pages — marketing/finance/sales/eng/exec)
   - .concern-card     (enterprise hub)
   - .buyer-card       (enterprise/position)
   - .topic-card       (enterprise/security)
   - .lane-card        (enterprise/trust)
   - .uc-case          (solutions/use-cases)
   ========================================================================== */
.work-card,
.concern-card,
.buyer-card,
.topic-card,
.lane-card,
.uc-case {
  display: grid !important;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: start;
}
.work-card > .ic,
.concern-card > .ic,
.buyer-card > .ic,
.topic-card > .ic,
.lane-card > .ic,
.uc-case > .ic {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0 !important;
  align-self: center;
}
.work-card > h3, .work-card > h4,
.concern-card > h3, .concern-card > h4,
.buyer-card > h3, .buyer-card > h4,
.topic-card > h3, .topic-card > h4,
.lane-card > h3, .lane-card > h4,
.uc-case > h3, .uc-case > h4 {
  grid-column: 2;
  grid-row: 1;
  margin: 0 !important;
  align-self: center;
}
/* Anything that isn't .ic or h3/h4 spans the full width below the head row */
.work-card > :not(.ic):not(h3):not(h4),
.concern-card > :not(.ic):not(h3):not(h4),
.buyer-card > :not(.ic):not(h3):not(h4),
.topic-card > :not(.ic):not(h3):not(h4),
.lane-card > :not(.ic):not(h3):not(h4),
.uc-case > :not(.ic):not(h3):not(h4) {
  grid-column: 1 / -1;
}
.work-card > p,
.concern-card > p,
.buyer-card > p,
.topic-card > p,
.lane-card > p,
.uc-case > p { margin-top: 8px !important; }

/* Trust cards — desktop was still stacked; make it inline like everywhere
   else. Mobile keeps its own inline rule from index.html. */
.trust-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}
.trust-card > .ic {
  margin-bottom: 0 !important;
  flex-shrink: 0;
}
.trust-card > .ttl { margin: 0 !important; }
.engines-grid .engine > h4,
.engines-grid .engine-tile > h4,
.engine > h4,
.engine-tile > h4 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  align-self: center;
}
.engines-grid .engine > p,
.engines-grid .engine > .engine-tag,
.engines-grid .engine-tile > p,
.engine > p,
.engine > .engine-tag,
.engine-tile > p {
  grid-column: 1 / -1;
}
.engines-grid .engine > p,
.engines-grid .engine-tile > p,
.engine > p,
.engine-tile > p { margin-top: 10px !important; }
.engines-grid .engine > .engine-tag,
.engine > .engine-tag { margin-top: 12px; }

/* ==========================================================================
   CO-WORKER CARD HEAD — keep this. Icon + title + "Most popular" badge live
   in one inline row instead of stacked. This is a structural change, not a
   spacing change, so it stays after the spacing revert.
   ========================================================================== */
.cw-grid .card .cw-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.cw-grid .card .cw-head .ic { margin-bottom: 0; flex-shrink: 0; }
.cw-grid .card .cw-head h3 { margin: 0; flex: 1; }
.cw-grid .card .cw-popular {
  font-family: var(--geist-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tertiary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.cw-grid .card .cw-popular .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--tertiary);
  display: inline-block;
}
