/* ==========================================================================
   METRIX LAB - why.css
   Section: "Why Choose Us" (#why) - 3-column animated grid.
   All rules scoped under #why to avoid cross-section collisions.
   Uses contract tokens/components; no hardcoded colors that have a token.
   ========================================================================== */

#why {
  overflow: hidden; /* clip the parallax glow */
}

/* Decorative parallax glow behind the grid */
#why .why__glow {
  position: absolute;
  top: 12%;
  left: 50%;
  width: clamp(20rem, 60vw, 46rem);
  height: clamp(20rem, 60vw, 46rem);
  transform: translateX(-50%);
  background: radial-gradient(circle at center, var(--color-accent-tint), transparent 68%);
  filter: blur(12px);
  pointer-events: none;
  z-index: var(--z-decor);
}

#why .container {
  position: relative;
  z-index: var(--z-content);
}

/* Grid spacing + spec'd 1 -> 3 reflow.
   Override the generic .grid--3 (which inserts a 2-col stage at 640px and would
   orphan the 3rd of exactly 3 cards on tablets). Here we go single-column on
   mobile straight to three columns at the tablet breakpoint. */
#why .why__grid {
  margin-top: var(--space-2xl);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  #why .why__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Card layout: keep icon -> title -> text vertically anchored,
   reserve the corner for the index number. */
#why .why__card {
  align-items: flex-start;
}

/* Faint oversized index numeral in the top-right corner */
#why .why__index {
  position: absolute;
  top: var(--space-md);
  right: var(--space-lg);
  z-index: 1;
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--tracking-tighter);
  color: var(--color-text-faint);
  opacity: 0.5;
  transition: color var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

/* On hover, the index picks up the accent to reinforce the glow reveal */
#why .why__card:hover .why__index {
  color: var(--color-accent-soft);
  opacity: 0.9;
}

/* Icon box gets a gentle float lift on hover (transform-only, GPU friendly) */
#why .why__card .card__icon {
  transition:
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
#why .why__card:hover .card__icon {
  transform: translateY(-3px);
}

/* Keep title + body tightly readable within the card */
#why .why__card .card__title {
  margin-top: var(--space-2xs);
}
#why .why__card .card__text {
  max-width: 34ch;
}

/* --- Reduced motion: disable decorative + hover transforms --- */
@media (prefers-reduced-motion: reduce) {
  #why .why__card:hover .card__icon,
  #why .why__card .card__icon {
    transform: none;
  }
  #why .why__glow {
    filter: blur(12px); /* keep static, no motion */
  }
}
