/* ============== NINJAX UI (No Bootstrap clashes) ============== */
.nx,
.nx * { box-sizing: border-box; }

/* Theme — tuned for light grey page bg */
.nx {
  --nx-purple: #6d28d9;
  --nx-purple-600: #5b21b6;
  --nx-purple-700: #4c1d95;  /* gradient start */
  --nx-blue-600: #2563eb;    /* gradient end */

  --nx-text: #101114;
  --nx-muted: #2b2d31;
  --nx-soft: #6b7280;

  --nx-card-bg: rgba(109, 40, 217, 0.10);      /* slightly lighter for grey bg */
  --nx-stroke: rgba(109, 40, 217, 0.20);

  --nx-page-bg: #f5f6f9; /* “whitey grey” */
  color: var(--nx-text);
}

/* Optional: if you want this section itself to set a soft grey panel */
.nx--panel {
  background: var(--nx-page-bg);
  border-radius: 16px;
}

/* Layout */
.nx-container {
  width: min(1200px, 100%);
  margin-inline: auto;
  padding: 48px 16px 96px;
  text-align: center;
}

/* ===== Header: improved heading + slogan ===== */
.nx-section-header { margin-bottom: 32px; }

.nx-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--nx-purple-600);
  background: rgba(109, 40, 217, .08);
  border: 1px solid rgba(109, 40, 217, .20);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.nx-title {
  font-weight: 900;
  line-height: 1.3;
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.02em;

  background: linear-gradient(135deg, var(--nx-purple-700), var(--nx-blue-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nx-header-accent {
  width: 110px;
  height: 4px;
  margin: 14px auto 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nx-purple-700), var(--nx-blue-600));
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.nx-slogan {
  margin: 0;
  max-width: 60ch;
  margin-inline: auto;
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.6;
  color: var(--nx-soft);
}

/* Grid (no Bootstrap) */
.nx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 42px;
}
@media (max-width: 992px) { .nx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .nx-grid { grid-template-columns: 1fr; } }

/* Card */
.nx-card {
  background: var(--nx-card-bg);
  border: 1px solid var(--nx-stroke);
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  padding: 30px;
  min-height: 360px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;

  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
  will-change: transform;

  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
}
.nx-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  background-image: linear-gradient(135deg, var(--nx-purple-700) 0%, var(--nx-blue-600) 100%);
  border-color: rgba(37, 99, 235, 0.45);
  animation: nx-pin-in 160ms ease-out both;
}

/* Icon + text */
.nx-card-icon {
  font-size: 50px;
  color: var(--nx-purple);
  margin-bottom: 15px;
  transition: color 200ms ease, transform 200ms ease, filter 200ms ease;
}
.nx-card:hover .nx-card-icon {
  color: #fff;
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.nx-card-title {
  font-weight: 800;
  color: var(--nx-text);
  margin: 10px 0 16px;
  letter-spacing: -0.01em;
}
.nx-card-text {
  color: var(--nx-muted);
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
  margin: 0 0 24px;
  max-width: 58ch;
}
/* Keep text readable on hover */
.nx-card:hover .nx-card-title,
.nx-card:hover .nx-card-text { color: #fff; }

/* ===== Buttons: very visible hover on light-grey backgrounds ===== */
.nx-btn {
  position: relative;
  display: inline-block;
  color: #fff;
  background: linear-gradient(135deg, var(--nx-purple-600), var(--nx-purple));
  border: 2px solid rgba(0,0,0,0);                 /* stable layout; will turn white on hover */
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 150ms ease,
    box-shadow 180ms ease,
    filter 150ms ease;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  overflow: hidden; /* sheen */
  margin-top: auto;
  align-self: center;
}

/* Sheen highlight (pure CSS) */
.nx-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120px 40px at 10% 0%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(140px 50px at 90% 100%, rgba(255,255,255,0.18), transparent 60%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.nx-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--nx-purple-700) 0%, var(--nx-blue-600) 100%);
  border-color: #fff; /* crisp edge so it pops on grey */
  box-shadow:
    0 10px 28px rgba(37, 99, 235, 0.45),
    0 2px 8px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transform: translateY(-2px);
  filter: brightness(1.03) saturate(1.05);
  animation: nx-pin-in 140ms ease-out both;
}
.nx-btn:hover::after { opacity: 0.6; }

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

/* Focus (keyboard a11y) */
.nx-card:focus-visible,
.nx-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.35),
    0 10px 24px rgba(37, 99, 235, 0.35);
}

/* Pin-in micro animation */
@keyframes nx-pin-in {
  0%   { transform: scale(0.985) translateY(-6px); opacity: 0.96; }
  60%  { transform: scale(1.012) translateY(-8px); opacity: 1; }
  100% { transform: scale(1) translateY(-8px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nx-card,
  .nx-card:hover,
  .nx-card-icon,
  .nx-btn,
  .nx-btn:hover {
    transition: none;
    animation: none;
    transform: none;
  }
}
