/* ============ WHY CHOOSE US (#why, index 05) ============ */

/* ── Section shell ────────────────────────────────────── */
#why {
  background: var(--bg-1);
  isolation: isolate;
  overflow: hidden;
}

/* ── Ambient decoration ────────────────────────────────── */
#why .why__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  z-index: 0;
}

#why .why__glow--a {
  width: clamp(320px, 45vw, 560px);
  aspect-ratio: 1;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.35;
}

#why .why__glow--b {
  width: clamp(260px, 36vw, 440px);
  aspect-ratio: 1;
  bottom: 5%;
  right: -8%;
  background: radial-gradient(circle, var(--violet-glow) 0%, transparent 72%);
  opacity: 0.28;
}

/* Subtle dot-grid backdrop */
#why .why__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--line-faint) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 0%, transparent 80%);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* ── Container z-stacking above decoration ─────────────── */
#why .container {
  position: relative;
  z-index: 1;
}

/* ── Section head ──────────────────────────────────────── */
#why .why__title {
  font-size: var(--fs-h2);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-top: var(--space-4);
  margin-bottom: var(--space-5);
}

#why .why__lead {
  font-size: var(--fs-lead);
  color: var(--text-dim);
  max-width: 54ch;
  line-height: 1.6;
}

/* ── Differentiators grid ──────────────────────────────── */
#why .why__grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

/* Individual card */
#why .why__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition:
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
  cursor: default;
}

#why .why__card:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
  transform: translateY(-4px);
}

/* Subtle top-edge highlight that brightens on hover */
#why .why__card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

#why .why__card:hover::before {
  opacity: 1;
}

/* Icon container */
#why .why__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-bright);
  flex-shrink: 0;
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

#why .why__card:hover .why__card-icon {
  background: rgba(61, 123, 255, 0.22);
  box-shadow: 0 0 20px var(--accent-soft);
}

#why .why__card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

#why .why__card-title {
  font-family: var(--font-sans);
  font-size: var(--fs-h4);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

#why .why__card-desc {
  font-size: var(--fs-body);
  color: var(--text-dim);
  line-height: 1.6;
}

/* Animated corner accent (purely decorative) */
#why .why__card-accent {
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}

#why .why__card:hover .why__card-accent {
  opacity: 1;
}

/* ── Stats band ─────────────────────────────────────────── */
#why .why__stats {
  position: relative;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* Vivid accent line across the top of the band */
#why .why__stats::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent-bright) 60%, transparent 100%);
}

#why .why__stats-eyebrow {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* Row of 4 counters */
#why .why__stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

/* Individual stat */
#why .why__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block: var(--space-4);
  position: relative;
}

/* Vertical separator between stats (except last) */
#why .why__stat + .why__stat::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 1px;
  background: var(--line);
}

/* The big number */
#why .why__stat-number {
  display: flex;
  align-items: baseline;
  gap: 0.05em;
  font-size: clamp(2.75rem, 5.5vw, 5rem);
  line-height: 1;
  color: var(--text);
  padding-inline-start: clamp(0rem, 2vw, 1rem);
}

#why .why__stat-suffix {
  font-family: var(--font-display);
  font-size: 0.55em;
  color: var(--accent-bright);
  letter-spacing: 0;
  line-height: 1;
}

/* Mono label under number */
#why .why__stat-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.4;
  padding-inline-start: clamp(0rem, 2vw, 1rem);
}

/* ── Responsive ─────────────────────────────────────────── */

/* 5-card grid: at 768 keep 2 cols + centre the 5th */
@media (min-width: 640px) and (max-width: 1023px) {
  #why .why__grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Span the 5th card full width or center it */
  #why .why__grid-cards > li:last-child {
    grid-column: 1 / -1;
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }
}

/* At wide: force all 5 in one row (they fit because minmax starts at 200px) */
@media (min-width: 1024px) {
  #why .why__grid-cards {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Stats: 2×2 on tablet */
@media (max-width: 767px) {
  #why .why__stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  #why .why__stat {
    padding: var(--space-5) var(--space-4);
  }

  /* Horizontal separator between top and bottom rows */
  #why .why__stat:nth-child(3),
  #why .why__stat:nth-child(4) {
    border-block-start: 1px solid var(--line);
  }

  /* Remove vertical separator from 3rd item (starts new row) */
  #why .why__stat:nth-child(3)::before {
    display: none;
  }
}

/* Mobile: single column cards + stacked stats */
@media (max-width: 479px) {
  #why .why__grid-cards {
    grid-template-columns: 1fr;
  }

  #why .why__grid-cards > li:last-child {
    grid-column: auto;
    max-width: none;
    margin-inline: 0;
  }

  #why .why__stats-row {
    grid-template-columns: 1fr 1fr;
  }

  #why .why__stat-number {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }
}
