/* Feature grid: two wide cards on top, three regular cards below. */

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

.feature {
  min-width: 0;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 30px);
  background: var(--nx-white);
  border: 1px solid var(--nx-bone-3);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -26px rgba(14, 28, 42, .55);
}

.feature--wide {
  grid-column: span 2;
  gap: 14px;
  padding: clamp(24px, 3vw, 34px);
}

.feature--accent {
  border-color: var(--nx-billing);
}

.feature--accent:hover {
  box-shadow: 0 18px 40px -26px rgba(16, 185, 129, .4);
}

.feature--ink {
  background: var(--nx-ink);
  border: none;
  position: relative;
  overflow: hidden;
}

.feature--ink:hover {
  box-shadow: none;
}

.feature__icon {
  --icon-size: 24px;
  color: var(--nx-ink);
}

.feature--wide .feature__icon {
  --icon-size: 26px;
}

.feature__sparkle-icon {
  width: 22px;
  height: 22px;
}

.feature__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.feature--wide .feature__title {
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -.02em;
}

.feature--ink .feature__title {
  color: var(--nx-white);
}

.feature__text {
  color: var(--nx-600);
  font-size: 14.5px;
  line-height: 1.6;
}

.feature--wide .feature__text {
  font-size: 15.5px;
  max-width: 56ch;
}

.feature--ink .feature__text {
  color: var(--nx-400);
  max-width: 52ch;
}

/* RUC chips */

.feature__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.feature__chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--nx-700);
  background: var(--nx-100);
  border: 1px solid var(--nx-200);
  padding: 6px 10px;
  border-radius: var(--r-pill);
}

.feature__chip--more {
  color: var(--nx-white);
  background: var(--nx-ink);
  border: none;
}

/* Document type pills */

.feature__doctypes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr));
  gap: 8px;
  margin-top: auto;
}

.feature__doctype {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--nx-100);
  color: var(--nx-700);
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 11px;
  border-radius: var(--r-pill);
}

.feature__doctype .icon {
  --icon-size: 13px;
}

/* RIMPE meters inside the dark card */

.feature__meters {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--nx-ink-2);
  border: 1px solid var(--nx-ink-3);
  border-radius: 12px;
  padding: 16px;
}

.feature__meter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature__meter-name {
  font-size: 12.5px;
  color: var(--nx-200);
  width: 96px;
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature__meter-track {
  flex: 1;
  height: 6px;
  background: var(--nx-ink-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.feature__meter-fill {
  height: 100%;
  background: var(--nx-success);
}

.feature__meter-fill--warning {
  background: var(--nx-warning);
}

.feature__meter-fill--danger {
  background: var(--nx-danger);
}

.feature__meter-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--nx-400);
  width: 32px;
  text-align: right;
}

/* A span-2 item forces auto-fit to create a second track, which would
 * overflow once two 280px tracks no longer fit. Below that, span one. */
@media (max-width: 640px) {
  .feature--wide {
    grid-column: auto;
  }
}
