/* Hover-expand company advantage accordion */
.why-section {
  padding: 104px clamp(20px, 8.3vw, 128px) 112px;
  background: #fff;
}

.why-heading {
  text-align: center;
  margin-bottom: 46px;
}

.why-heading .eyebrow {
  margin-bottom: 12px;
  color: #587bb5;
}

.why-heading h2 {
  margin: 0;
  font-size: clamp(40px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -.07em;
}

.why-accordion {
  height: 710px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.why-card {
  position: relative;
  min-height: 0;
  flex: 1 1 0;
  overflow: hidden;
  border-radius: 18px;
  background-position: center;
  background-size: cover;
  outline: 0;
  cursor: default;
  will-change: flex-grow;
  transform: translateZ(0);
  transition: flex-grow .62s cubic-bezier(.22, 1, .36, 1), box-shadow .42s ease;
}

.why-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 247, 247, .96);
  transition: background .35s ease;
}

.why-card-copy {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 29px 56px;
  color: #6f7174;
  transition: color .35s ease;
}

.why-card-copy span {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  color: #9db9e4;
  font: 10px var(--mono);
  letter-spacing: .1em;
  transition: max-height .35s ease, opacity .25s ease, margin .35s ease;
}

.why-card h3 {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.why-card-copy p {
  max-width: 610px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  margin: 0;
  color: #d5dbe4;
  font-size: 14px;
  line-height: 1.75;
  transition: max-height .35s ease, opacity .25s ease, transform .35s ease, margin .35s ease;
}

.why-portfolio { background-image: url("./assets/hearit-ai/why-experience/product-portfolio.jpg?v=20260908e"); background-position: center; }
.why-odm { background-image: url("./assets/hearit-ai/why-experience/development-experience.jpg?v=20260908c"); background-position: center; }
.why-ai { background-image: url("./assets/hearit-ai/why-experience/connected-ai-engineering.jpg?v=20260908c"); background-position: center; }
.why-quality { background-image: url("./assets/hearit-ai/why-experience/oem-odm-scale.jpg?v=20260908c"); background-position: center; }

.why-card.is-active {
  flex-grow: 2.3;
  box-shadow: 0 18px 42px rgba(24, 43, 70, .12);
}

.why-card.is-active::after {
  background: linear-gradient(90deg, rgba(5, 10, 19, .92), rgba(8, 18, 34, .72) 48%, rgba(7, 14, 25, .2));
}

.why-card.is-active .why-card-copy { color: #fff; }
.why-card.is-active .why-card-copy span { max-height: 20px; opacity: 1; margin-bottom: 17px; }
.why-card.is-active .why-card-copy p { max-height: 90px; opacity: 1; transform: none; margin-top: 17px; }

@media (max-width: 800px) {
  .why-section { padding: 72px 20px 78px; }
  .why-heading { margin-bottom: 30px; }
  .why-heading h2 { font-size: 38px; }
  .why-accordion { height: auto; gap: 10px; }
  .why-card { flex: none; min-height: 104px; border-radius: 13px; }
  .why-card.is-active { min-height: 235px; }
  .why-card-copy { padding: 22px 20px; }
  .why-card h3 { font-size: 22px; }
  .why-card-copy p { font-size: 12px; }
}
