:root {
  --cntx-bg: #F7F7FB;
  --cntx-surface: #FFFFFF;
  --cntx-border: rgba(17, 24, 39, 0.10);
  --cntx-border-subtle: rgba(17, 24, 39, 0.06);

  --cntx-primary: #6A3DFF;
  --cntx-primary-strong: #5A2DFF;
  --cntx-primary-soft: rgba(106, 61, 255, 0.10);
  --cntx-secondary: #B12DFF;
  --cntx-cyan: #43A6D3;

  --cntx-neutral-900: #0B1020;
  --cntx-neutral-800: #141A2E;
  --cntx-neutral-700: #222A44;
  --cntx-neutral-600: rgba(20, 26, 46, 0.85);
  --cntx-neutral-500: rgba(20, 26, 46, 0.70);
  --cntx-neutral-400: rgba(20, 26, 46, 0.40);

  --cntx-success: #10B981;
  --cntx-success-soft: rgba(16, 185, 129, 0.10);
  --cntx-warning: #F59E0B;
  --cntx-warning-soft: rgba(245, 158, 11, 0.12);
  --cntx-danger: #DC2626;
  --cntx-danger-soft: rgba(220, 38, 38, 0.10);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.14);

  --container: 1140px;
}

/* Dark mode variables */
[data-theme="dark"] {
  --cntx-bg: #070814;
  --cntx-surface: #0c0f22;
  --cntx-border: rgba(255, 255, 255, 0.10);
  --cntx-border-subtle: rgba(255, 255, 255, 0.06);

  --cntx-primary: #7c3aed;
  --cntx-primary-strong: #6d28d9;
  --cntx-primary-soft: rgba(124, 58, 237, 0.20);
  --cntx-secondary: #d946ef;
  --cntx-cyan: #43A6D3;

  --cntx-neutral-900: #e9ecff;
  --cntx-neutral-800: #d1d5db;
  --cntx-neutral-700: #a8b0d8;
  --cntx-neutral-600: rgba(168, 176, 216, 0.85);
  --cntx-neutral-500: rgba(168, 176, 216, 0.70);
  --cntx-neutral-400: rgba(168, 176, 216, 0.40);

  --cntx-success: #22c55e;
  --cntx-success-soft: rgba(34, 197, 94, 0.20);
  --cntx-warning: #F59E0B;
  --cntx-warning-soft: rgba(245, 158, 11, 0.20);
  --cntx-danger: #DC2626;
  --cntx-danger-soft: rgba(220, 38, 38, 0.20);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.20);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 20px 70px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { 
  height: 100%; 
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: 100%;
}

/* Visually hidden, accessible text */
.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;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--cntx-bg);
  color: var(--cntx-neutral-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode background gradients */
[data-theme="dark"] body {
  background: radial-gradient(1200px 600px at 20% -10%, rgba(79,70,229,.26), transparent 60%),
              radial-gradient(900px 520px at 70% 0%, rgba(217,70,239,.20), transparent 55%),
              radial-gradient(900px 520px at 50% 110%, rgba(34,197,94,.10), transparent 60%),
              var(--cntx-bg);
}

a { color: inherit; text-decoration: none; }

/*
 * Header, drawer, hero CTAs, boutons-liens : pas de soulignement.
 * Twenty Twenty-Five + styles globaux WP (theme.json) ajoutent souvent
 * `text-decoration: underline` sur les liens après notre feuille : body + !important
 * pour gagner la cascade sans toucher au reste du site (ex. .page-body).
 */
body header.topbar a,
body header.topbar a:visited,
body header.topbar a:hover,
body header.topbar a:focus,
body header.topbar a:focus-visible,
body header.topbar a:active,
body .mobile-drawer a,
body .mobile-drawer a:visited,
body .mobile-drawer a:hover,
body .mobile-drawer a:focus,
body .mobile-drawer a:focus-visible,
body .mobile-drawer a:active,
body .hero-cta a,
body .hero-cta a:visited,
body .hero-cta a:hover,
body .hero-cta a:focus,
body .hero-cta a:focus-visible,
body .hero-cta a:active,
body a.btn,
body a.btn:visited,
body a.btn:hover,
body a.btn:focus,
body a.btn:focus-visible,
body a.btn:active {
  text-decoration: none !important;
  text-underline-offset: 0 !important;
  text-decoration-line: none !important;
  text-decoration-thickness: 0 !important;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

/* Top nav */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cntx-border);
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .topbar {
  background: rgba(7,8,20,0.55);
  backdrop-filter: blur(12px);
}

.topbar .container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  width: 100%;
  min-width: 0; /* Allow flex items to shrink */
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  display: grid;
  place-items: center;
  overflow: visible;
}

.brand-logo img {
  width: 46px;
  height: 46px;
  display: block;
}

.nav {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  color: var(--cntx-neutral-600);
  font-weight: 600;
}

.nav a {
  padding: 6px 0;
  position: relative;
  transition: color 0.15s ease;
  color: var(--cntx-neutral-600);
}

[data-theme="dark"] .nav a {
  color: rgba(168, 176, 216, 0.85);
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .nav a.active {
  color: #e9ecff;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cntx-primary-strong), var(--cntx-primary));
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav a:hover {
  color: var(--cntx-neutral-900);
}

.nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav a.active {
  color: var(--cntx-neutral-900);
}

/* Product dropdown (desktop nav) */
.nav-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Invisible bridge so hover survives the gap between trigger and panel */
.nav-dropdown-wrap::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: max(100%, 280px);
  height: 16px;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cntx-neutral-600);
  cursor: pointer;
  transition: color 0.15s ease;
}

[data-theme="dark"] .nav-dropdown-trigger {
  color: rgba(168, 176, 216, 0.85);
}

.nav-dropdown-trigger i[data-lucide],
.nav-dropdown-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.nav-dropdown-wrap.is-open .nav-dropdown-trigger i[data-lucide],
.nav-dropdown-wrap.is-open .nav-dropdown-trigger svg,
.nav-dropdown-wrap:hover .nav-dropdown-trigger i[data-lucide],
.nav-dropdown-wrap:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-wrap.is-active .nav-dropdown-trigger,
.nav-dropdown-wrap.is-open .nav-dropdown-trigger,
.nav-dropdown-trigger:hover {
  color: var(--cntx-neutral-900);
}

[data-theme="dark"] .nav-dropdown-wrap.is-active .nav-dropdown-trigger,
[data-theme="dark"] .nav-dropdown-wrap.is-open .nav-dropdown-trigger,
[data-theme="dark"] .nav-dropdown-trigger:hover {
  color: #e9ecff;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 260px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--cntx-border);
  background: var(--cntx-surface);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 60;
}

[data-theme="dark"] .nav-dropdown {
  background: rgba(12, 15, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.nav-dropdown-wrap.is-open .nav-dropdown,
.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cntx-neutral-700);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
  background: var(--cntx-border-subtle);
  color: var(--cntx-neutral-900);
}

[data-theme="dark"] .nav-dropdown a {
  color: rgba(168, 176, 216, 0.85);
}

[data-theme="dark"] .nav-dropdown a:hover,
[data-theme="dark"] .nav-dropdown a.active {
  background: rgba(255, 255, 255, 0.06);
  color: #e9ecff;
}

/* Mobile drawer — product sub-links */
.mobile-nav-group {
  display: grid;
  gap: 2px;
  padding: 4px 0 8px;
}

.mobile-nav-label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cntx-neutral-500);
}

.mobile-nav-sublink {
  padding-left: 20px !important;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
  position: relative;
  z-index: 10002;
  overflow: visible;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cntx-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.20);
}

.btn-primary:hover { background: var(--cntx-primary-strong); }

.btn-secondary {
  background: var(--cntx-surface);
  border-color: var(--cntx-border);
  color: var(--cntx-neutral-700);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--cntx-border-subtle);
  border-color: #D1D5DB;
}

[data-theme="dark"] .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e9ecff;
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--cntx-neutral-600);
  transition: color 0.15s ease;
}

.btn-ghost:hover { background: var(--cntx-border-subtle); color: var(--cntx-neutral-900); }

[data-theme="dark"] .btn-ghost {
  color: rgba(233, 236, 255, 0.85);
}

[data-theme="dark"] .btn-ghost:hover {
  color: #e9ecff;
  background: rgba(255, 255, 255, 0.06);
}

.hamburger {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--cntx-border);
  background: var(--cntx-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hamburger:hover { background: var(--cntx-border-subtle); }

/* Theme toggle button */
.theme-toggle {
  width: 40px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.08s ease;
  position: relative;
  padding: 0;
  margin: 0;
  color: var(--cntx-neutral-900);
  z-index: 52;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:not(.VPSwitch) {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.VPSwitch {
  position: relative;
  border-radius: 11px;
  display: block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid var(--cntx-border);
  background: var(--cntx-surface);
  transition: background-color 0.25s, border-color 0.25s;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

[data-theme="dark"] .VPSwitch {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.VPSwitch:hover {
  border-color: var(--cntx-primary);
}

.VPSwitchAppearance {
  width: 40px;
  height: 22px;
}

.VPSwitch .check {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Knob position follows <html data-theme>. Dark theme = dark pill + light moon (readable, not flat #000) */
[data-theme="dark"] .VPSwitch .check {
  transform: translateX(18px);
  background: linear-gradient(180deg, rgba(36, 40, 72, 0.98) 0%, rgba(18, 20, 42, 0.99) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .VPSwitch .check {
  transform: translateX(0);
}

.VPSwitch .icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.VPSwitch .vpi-sun,
.VPSwitch .vpi-moon {
  position: absolute;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Icons follow <html data-theme> only (same as knob — avoids moon-on-light when aria lags) */
[data-theme="dark"] .VPSwitch .vpi-sun {
  display: none !important;
}

[data-theme="dark"] .VPSwitch .vpi-moon {
  display: flex !important;
}

html[data-theme="light"] .VPSwitch .vpi-sun,
html:not([data-theme="dark"]) .VPSwitch .vpi-sun {
  display: flex !important;
}

html[data-theme="light"] .VPSwitch .vpi-moon,
html:not([data-theme="dark"]) .VPSwitch .vpi-moon {
  display: none !important;
}

.VPSwitch .vpi-sun i[data-lucide],
.VPSwitch .vpi-sun svg,
.VPSwitch .vpi-moon i[data-lucide],
.VPSwitch .vpi-moon svg {
  width: 14px;
  height: 14px;
  color: var(--cntx-neutral-700);
  stroke: var(--cntx-neutral-700);
}

/* Icons on dark knob: light strokes (dark-mode toggle look) */
[data-theme="dark"] .VPSwitch .vpi-sun i[data-lucide],
[data-theme="dark"] .VPSwitch .vpi-sun svg,
[data-theme="dark"] .VPSwitch .vpi-moon i[data-lucide],
[data-theme="dark"] .VPSwitch .vpi-moon svg {
  color: rgba(255, 255, 255, 0.95);
  stroke: rgba(255, 255, 255, 0.95);
}

.theme-toggle:hover {
  opacity: 0.7;
}

/* Tooltip for theme toggle */
.theme-toggle::after {
  content: attr(data-tooltip);
  position: fixed;
  top: var(--tooltip-top, 76px);
  left: var(--tooltip-left, 50%);
  transform: translateX(-50%) translateY(4px);
  background: var(--cntx-neutral-900);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10003;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle::before {
  content: '';
  position: fixed;
  top: var(--tooltip-arrow-top, 76px);
  left: var(--tooltip-left, 50%);
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-bottom-color: var(--cntx-neutral-900);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10005;
}

.theme-toggle:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.theme-toggle:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hide tooltips on mobile/touch devices */
@media (hover: none) or (pointer: coarse) {
  .theme-toggle::after,
  .theme-toggle::before {
    display: none !important;
  }
}

/* Also hide tooltips on small screens */
@media (max-width: 768px) {
  .theme-toggle::after,
  .theme-toggle::before {
    display: none !important;
  }
}

[data-theme="dark"] .theme-toggle::after {
  background: var(--cntx-surface);
  color: var(--cntx-neutral-900);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .theme-toggle::before {
  border-bottom-color: var(--cntx-surface);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Avoid default browser focus “square” on the switch; keep visible keyboard focus */
.theme-toggle.VPSwitch:focus {
  outline: none;
}

.theme-toggle.VPSwitch:focus-visible {
  outline: 2px solid var(--cntx-primary);
  outline-offset: 2px;
  border-radius: 12px;
}

.hamburger:focus {
  outline: none;
}

.hamburger:focus-visible {
  outline: 2px solid var(--cntx-primary);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Legacy theme-icon styles kept for backward compatibility if needed */
.theme-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: opacity 0.2s ease;
}

/* Mobile theme toggle in drawer */
.mobile-theme-toggle {
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--cntx-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
  color: var(--cntx-neutral-700);
  margin: 0;
}

.mobile-theme-toggle.VPSwitch {
  width: 100%;
  height: auto;
  min-height: 44px;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-theme-toggle .check {
  position: static;
  width: auto;
  height: auto;
  transform: none;
  background: transparent;
  display: inline-flex;
  margin-left: auto;
}

.mobile-theme-toggle[aria-checked="true"] .check {
  transform: none;
}

.mobile-theme-toggle:hover {
  background: var(--cntx-border-subtle);
  color: var(--cntx-neutral-900);
}

[data-theme="dark"] .mobile-theme-toggle {
  color: var(--cntx-neutral-700);
}

[data-theme="dark"] .mobile-theme-toggle:hover {
  color: var(--cntx-neutral-900);
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}

/* Force hero glow behind everything */
.hero::before {
      content: "";
      position: absolute;
      inset: -40% -20% auto -20%;
      height: 520px;
      z-index: 0;
      background:
        radial-gradient(closest-side, rgba(79,70,229,0.20), transparent 70%),
        radial-gradient(closest-side, rgba(124,58,237,0.16), transparent 70%),
        radial-gradient(closest-side, rgba(217,70,239,0.14), transparent 70%);
      filter: blur(4px);
      transform: translateY(-40px);
      pointer-events: none;
}
    
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--cntx-primary-soft);
  border: 1px solid #BFDBFE;
  color: var(--cntx-primary);
  font-weight: 700;
  font-size: 12px;
  width: fit-content;
  box-shadow: var(--shadow-xs);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .eyebrow {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(168, 176, 216, 0.85);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cntx-primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-top: 14px;
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] h1 {
  color: #e9ecff;
}

.hero p {
  color: var(--cntx-neutral-600);
  font-size: 16px;
  max-width: 58ch;
  margin-top: 14px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.microcopy {
  margin-top: 10px;
  font-size: 12px;
  color: var(--cntx-neutral-500);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  transition: color 0.3s ease;
}

[data-theme="dark"] .microcopy {
  color: rgba(168, 176, 216, 0.70);
}

.micro-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--cntx-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .micro-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(168, 176, 216, 0.85);
}

.micro-pill svg { opacity: 0.8; }

/* Lucide */
i[data-lucide] { 
  width: 16px; 
  height: 16px; 
  color: inherit;
  stroke: currentColor;
}
.feature .icon i[data-lucide] { width: 18px; height: 18px; }
.hamburger i[data-lucide] { width: 18px; height: 18px; }
.bullet .check i[data-lucide] { width: 14px; height: 14px; }
.micro-pill i[data-lucide] { opacity: 0.8; }

/* Ensure icons are white in dark mode */
[data-theme="dark"] i[data-lucide] {
  color: #ffffff;
  stroke: #ffffff;
}

/* Hero preview */
.preview {
  background: var(--cntx-surface);
  border: 1px solid var(--cntx-border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .preview {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--cntx-border);
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
  transition: background 0.3s ease;
}

[data-theme="dark"] .preview-top {
  background: linear-gradient(180deg, rgba(12,15,34,.75) 0%, rgba(10,12,28,.82) 100%);
}

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

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E5E7EB;
  transition: background 0.3s ease;
}

[data-theme="dark"] .preview-dot {
  background: rgba(255, 255, 255, 0.20);
}

.preview-title {
  font-size: 12px;
  color: var(--cntx-neutral-600);
  font-weight: 700;
  transition: color 0.3s ease;
}

[data-theme="dark"] .preview-title {
  color: rgba(168, 176, 216, 0.85);
}

.preview-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.preview-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.card {
  background: var(--cntx-surface);
  border: 1px solid var(--cntx-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-xs);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .card {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.card h3,
.card h4,
.card h2.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cntx-neutral-900);
  margin-bottom: 6px;
  transition: color 0.3s ease;
}

[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4,
[data-theme="dark"] .card h2.card-title {
  color: #e9ecff;
}

.card p {
  font-size: 12px;
  color: var(--cntx-neutral-600);
  margin: 0;
  transition: color 0.3s ease;
}

[data-theme="dark"] .card p {
  color: rgba(168, 176, 216, 0.85);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--cntx-border-subtle);
  border: 1px solid #E5E7EB;
  font-size: 11px;
  font-weight: 600;
  color: var(--cntx-neutral-700);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(168, 176, 216, 0.85);
}

.chip.primary { background: var(--cntx-primary-soft); border-color: #BFDBFE; color: var(--cntx-primary); }
.chip.success { background: var(--cntx-success-soft); border-color: #BBF7D0; color: #047857; }
.chip.warning { background: var(--cntx-warning-soft); border-color: #FED7AA; color: #9A3412; }

[data-theme="dark"] .chip.primary { 
  background: rgba(124, 58, 237, 0.20); 
  border-color: rgba(124, 58, 237, 0.35); 
  color: rgba(233, 236, 255, 0.92); 
}
[data-theme="dark"] .chip.success { 
  background: rgba(34, 197, 94, 0.20); 
  border-color: rgba(34, 197, 94, 0.35); 
  color: rgba(233, 236, 255, 0.92); 
}
[data-theme="dark"] .chip.warning { 
  background: rgba(245, 158, 11, 0.20); 
  border-color: rgba(245, 158, 11, 0.35); 
  color: rgba(233, 236, 255, 0.92); 
}

.mini-table {
  border-radius: 14px;
  border: 1px solid var(--cntx-border);
  overflow: hidden;
  background: #fff;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .mini-table {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.mini-table .head {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 10px;
  padding: 10px 12px;
  background: #F9FAFB;
  border-bottom: 1px solid var(--cntx-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--cntx-neutral-500);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .mini-table .head {
  background: rgba(10, 12, 28, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(168, 176, 216, 0.70);
}

.mini-table .row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--cntx-border-subtle);
  align-items: center;
  font-size: 12px;
  color: var(--cntx-neutral-700);
  transition: border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .mini-table .row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(168, 176, 216, 0.85);
}

.mini-table .row:last-child { border-bottom: none; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}

.pill.blue { background: var(--cntx-primary-soft); color: var(--cntx-primary); border: 1px solid #BFDBFE; transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease; }
.pill.green { background: var(--cntx-success-soft); color: #047857; border: 1px solid #BBF7D0; transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease; }
.pill.orange { background: var(--cntx-warning-soft); color: #9A3412; border: 1px solid #FED7AA; transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease; }

[data-theme="dark"] .pill.blue { 
  background: rgba(124, 58, 237, 0.20); 
  color: rgba(233, 236, 255, 0.92); 
  border: 1px solid rgba(124, 58, 237, 0.35); 
}
[data-theme="dark"] .pill.green { 
  background: rgba(34, 197, 94, 0.20); 
  color: rgba(233, 236, 255, 0.92); 
  border: 1px solid rgba(34, 197, 94, 0.35); 
}
[data-theme="dark"] .pill.orange { 
  background: rgba(245, 158, 11, 0.20); 
  color: rgba(233, 236, 255, 0.92); 
  border: 1px solid rgba(245, 158, 11, 0.35); 
}

/* Sections */
section { padding: 48px 0; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.kicker {
  font-size: 12px;
  font-weight: 800;
  color: var(--cntx-neutral-500);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

[data-theme="dark"] .kicker {
  color: rgba(168, 176, 216, 0.70);
}

.section-title {
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .section-title {
  color: #e9ecff;
}

.section-sub {
  color: var(--cntx-neutral-600);
  font-size: 14px;
  max-width: 72ch;
  transition: color 0.3s ease;
}

[data-theme="dark"] .section-sub {
  color: rgba(168, 176, 216, 0.85);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.feature {
  background: var(--cntx-surface);
  border: 1px solid var(--cntx-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .feature {
  background: rgba(12, 15, 34, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.feature .icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cntx-primary-soft);
  border: 1px solid #BFDBFE;
  color: var(--cntx-primary);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .feature .icon {
  background: rgba(124, 58, 237, 0.20);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: rgba(233, 236, 255, 0.92);
}

.feature h3 { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; color: var(--cntx-neutral-900); transition: color 0.3s ease; }
.feature p { font-size: 13px; color: var(--cntx-neutral-600); transition: color 0.3s ease; }

[data-theme="dark"] .feature h3 {
  color: #e9ecff;
}

[data-theme="dark"] .feature p {
  color: rgba(168, 176, 216, 0.85);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.callout {
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(249,250,251,1) 100%);
  border: 1px solid var(--cntx-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .callout {
  background: linear-gradient(180deg, rgba(12,15,34,.75) 0%, rgba(10,12,28,.82) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Beta callout with lighter background in light mode */
.callout-beta {
  background: rgba(255,255,255,0.92) !important;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .callout-beta {
  background: linear-gradient(180deg, rgba(12,15,34,.75) 0%, rgba(10,12,28,.82) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.callout h3 { font-size: 14px; font-weight: 800; margin-bottom: 6px; color: var(--cntx-neutral-900); transition: color 0.3s ease; }

[data-theme="dark"] .callout h3 {
  color: #e9ecff;
}

.bullets { margin-top: 10px; display: grid; gap: 10px; }

.bullet {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--cntx-border-subtle);
  background: #fff;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .bullet {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.bullet .check {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--cntx-success-soft);
  border: 1px solid #BBF7D0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #047857;
  flex: 0 0 auto;
  margin-top: 1px;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .bullet .check {
  background: rgba(34, 197, 94, 0.20);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: rgba(233, 236, 255, 0.92);
}

/* Check icons with danger/error styling (red X icons) - override inline styles in dark mode */
[data-theme="dark"] .bullet .check[style*="var(--cntx-danger-soft)"] {
  background: rgba(220, 38, 38, 0.20) !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
  color: rgba(233, 236, 255, 0.92) !important;
}

[data-theme="dark"] .bullet .check[style*="#FECACA"] {
  border-color: rgba(220, 38, 38, 0.35) !important;
}

[data-theme="dark"] .bullet .check[style*="#991B1B"] {
  color: rgba(233, 236, 255, 0.92) !important;
}

.bullet strong { font-size: 13px; display: block; color: var(--cntx-neutral-900); transition: color 0.3s ease; }
.bullet span { font-size: 12px; color: var(--cntx-neutral-600); display: block; margin-top: 2px; transition: color 0.3s ease; }

[data-theme="dark"] .bullet strong {
  color: #e9ecff;
}

[data-theme="dark"] .bullet span {
  color: rgba(168, 176, 216, 0.85);
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--cntx-border);
  background: #fff;
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 700;
  color: var(--cntx-neutral-800);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .tag {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e9ecff;
}

.tag small {
  font-size: 12px;
  font-weight: 600;
  color: var(--cntx-neutral-500);
  transition: color 0.3s ease;
}

[data-theme="dark"] .tag small {
  color: rgba(168, 176, 216, 0.70);
}

.tag .badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cntx-primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .tag .badge {
  background: var(--cntx-primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.20);
}

/* Beta */
.beta { padding: 56px 0; }

.beta-card {
  border-radius: 20px;
  border: 1px solid var(--cntx-border);
  background:
    radial-gradient(1200px 600px at 10% 20%, rgba(37,99,235,0.14), transparent 55%),
    radial-gradient(900px 500px at 80% 10%, rgba(16,185,129,0.10), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
  box-shadow: var(--shadow-md);
  padding: 22px;
  overflow: hidden;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .beta-card {
  background:
    radial-gradient(1200px 600px at 10% 20%, rgba(79,70,229,0.22), transparent 55%),
    radial-gradient(900px 500px at 80% 10%, rgba(217,70,239,0.14), transparent 60%),
    linear-gradient(180deg, rgba(12,15,34,.75) 0%, rgba(10,12,28,.82) 100%);
}

.beta-card::after {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 28px;
  background: radial-gradient(closest-side, rgba(255,255,255,0.6), transparent 70%);
  transform: translateX(-20%) translateY(-10%);
  opacity: 0.35;
  pointer-events: none;
  transition: background 0.3s ease, opacity 0.3s ease;
}

[data-theme="dark"] .beta-card::after {
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.15), transparent 70%);
  opacity: 0.25;
}

.beta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.beta-card h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .beta-card h2 {
  color: #e9ecff;
}

.beta-card p {
  color: var(--cntx-neutral-600);
  margin-top: 8px;
  font-size: 14px;
  max-width: 72ch;
  transition: color 0.3s ease;
}

[data-theme="dark"] .beta-card p {
  color: rgba(168, 176, 216, 0.85);
}

/* Beta card kicker */
.beta-card .kicker {
  transition: color 0.3s ease;
}

[data-theme="dark"] .beta-card .kicker {
  color: rgba(168, 176, 216, 0.70);
}

.beta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Footer */
footer {
  border-top: 1px solid var(--cntx-border);
  background: #FFFFFF;
  padding: 26px 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] footer {
  background: var(--cntx-bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.footer-note { color: var(--cntx-neutral-500); font-size: 13px; transition: color 0.3s ease; }

.footer-note strong,
footer strong {
  font-weight: 600;
}

[data-theme="dark"] .footer-note {
  color: rgba(168, 176, 216, 0.70);
}

.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }

.footer-links a {
  font-size: 13px;
  color: var(--cntx-neutral-600);
  padding: 6px 10px;
  border-radius: 12px;
  transition: background 0.15s ease, color 0.3s ease;
}

.footer-links a:hover { background: var(--cntx-border-subtle); color: var(--cntx-neutral-900); }

[data-theme="dark"] .footer-links a {
  color: rgba(168, 176, 216, 0.85);
}

[data-theme="dark"] .footer-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e9ecff;
}

/* Mobile menu */
.mobile-drawer {
  position: fixed;
  inset: 76px 0 auto 0;
  background: rgba(249,250,251,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cntx-border);
  transform: translateY(-120%);
  transition: transform 0.2s ease, background-color 0.3s ease;
  /* Must be above the sticky header (.topbar z-index: 50) */
  z-index: 60;
  /* Don't block clicks when closed (even if transforms change later) */
  pointer-events: none;
}

[data-theme="dark"] .mobile-drawer {
  background: rgba(7,8,20,0.92);
}

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

/* CSS-only open state (checkbox hack). Keeps working even if JS is broken by perf plugins. */
.nav-toggle:checked ~ .mobile-drawer {
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 76px 0 0 0; /* below header */
  background: transparent;
  cursor: pointer;
}

.mobile-drawer .panel {
  position: relative;
  z-index: 1; /* above overlay label */
  background: var(--cntx-surface);
  border: 1px solid var(--cntx-border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 12px;
  margin: 14px auto 18px;
  width: min(var(--container), calc(100% - 32px));
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
}

.mobile-drawer-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cntx-neutral-500);
}

.mobile-drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--cntx-border);
  background: var(--cntx-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--cntx-neutral-600);
}

.mobile-drawer-close:hover {
  background: var(--cntx-border-subtle);
  color: var(--cntx-neutral-900);
}

.mobile-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--cntx-neutral-700);
}

.mobile-drawer a:hover { background: var(--cntx-border-subtle); color: var(--cntx-neutral-900); }

/* Responsive */
@media (min-width: 860px) {
  .nav { display: flex; }
  .hamburger { display: none; }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 34px;
  }

  .preview-row { grid-template-columns: 1fr 1fr; }

  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 1.1fr 0.9fr; }

  .beta-inner { grid-template-columns: 1.2fr 0.8fr; align-items: center; }

  .footer-inner { flex-direction: row; align-items: center; }
}

/* Mobile fixes */
@media (max-width: 859px) {
  /* Ensure containers are centered and don't overflow */
  .container {
    width: min(var(--container), calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
    padding: 0;
  }
  
  /* Header adjustments for mobile */
  .topbar .container {
    width: min(var(--container), calc(100% - 48px));
  }
  
  .topbar-inner {
    gap: 10px;
    align-items: center;
  }

  /* Dark/light: use drawer row only (#themeToggleMobile), not the header switch */
  #themeToggle {
    display: none !important;
  }

  .brand {
    flex-shrink: 0;
    min-width: 0;
  }

  .actions {
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
  }

  .actions .btn-primary {
    padding: 9px 12px;
    font-size: 12px;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }
  
  /* Hide some buttons on very small screens to prevent overflow */
  .actions .btn-ghost,
  .actions .btn-secondary {
    display: none;
  }
  
  /* Center cards and content sections */
  section:not(.hero) {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  section.hero {
    display: block;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Ensure cards are centered */
  .grid-3,
  .preview-row,
  .hero-grid {
    width: 100%;
    justify-items: center;
    place-items: center;
  }
  
  /* Center individual cards */
  .card {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .container { 
    width: min(var(--container), calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
  }
  
  .topbar .container {
    width: min(var(--container), calc(100% - 32px));
  }
  
  .topbar-inner {
    gap: 8px;
  }

  /*
   * IMPORTANT:
   * Do NOT force all `.btn` to full-width on very small screens.
   * It breaks header actions layout and can make the hamburger unclickable
   * (e.g. a long primary CTA stretches and overlaps).
   * Keep full-width only where intended (hero/beta CTAs) via scoped rules below.
   */
  .actions { 
    width: auto;
    justify-content: flex-end;
    gap: 6px;
  }
  .hero-cta .btn { width: 100%; }
  .beta-actions .btn { width: 100%; }
  
  /* Footer adjustments */
  footer .container {
    width: min(var(--container), calc(100% - 32px));
  }
  
  .footer-inner {
    align-items: center;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

.muted { color: var(--cntx-neutral-600); transition: color 0.3s ease; }

[data-theme="dark"] .muted {
  color: rgba(168, 176, 216, 0.70);
}

.divider { height: 1px; background: var(--cntx-border); transition: background 0.3s ease; }

[data-theme="dark"] .divider {
  background: rgba(255, 255, 255, 0.10);
}

:focus-visible {
  outline: 3px solid rgba(37,99,235,0.25);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Newsletter modal (available on all pages since footer.php includes it) */
.cntx-newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.cntx-newsletter-modal[aria-hidden="false"] {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cntx-newsletter-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .cntx-newsletter-modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.cntx-newsletter-modal-content {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  max-width: 480px;
  width: calc(100% - 48px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  transform: scale(0.95);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

[data-theme="dark"] .cntx-newsletter-modal-content {
  background: var(--cntx-surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cntx-newsletter-modal[aria-hidden="false"] .cntx-newsletter-modal-content {
  transform: scale(1);
}

.cntx-newsletter-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--cntx-neutral-600);
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 1;
}

.cntx-newsletter-modal-close:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--cntx-neutral-900);
}

.cntx-newsletter-modal-close i {
  width: 20px;
  height: 20px;
}

.cntx-newsletter-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--cntx-neutral-900);
  margin: 0 0 20px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cntx-newsletter-modal-form-wrapper {
  margin-bottom: 16px;
}

.cntx-newsletter-modal-footer {
  margin: 0;
  color: var(--cntx-neutral-600);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 768px) {
  .cntx-newsletter-modal-content {
    padding: 24px;
    border-radius: 20px;
  }
  
  .cntx-newsletter-modal-title {
    font-size: 20px;
  }
}

/* =====================================================================
   Hero v2 — integrated above-the-fold (animated editorial system visual)
   All visual internals are scoped under .cntx-hero-visual so they never
   leak into the rest of the site (chips, card-title, etc.).
   ===================================================================== */

.hero--v2 { padding-bottom: 40px; }

.hero--v2 .hero-copy {
  position: relative;
  z-index: 4;
  max-width: 560px;
}

.hero--v2 h1 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-visual-wrap {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 0;
  z-index: 3;
  container-type: inline-size;
  container-name: hero-visual;
}

/* Hero v2: visible by default (mobile-first); stale LiteSpeed bundles often miss @media blocks */
.hero--v2 .hero-visual-wrap {
  display: block;
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 14px auto 0;
  min-height: 200px;
  height: auto;
  aspect-ratio: 560 / 660;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 16px;
  border: 1px solid var(--cntx-border);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.14), transparent 55%),
    var(--cntx-bg);
}

[data-theme="dark"] .hero--v2 .hero-visual-wrap {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(123, 60, 255, 0.22), transparent 55%),
    rgba(6, 8, 22, 0.88);
}

.hero--v2 .hero-visual-wrap .cntx-hero-visual {
  position: absolute;
  top: 0;
  left: 50%;
  width: 560px;
  height: 660px;
  min-height: 660px;
  max-width: none;
  margin-left: -280px;
  transform-origin: 50% 0;
  transform: perspective(1200px) rotateX(1deg) rotateY(-2deg) scale(0.62);
}

.hero--v2 .hero-visual-wrap.is-mobile-ready .cntx-hero-visual {
  will-change: transform;
}

.hero--v2 .hero-copy .hero-cta {
  margin-top: 18px;
}

.hero--v2 .hero-copy .microcopy {
  margin-top: 8px;
}

.cntx-hero-visual {
  --cntx-hv-purple: #7b3cff;
  --cntx-hv-purple-2: #b24dff;
  --cntx-hv-border: rgba(181, 132, 255, 0.22);
  --cntx-hv-border-strong: rgba(181, 132, 255, 0.48);
  --cntx-hv-card: rgba(14, 16, 37, 0.82);
  --cntx-hv-ink: #f8f5ff;
  --cntx-hv-muted: rgba(225, 216, 255, 0.68);
  --cntx-hv-muted-soft: rgba(225, 216, 255, 0.42);
  --cntx-hv-radius: 20px;
  --context-x: 0px; --context-y: 0px;
  --signals-x: 0px; --signals-y: 0px;
  --plan-x: 0px; --plan-y: 0px;
  --brief-x: 0px; --brief-y: 0px;
  --line-x: 0px; --line-y: 0px;
  --glow-x: 50%; --glow-y: 50%;
  position: relative;
  width: min(560px, 100%);
  min-height: 660px;
  padding: 18px;
  overflow: visible;
  transform: perspective(1200px) rotateX(1deg) rotateY(-2deg);
  transform-origin: center;
}

.cntx-hero-visual .scene-glow {
  position: absolute;
  inset: -140px -180px;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(178, 77, 255, 0.115), transparent 18%),
    radial-gradient(ellipse at 52% 48%, rgba(123, 60, 255, 0.20), transparent 42%),
    radial-gradient(ellipse at 86% 72%, rgba(178, 77, 255, 0.10), transparent 38%);
  filter: blur(18px);
  opacity: 0.82;
}

.cntx-hero-visual .visual-particles {
  position: absolute;
  inset: -140px -180px;
  z-index: -3;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(186, 127, 255, 0.44) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.14) 0 1px, transparent 1.7px);
  background-size: 82px 82px, 137px 137px;
  opacity: 0.115;
  animation: cntxParticleDrift 24s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0 44%, rgba(0,0,0,.78) 64%, transparent 92%);
  mask-image: radial-gradient(ellipse at center, #000 0 44%, rgba(0,0,0,.78) 64%, transparent 92%);
}

.cntx-hero-visual .visual-orbit-glow {
  position: absolute;
  inset: -180px -220px;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 47% 42%, rgba(123, 60, 255, 0.13), transparent 34%),
    radial-gradient(ellipse at 68% 58%, rgba(178, 77, 255, 0.10), transparent 36%),
    radial-gradient(ellipse at 34% 72%, rgba(94, 52, 180, 0.10), transparent 32%);
  filter: blur(28px);
  opacity: 0.74;
  transform: translate3d(var(--line-x), var(--line-y), 0);
}

.cntx-hero-visual .connection-layer {
  position: absolute;
  inset: 30px 32px 34px 32px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.92;
  transform: translate3d(var(--line-x), var(--line-y), 0);
  transition: transform 0.18s ease-out;
}

.cntx-hero-visual .connection-layer svg { width: 100%; height: 100%; overflow: visible; }

.cntx-hero-visual .light-path {
  fill: none;
  stroke: url(#cntxLineGradient);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 9 16;
  filter: drop-shadow(0 0 8px rgba(151, 76, 255, 0.82));
  animation: cntxDashFlow 8s linear infinite;
}

.cntx-hero-visual .glow-path {
  fill: none;
  stroke: rgba(158, 79, 255, 0.18);
  stroke-width: 8;
  stroke-linecap: round;
  filter: blur(5px) drop-shadow(0 0 18px rgba(178, 77, 255, 0.44));
  opacity: 0.78;
  animation: cntxGlowBreath 3.8s ease-in-out infinite;
}

.cntx-hero-visual .soft-path {
  fill: none;
  stroke: rgba(151, 76, 255, 0.14);
  stroke-width: 1;
  stroke-dasharray: 3 12;
  animation: cntxDashFlow 12s linear infinite reverse;
}

.cntx-hero-visual .vertical-flow-line {
  position: absolute;
  left: 50%;
  top: 432px;
  width: 1.5px;
  height: 78px;
  transform: translateX(-50%);
  z-index: 1;
  border-radius: 999px;
  background: repeating-linear-gradient(to bottom, rgba(224, 215, 255, 0.42) 0 7px, rgba(178, 77, 255, 0.26) 7px 13px, transparent 13px 24px);
  background-size: 100% 48px;
  box-shadow: 0 0 7px rgba(178, 77, 255, 0.28), 0 0 18px rgba(123, 60, 255, 0.18);
  opacity: 0.52;
  animation: cntxVerticalDashFlow 1.8s linear infinite;
  pointer-events: none;
}

.cntx-hero-visual .connector-node,
.cntx-hero-visual .flow-dot {
  position: absolute;
  border-radius: 999px;
  background: #fff;
  z-index: 1;
  pointer-events: none;
}

.cntx-hero-visual .connector-node {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 14px 5px rgba(165, 87, 255, 0.42), 0 0 30px 8px rgba(123, 60, 255, 0.24);
}

.cntx-hero-visual .node--merge {
  left: calc(50% - 5px);
  top: 232px;
  animation: cntxNodePulse 2.8s ease-in-out infinite, cntxNodeFloatMerge 5.4s ease-in-out infinite;
}

.cntx-hero-visual .node--drop {
  left: calc(50% - 5px);
  top: 510px;
  animation: cntxNodePulse 2.8s ease-in-out infinite .7s, cntxNodeFloatDrop 4.8s ease-in-out infinite .25s;
}

.cntx-hero-visual .flow-dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 10px 3px rgba(165, 87, 255, 0.56);
  opacity: 0;
  z-index: 2;
}

.cntx-hero-visual .flow-dot--a { left: 180px; top: 130px; animation: cntxDotA 3.8s ease-in-out infinite; }
.cntx-hero-visual .flow-dot--b { right: 180px; top: 130px; animation: cntxDotB 3.8s ease-in-out infinite 0.75s; }
.cntx-hero-visual .flow-dot--c { left: 50%; top: 444px; animation: cntxDotC 3.8s ease-in-out infinite 1.35s; }

.cntx-hero-visual .input-card,
.cntx-hero-visual .plan-card,
.cntx-hero-visual .brief-card {
  position: absolute;
  border-radius: var(--cntx-hv-radius);
  border: 1px solid var(--cntx-hv-border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.058), rgba(255,255,255,0.018)),
    var(--cntx-hv-card);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(123, 60, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateZ(0);
  z-index: 2;
}

.cntx-hero-visual .input-card {
  width: 200px;
  min-height: 124px;
  padding: 14px;
  animation: cntxFloatSoft 6s ease-in-out infinite;
}

.cntx-hero-visual .input-card--context { --parallax-x: var(--context-x); --parallax-y: var(--context-y); left: 8px; top: 44px; }
.cntx-hero-visual .input-card--signals { --parallax-x: var(--signals-x); --parallax-y: var(--signals-y); right: 8px; top: 44px; animation-delay: -1.8s; }

.cntx-hero-visual .plan-card {
  left: 50%;
  top: 286px;
  width: 360px;
  min-height: 140px;
  padding: 14px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 18% 26%, rgba(123, 60, 255, 0.20), transparent 34%), linear-gradient(180deg, rgba(31, 25, 76, 0.90), rgba(13, 15, 42, 0.84));
  border-color: var(--cntx-hv-border-strong);
  animation: cntxPlanFloat 6.8s ease-in-out infinite;
}

.cntx-hero-visual .brief-card {
  left: 50%;
  bottom: 46px;
  width: 360px;
  min-height: 124px;
  padding: 14px;
  transform: translateX(-50%);
  animation: cntxBriefFloat 6.1s ease-in-out infinite;
}

.cntx-hero-visual .card-title,
.cntx-hero-visual .brief-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -0.01em;
  color: var(--cntx-hv-ink);
}

.cntx-hero-visual .icon-box {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #d9bcff;
  background: rgba(123, 60, 255, 0.18);
  border: 1px solid rgba(178, 77, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 20px rgba(123,60,255,.16);
  flex: 0 0 auto;
}

.cntx-hero-visual .icon-box i[data-lucide],
.cntx-hero-visual .icon-box svg { width: 16px; height: 16px; }

.cntx-hero-visual .chips { display: grid; gap: 7px; margin-top: 0; }

.cntx-hero-visual .chip {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--cntx-hv-muted);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.07);
}

.cntx-hero-visual .chip.is-good {
  color: #eadfff;
  background: rgba(123, 60, 255, 0.16);
  border-color: rgba(178, 77, 255, 0.28);
  font-weight: 600;
}

.cntx-hero-visual .plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cntx-hero-visual .plan-range {
  font-size: 10px;
  color: var(--cntx-hv-muted-soft);
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.035);
}

.cntx-hero-visual .editorial-calendar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.cntx-hero-visual .calendar-day {
  min-height: 70px;
  border-radius: 12px;
  padding: 7px;
  background: rgba(255,255,255,0.032);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.cntx-hero-visual .calendar-day-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cntx-hv-muted-soft);
  font-weight: 760;
}

.cntx-hero-visual .calendar-day-label em { font-style: normal; color: rgba(247, 244, 255, 0.48); }

.cntx-hero-visual .calendar-item {
  position: relative;
  min-height: 20px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(123, 60, 255, 0.15);
  border: 1px solid rgba(178, 77, 255, 0.18);
  overflow: hidden;
}

.cntx-hero-visual .calendar-item::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w, 72%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(123,60,255,.96), rgba(178,77,255,.70));
  box-shadow: 0 0 16px rgba(151,76,255,.34);
  animation: cntxTaskBreath 4.4s ease-in-out infinite;
}

.cntx-hero-visual .calendar-item--short::before { width: 48%; opacity: .78; }
.cntx-hero-visual .calendar-item--long::before { width: 92%; }
.cntx-hero-visual .calendar-item--ghost { min-height: 16px; opacity: .52; }
.cntx-hero-visual .calendar-item--ghost::before { width: 58%; opacity: .58; }

.cntx-hero-visual .brief-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.cntx-hero-visual .brief-heading { margin-bottom: 0; }
.cntx-hero-visual .brief-heading strong { font-size: 14px; }
.cntx-hero-visual .brief-lines { display: grid; gap: 8px; max-width: 150px; margin-left: 40px; }

.cntx-hero-visual .row-line {
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.cntx-hero-visual .row-line span {
  display: block;
  height: 100%;
  width: var(--w, 62%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cntx-hv-purple), var(--cntx-hv-purple-2));
  box-shadow: 0 0 14px rgba(151, 76, 255, 0.40);
  animation: cntxLineBreath 4.6s ease-in-out infinite;
}

.cntx-hero-visual .brief-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.cntx-hero-visual .meta-item {
  padding: 9px;
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.065);
  min-width: 0;
}

.cntx-hero-visual .meta-label {
  display: block;
  font-size: 10px;
  color: var(--cntx-hv-ink);
  margin-bottom: 5px;
  font-weight: 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cntx-hero-visual .meta-value {
  display: block;
  font-size: 10px;
  color: var(--cntx-hv-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes cntxParticleDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-82px,-82px,0); } }
@keyframes cntxDashFlow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -170; } }
@keyframes cntxVerticalDashFlow { from { background-position: 0 0; } to { background-position: 0 48px; } }
@keyframes cntxGlowBreath { 0%,100% { opacity: .42; } 50% { opacity: .82; } }

@keyframes cntxNodePulse {
  0%, 100% { opacity: .52; box-shadow: 0 0 10px 4px rgba(165, 87, 255, 0.34), 0 0 28px 8px rgba(123, 60, 255, 0.18); }
  50% { opacity: .88; box-shadow: 0 0 14px 5px rgba(238, 228, 255, 0.34), 0 0 34px 10px rgba(178, 77, 255, 0.26); }
}

@keyframes cntxNodeFloatMerge {
  0%, 100% { transform: translate3d(0,0,0) scale(.92); }
  25% { transform: translate3d(-7px,-5px,0) scale(1); }
  50% { transform: translate3d(4px,-11px,0) scale(1.06); }
  75% { transform: translate3d(8px,-4px,0) scale(.98); }
}

@keyframes cntxNodeFloatDrop {
  0%, 100% { transform: translate3d(0,0,0) scale(.9); }
  25% { transform: translate3d(5px,-4px,0) scale(.98); }
  50% { transform: translate3d(-3px,-10px,0) scale(1.04); }
  75% { transform: translate3d(-6px,-3px,0) scale(.96); }
}

@keyframes cntxFloatSoft {
  0%, 100% { transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) translateY(0); }
  50% { transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) translateY(-8px); }
}

@keyframes cntxPlanFloat {
  0%, 100% { transform: translateX(-50%) translate3d(var(--plan-x), var(--plan-y), 0) translateY(0); }
  50% { transform: translateX(-50%) translate3d(var(--plan-x), var(--plan-y), 0) translateY(-6px); }
}

@keyframes cntxBriefFloat {
  0%, 100% { transform: translateX(-50%) translate3d(var(--brief-x), var(--brief-y), 0) translateY(0); }
  50% { transform: translateX(-50%) translate3d(var(--brief-x), var(--brief-y), 0) translateY(7px); }
}

@keyframes cntxTaskBreath { 0%,100% { transform: scaleX(.88); opacity:.76; } 50% { transform: scaleX(1); opacity:1; } }
@keyframes cntxLineBreath { 0%,100% { transform: scaleX(.82); opacity:.78; } 50% { transform: scaleX(1); opacity:1; } }

@keyframes cntxDotA {
  0% { opacity: 0; transform: translate(0, 0) scale(.8); }
  20% { opacity: 1; }
  70% { opacity: 1; transform: translate(72px, 104px) scale(1); }
  100% { opacity: 0; transform: translate(88px, 122px) scale(.7); }
}

@keyframes cntxDotB {
  0% { opacity: 0; transform: translate(0, 0) scale(.8); }
  20% { opacity: 1; }
  70% { opacity: 1; transform: translate(-72px, 104px) scale(1); }
  100% { opacity: 0; transform: translate(-88px, 122px) scale(.7); }
}

@keyframes cntxDotC {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.8); }
  20% { opacity: 1; }
  70% { opacity: 1; transform: translate(-50%, 72px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, 88px) scale(.7); }
}

/* Mobile hero: copy (incl. CTAs) → visual card — aligned with product pages */
@media (max-width: 859px) {
  .hero--v2 {
    padding-bottom: 28px;
  }

  .hero--v2 .hero-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0;
    place-items: stretch;
    justify-items: stretch;
  }

  .hero--v2 .hero-copy {
    order: 1 !important;
    max-width: none;
    width: 100%;
  }

  .hero.hero--v2 .hero-visual-wrap {
    order: 2 !important;
    margin: 12px 0 0;
    max-width: none;
    width: 100%;
  }

  .hero--v2 .hero-copy .hero-cta {
    width: 100%;
  }

  .hero--v2 .hero-visual-wrap .cntx-hero-visual {
    transform: perspective(1200px) rotateX(1deg) rotateY(-2deg) scale(0.62);
  }

  .cntx-hero-visual .input-card,
  .cntx-hero-visual .plan-card,
  .cntx-hero-visual .brief-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (min-width: 860px) {
  .hero--v2 .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
    gap: 28px 34px;
    align-items: center;
  }

  .hero--v2 .hero-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .hero--v2 .hero-copy .hero-cta {
    margin-top: 18px;
  }

  /* Desktop: visual floats in the hero glow — no card chrome */
  .hero.hero--v2 .hero-visual-wrap {
    display: flex !important;
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    justify-self: center;
    min-height: 660px;
    max-width: none;
    width: 100%;
    margin: 0;
    aspect-ratio: auto;
    overflow: visible;
    border: none;
    border-radius: 0;
    background: none;
  }

  [data-theme="dark"] .hero.hero--v2 .hero-visual-wrap {
    border: none;
    background: none;
  }

  .hero.hero--v2 .hero-visual-wrap .cntx-hero-visual {
    position: relative;
    top: auto;
    left: auto;
    width: min(560px, 100%);
    height: auto;
    min-height: 660px;
    margin-left: 0;
    transform-origin: center;
    transform: perspective(1200px) rotateX(1deg) rotateY(-2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cntx-hero-visual *,
  .cntx-hero-visual *::before,
  .cntx-hero-visual *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .cntx-hero-visual .connection-layer { transform: none !important; transition: none !important; }
}

/* =====================================================================
   Phase 2 — Pivot section (3 product layers), flow chain & outcomes.
   These content sections use theme tokens so they adapt to light/dark.
   ===================================================================== */

/* Flow chain: Context -> Decisions -> Planning -> Production -> Optimization */
.flow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.flow-chain-step {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cntx-neutral-700);
  background: var(--cntx-surface);
  border: 1px solid var(--cntx-border);
  box-shadow: var(--shadow-xs);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .flow-chain-step {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e9ecff;
}

.flow-chain-arrow {
  color: var(--cntx-neutral-400);
  font-size: 13px;
  font-weight: 700;
}

/* 3 product-layer cards */
.layers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

.layer-card {
  position: relative;
  background: var(--cntx-surface);
  border: 1px solid var(--cntx-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.layer-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cntx-primary-strong), var(--cntx-secondary));
  opacity: 0.85;
}

.layer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .layer-card {
  background: rgba(12, 15, 34, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.layer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.layer-step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cntx-primary);
  background: var(--cntx-primary-soft);
  border: 1px solid #BFDBFE;
  flex: 0 0 auto;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .layer-step {
  background: rgba(124, 58, 237, 0.20);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: rgba(233, 236, 255, 0.92);
}

.layer-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cntx-neutral-500);
  transition: color 0.3s ease;
}

[data-theme="dark"] .layer-tag {
  color: rgba(168, 176, 216, 0.70);
}

.layer-card h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cntx-neutral-900);
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

/* Layer card mini-visuals (HTML/CSS/SVG — scoped like hero) */
.layer-visual-wrap {
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--cntx-border);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.10), transparent 55%),
    var(--cntx-bg);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .layer-visual-wrap {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(123, 60, 255, 0.18), transparent 55%),
    rgba(6, 8, 22, 0.92);
}

.cntx-layer-visual {
  --lv-purple: #7b3cff;
  --lv-purple-2: #b24dff;
  --lv-ink: var(--cntx-neutral-900);
  --lv-muted: var(--cntx-neutral-600);
  --lv-chip-bg: rgba(255, 255, 255, 0.88);
  --lv-chip-border: rgba(124, 58, 237, 0.18);
  --lv-card-bg: rgba(255, 255, 255, 0.72);
  position: relative;
  min-height: 168px;
  padding: 14px 12px 12px;
  overflow: hidden;
  isolation: isolate;
}

[data-theme="dark"] .cntx-layer-visual {
  --lv-ink: #e9ecff;
  --lv-muted: rgba(168, 176, 216, 0.78);
  --lv-chip-bg: rgba(14, 16, 37, 0.88);
  --lv-chip-border: rgba(181, 132, 255, 0.22);
  --lv-card-bg: rgba(14, 16, 37, 0.82);
}

.cntx-layer-visual .lv-scene-glow {
  position: absolute;
  inset: -30% -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(123, 60, 255, 0.14), transparent 48%),
    radial-gradient(ellipse at 80% 80%, rgba(178, 77, 255, 0.08), transparent 42%);
  opacity: 0.9;
}

/* —— Strategy: full SVG orbit hub —— */
.cntx-layer-visual--strategy {
  min-height: 196px;
  padding: 8px 6px 6px;
}

.cntx-layer-visual--strategy .lv-scene-glow {
  background:
    radial-gradient(ellipse at 50% 46%, rgba(123, 60, 255, 0.20), transparent 52%),
    radial-gradient(ellipse at 18% 82%, rgba(178, 77, 255, 0.08), transparent 40%);
}

.cntx-layer-visual--strategy .lv-strategy-scene {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.cntx-layer-visual--strategy .lv-strategy-ambient {
  pointer-events: none;
}

.cntx-layer-visual--strategy .lv-strategy-orbit {
  fill: none;
  stroke: rgba(178, 77, 255, 0.16);
  stroke-width: 1;
  stroke-dasharray: 4 10;
  transform-origin: 170px 98px;
}

.cntx-layer-visual--strategy .lv-strategy-orbit--outer {
  animation: cntxLvOrbitSpin 32s linear infinite;
}

.cntx-layer-visual--strategy .lv-strategy-orbit--inner {
  stroke: rgba(178, 77, 255, 0.10);
  stroke-dasharray: 2 8;
  animation: cntxLvOrbitSpin 24s linear infinite reverse;
}

.cntx-layer-visual--strategy .lv-strategy-glow-path {
  fill: none;
  stroke: rgba(178, 77, 255, 0.34);
  stroke-width: 4.5;
  stroke-linecap: round;
  opacity: 0.55;
}

.cntx-layer-visual--strategy .lv-strategy-line {
  fill: none;
  stroke: url(#cntxLvStratLine);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 4 7;
  animation: cntxLvDashIn 8s linear infinite;
}

.cntx-layer-visual--strategy .lv-strategy-line.lv-strategy-link--tc {
  stroke: #b24dff;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 5px rgba(178, 77, 255, 0.55));
}

.cntx-layer-visual--strategy .lv-strategy-glow-path.lv-strategy-link--tc {
  stroke: rgba(178, 77, 255, 0.55);
  stroke-width: 6;
  opacity: 0.65;
  filter: blur(2px);
}

.cntx-layer-visual--strategy .lv-strategy-links--tc {
  pointer-events: none;
}

.cntx-layer-visual--strategy .lv-strategy-flow-dot {
  fill: #fff;
  stroke: #b24dff;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 4px rgba(178, 77, 255, 0.85));
  opacity: 0.92;
}

.cntx-layer-visual--strategy .lv-strategy-chip-bg {
  fill: var(--lv-chip-bg);
  stroke: var(--lv-chip-border);
  stroke-width: 1;
}

.cntx-layer-visual--strategy .lv-strategy-chip-shine {
  fill: url(#cntxLvStratChip);
  stroke: none;
  opacity: 0.85;
  pointer-events: none;
}

.cntx-layer-visual--strategy .lv-strategy-chip-text {
  fill: var(--lv-ink);
  font-size: 10px;
  font-weight: 700;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-anchor: middle;
  letter-spacing: -0.02em;
}

.cntx-layer-visual--strategy .lv-strategy-hub {
  fill: url(#cntxLvStratHub);
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.2;
}

.cntx-layer-visual--strategy .lv-strategy-hub-text {
  fill: #fff;
  font-size: 13px;
  font-weight: 800;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-anchor: middle;
  letter-spacing: -0.03em;
}

.cntx-layer-visual--strategy .lv-strategy-hub-wrap {
  animation: cntxLvHubPulseSvg 4s ease-in-out infinite;
  transform-origin: 170px 98px;
  filter: drop-shadow(0 0 10px rgba(178, 77, 255, 0.4));
}

.cntx-layer-visual--strategy .lv-strategy-node--tl { animation: cntxLvFloatA 5s ease-in-out infinite; }
.cntx-layer-visual--strategy .lv-strategy-node--tr { animation: cntxLvFloatB 5.2s ease-in-out infinite; }
.cntx-layer-visual--strategy .lv-strategy-node--bl { animation: cntxLvFloatB 4.8s ease-in-out infinite 0.35s; }
.cntx-layer-visual--strategy .lv-strategy-node--br { animation: cntxLvFloatA 5.4s ease-in-out infinite 0.2s; }
.cntx-layer-visual--strategy .lv-strategy-node--tc { animation: cntxLvFloatCenterSvg 4.6s ease-in-out infinite 0.5s; }

@keyframes cntxLvOrbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes cntxLvHubPulseSvg {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.94; }
}

@keyframes cntxLvFloatCenterSvg {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

[data-theme="dark"] .cntx-layer-visual--strategy .lv-strategy-chip-bg {
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.32));
}

[data-theme="light"] .cntx-layer-visual--strategy .lv-strategy-glow-path {
  opacity: 0.42;
}

[data-theme="light"] .cntx-layer-visual--strategy .lv-strategy-orbit {
  stroke: rgba(124, 58, 237, 0.14);
}

/* —— Planning: kanban —— */
.cntx-layer-visual--planning .lv-kanban {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 148px;
}

.cntx-layer-visual--planning .lv-kanban-head {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lv-muted);
}

.cntx-layer-visual--planning .lv-kanban-card {
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid var(--lv-chip-border);
  background: var(--lv-card-bg);
  margin-bottom: 6px;
}

.cntx-layer-visual--planning .lv-kanban-card--idea {
  border-color: rgba(124, 58, 237, 0.22);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.10), var(--lv-card-bg));
}

.cntx-layer-visual--planning .lv-kanban-card--plan {
  border-color: rgba(59, 130, 246, 0.22);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.10), var(--lv-card-bg));
}

.cntx-layer-visual--planning .lv-kanban-card--brief {
  border-color: rgba(16, 185, 129, 0.22);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.10), var(--lv-card-bg));
}

.cntx-layer-visual--planning .lv-kanban-card--ghost { opacity: 0.55; }

.cntx-layer-visual--planning .lv-kanban-line {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.22);
  margin-top: 5px;
}

.cntx-layer-visual--planning .lv-kanban-line:first-child { margin-top: 0; }
.cntx-layer-visual--planning .lv-kanban-line--lg { width: 88%; background: rgba(124, 58, 237, 0.34); }
.cntx-layer-visual--planning .lv-kanban-line--sm { width: 52%; }

.cntx-layer-visual--planning .lv-kanban-card--plan .lv-kanban-line { background: rgba(59, 130, 246, 0.28); }
.cntx-layer-visual--planning .lv-kanban-card--plan .lv-kanban-line--lg { background: rgba(59, 130, 246, 0.40); }

.cntx-layer-visual--planning .lv-kanban-card--brief .lv-kanban-line { background: rgba(16, 185, 129, 0.30); }
.cntx-layer-visual--planning .lv-kanban-card--brief .lv-kanban-line--lg { background: rgba(16, 185, 129, 0.42); }

.cntx-layer-visual--planning .lv-kanban-pill {
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  color: rgba(59, 130, 246, 0.95);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.cntx-layer-visual--planning .lv-kanban-meta {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.cntx-layer-visual--planning .lv-kanban-meta span {
  flex: 1;
  height: 14px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.18);
  font-size: 0;
}

/* —— Intelligence: chart —— */
.cntx-layer-visual--intelligence {
  padding-bottom: 10px;
}

.cntx-layer-visual--intelligence .lv-chart {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.cntx-layer-visual--intelligence .lv-chart-area {
  fill: url(#cntxLvChartFill);
}

.cntx-layer-visual--intelligence .lv-chart-line {
  fill: none;
  stroke: url(#cntxLvChartLine);
  stroke-width: 2.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(123, 60, 255, 0.45));
}

.cntx-layer-visual--intelligence .lv-chart-dot {
  fill: #fff;
  stroke: var(--lv-purple);
  stroke-width: 2;
}

.cntx-layer-visual--intelligence .lv-chart-dot--active {
  fill: var(--lv-purple-2);
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgba(178, 77, 255, 0.65));
}

.cntx-layer-visual--intelligence .lv-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.cntx-layer-visual--intelligence .lv-metric {
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lv-muted);
  background: var(--lv-chip-bg);
  border: 1px solid var(--lv-chip-border);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes cntxLvDash {
  to { stroke-dashoffset: -48; }
}

/* Dash animation toward hub (paths run outside → inside) */
@keyframes cntxLvDashIn {
  to { stroke-dashoffset: 48; }
}

@keyframes cntxLvFloatA {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes cntxLvFloatB {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .cntx-layer-visual--strategy .lv-strategy-line,
  .cntx-layer-visual--strategy .lv-strategy-orbit,
  .cntx-layer-visual--strategy .lv-strategy-hub-wrap,
  .cntx-layer-visual--strategy .lv-strategy-node,
  .cntx-layer-visual--strategy .lv-strategy-flow-dot {
    animation: none !important;
    visibility: hidden;
  }
}

@media (min-width: 860px) {
  .cntx-layer-visual { min-height: 172px; }
  .cntx-layer-visual--strategy { min-height: 200px; }
  .cntx-layer-visual--strategy .lv-strategy-chip-text { font-size: 10.5px; }
  .cntx-layer-visual--intelligence .lv-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cntx-layer-visual--intelligence .lv-metric { font-size: 8.5px; }
}

[data-theme="dark"] .layer-card h3 { color: #e9ecff; }

.layer-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--cntx-neutral-600);
  transition: color 0.3s ease;
}

.layer-card-cta {
  margin-top: 14px;
}

.layer-card-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cntx-primary);
  transition: color 0.15s ease;
}

.layer-card-cta a:hover {
  color: var(--cntx-primary-strong);
}

.layer-card-cta i[data-lucide],
.layer-card-cta svg {
  width: 14px;
  height: 14px;
}

[data-theme="dark"] .layer-card p { color: rgba(168, 176, 216, 0.85); }

.approach-note { margin-top: 18px; }

/* Outcomes / proof */
.outcomes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.outcome-card {
  background: var(--cntx-surface);
  border: 1px solid var(--cntx-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.outcome-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .outcome-card {
  background: rgba(12, 15, 34, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.outcome-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cntx-primary-soft);
  border: 1px solid #BFDBFE;
  color: var(--cntx-primary);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .outcome-icon {
  background: rgba(124, 58, 237, 0.20);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: rgba(233, 236, 255, 0.92);
}

.outcome-card h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .outcome-card h3 { color: #e9ecff; }

.outcome-card p {
  font-size: 13px;
  color: var(--cntx-neutral-600);
  transition: color 0.3s ease;
}

[data-theme="dark"] .outcome-card p { color: rgba(168, 176, 216, 0.85); }

@media (min-width: 600px) {
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 860px) {
  .layers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .outcomes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
