/* Intelligence Hub — Redesign
   Scoped with np- prefix to avoid CMS collisions */

/* ========================================================================
   DESIGN TOKENS
   ======================================================================== */

.np-intelligence {
  --np-purple: #3C1361;
  --np-orange: #D97706;
  --np-cyan: #2BA89E;
  --np-white: #ffffff;
  --np-off-white: #F9F8FC;
  --np-light-gray: #F0EEF5;
  --np-border: #E5E1EF;
  --np-text-primary: #0F0B17;
  --np-text-secondary: #5C5470;
  --np-text-muted: #9B94AE;

  --np-font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --np-font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --np-radius-card: 12px;
  --np-radius-pill: 100px;
  --np-radius-cta: 8px;
}

/* ========================================================================
   PAGE FOUNDATION
   ======================================================================== */

.np-intelligence {
  background: var(--np-white);
  color: var(--np-text-primary);
  font-family: var(--np-font-primary);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.np-intelligence h1,
.np-intelligence h2,
.np-intelligence h3 {
  font-family: var(--np-font-primary);
  margin: 0;
  color: var(--np-text-primary);
}

.np-intelligence p {
  margin: 0;
}

.np-intelligence a,
.np-intelligence a:hover,
.np-intelligence a:focus,
.np-intelligence a:active {
  color: var(--np-text-primary);
  text-decoration: none;
  transition: none;
}

/* ========================================================================
   SCROLL REVEAL — IntersectionObserver driven
   ======================================================================== */

.np-reveal {
  opacity: 0;
  transform: translateY(20px);
}

.np-reveal.np-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .np-reveal {
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .np-reveal.np-delay-1 { transition-delay: 0.08s; }
  .np-reveal.np-delay-2 { transition-delay: 0.16s; }
  .np-reveal.np-delay-3 { transition-delay: 0.24s; }
  .np-reveal.np-delay-4 { transition-delay: 0.32s; }
  .np-reveal.np-delay-5 { transition-delay: 0.40s; }
  .np-reveal.np-delay-6 { transition-delay: 0.48s; }
  .np-reveal.np-delay-7 { transition-delay: 0.56s; }
}

@media (prefers-reduced-motion: reduce) {
  .np-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========================================================================
   HERO
   ======================================================================== */

.np-hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 48px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
  border-bottom: 1px solid var(--np-border);
  position: relative;
}

.np-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 48px;
  width: 64px;
  height: 2px;
  background: var(--np-orange);
}

.np-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--np-font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--np-cyan);
  margin-bottom: 20px;
}

.np-hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--np-cyan);
  flex-shrink: 0;
}

.np-hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 300;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--np-text-primary);
  margin: 0 0 20px;
}

.np-hero h1 em {
  color: var(--np-purple);
  font-style: normal;
}

.np-hero-description {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--np-text-secondary);
  margin: 0;
  max-width: 520px;
}

.np-hero-stat {
  text-align: right;
  flex-shrink: 0;
  padding: 20px 24px;
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-card);
  background: var(--np-off-white);
  position: relative;
  overflow: hidden;
}

.np-hero-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--np-purple), var(--np-cyan));
}

.np-hero-stat-number {
  font-size: 52px;
  font-weight: 200;
  letter-spacing: -3px;
  line-height: 1;
  color: var(--np-purple);
}

.np-hero-stat-label {
  font-family: var(--np-font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--np-text-muted);
  margin-top: 8px;
}

/* ========================================================================
   FILTER BAR
   ======================================================================== */

.np-filters {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.np-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.np-pill {
  font-family: var(--np-font-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--np-radius-pill);
  border: 1px solid var(--np-border);
  background: transparent;
  color: var(--np-text-secondary);
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .np-pill {
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }
}

.np-pill:hover {
  border-color: var(--np-purple);
  color: var(--np-purple);
}

.np-pill.np-active {
  background: var(--np-purple);
  border-color: var(--np-purple);
  color: var(--np-white);
  box-shadow: 0 2px 8px rgba(60, 19, 97, 0.25);
}

.np-search-wrapper {
  position: relative;
  width: 220px;
  flex-shrink: 0;
}

.np-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--np-text-muted);
  pointer-events: none;
}

.np-search {
  width: 100%;
  min-height: 40px;
  padding: 7px 14px 7px 38px;
  font-family: var(--np-font-primary);
  font-size: 14px;
  font-weight: 400;
  color: var(--np-text-primary);
  background: var(--np-light-gray);
  border: 1px solid transparent;
  border-radius: var(--np-radius-card);
  outline: none;
}

@media (prefers-reduced-motion: no-preference) {
  .np-search {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
}

.np-search::placeholder {
  color: var(--np-text-muted);
}

.np-search:focus {
  border-color: var(--np-purple);
  background: var(--np-white);
  box-shadow: 0 0 0 3px rgba(60, 19, 97, 0.08);
}

/* ========================================================================
   CONTENT AREA
   ======================================================================== */

.np-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

/* ========================================================================
   FEATURED ARTICLE
   ======================================================================== */

.np-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--np-radius-card);
  border: 1px solid var(--np-border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 48px;
}

@media (prefers-reduced-motion: no-preference) {
  .np-featured {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
}

.np-featured:hover {
  box-shadow: 0 20px 56px rgba(60, 19, 97, 0.14);
  border-color: rgba(60, 19, 97, 0.2);
}

.np-featured-visual {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background-color: var(--np-purple);
  background-size: cover;
  background-position: center;
}

@media (prefers-reduced-motion: no-preference) {
  .np-featured-visual {
    transition: transform 0.5s ease;
  }

  .np-featured:hover .np-featured-visual {
    transform: scale(1.02);
  }
}

.np-featured-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(60, 19, 97, 0.94) 0%, rgba(43, 168, 158, 0.30) 100%);
  z-index: 0;
}

.np-featured-visual .np-featured-tag {
  font-family: var(--np-font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--np-cyan);
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.np-featured-visual .np-featured-tag::before {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  background: var(--np-cyan);
}

.np-featured-visual .np-featured-title {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.3;
  color: #ffffff;
  margin: 0;
  position: relative;
  z-index: 1;
  letter-spacing: -0.5px;
}

.np-featured-visual .np-featured-meta {
  font-family: var(--np-font-mono);
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.np-featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--np-off-white);
}

.np-featured-latest {
  font-family: var(--np-font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--np-orange);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.np-featured-latest::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--np-orange);
  animation: np-pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .np-featured-latest::before {
    animation: none;
  }
}

@keyframes np-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.np-featured-excerpt {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--np-text-secondary);
  margin: 0;
  flex-grow: 1;
}

.np-featured-cta {
  font-family: var(--np-font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--np-purple);
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (prefers-reduced-motion: no-preference) {
  .np-featured-cta {
    transition: gap 0.2s ease;
  }

  .np-featured:hover .np-featured-cta {
    gap: 12px;
  }
}

/* ========================================================================
   SECTION LABELS
   ======================================================================== */

.np-section-label {
  font-family: var(--np-font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--np-text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.np-section-label::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  background: var(--np-border);
  max-width: 120px;
}

/* ========================================================================
   RECENT ARTICLES GRID
   ======================================================================== */

.np-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.np-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--np-radius-card);
  border: 1px solid var(--np-border);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  background: var(--np-white);
}

.np-card-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: var(--np-light-gray);
}

@media (prefers-reduced-motion: no-preference) {
  .np-card-image {
    transition: transform 0.4s ease;
  }
}

.np-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .np-card {
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
  }

  .np-card-title {
    transition: color 0.2s ease;
  }
}

.np-card:hover {
  box-shadow: 0 10px 32px rgba(60, 19, 97, 0.1);
  border-color: rgba(60, 19, 97, 0.18);
}

.np-card:hover .np-card-image {
  transform: scale(1.04);
}

.np-card:hover .np-card-title {
  color: var(--np-purple);
}

.np-card-tag {
  font-family: var(--np-font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--np-cyan);
  margin-bottom: 12px;
}

.np-card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.4;
  color: var(--np-text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--np-border);
  font-family: var(--np-font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--np-text-muted);
}

/* ========================================================================
   ARCHIVE LIST
   ======================================================================== */

.np-archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.np-archive-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--np-border);
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  position: relative;
}

.np-archive-item:first-child {
  border-top: 1px solid var(--np-border);
}

@media (prefers-reduced-motion: no-preference) {
  .np-archive-item {
    transition: background 0.2s ease, padding 0.2s ease;
  }

  .np-archive-title {
    transition: color 0.2s ease;
  }
}

.np-archive-item:hover {
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
  background: var(--np-off-white);
  border-radius: 6px;
}

.np-archive-item:hover + .np-archive-item {
  border-top: none;
}

.np-archive-item:hover .np-archive-title {
  color: var(--np-purple);
}

.np-archive-tag {
  font-family: var(--np-font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--np-cyan);
  min-width: 140px;
}

.np-archive-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--np-text-primary);
  line-height: 1.4;
}

.np-archive-meta {
  font-family: var(--np-font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--np-text-muted);
  white-space: nowrap;
}

/* ========================================================================
   NO RESULTS
   ======================================================================== */

.np-no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--np-text-secondary);
  display: none;
}

.np-no-results h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--np-text-primary);
}

.np-no-results p {
  font-size: 16px;
  margin: 0;
}

/* ========================================================================
   UTILITY
   ======================================================================== */

.np-hidden {
  display: none !important;
}

/* ========================================================================
   RESPONSIVE — <= 900px
   ======================================================================== */

@media (max-width: 900px) {

  /* Hero */
  .np-hero {
    grid-template-columns: 1fr;
    padding: 56px 20px 40px;
    gap: 28px;
  }

  .np-hero::after {
    left: 20px;
  }

  .np-hero-stat {
    text-align: left;
    padding: 16px 20px;
    display: inline-flex;
    flex-direction: column;
    align-self: flex-start;
  }

  .np-hero-stat-number {
    font-size: 40px;
    letter-spacing: -2px;
  }

  /* Filters */
  .np-filters {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 20px 0;
    gap: 12px;
  }

  .np-pills {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .np-pills::-webkit-scrollbar {
    display: none;
  }

  .np-pill {
    flex-shrink: 0;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12px;
  }

  .np-search-wrapper {
    width: 100%;
  }

  /* Content */
  .np-content {
    padding: 28px 20px 64px;
  }

  /* Featured */
  .np-featured {
    grid-template-columns: 1fr;
    margin-bottom: 36px;
  }

  .np-featured-visual {
    min-height: 220px;
    padding: 28px;
  }

  .np-featured-visual .np-featured-title {
    font-size: 22px;
  }

  .np-featured-body {
    padding: 28px;
  }

  /* Recent grid: 2 columns at tablet, 1 at very small */
  .np-recent-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 36px;
  }

  .np-card-image {
    height: 150px;
  }

  .np-card-body {
    padding: 16px 18px 20px;
  }

  .np-card-title {
    font-size: 15px;
  }

  /* Section labels */
  .np-section-label {
    margin-bottom: 16px;
  }

  /* Archive */
  .np-archive-item {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px 0;
  }

  .np-archive-item:hover {
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
  }

  .np-archive-tag {
    display: none;
  }

  .np-archive-title {
    font-size: 14px;
  }
}

@media (max-width: 540px) {
  .np-hero h1 {
    font-size: 28px;
    letter-spacing: -0.8px;
  }

  .np-recent-grid {
    grid-template-columns: 1fr;
  }

  .np-card-image {
    height: 160px;
  }

  .np-filters {
    padding: 16px 20px 0;
  }
}
