/* ==========================================================================
   05 Why Choose Us — benefits grid + comparison table
   ========================================================================== */

/* Benefits grid ---------------------------------------------------------- */
.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.why__item { display: flex; }

.why__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 60%),
    var(--surface);
}

.why__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.why__card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.22) 0%, rgba(124, 92, 255, 0) 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.why__card:hover::before,
.why__card:hover::after { opacity: 1; }

.why__icon {
  margin-bottom: var(--space-5);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.why__card:hover .why__icon { transform: scale(1.06); color: var(--text); }

.why__card-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.why__card-text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.why__metric {
  margin-top: auto;
  align-self: flex-start;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--secondary);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-full);
}

/* Comparison ------------------------------------------------------------- */
.why__compare {
  max-width: 960px;
  margin-inline: auto;
}

.why__compare-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-6);
}

.why__compare-vs {
  display: inline-block;
  margin-inline: var(--space-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.why__compare-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 255, 0.5) transparent;
}

.why__compare-inner {
  position: relative;
  min-width: 600px;
  padding: var(--space-4);
}

/* Highlighted "us" column: gradient border + soft glow, sits behind the table */
.why__compare-highlight {
  position: absolute;
  top: var(--space-2);
  bottom: var(--space-2);
  right: var(--space-4);
  width: calc((100% - 2 * var(--space-4)) * 0.36);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.16) 0%, rgba(34, 211, 238, 0.06) 100%);
  box-shadow: 0 0 40px rgba(124, 92, 255, 0.22);
  pointer-events: none;
}

.why__compare-highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.why__table {
  position: relative;
  z-index: 1;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.why__col--label { width: 34%; }
.why__col--them { width: 30%; }
.why__col--us { width: 36%; }

.why__th {
  padding: var(--space-4) var(--space-4) var(--space-5);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  vertical-align: bottom;
}

.why__th--label { color: var(--text-dim); }
.why__th--them { color: var(--text-dim); }

.why__th--us {
  font-size: var(--fs-base);
  letter-spacing: -0.01em;
  text-transform: none;
}

.why__us-name {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.why__cell {
  padding: var(--space-4);
  text-align: left;
  vertical-align: middle;
  border-top: 1px solid var(--border);
}

.why__row:first-child .why__cell { border-top-color: var(--border-strong); }

.why__cell--label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text);
}

.why__cell--them { color: var(--text-dim); }

.why__cell--us {
  font-weight: 600;
  color: var(--text);
  border-top-color: rgba(124, 92, 255, 0.18);
}

.why__row:hover .why__cell--label,
.why__row:hover .why__cell--them { background: rgba(255, 255, 255, 0.02); }

.why__cell-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.why__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.why__mark svg { width: 14px; height: 14px; }

.why__mark--cross {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.why__mark--check {
  color: var(--text);
  background: var(--gradient);
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.35);
}

.why__mark--check svg { stroke-width: 2.6; }

/* Responsive ------------------------------------------------------------- */
/* Below 720px the table becomes stacked cards, so both answers stay visible
   without sideways scrolling. Cell labels come from data-label. */
@media (max-width: 719px) {
  .why__compare-scroll { overflow: visible; background: none; border: 0; }
  .why__compare-inner { min-width: 0; padding: 0; }
  .why__compare-highlight,
  .why__table colgroup,
  .why__table thead { display: none; }

  .why__table,
  .why__table tbody,
  .why__row,
  .why__cell { display: block; width: auto; }

  .why__row {
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
  .why__row + .why__row { margin-top: var(--space-3); }

  .why__cell { padding: 0; border: 0; }
  .why__row:hover .why__cell--label,
  .why__row:hover .why__cell--them { background: none; }

  .why__cell--label { margin-bottom: var(--space-4); font-size: var(--fs-base); }

  .why__cell--them::before,
  .why__cell--us::before {
    content: attr(data-label);
    display: block;
    margin-bottom: var(--space-2);
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .why__cell--us {
    margin-top: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(124, 92, 255, 0.4);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.16) 0%, rgba(34, 211, 238, 0.06) 100%);
  }
  .why__cell--us::before { color: var(--secondary); }
}

@media (min-width: 640px) {
  .why__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .why__compare-inner { padding: var(--space-5) var(--space-5) var(--space-4); }
  .why__compare-highlight {
    top: var(--space-3);
    bottom: var(--space-3);
    right: var(--space-5);
    width: calc((100% - 2 * var(--space-5)) * 0.36);
  }
  .why__cell,
  .why__th { padding-inline: var(--space-5); }
}

@media (min-width: 1024px) {
  .why__grid { grid-template-columns: repeat(4, 1fr); }
}
