/* ============================================================
   WHY KONSALTA — six cards (drop-in block)
   Scoped: .why-block / .wc-*
   Uses site tokens: --navy --orange --cream --white --ink-soft
   --r-lg --fs-* --section-pad
   Add .why-block--on-navy when the parent section has a navy background.
   ============================================================ */

.why-block {
  /* self-contained: these tokens exist on the About page but not on why-us.css */
  --cream: #f6f3ee;
  --bg: #efede8;
  --fs-xs: 0.75rem;
  --fs-sm: 0.9375rem;
  --fs-lg: 1.25rem;
  --wc-gap: clamp(16px, 2vw, 24px);
  --wc-cut: 28px; /* clipped corner, echoes the slanted shapes elsewhere */
  --wc-bg: var(--white);
  --wc-ink: var(--navy);
  --wc-muted: var(--ink-soft);
  --wc-hover-bg: var(--navy);
  --wc-hover-ink: var(--cream);
  --wc-hover-muted: rgba(246, 243, 238, 0.86);
  width: 100%;
}

/* Inside the unified glass section — cards adopt glass surfaces */
.why-unified-section .wc-card {
  --wc-bg: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(
      ellipse 60% 60% at 20% 0%,
      rgba(242, 101, 34, 0.06),
      transparent 55%
    ),
    radial-gradient(
      ellipse 50% 50% at 80% 100%,
      rgba(11, 45, 83, 0.06),
      transparent 55%
    ),
    var(--bg);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 25px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 16px rgba(11, 45, 83, 0.06);
}
.why-unified-section .wc-item:hover .wc-card {
  background: var(--navy);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: var(--orange);
}
.why-block--on-navy {
  --wc-bg: var(--cream);
  --wc-hover-bg: var(--white);
  --wc-hover-ink: var(--navy);
  --wc-hover-muted: var(--ink-soft);
}

.why-block .section-head {
  margin-bottom: clamp(24px, 3vw, 40px);
}
.why-block--on-navy .section-title {
  color: var(--cream);
}

/* ---------- Grid ---------- */
.wc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wc-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .wc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .wc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* The shadow lives on the wrapper because clip-path would cut it off */
.wc-item {
  display: flex;
  filter: drop-shadow(0 6px 16px rgba(11, 45, 83, 0.09));
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
}
.wc-item:hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 14px 26px rgba(11, 45, 83, 0.18));
}

/* ---------- Card ---------- */
.wc-card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 240px;
  padding: clamp(22px, 2.4vw, 32px);
  padding-bottom: calc(clamp(22px, 2.4vw, 32px) + 6px);
  overflow: hidden;
  background: var(--wc-bg);
  color: var(--wc-ink);
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--wc-cut)),
    calc(100% - var(--wc-cut)) 100%,
    0 100%
  );
  transition:
    background 0.4s ease,
    color 0.4s ease;
}
.wc-item:hover .wc-card {
  background: var(--wc-hover-bg);
  color: var(--wc-hover-ink);
}

/* cursor-follow highlight (hover devices only, set by JS) */
.wc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    260px circle at var(--mx) var(--my),
    rgba(242, 101, 34, 0.18),
    transparent 70%
  );
  transition: opacity 0.4s ease;
}
.wc-item:hover .wc-card::before {
  opacity: 1;
}
.why-unified-section {
  border-radius: 25px;
  /* Was 130px fixed — kills layout on tablet/mobile */
  margin-inline: clamp(0px, 8vw, 80px);
}

/* orange rule that draws across the bottom on hover */
.wc-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--orange);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.wc-item:hover .wc-card::after {
  transform: scaleX(1);
}

.wc-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.wc-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  transition:
    background 0.4s ease,
    color 0.4s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.wc-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wc-item:hover .wc-icon {
  background: var(--orange);
  color: var(--white);
  transform: rotate(-8deg) scale(1.06);
}
.why-block--on-navy .wc-icon {
  background: var(--navy);
}

.wc-num {
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.wc-title {
  font-family: "Manrope", system-ui, sans-serif;
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: inherit;
}
.wc-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--wc-muted);
  transition: color 0.4s ease;
}
.wc-item:hover .wc-text {
  color: var(--wc-hover-muted);
}

/* touch devices have no hover: keep cards calm and readable */
@media (hover: none) {
  .wc-item:hover {
    transform: none;
  }
}

/* Reduce clip-path cut on small screens so cards don't look cropped */
@media (max-width: 480px) {
  .why-block {
    --wc-cut: 18px;
  }
  .why-unified-section {
    border-radius: 16px;
    margin-inline: 0;
  }
}

@media (max-width: 320px) {
  .why-block {
    --wc-cut: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wc-item,
  .wc-card,
  .wc-card::after,
  .wc-icon {
    transition: none;
  }
}
