/* ==========================================================================
   Ailygence Design System - Premium Modular Components (Mobile-First)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Logo Presentation & Theme Switching
   -------------------------------------------------------------------------- */
.logo-img-nav {
  height: 32px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
  display: block;
}

.logo-img-nav:hover {
  transform: scale(1.02);
}

.logo-img-footer {
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: var(--space-4);
  display: block;
}

.logo-img-symbol {
  height: 24px;
  width: auto;
  object-fit: contain;
}

/* Theme-dependent logo visibility */
html[data-theme="dark"] .logo-light-variant {
  display: none !important;
}
html[data-theme="dark"] .logo-dark-variant {
  display: block !important;
}

html[data-theme="light"] .logo-dark-variant {
  display: none !important;
}
html[data-theme="light"] .logo-light-variant {
  display: block !important;
}

/* --------------------------------------------------------------------------
   Theme Toggle Button (Sun / Moon)
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-primary);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

.theme-toggle-btn:hover {
  border-color: var(--color-violet-border);
  background: var(--color-violet-tint);
  color: var(--color-violet-soft);
  transform: rotate(15deg);
  box-shadow: 0 0 16px var(--color-violet-glow);
}

.theme-icon-sun, .theme-icon-moon {
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

html[data-theme="dark"] .theme-icon-sun {
  display: block;
}
html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="light"] .theme-icon-sun {
  display: none;
}
html[data-theme="light"] .theme-icon-moon {
  display: block;
}

/* --------------------------------------------------------------------------
   Badges, Pills & Labels
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  transition: all var(--transition-normal);
  max-width: 100%;
}

.badge-violet {
  background: var(--color-violet-tint);
  border-color: var(--color-violet-border);
  color: var(--color-violet-soft);
}

.badge-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: var(--color-violet-bright);
  box-shadow: 0 0 8px var(--color-violet-bright);
}

/* --------------------------------------------------------------------------
   Buttons & CTAs (Touch-Friendly)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 1rem 2rem;
  min-height: 52px;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-btn);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-violet-bright), var(--color-violet-deep));
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px var(--color-violet-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-violet-vivid), var(--color-violet-primary));
  box-shadow: 0 6px 28px rgba(123, 43, 249, 0.5);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-violet-tint);
  color: var(--color-violet-soft);
  border: 1px solid var(--color-violet-border);
  font-weight: 700;
}

.btn-secondary:hover {
  background: var(--color-violet-primary);
  border-color: var(--color-violet-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--color-violet-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--color-text-pure);
  background: var(--color-surface-elevated);
  border-color: var(--color-border-subtle);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  min-height: 38px;
  font-size: var(--text-xs);
  border-radius: var(--radius-btn);
}

.btn-lg {
  padding: 0.95rem 2rem;
  min-height: 50px;
  font-size: var(--text-base);
  border-radius: var(--radius-btn);
}

/* --------------------------------------------------------------------------
   Navigation Bar (Fixed / Sticky at Top on All Devices)
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1000;
  background: var(--color-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-glass);
  transition: background-color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 92px;
}

.navbar.scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 1px 0 var(--color-violet-border);
  border-bottom-color: var(--color-violet-border);
  background: var(--color-nav-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.navbar-inner {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: space-between;
  align-items: center;
  height: 76px;
  gap: var(--space-6);
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: max(clamp(1rem, 4vw, 1.5rem), env(safe-area-inset-left, 16px));
  padding-right: max(clamp(1rem, 4vw, 1.5rem), env(safe-area-inset-right, 16px));
  box-sizing: border-box;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
  justify-self: start;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-self: end;
}

.navbar-inner > nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  margin: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  list-style: none;
  margin: 0 auto;
}

.nav-link {
  padding: 0.72rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-text-pure);
  background: var(--color-surface-elevated);
}
.nav-link.active {
  color: var(--color-text-pure);
}

.nav-link.active::after,
.nav-links .current-menu-item > a.nav-link::after,
.nav-links .current_page_item > a.nav-link::after,
.nav-links .current_page_parent > a.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--color-violet-bright);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--color-violet-bright);
}

/* WordPress marks the current page's menu item natively: surface it with
   the same violet underline so visitors always know where they are. */
.nav-links .current-menu-item > a.nav-link,
.nav-links .current_page_item > a.nav-link,
.nav-links .current_page_parent > a.nav-link {
  color: var(--color-text-pure);
}

/* --------------------------------------------------------------------------
   Flat navigation: a top-level menu item with the "menu-cta" class
   (set in WP Admin > Appearance > Menus) renders as a violet button with
   the site-wide 10px button radius.
   In the mobile drawer it renders as a highlighted link instead.
   -------------------------------------------------------------------------- */
/* CONTACT sits one menu rhythm away from BLOG, matching the spacing
   between the plain menu items (user decision 2026-10-25: unified header gaps). */
.nav-links .menu-cta {
  margin-left: 20px;
}
.nav-links .menu-cta > a.nav-link {
  background: var(--color-violet-primary);
  color: #ffffff;
  border-radius: var(--radius-btn);
  padding: 0.7rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(109, 47, 246, 0.35);
}

.nav-links .menu-cta > a.nav-link:hover,
.nav-links .menu-cta > a.nav-link:focus-visible {
  background: var(--color-violet-bright);
  color: #ffffff;
}

.nav-links .menu-cta > a.nav-link.active::after {
  display: none;
}

.mobile-nav-list .menu-cta > a {
  background: var(--color-violet-tint);
  border-color: var(--color-violet-border);
  color: var(--color-violet-soft);
}

/* Ten top-level items fit gracefully: tighten spacing below 1200px.
   The desktop nav hides entirely under 860px (mobile drawer takes over). */
@media (max-width: 1200px) {
  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: 0.5rem 0.55rem;
    font-size: var(--text-xs);
  }

  .nav-links .menu-cta > a.nav-link {
    padding: 0.5rem 0.9rem;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  margin-left: 0;
}

.nav-mobile-toggle {
  display: none;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-btn);
  color: var(--color-text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
  padding: 0;
}

.nav-mobile-toggle:hover {
  border-color: var(--color-violet-border);
  color: var(--color-violet-bright);
}

/* --------------------------------------------------------------------------
   Mobile Drawer Overlay (Slide-In / Full-Screen Independent Architecture)
   -------------------------------------------------------------------------- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--color-mobile-drawer-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(1.25rem, env(safe-area-inset-top, 16px)) max(1.25rem, env(safe-area-inset-right, 16px)) max(1.5rem, env(safe-area-inset-bottom, 16px)) max(1.25rem, env(safe-area-inset-left, 16px));
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 300ms var(--ease-out-expo), opacity 300ms ease, visibility 300ms ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.mobile-drawer.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: var(--space-4);
}

.mobile-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-primary);
  cursor: pointer;
}

.mobile-drawer-close:hover {
  border-color: var(--color-violet-border);
  color: var(--color-violet-bright);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.mobile-nav-item {
  width: 100%;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  min-height: 52px;
}

.mobile-nav-link:hover, .mobile-nav-link:active {
  background: var(--color-violet-tint);
  border-color: var(--color-violet-border);
  color: var(--color-violet-soft);
  transform: translateX(4px);
}

.mobile-nav-arrow {
  color: var(--color-violet-soft);
  font-size: 1.2rem;
  font-weight: 700;
}

.mobile-drawer-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 8vw, 4.5rem);
  padding-bottom: clamp(3rem, 10vw, 6rem);
  text-align: center;
  width: 100%;
}

.hero-content {
  max-width: 920px;
  margin: 0 auto;
}

.hero-eyebrow {
  margin-bottom: var(--space-4);
}

.hero-title {
  font-size: var(--text-h1);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-4);
  font-weight: 700;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-8);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero-preview-title {
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.hero-preview {
  margin-top: var(--space-8);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
  position: relative;
  overflow: hidden;
  text-align: left;
  width: 100%;
}

.hero-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-violet-bright), transparent);
}

.hero-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hero-preview-dots {
  display: flex;
  gap: 6px;
}

.hero-preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-subtle);
}

.hero-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.hero-preview-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.hero-preview-card:hover {
  border-color: var(--color-violet-border);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--color-violet-glow);
}

.hero-preview-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-violet-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-violet-soft);
  margin-bottom: var(--space-2);
  border: 1px solid var(--color-violet-border);
}

/* --------------------------------------------------------------------------
   Cards & Surfaces
   -------------------------------------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--color-surface-card) 0%, var(--color-surface-elevated) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2rem);
  position: relative;
  width: 100%;
  text-align: center;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Subtle top gradient accent on all cards */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-violet-primary), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card:hover {
  border-color: var(--color-violet-border);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(109, 47, 246, 0.16), 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card:hover::before {
  opacity: 1;
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

/* v2.8.87: card titles that ARE h2 elements use the Resources card size
   (20px), NOT the canonical H2 size. v2.8.86 set them to 24-32px, which
   made service-card and blog-card titles huge and wrapping. Card titles
   are a component, not section headings: h3.card-title already renders
   at this size via the .card-title base rule above. */
h2.card-title {
  font-size: var(--text-h3);
}

.card-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-violet-bright);
  margin-bottom: var(--space-3);
  padding: 4px 12px;
  background: var(--color-violet-tint);
  border-radius: 999px;
}

.card-body {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.card-body {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Section Headers
   -------------------------------------------------------------------------- */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}

.section-tag {
  color: var(--color-violet-bright);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  display: inline-block;
  padding: 6px 16px;
  background: var(--color-violet-tint);
  border: 1px solid var(--color-violet-border);
  border-radius: 999px;
}

/* Unified eyebrow style for page content section headers.
   Used by FAQ blocks, "Go deeper" sections, and other content headers
   authored in wp-admin. Matches the section-tag pill treatment. */
.page-content .eyebrow {
  color: var(--color-violet-bright);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  display: inline-block;
  padding: 6px 16px;
  background: var(--color-violet-tint);
  border: 1px solid var(--color-violet-border);
  border-radius: 999px;
}

.section-title {
  font-size: var(--text-h2);
  margin-bottom: var(--space-4);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* v2.8.86: .section-title is also the H1 on /blog/, category archives,
   search and 404 pages (home.php, archive.php, search.php, 404.php,
   index.php). Those H1s were 30px-44px while other pages were 36px-60px —
   the blog-title difference the owner noticed. */
h1.section-title {
  font-size: var(--text-h1);
}

.section-desc {
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
  line-height: 1.65;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Interactive Ecosystem Explorer
   -------------------------------------------------------------------------- */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.offering-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  min-height: 180px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), background-color var(--transition-normal);
}

.offering-card:hover, .offering-card.active {
  border-color: var(--color-violet-bright);
  background: var(--color-surface-elevated);
  box-shadow: 0 0 24px var(--color-violet-glow);
  transform: translateY(-4px);
}

.offering-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--color-violet-tint);
  border: 1px solid var(--color-violet-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-violet-soft);
  margin-bottom: var(--space-3);
}

.offering-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.offering-badge {
  font-size: var(--text-xs);
  color: var(--color-violet-soft);
  font-weight: 600;
  margin-bottom: var(--space-2);
  display: block;
}

.offering-summary {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.ecosystem-detail-view {
  background: var(--color-surface-card);
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
  margin-top: var(--space-6);
  width: 100%;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.detail-deliverables {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.deliverable-pill {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   Audience Pathways Switcher
   -------------------------------------------------------------------------- */
.pathway-nav {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.pathway-btn {
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-btn);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  transition: all var(--transition-normal);
  white-space: nowrap;
  min-height: 40px;
}

.pathway-btn:hover {
  border-color: var(--color-violet-border);
  color: var(--color-text-pure);
}

.pathway-btn.active {
  background: var(--color-violet-primary);
  border-color: var(--color-violet-bright);
  color: #FFFFFF;
  box-shadow: 0 0 16px var(--color-violet-glow);
}

.pathway-content-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-6);
  align-items: center;
  width: 100%;
}

/* --------------------------------------------------------------------------
   AI Pathfinder (Matcher Wizard)
   -------------------------------------------------------------------------- */
.matcher-container {
  background: var(--color-surface-card);
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.matcher-progress {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.matcher-step-bar {
  flex: 1;
  height: 5px;
  background: var(--color-border-subtle);
  border-radius: 3px;
  transition: background var(--transition-normal);
}

.matcher-step-bar.active {
  background: var(--color-violet-bright);
  box-shadow: 0 0 10px var(--color-violet-bright);
}

.matcher-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.matcher-option-btn {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-btn);
  padding: var(--space-4);
  text-align: left;
  transition: all var(--transition-normal);
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-height: 70px;
  justify-content: center;
}

.matcher-option-btn:hover, .matcher-option-btn:active {
  border-color: var(--color-violet-soft);
  background: var(--color-surface-highlight);
}

.matcher-result {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-top: var(--space-5);
}

/* --------------------------------------------------------------------------
   Responsible AI Section
   -------------------------------------------------------------------------- */
.responsible-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.responsible-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.responsible-card:hover {
  border-color: var(--color-violet-border);
  box-shadow: 0 0 20px var(--color-violet-glow);
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   Atlas Resource Hub
   -------------------------------------------------------------------------- */
.atlas-filter-bar {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.atlas-search-input {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--color-text-pure);
  font-size: 16px; /* 16px to avoid iOS safari auto-zoom */
  min-width: 0;
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
  transition: all var(--transition-normal);
}

.atlas-search-input:focus {
  border-color: var(--color-violet-bright);
  outline: none;
  box-shadow: 0 0 16px var(--color-violet-glow);
}

.atlas-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.atlas-tag-btn {
  font-size: var(--text-xs);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  min-height: 36px;
}

.atlas-tag-btn:hover {
  color: var(--color-text-pure);
  border-color: var(--color-violet-border);
}

.atlas-tag-btn.active {
  background: var(--color-violet-tint);
  border-color: var(--color-violet-border);
  color: var(--color-violet-soft);
  box-shadow: 0 0 12px var(--color-violet-glow);
}

.atlas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.atlas-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.atlas-card:hover {
  border-color: var(--color-violet-border);
  box-shadow: var(--shadow-md), 0 0 20px var(--color-violet-glow);
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   FAQ Accordion
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.faq-item {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  width: 100%;
}

.faq-item:hover, .faq-item.active {
  border-color: var(--color-border-active);
}

.faq-item.active {
  border-color: var(--color-violet-border);
  box-shadow: 0 4px 20px var(--color-violet-glow);
}

.faq-trigger {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text-pure);
  cursor: pointer;
  background: none;
  border: none;
  min-height: 52px;
  gap: var(--space-3);
}

.faq-icon {
  color: var(--color-violet-soft);
  font-size: var(--text-lg);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--color-violet-bright);
}

.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows 340ms var(--ease-out-expo),
    visibility 0s linear 340ms;
  padding: 0;
}

.faq-content > * {
  overflow: hidden;
  min-height: 0;
}

.faq-item.active .faq-content {
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows 340ms var(--ease-out-expo),
    visibility 0s linear 0s;
}

/* --------------------------------------------------------------------------
   Contact / Work With Us Form (16px Inputs for Mobile Safe-Zoom)
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: start;
  width: 100%;
}

.form-group {
  margin-bottom: var(--space-4);
  width: 100%;
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--color-surface-card);
  border: 1.5px solid var(--color-border-strong, var(--color-border-subtle));
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  color: var(--color-text-pure);
  font-size: 16px; /* 16px to prevent iOS auto-zoom */
  font-family: inherit;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-violet-bright);
  outline: none;
  box-shadow: 0 0 16px var(--color-violet-glow);
}

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

.form-feedback {
  display: none;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}

.form-feedback.success {
  display: block;
  background: var(--color-success-tint);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--color-surface-base);
  border-top: 1px solid var(--color-border-subtle);
  padding: clamp(2.5rem, 6vw, 4rem) 0 var(--space-6);
  width: 100%;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: var(--space-8);
}

.footer-brand {
  max-width: 360px;
}

.footer-boilerplate {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.footer-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-pure);
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-violet-bright);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   Responsive Media Queries (Mobile-First Optimization)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-preview-grid {
    grid-template-columns: 1fr;
  }
  .pathway-content-card {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  /* v2.8.84: scope to the header menu only. WordPress pagination
     (the_posts_pagination) also outputs .nav-links, so the unscoped
     rule hid the blog pagination on every phone up to 860px wide.
     Pagination display is set in styles/blog.css. */
  .navbar .nav-links, .nav-actions .btn-sm {
    display: none !important;
  }
  .nav-mobile-toggle {
    display: flex !important;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }
  .matcher-options-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .atlas-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .atlas-search-input {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }
  .responsible-grid {
    grid-template-columns: 1fr;
  }
  .atlas-grid {
    grid-template-columns: 1fr;
  }
  .logo-img-nav {
    height: 28px;
    max-width: 160px;
  }
  .navbar-inner {
    height: 64px;
  }
  main {
    padding-top: 64px;
  }
}

@media (max-width: 400px) {
  .logo-img-nav {
    height: 24px;
    max-width: 140px;
  }
  .nav-actions {
    gap: 4px;
  }
  /* Touch targets stay at 44px even on the smallest phones */
  .theme-toggle-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .nav-mobile-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

/* ==========================================================================
   Ailygence v2.0.0: Multi-page components
   ========================================================================== */

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Narrow measure for editorial pages */
.container-narrow {
  max-width: 760px;
}

/* --------------------------------------------------------------------------
   Desktop dropdown navigation (Services)
   -------------------------------------------------------------------------- */
.nav-links .menu-item-has-children {
  position: relative;
}

.nav-links .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 250px;
  list-style: none;
  margin: 0;
  padding: var(--space-2);
  background: var(--color-surface-card);
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms var(--ease-out-expo), visibility 220ms;
  z-index: 1200;
}

.nav-links .menu-item-has-children:hover > .sub-menu,
.nav-links .menu-item-has-children:focus-within > .sub-menu,
.nav-links .menu-item-has-children.open > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-links .sub-menu a {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-links .sub-menu a:hover,
.nav-links .sub-menu a:focus-visible {
  background: var(--color-violet-tint);
  color: var(--color-text-pure);
  transform: translateX(3px);
}

/* Submenu toggle button (touch + keyboard users) */
.submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  vertical-align: middle;
}

.submenu-toggle svg {
  transition: transform 200ms ease;
}

.submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.submenu-toggle:hover,
.submenu-toggle:focus-visible {
  color: var(--color-violet-bright);
  background: var(--color-violet-tint);
}

/* --------------------------------------------------------------------------
   Mobile drawer: wp_nav_menu output (numbered top-level, stacked submenus)
   -------------------------------------------------------------------------- */
.mobile-nav-list {
  counter-reset: mobile-nav;
}

.mobile-nav-list > .menu-item {
  counter-increment: mobile-nav;
  width: 100%;
}

/* Current page highlighted in the mobile drawer too. */
.mobile-nav-list > .current-menu-item > a,
.mobile-nav-list > .current_page_item > a,
.mobile-nav-list > .current_page_parent > a {
  color: var(--color-violet-bright);
  border-color: var(--color-violet-border);
  background: var(--color-violet-tint);
}

.mobile-nav-list > .menu-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  min-height: 52px;
  box-sizing: border-box;
}

.mobile-nav-list > .menu-item > a::before {
  content: counter(mobile-nav, decimal-leading-zero);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-violet-soft);
  margin-right: var(--space-2);
  flex-shrink: 0;
}

.mobile-nav-list > .menu-item > a:hover,
.mobile-nav-list > .menu-item > a:active {
  background: var(--color-violet-tint);
  border-color: var(--color-violet-border);
  color: var(--color-violet-soft);
}

.mobile-nav-list .sub-menu {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0 0 0 var(--space-4);
  border-left: 2px solid var(--color-violet-border);
  display: none;
}

.mobile-nav-list .menu-item-has-children.open > .sub-menu {
  display: block;
  animation: mobileSubmenuIn 240ms var(--ease-out-expo);
}

.mobile-nav-list .sub-menu a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.mobile-nav-list .sub-menu a:hover,
.mobile-nav-list .sub-menu a:active {
  color: var(--color-violet-soft);
  background: var(--color-violet-tint);
}

.mobile-nav-list .menu-item-has-children {
  position: relative;
}

.mobile-nav-list .menu-item-has-children > .submenu-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
}

@keyframes mobileSubmenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Homepage teaser sections
   -------------------------------------------------------------------------- */
.trust-strip {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-violet-glow);
}

.trust-quote {
  font-size: var(--text-xl);
  line-height: 1.6;
  color: var(--color-text-primary);
  margin: var(--space-4) 0 0;
  font-style: normal;
}

.trust-quote strong {
  color: var(--color-violet-soft);
}

/* Trust strip proof points: clean left-aligned list inside the panel */
.trust-points {
  list-style: none;
  margin: var(--space-6) auto 0;
  padding: 0;
  max-width: 620px;
  display: grid;
  gap: var(--space-3);
  text-align: left;
}

.trust-points li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  line-height: 1.6;
}

.trust-points li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0.1em;
  color: var(--color-violet-bright);
  font-weight: 700;
}

.trust-points strong {
  color: var(--color-text-pure);
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
}
.services-grid > * {
  flex: 0 1 320px;
  max-width: 380px;
}

/* v2.8.34: replaced by the unified content card system below. */

/* Card-grid pages (Services, Pricing, Resources) get a wide canvas: the default
   860px article column squeezes multi-column cards into unreadable slivers. */
.page-body:has(.services-grid) .container,
.page-body:has(.services-grid-4) .container,
.page-body:has(.pricing-grid) .container,
.page-body:has(.resource-grid) .container {
  max-width: 1200px;
}

/* --------------------------------------------------------------------------
   Pricing page: premium price cards (revenue page - maximum wow factor)
   -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin: var(--space-8) 0 var(--space-10);
}

/* Two columns on tablets, three on desktop: every section's cards share
   one identical width, so 1-card, 2-card and 3-card sections look unified. */
@media (min-width: 640px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.price-card {
  position: relative;
  padding: var(--space-8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, border-color 0.3s ease;
}
/* Gradient top accent line */
.price-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-violet-primary), var(--color-violet-bright));
  opacity: 0.9;
}
.price-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-violet-border);
  box-shadow: 0 16px 48px rgba(109, 47, 246, 0.18), var(--shadow-lg);
}
.price-card .card-eyebrow {
  font-size: 0.78rem;
  margin-bottom: var(--space-3);
}
.price-card .price-amount {
  font-family: var(--font-family-display);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-text-pure) 30%, var(--color-violet-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 var(--space-4);
}
.price-card .card-body {
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1 1 auto;
}
/* Pin the CTA to the card bottom so buttons align across cards in a row. */
.price-card > p:last-child {
  margin-top: auto;
  padding-top: var(--space-6);
}
.price-card .btn,
.price-card p:last-child a {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, var(--color-violet-bright), var(--color-violet-deep));
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--color-violet-glow);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.price-card p:last-child a:hover {
  background: linear-gradient(135deg, var(--color-violet-vivid), var(--color-violet-primary));
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(123, 43, 249, 0.5);
}
.price-card .price-period {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-secondary);
}
.price-card .price-from {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Pricing: Recommended badge and duration line. These rules previously
   lived only in style blocks pasted inside the pricing page content, where
   they did not take effect, so the badge rendered as plain text. They now
   live in the theme, where styles reliably load.
   -------------------------------------------------------------------------- */
.pricing-grid {
  overflow: visible;
  padding-top: 34px;
  row-gap: 52px;
}
.pricing-grid .price-card.recommended {
  overflow: visible;
  position: relative;
  border: 2px solid var(--color-violet-bright);
  box-shadow: 0 0 36px rgba(124, 92, 255, 0.28);
}
.recommended-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-violet-bright);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 2;
}
.price-card .price-duration {
  margin: 2px 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: #8b7cf6;
}
.pricing-faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-8);
}

/* --------------------------------------------------------------------------
   About page: visual story sections (name cards, pull-quote, values)
   -------------------------------------------------------------------------- */
.about-name-grid,
.about-duo,
.about-values {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-8);
}
.about-name-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.about-duo {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.about-values {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* v2.8.34: replaced by the unified content card system below. */
.card-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-violet-bright);
  margin: 0 0 var(--space-2);
}
.about-pullquote {
  margin: var(--space-8) auto;
  padding: var(--space-8) var(--space-6);
  max-width: 720px;
  text-align: center;
  background: var(--color-violet-tint-subtle);
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-xl);
}
.about-pullquote p {
  font-family: var(--font-family-display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--color-text-pure);
  margin: 0;
  max-width: none;
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card .card-body {
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  color: var(--color-violet-bright);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.card-link:hover {
  gap: var(--space-2);
  color: var(--color-violet-soft);
}

.glimpse-panel {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-10) var(--space-6);
  background: var(--color-surface-card);
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
}

.glimpse-panel .section-title {
  margin-bottom: var(--space-4);
}

.glimpse-panel .btn {
  margin-top: var(--space-5);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: 1100px;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 3rem;
  position: relative;
  justify-content: center;
}

/* Connecting progress line behind the number badges (desktop) */
@media (min-width: 900px) {
  .steps-grid::before {
    content: "";
    position: absolute;
    top: 4.1rem;
    left: 18%;
    right: 18%;
    height: 2px;
    background: linear-gradient(90deg,
      transparent,
      rgba(139, 92, 246, 0.5),
      rgba(109, 47, 246, 0.5),
      transparent);
    pointer-events: none;
  }
}

.step-card {
  position: relative;
  overflow: hidden;
  padding: 2.75rem 2rem 2.5rem;
  text-align: center;
  background: linear-gradient(180deg,
    var(--color-surface-card) 0%,
    var(--color-surface-elevated) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: 1.25rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.step-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 16px 44px rgba(109, 47, 246, 0.16);
}

/* Soft violet glow at the top of each card */
.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg,
    var(--color-violet-bright),
    var(--color-violet-deep));
  opacity: 0.85;
}

.step-card .card-title {
  margin: 0 0 0.75rem;
  font-size: var(--text-h3);
  line-height: 1.35;
}

.step-card .card-body {
  margin: 0;
  line-height: 1.65;
  max-width: 26ch;
  margin-left: auto;
  margin-right: auto;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.9rem;
  height: 3.9rem;
  margin: 0 auto 1.4rem;
  font-family: var(--font-family-display);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
  background: linear-gradient(135deg,
    var(--color-violet-bright),
    var(--color-violet-deep));
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(109, 47, 246, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 1;
}
.section-cta {
  text-align: center;
  margin-top: var(--space-8);
}

/* CTA band (homepage finale + every inner page) */
.cta-band {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(135deg, var(--color-surface-card), var(--color-surface-elevated));
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--color-violet-glow) 0%, transparent 65%);
  pointer-events: none;
}

.cta-band-title {
  font-size: var(--text-h2);
  margin: var(--space-3) 0 var(--space-4);
  position: relative;
}

.cta-band-text {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  max-width: 600px;
  margin: 0 auto var(--space-6);
  line-height: 1.7;
  position: relative;
}

.cta-band-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* --------------------------------------------------------------------------
   Inner pages: hero band, breadcrumbs, editorial measure
   -------------------------------------------------------------------------- */
.page-hero {
  padding: calc(70px + var(--space-12)) 0 var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Tighten the gap when page content starts right after the hero:
   the hero's bottom padding + first section's top padding must not double up */
.page-hero + .page-body,
.page-hero + .section {
  padding-top: 0;
}
.page-hero + .page-body .container,
.page-hero + .section .container {
  padding-top: var(--space-4);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 90%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-violet-border), transparent);
}

.page-hero-title {
  font-size: var(--text-h1);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: var(--space-4) 0;
  color: var(--color-text-pure);
}

.page-hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

/* v2.8.87: ONE hero H1 rule for every page hero. The blog/archive H1
   (h1.section-title) already shared the font-size number with
   .page-hero-title since v2.8.86, but it kept the section line-height
   (1.12 vs 1.08), its own margins, a pill eyebrow instead of the
   breadcrumb, and different hero spacing — so "Blog" still looked
   smaller than "Resources" even though the font-size matched. The
   homepage hero also used weight 700 while every other H1 uses 800.
   One rule, one size, one weight, one line-height. Margins are set
   separately below so the homepage hero keeps its own top spacing. */
.hero-title,
.page-hero-title,
h1.section-title {
  font-size: var(--text-h1);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* v2.8.88: a <p> wearing the hero-title class is a statement, not a
   heading — but the shared rule above gave it the full H1 size, so the
   Services page read as two stacked H1s ("Services" + "All five
   services follow one principle..."). One shared rule for every such
   paragraph, site-wide: the H2 size, clearly below the page H1 and
   uniform wherever the class is used in content. p.page-hero-title
   (0,1,1) outranks .page-hero-title (0,1,0), so this wins at every
   width; the mobile blocks below re-assert it explicitly. Real H1s
   are untouched. Live scan 2026-11-13: /services/ is the only page
   with a <p class="page-hero-title">; every page checked has exactly
   one H1. */
p.page-hero-title {
  font-size: var(--text-h2);
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: var(--space-4) 0;
  color: var(--color-text-pure);
}

/* v2.8.87: the blog/archive H1 gets exactly the page-hero-title
   margins (1rem above and below), matching Resources/Services. */
h1.section-title {
  margin: var(--space-4) 0;
}

.breadcrumbs {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-violet-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span[aria-hidden="true"] {
  margin: 0 var(--space-2);
}

.page-body {
  padding-top: var(--space-8);
}

.page-content {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.page-content > *:first-child {
  margin-top: 0;
}

.page-content h2 {
  text-wrap: balance;
  text-align: center;
  font-size: var(--text-h2);
  color: var(--color-text-pure);
  margin: var(--space-10) auto var(--space-4);
  max-width: 720px;
  line-height: 1.3;
  scroll-margin-top: 90px;
}

.page-content h3 {
  text-wrap: balance;
  font-size: var(--text-xl);
  color: var(--color-text-pure);
  margin: var(--space-8) 0 var(--space-3);
  line-height: 1.35;
}

.page-content h4 {
  font-size: var(--text-base);
  color: var(--color-violet-soft);
  margin: var(--space-6) 0 var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-content p {
  margin: 0 auto var(--space-4);
  max-width: 65ch;
}

.page-content ul,
.page-content ol {
  margin: 0 0 var(--space-5);
  padding-left: var(--space-5);
}

.page-content li {
  margin-bottom: var(--space-2);
}

.page-content li::marker {
  color: var(--color-violet-bright);
}

.page-content blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--color-violet-bright);
  background: var(--color-surface-card);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  line-height: 1.6;
}

.page-content a {
  color: var(--color-violet-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content a:hover {
  color: var(--color-violet-soft);
}

/* Buttons inside page content must keep white text (beats .page-content a). */
.page-content a.btn {
  color: #FFFFFF;
  text-decoration: none;
}

.page-content a.btn:hover {
  color: #FFFFFF;
}

/* Secondary buttons keep their tinted style inside page content too. */
.page-content a.btn-secondary {
  color: var(--color-violet-soft);
}

.page-content a.btn-secondary:hover {
  color: #FFFFFF;
}

.page-content strong {
  color: var(--color-text-primary);
}

.page-content img {
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}

/* --------------------------------------------------------------------------
   FAQ answer inner spacing (the collapse/expand mechanics live with the
   .faq-content rules near the accordion component above)
   -------------------------------------------------------------------------- */
.faq-answer-pad {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.faq-answer-pad p {
  margin: 0 0 var(--space-3);
}

.faq-answer-pad p:last-child {
  margin-bottom: 0;
}

.faq-answer-pad a {
  color: var(--color-violet-bright);
}

.faq-list-static {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 820px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Signup forms (newsletter / community)
   -------------------------------------------------------------------------- */
.ailygence-signup-card {
  max-width: 520px;
  margin: var(--space-6) auto;
  border-color: var(--color-violet-border);
}

.ailygence-signup-card .card-body {
  margin-bottom: var(--space-4);
}

.ailygence-form-card {
  border-color: var(--color-violet-border);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
}

.signup-feedback {
  margin-top: var(--space-3);
}

/* ==========================================================================
   Ailygence v2.0.1: Mobile Experience Polish Pass
   Premium, reader friendly phone experience in dark and light themes.
   Pure CSS: no markup, copy, or behavior changes.
   ========================================================================== */

/* Balanced headline wraps: no orphaned words on narrow screens */
h1, h2, h3,
.hero-title, .section-title, .page-hero-title,
.card-title, .post-title, .blog-card-title,
.cta-band-title {
  text-wrap: balance;
}

.page-content p, .post-content p,
.blog-excerpt, .card-body {
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Mobile typography: confident, striking, genuinely readable
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .hero-title {
    font-size: var(--text-h1-mobile);
    line-height: 1.08;
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    font-size: 1.075rem;
    line-height: 1.65;
  }

  .section-title {
    font-size: var(--text-h2-mobile);
    line-height: 1.18;
  }

  /* v2.8.86: the mobile .section-title rule above would shrink blog /
     archive H1s to H2 size — H1s stay at the mobile H1 size. */
  h1.section-title {
    font-size: var(--text-h1-mobile);
    line-height: 1.08;
  }

  .page-hero {
    padding-top: calc(64px + var(--space-8));
    padding-bottom: var(--space-8);
  }

  .page-hero-title {
    font-size: var(--text-h1-mobile);
    line-height: 1.08;
  }

  /* v2.8.88: hero-title paragraphs stay at the mobile H2 size on
     phones too, never the mobile H1 size. */
  p.page-hero-title {
    font-size: var(--text-h2-mobile);
    line-height: 1.3;
  }

  .page-hero-sub {
    font-size: 1.05rem;
    line-height: 1.7;
  }

  /* Body copy: true 16px reading size with airy line height */
  .card-body,
  .offering-summary,
  .blog-excerpt {
    font-size: 1rem;
    line-height: 1.7;
  }

  .faq-trigger {
    font-size: 1.02rem;
    line-height: 1.45;
    padding: var(--space-4);
  }

  .faq-answer-pad {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .page-content {
    font-size: 1.02rem;
    line-height: 1.8;
  }

  .post-content {
    font-size: 1.02rem;
  }

  /* Small buttons grow to full touch targets on mobile */
  .btn-sm {
    min-height: 44px;
    padding: 0.6rem 1.1rem;
    font-size: var(--text-sm);
  }

  .pathway-btn {
    min-height: 44px;
    padding: 0.7rem 1.25rem;
  }

  .atlas-tag-btn {
    min-height: 44px;
    padding: 0.55rem 1rem;
  }
}

/* --------------------------------------------------------------------------
   Form select: visible custom chevron in both themes
   (appearance:none removed the native arrow; this restores affordance)
   -------------------------------------------------------------------------- */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239E9EAF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px 14px;
  padding-right: 2.75rem;
  cursor: pointer;
}

html[data-theme="light"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234E4E65' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Mobile drawer: premium entrance and finishes
   -------------------------------------------------------------------------- */
.mobile-drawer::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 280px;
  background: radial-gradient(ellipse, var(--color-violet-glow), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.mobile-drawer > * {
  position: relative;
  z-index: 1;
}

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

.mobile-drawer.open .mobile-nav-list > .menu-item {
  animation: drawerLinkIn 420ms var(--ease-out-expo) both;
}

.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(1) { animation-delay: 70ms; }
.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(2) { animation-delay: 130ms; }
.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(3) { animation-delay: 190ms; }
.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(4) { animation-delay: 250ms; }
.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(5) { animation-delay: 310ms; }
.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(6) { animation-delay: 370ms; }
.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(7) { animation-delay: 430ms; }
.mobile-drawer.open .mobile-nav-list > .menu-item:nth-child(8) { animation-delay: 490ms; }

.mobile-drawer.open .mobile-drawer-footer {
  animation: drawerLinkIn 420ms var(--ease-out-expo) 540ms both;
}

/* Drawer close button: playful rotate on interaction */
.mobile-drawer-close {
  transition: transform var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal), background var(--transition-normal);
}

.mobile-drawer-close:hover {
  transform: rotate(90deg);
  border-color: var(--color-violet-border);
  color: var(--color-violet-bright);
}

.mobile-drawer-close:active {
  transform: rotate(90deg) scale(0.9);
}

/* Submenu items cascade gently when a drawer section expands */
.mobile-nav-list .menu-item-has-children.open > .sub-menu > li {
  animation: drawerLinkIn 260ms var(--ease-out-expo) both;
}

.mobile-nav-list .menu-item-has-children.open > .sub-menu > li:nth-child(2) { animation-delay: 45ms; }
.mobile-nav-list .menu-item-has-children.open > .sub-menu > li:nth-child(3) { animation-delay: 90ms; }
.mobile-nav-list .menu-item-has-children.open > .sub-menu > li:nth-child(4) { animation-delay: 135ms; }
.mobile-nav-list .menu-item-has-children.open > .sub-menu > li:nth-child(5) { animation-delay: 180ms; }

/* Current page gets a clear active state inside the drawer */
.mobile-nav-list > .menu-item.current-menu-item > a,
.mobile-nav-list > .menu-item.current_page_parent > a,
.mobile-nav-list .sub-menu .current-menu-item > a {
  border-color: var(--color-violet-border);
  color: var(--color-violet-soft);
  background: var(--color-violet-tint);
}

/* --------------------------------------------------------------------------
   Touch feedback: tactile press states where hover does not exist
   -------------------------------------------------------------------------- */
@media (hover: none) {
  .card:active,
  .service-card:active,
  .step-card:active,
  .blog-card:active,
  .offering-card:active,
  .responsible-card:active,
  .atlas-card:active {
    transform: scale(0.985);
  }

  .btn:active {
    transform: scale(0.97);
  }

  .mobile-nav-list > .menu-item > a:active {
    background: var(--color-violet-tint);
    border-color: var(--color-violet-border);
  }
}

/* --------------------------------------------------------------------------
   Overflow safety: long words, URLs, and wide content never break layout
   -------------------------------------------------------------------------- */
.page-content,
.post-content,
.footer-boilerplate,
.blog-excerpt,
.card-body,
.faq-answer-pad {
  overflow-wrap: anywhere;
}

.page-content table,
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.page-content th,
.post-content th,
.page-content td,
.post-content td {
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border-subtle);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}

.page-content th,
.post-content th {
  background: var(--color-surface-elevated);
  font-weight: 650;
}

.page-content tbody tr:nth-child(even) td,
.post-content tbody tr:nth-child(even) td {
  background: var(--color-violet-tint-subtle);
}

/* --------------------------------------------------------------------------
   Mobile tables: smooth horizontal scroll with no sticky column, so no
   column can paint over its neighbour; cells wrap instead of overflowing
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .page-content table,
  .post-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .page-content th,
  .post-content th,
  .page-content td,
  .post-content td {
    min-width: 148px;
    overflow-wrap: break-word;
  }

  /* Mobile pricing: duration line under the price reads clearly */
  .price-card .price-duration {
    font-size: 15px;
    font-weight: 700;
  }

  /* Fix squeezed CTA split on mobile: reduce compounding padding */
  .cta-split {
    padding: var(--space-5);
    gap: var(--space-6);
  }
  .cta-split::before {
    width: 320px;
    height: 320px;
  }
  /* Remove double-card nesting: form card sits flush inside the split */
  .cta-split .ailygence-form-card {
    padding: var(--space-5);
    border-color: transparent;
    box-shadow: none;
    background: transparent;
  }
  .cta-direct-box {
    padding: var(--space-4);
  }
  /* Reduce card padding site-wide on small screens */
  .card {
    padding: var(--space-5);
  }
  .price-card {
    padding: var(--space-6);
  }
  .resource-card {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
  }
  .resource-card .resource-cover {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }
}

.page-content img,
.post-content img,
.page-content iframe,
.post-content iframe {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Tablet refinement: keep the desktop nav comfortable down to its breakpoint
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) and (min-width: 861px) {
  .nav-link {
    padding: 0.5rem 0.6rem;
    font-size: 0.8125rem;
  }
}

/* --------------------------------------------------------------------------
   Light theme mobile refinements: deliberate contrast everywhere
   -------------------------------------------------------------------------- */
html[data-theme="light"] .mobile-drawer {
  box-shadow: -12px 0 48px rgba(108, 34, 242, 0.08);
}

html[data-theme="light"] .mobile-nav-list > .menu-item > a {
  box-shadow: 0 1px 3px rgba(21, 21, 32, 0.04);
}

html[data-theme="light"] .faq-item {
  box-shadow: 0 1px 4px rgba(21, 21, 32, 0.05);
}

html[data-theme="light"] .card,
html[data-theme="light"] .service-card,
html[data-theme="light"] .step-card {
  box-shadow: 0 2px 10px rgba(21, 21, 32, 0.05);
}

/* --------------------------------------------------------------------------
   Reduced motion: new entrance animations opt out explicitly
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mobile-drawer.open .mobile-nav-list > .menu-item,
  .mobile-drawer.open .mobile-drawer-footer,
  .mobile-nav-list .menu-item-has-children.open > .sub-menu > li {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .mobile-drawer-close:hover,
  .mobile-drawer-close:active,
  .card:hover,
  .offering-card:hover,
  .hero-preview-card:hover,
  .responsible-card:hover,
  .atlas-card:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   Resource Hub: download cards, steps, newsletter (v2.8.1)
   ========================================================================== */
.resource-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
  margin: var(--space-10) 0;
}
.resource-grid > * {
  flex: 0 1 320px;
  max-width: 380px;
  min-width: 0;
}

.resource-card {
  display: flex;
  flex-direction: column;
  padding: 0 2.25rem 2.5rem;
  text-align: center;
  overflow: hidden;
}
/* PDF cover art bleeds to the card's top edge for a premium product-card look. */
.resource-cover {
  display: block;
  margin: 0 -2.25rem 1.75rem;
  overflow: hidden;
}
.resource-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease;
}
.resource-card:hover .resource-cover img {
  transform: scale(1.04);
}
.resource-card .card-eyebrow {
  margin-bottom: 0.85rem;
}
.resource-card .card-title {
  margin-bottom: 0.85rem;
  line-height: 1.35;
}
.resource-card .card-body {
  flex: 1;
  margin-bottom: 0.5rem;
  line-height: 1.65;
}
.resource-card .card-meta {
  margin-bottom: 1.25rem;
}
.resource-card .btn {
  margin-top: auto;
  padding: 1rem 1.5rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  align-self: stretch;
  justify-content: center;
  white-space: normal;
  line-height: 1.4;
  box-shadow: 0 6px 24px rgba(109, 47, 246, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.resource-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(109, 47, 246, 0.55);
}

.card-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: var(--space-4) 0 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 900px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Four-across variants for service pages: 2x2 on tablets, 4 in one row on
   desktop. Keeps 4-card sets symmetrical (no orphan card). */
.services-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.steps-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
@media (min-width: 640px) {
  .services-grid-4,
  .steps-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .services-grid-4,
  .steps-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .services-grid-4 > *,
  .steps-grid-4 > * {
    min-width: 0;
  }
}

.step-card {
  padding: var(--space-6);
}
/* .step-number is defined once above (large gradient numerals). */

.newsletter-card {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-8);
  text-align: center;
}
.newsletter-card .card-body {
  margin-bottom: var(--space-5);
}

/* Resource Hub teaser: 3 centered cards in one row (not the 5-column services layout). */
.resources-teaser-grid {
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
}
.resources-teaser-grid > * {
  flex: 1 1 280px;
  max-width: 340px;
}

/* Contact page: method cards (v2.8.1) */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin: var(--space-10) 0;
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.contact-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-7);
  text-align: center;
  align-items: center;
}
.contact-card .card-body {
  flex: 1;
}
.contact-card .btn {
  margin-top: var(--space-5);
}

/* Four steps in one row on desktop (no orphan card). */
@media (min-width: 1100px) {
  .steps-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .steps-grid-4 .card-body {
    font-size: 0.92rem;
  }
}

/* Latest posts rows (Resources "Go deeper"): elegant horizontal rows with
   thumbnail, title and arrow. Premium and compact, never competing with
   the download cards above. */
.latest-posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 820px;
  margin: 0 auto var(--space-8);
}
.latest-post-row {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, var(--color-surface-card), var(--color-surface-elevated));
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease-out-expo), border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.latest-post-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-violet-primary), var(--color-violet-bright));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.latest-post-row:hover {
  transform: translateY(-4px);
  border-color: var(--color-violet-bright);
  box-shadow: 0 16px 40px var(--color-violet-glow), var(--shadow-lg);
}
.latest-post-row:hover::before {
  opacity: 1;
}
.latest-post-thumb {
  flex-shrink: 0;
  width: 148px;
  height: 104px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.latest-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.latest-post-row:hover .latest-post-thumb img {
  transform: scale(1.08);
}
.latest-post-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}
.latest-post-row,
.latest-post-row:hover,
.latest-post-row *,
.latest-post-row:hover * {
  text-decoration: none !important;
}
.latest-post-title {
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--color-text-pure);
  text-decoration: none;
  text-wrap: balance;
}
.latest-post-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.latest-post-meta .category-pill {
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-violet-tint);
  border: 1px solid var(--color-violet-border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-violet-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.latest-post-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-violet-tint);
  border: 1px solid var(--color-violet-border);
  color: var(--color-violet-bright);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}
.latest-post-row:hover .latest-post-arrow {
  transform: translateX(4px);
  background: linear-gradient(135deg, var(--color-violet-primary), var(--color-violet-bright));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px var(--color-violet-glow);
}
@media (max-width: 640px) {
  .latest-post-row {
    gap: var(--space-4);
    padding: var(--space-4);
  }
  .latest-post-thumb {
    width: 96px;
    height: 72px;
  }
  .latest-post-arrow {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Text alignment system (site-wide consistency).
   Headings, eyebrows, section headers, heroes, and cards use centered text.
   Body paragraphs and long-form copy use LEFT alignment for readability —
   centered body text creates ragged edges and looks unprofessional.
   Lists, forms, FAQs, and article bodies keep left alignment.
   -------------------------------------------------------------------------- */
.page-content {
  text-align: left;
}
.page-content .section-header,
.page-content .section-cta,
.page-content .cta-band {
  text-align: center;
}
.page-content ul,
.page-content ol {
  text-align: left;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}
.page-content .ailygence-contact-form,
.page-content .faq-list {
  text-align: left;
}
details.faq-item summary {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text-pure);
  cursor: pointer;
  list-style: none;
  min-height: 52px;
  gap: var(--space-3);
}
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item summary::after {
  content: "+";
  color: var(--color-violet-soft);
  font-size: var(--text-lg);
  flex-shrink: 0;
  transition: transform var(--transition-normal), color var(--transition-normal);
}
details.faq-item[open] {
  border-color: var(--color-violet-border);
  box-shadow: 0 4px 20px var(--color-violet-glow);
}
details.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--color-violet-bright);
}
details.faq-item > p,
details.faq-item > div {
  padding: 0 var(--space-5) var(--space-5);
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Homepage contact: split layout (brand left, form right) */
.cta-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: stretch;
  background: linear-gradient(135deg, var(--color-surface-card), var(--color-surface-elevated));
  border: 1px solid var(--color-violet-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-violet-glow);
  padding: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  overflow: hidden;
}
.cta-split::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--color-violet-glow) 0%, transparent 65%);
  pointer-events: none;
}
.cta-split > * {
  position: relative;
}
@media (min-width: 900px) {
  .cta-split {
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-10);
  }
}
.cta-split-brand .cta-band-title {
  margin-bottom: var(--space-4);
}
.cta-brand-info {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}
.cta-email {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-violet-bright);
  text-decoration: none;
}
.cta-email:hover {
  text-decoration: underline;
}
.cta-response {
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}
/* Form column stretches to match the brand column height, so both sides align */
.cta-split-form {
  display: flex;
  flex-direction: column;
}
.cta-split-form .ailygence-contact-form {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Form card lives flush inside the split: no nested card chrome at any size */
.cta-split-form .ailygence-form-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* The message field grows to fill the column, keeping the button level with the brand column */
.cta-split-form .form-group-grow {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cta-split-form .form-group-grow .form-textarea {
  flex: 1;
  min-height: 150px;
}

/* ==========================================================================
   About page: premium identity lockup card.
   Full master lockup (symbol + wordmark + tagline) in a glowing card that
   adapts to the theme: the artwork swaps via logo-dark/light-variant.
   ========================================================================== */
.about-lockup {
  margin: 44px auto;
  max-width: 720px;
}
.about-lockup-card {
  background: #ffffff;
  border: 1px solid rgba(143, 71, 255, 0.35);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(123, 43, 249, 0.14), 0 4px 18px rgba(10, 10, 20, 0.06);
  padding: 40px 36px;
  overflow: hidden;
}
html[data-theme="dark"] .about-lockup-card {
  background: #0b0b10;
  border-color: rgba(143, 71, 255, 0.45);
  box-shadow: 0 24px 70px rgba(123, 43, 249, 0.22), 0 4px 18px rgba(0, 0, 0, 0.4);
}
.about-lockup-img {
  display: block;
  width: 100%;
  height: auto;
}
.about-lockup .wp-element-caption {
  margin-top: var(--space-4);
}


/* Inner pages: let the premium form section break out of the narrow text
   column so it matches the homepage's breathing room */
@media (min-width: 861px) {
  .page-content .section:has(.cta-split) {
    width: min(1080px, 94vw);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Premium trust list and direct contact box (homepage + contact page CTA) */
.cta-trust-list {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
}
.cta-trust-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.cta-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-violet-tint);
  border: 1px solid var(--color-violet-border);
  color: var(--color-violet-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.cta-trust-list strong {
  display: block;
  font-size: var(--text-base);
  color: var(--color-text-pure);
  margin-bottom: 2px;
}
.cta-trust-list span span,
.cta-trust-list div span {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.55;
}
.cta-direct-box {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  text-align: left;
}
.cta-direct-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-violet-bright);
  margin-bottom: var(--space-2);
}
.cta-direct-line {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}
.cta-direct-line .cta-email {
  font-size: var(--text-base);
}

/* --------------------------------------------------------------------------
   Pathways, Outcomes, Responsible AI grids (homepage, Netlify-inspired).
   -------------------------------------------------------------------------- */
.pathways-grid,
.outcomes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 640px) {
  .pathways-grid,
  .outcomes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .pathways-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .outcomes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .outcomes-grid .outcome-card:last-child {
    grid-column: 2 / 4;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}
.responsible-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 640px) {
  .responsible-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .responsible-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.pathway-card .card-eyebrow,
.outcome-card .card-eyebrow,
.responsible-card .card-eyebrow {
  color: var(--color-violet-bright);
}

/* AI Pathfinder quiz */
.pathfinder {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.pathfinder-progress {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-6);
}
.pathfinder-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border-subtle);
  transition: background 0.3s ease;
}
.pathfinder-bar.is-active {
  background: var(--color-violet-primary);
}
.pathfinder-question {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-5);
  text-align: center;
}
.pathfinder-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) {
  .pathfinder-options {
    grid-template-columns: repeat(2, 1fr);
  }
}
.pathfinder-option {
  text-align: left;
  padding: var(--space-4);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: inherit;
}
.pathfinder-option:hover {
  border-color: var(--color-violet-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--color-violet-glow);
}
.pathfinder-option-title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.pathfinder-option-desc {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.pathfinder-back,
.pathfinder-restart {
  display: block;
  margin: var(--space-5) auto 0;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.pathfinder-result {
  text-align: center;
}
.pathfinder-result .card-eyebrow {
  color: var(--color-violet-bright);
  margin-bottom: var(--space-3);
}
.pathfinder-result h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}
.pathfinder-result p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}
.pathfinder-result .btn {
  margin: 0 var(--space-2) var(--space-2);
}

/* --------------------------------------------------------------------------
   Unified Spacing System: consistent vertical rhythm across all pages.
   Every section follows the same header stack (eyebrow -> title -> desc ->
   content) with identical gaps, and page content uses one paragraph rhythm.
   -------------------------------------------------------------------------- */

/* Section header stack: uniform gaps */
.section-tag,
.page-content .eyebrow {
  margin-bottom: var(--space-4);
}
.section-title {
  margin-bottom: var(--space-4);
}
.section-desc {
  margin-bottom: var(--space-8);
}
.section-desc:last-child {
  margin-bottom: 0;
}

/* Centered section headers: consistent bottom breathing room */
.section-header {
  margin-bottom: var(--space-8);
  text-align: center;
}
.section-header .section-desc {
  margin-bottom: 0;
}

/* Page content: unified paragraph rhythm */
.page-content > *:first-child,
.post-content > *:first-child {
  margin-top: 0;
}
.page-content h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}
.page-content h2:first-child {
  margin-top: 0;
}
.page-content h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.page-content p {
  margin-bottom: var(--space-5);
}
.page-content p:last-child {
  margin-bottom: 0;
}

/* FAQ blocks: uniform spacing */
.faq-item {
  margin-bottom: var(--space-3);
}
.faq-item:last-child {
  margin-bottom: 0;
}

/* Card grids: uniform gaps */
.card-grid,
.pricing-grid,
.resource-grid,
.steps-grid {
  gap: var(--space-6);
}

/* Contact page card grid: 3 cards in one row on desktop. */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-grid > * {
    min-width: 0;
  }
}

/* Buttons after content: uniform top spacing */
.section .btn,
.page-content .btn {
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Unified content card system (v2.8.35).

   One card anatomy everywhere (same padding, type, radius, hover). Each group
   gets exactly as many equal columns as it has cards on desktop, so every
   row is always full and symmetric: sets of 2, 3, and 4 fill one row;
   sets of 5 form a centered 3 + 2. No half-empty rows, no lopsided orphans.
   Tablet shows 2 columns with any odd orphan spanning the full width.
   Phone shows 1 column.
   -------------------------------------------------------------------------- */
.about-name-grid,
.about-duo,
.about-values,
.pathways-grid,
.outcomes-grid,
.responsible-grid,
.services-grid-4,
.steps-grid,
.steps-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
/* .services-grid uses flexbox centering (defined above); excluded from the grid reset. */
@media (min-width: 640px) {
  .about-name-grid,
  .about-duo,
  .about-values,
  .pathways-grid,
  .outcomes-grid,
  .responsible-grid,
  .services-grid-4,
  .steps-grid,
  .steps-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Tablet only: an odd orphan spans the full width, keeping symmetry. */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .about-name-grid > :last-child,
  .about-values > :last-child,
  .outcomes-grid > :last-child,
  .responsible-grid > :last-child {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1024px) {
  /* 2-card sets: one full row of two. */
  .about-duo {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
  /* 3-card sets: one full row of three. */
  .about-name-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
  /* 4-card sets: one full row of four. */
  .pathways-grid,
  .steps-grid-4,
  .services-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
  }
  /* 5-card sets: six tracks, each card spans two (three per row, same width
     as the 3-card sets). The final pair is centered on the second row, so
     the layout stays perfectly symmetric instead of squeezing five narrow
     columns or leaving a lopsided orphan. */
  .about-values,
  .outcomes-grid,
  .responsible-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-5);
  }
  .about-values > *,
  .outcomes-grid > *,
  .responsible-grid > * {
    grid-column: span 2;
  }
  .about-values > :nth-child(4),
  .outcomes-grid > :nth-child(4),
  .responsible-grid > :nth-child(4) {
    grid-column: 2 / span 2;
  }
  .about-values > :nth-child(5),
  .outcomes-grid > :nth-child(5),
  .responsible-grid > :nth-child(5) {
    grid-column: 4 / span 2;
  }
  /* 6-card sets: clean 3+3. The 6th card fills the bottom row. */
  .about-values > :nth-child(6):last-child {
    grid-column: 5 / span 2;
  }
  .about-values:has(> :nth-child(6)) > :nth-child(4) {
    grid-column: 1 / span 2;
  }
  .about-values:has(> :nth-child(6)) > :nth-child(5) {
    grid-column: 3 / span 2;
  }
  /* Neutralize the legacy orphan-centering rule; the 6-track layout above
     places the 5th card explicitly. Equal specificity, later wins. */
  .outcomes-grid .outcome-card:last-child {
    grid-column: 4 / span 2;
    max-width: none;
    margin: 0;
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Dark-theme content guard (v2.8.37).

   Page content occasionally carries hardcoded light colors in inline styles
   (e.g. background:#ffffff panels, #14141c headings). In dark theme those
   would glow white against the dark canvas, which looks broken. This guard
   remaps the known hardcoded values to the theme tokens automatically, so
   content always adapts to the active theme. Scoped to .page-content and
   dark theme only; light theme is untouched.
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .page-content [style*="background:#ffffff"],
html[data-theme="dark"] .page-content [style*="background: #ffffff"],
html[data-theme="dark"] .page-content [style*="background:#FFFFFF"],
html[data-theme="dark"] .page-content [style*="background-color:#ffffff"] {
  background-color: var(--color-surface-card) !important;
}
html[data-theme="dark"] .page-content [style*="color:#14141c"],
html[data-theme="dark"] .page-content [style*="color: #14141c"] {
  color: var(--color-text-pure) !important;
}
html[data-theme="dark"] .page-content [style*="color:#33333f"],
html[data-theme="dark"] .page-content [style*="color:#55556a"],
html[data-theme="dark"] .page-content [style*="color: #55556a"] {
  color: var(--color-text-secondary) !important;
}

/* ==========================================================================
   Steps grid: definitive 3-column centered layout (v2.8.59)
   Overrides all earlier conflicting rules by source order.
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: 1100px;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 3rem;
  position: relative;
}
@media (min-width: 900px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Resource Hub: search, category filters, pagination (v2.8.63)
   Mirrors the blog experience: search bar, pills, 9 per page.
   ========================================================================== */
.resource-search-form {
  display: flex;
  gap: 0.75rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}
.resource-search-form .form-input {
  flex: 1;
}
.resource-search-form .btn {
  flex-shrink: 0;
}
.res-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.res-pill:hover {
  color: var(--color-text-pure);
  border-color: var(--color-violet-border);
  transform: translateY(-1px);
}
.res-pill.is-active {
  color: #ffffff;
  background: var(--color-violet-primary);
  border-color: var(--color-violet-primary);
  box-shadow: 0 4px 14px rgba(109, 47, 246, 0.3);
}
.res-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(127, 127, 157, 0.18);
}
.res-pill.is-active .res-count {
  background: rgba(255, 255, 255, 0.25);
}
.res-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-secondary);
  grid-column: 1 / -1;
}
.res-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0 1rem;
  flex-wrap: wrap;
}
.res-page-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.res-page-btn:hover:not(:disabled) {
  color: var(--color-text-pure);
  border-color: var(--color-violet-border);
}
.res-page-btn.is-active {
  color: #ffffff;
  background: var(--color-violet-primary);
  border-color: var(--color-violet-primary);
}
.res-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.res-page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 2.5rem;
  color: var(--color-text-tertiary);
  font-weight: 600;
  user-select: none;
}
.res-page-info {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0 0.5rem;
}

/* Resource card buttons: uniform size, centered text (v2.8.63) */
.resource-card .btn {
  min-height: 3.25rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  padding: 0.8rem 1.25rem;
}

/* ==========================================================================
   Resource Hub: search, category filters, pagination (v2.8.63)
   Mirrors the blog experience: search bar, pills, 9 per page.
   ========================================================================== */
.resource-search-form {
  display: flex;
  gap: 0.75rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}
.resource-search-form .form-input {
  flex: 1;
}
.resource-search-form .btn {
  flex-shrink: 0;
}
.res-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.res-pill:hover {
  color: var(--color-text-pure);
  border-color: var(--color-violet-border);
  transform: translateY(-1px);
}
.res-pill.is-active {
  color: #ffffff;
  background: var(--color-violet-primary);
  border-color: var(--color-violet-primary);
  box-shadow: 0 4px 14px rgba(109, 47, 246, 0.3);
}
.res-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(127, 127, 157, 0.18);
}
.res-pill.is-active .res-count {
  background: rgba(255, 255, 255, 0.25);
}
.res-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-secondary);
  grid-column: 1 / -1;
}
.res-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0 1rem;
  flex-wrap: wrap;
}
.res-page-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.res-page-btn:hover:not(:disabled) {
  color: var(--color-text-pure);
  border-color: var(--color-violet-border);
}
.res-page-btn.is-active {
  color: #ffffff;
  background: var(--color-violet-primary);
  border-color: var(--color-violet-primary);
}
.res-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.res-page-info {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0 0.5rem;
}


/* Resource card buttons: uniform size, centered text (v2.8.63) */
.resource-card .btn {
  min-height: 3.25rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  padding: 0.8rem 1.25rem;
}

/* ==========================================================================
   Steps grid: definitive 3-column centered layout (v2.8.59)
   Overrides all earlier conflicting rules by source order.
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: 1100px;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 3rem;
  position: relative;
}
@media (min-width: 900px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Resource Hub: search, category filters, pagination (v2.8.63)
   Mirrors the blog experience: search bar, pills, 9 per page.
   ========================================================================== */
.resource-search-form {
  display: flex;
  gap: 0.75rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}
.resource-search-form .form-input {
  flex: 1;
}
.resource-search-form .btn {
  flex-shrink: 0;
}
.res-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.res-pill:hover {
  color: var(--color-text-pure);
  border-color: var(--color-violet-border);
  transform: translateY(-1px);
}
.res-pill.is-active {
  color: #ffffff;
  background: var(--color-violet-primary);
  border-color: var(--color-violet-primary);
  box-shadow: 0 4px 14px rgba(109, 47, 246, 0.3);
}
.res-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(127, 127, 157, 0.18);
}
.res-pill.is-active .res-count {
  background: rgba(255, 255, 255, 0.25);
}
.res-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-secondary);
  grid-column: 1 / -1;
}
.res-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0 1rem;
  flex-wrap: wrap;
}
.res-page-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.res-page-btn:hover:not(:disabled) {
  color: var(--color-text-pure);
  border-color: var(--color-violet-border);
}
.res-page-btn.is-active {
  color: #ffffff;
  background: var(--color-violet-primary);
  border-color: var(--color-violet-primary);
}
.res-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.res-page-info {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0 0.5rem;
}

/* Resource card buttons: uniform size, centered text (v2.8.63) */
.resource-card .btn {
  min-height: 3.25rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  padding: 0.8rem 1.25rem;
}


/* ==========================================================================
   Steps grid 4-across: definitive rule (v2.8.70).
   Must come after the v2.8.59 .steps-grid override so 4-card sections
   (e.g. homepage "How we work") render 4 in one row, not 3+1.
   ========================================================================== */
@media (min-width: 900px) {
  .steps-grid.steps-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .steps-grid.steps-grid-4 > * {
    min-width: 0;
  }
}

/* Resources pagination: keep on one row on phones (v2.8.80, tightened v2.8.83) */
@media (max-width: 640px) {
  .res-pagination {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }
  .res-page-btn {
    min-width: 1.75rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.8rem;
  }
  .res-page-dots {
    min-width: 1rem;
    height: 2.25rem;
  }
}

/* ==========================================================================
   v2.8.86 font uniformity — mobile: one size per heading level
   The desktop rules above already point every H1/H2 at var(--text-h1) /
   var(--text-h2), but at <=640px the fluid desktop clamps and the older
   mobile overrides would drift apart again (e.g. .section-title at
   22px-28px vs a card H2 at a 24px floor). This block re-asserts one
   mobile size per level for section/body headings. v2.8.87: card titles
   (h2.card-title, h2.blog-card-title) are NOT in this block — they stay
   at the 20px Resources card size, re-asserted after this block.
   ========================================================================== */
@media (max-width: 640px) {
  h1,
  .hero-title,
  .page-hero-title,
  .article-title,
  h1.section-title,
  .post-title,
  .page-title {
    font-size: var(--text-h1-mobile);
  }

  h2,
  .section-title,
  .cta-band-title,
  .page-content h2,
  .post-content h2,
  .more-in-cat-title,
  .comments-title,
  .related-title,
  p.page-hero-title {
    font-size: var(--text-h2-mobile);
  }
}

/* v2.8.87: card titles stay at the Resources card size (20px) at every
   width, desktop and mobile. They are deliberately NOT in the mobile H2
   block above — that block is for section/body headings only. */
h2.card-title,
h2.blog-card-title,
.article-related h2.blog-card-title {
  font-size: var(--text-h3);
}
