/* =================== hc-why.css =================== */
/* "Качество в каждой детали" — 4 feature cards.
 * Sprint46:
 *  - визуальная синхронизация с hero stats: serif заголовок, gold accent,
 *    mono подпись (один tone-of-voice с hero block);
 *  - premium hover-fx: lift + gold halo + animated orbs + icon scale;
 *  - prefers-reduced-motion respected.
 * Strictly .hc-why__* / no overrides.
 */

.hc-why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--hc-sp-3);
}

.hc-why__card {
  position: relative;
  padding: var(--hc-sp-5);
  background: var(--hc-paper);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-r-md);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.32s cubic-bezier(0.2, 0.84, 0.3, 1),
    border-color 0.32s ease,
    box-shadow 0.42s cubic-bezier(0.2, 0.84, 0.3, 1);
}

/* Floating gold orbs — appear on hover */
.hc-why__card::before,
.hc-why__card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.42s ease, transform 0.6s cubic-bezier(0.2, 0.84, 0.3, 1);
}
.hc-why__card::before {
  top: -28px;
  right: -28px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(212, 184, 150, 0.42), transparent 65%);
}
.hc-why__card::after {
  bottom: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(184, 154, 111, 0.28), transparent 65%);
}

.hc-why__card:hover {
  transform: translateY(-3px);
  border-color: var(--hc-gold-border, rgba(212, 184, 150, 0.55));
  box-shadow:
    0 18px 38px -16px rgba(184, 154, 111, 0.34),
    0 2px 4px rgba(0, 0, 0, 0.06);
}
.hc-why__card:hover::before {
  opacity: 1;
  transform: translate(-6px, 6px) scale(1.05);
}
.hc-why__card:hover::after {
  opacity: 1;
  transform: translate(6px, -6px) scale(1.08);
}

/* Numbered eyebrow — matches hero stats' mono caption style */
.hc-why__num {
  font-family: var(--hc-mono);
  font-size: var(--hc-fs-xxs);
  color: var(--hc-accent);
  letter-spacing: var(--hc-ls-wide);
}

/* Icon container — gold-soft tile with mask icon */
.hc-why__ico {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 184, 150, 0.32), rgba(141, 109, 71, 0.18));
  border: 1px solid rgba(141, 109, 71, 0.22);
  position: relative;
  margin: var(--hc-sp-2) 0 var(--hc-sp-3);
  transition: transform 0.42s cubic-bezier(0.2, 0.84, 0.3, 1), background 0.32s ease;
}
.hc-why__ico > * {
  display: none;
}
.hc-why__ico::after {
  content: "";
  width: 26px;
  height: 26px;
  background: var(--hc-ink, #1a1714);
  -webkit-mask: var(--hc-why-icon) center/contain no-repeat;
          mask: var(--hc-why-icon) center/contain no-repeat;
  transition: background 0.32s ease, transform 0.42s cubic-bezier(0.2, 0.84, 0.3, 1);
}
.hc-why__card:hover .hc-why__ico {
  transform: scale(1.08) rotate(-3deg);
  background: linear-gradient(135deg, var(--hc-gold, #d4b896), rgba(141, 109, 71, 0.42));
}
.hc-why__card:hover .hc-why__ico::after {
  background: var(--hc-accent-dark, #7a6548);
  transform: scale(1.06);
}

/* Title — serif for visual harmony with hero stats `hc-hero__stat-num` */
.hc-why__title {
  font-family: var(--hc-serif, "Cormorant Garamond", "Playfair Display", Georgia, serif);
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--hc-sp-2);
  color: var(--hc-ink, #1a1714);
  transition: color 0.22s ease;
}
.hc-why__card:hover .hc-why__title {
  color: var(--hc-accent-dark, #7a6548);
}

.hc-why__desc {
  font-size: var(--hc-fs-sm);
  color: var(--hc-ink-soft);
  line-height: 1.55;
}

.hc-why__spec {
  margin-top: var(--hc-sp-3);
  padding-top: var(--hc-sp-2);
  border-top: 1px solid var(--hc-line);
  font-family: var(--hc-mono);
  font-size: var(--hc-fs-xxs);
  color: var(--hc-ink-mid);
  letter-spacing: 0.04em;
}

/* Per-card icon mask (re-used from previous Sprint37 set) */
.hc-why__card:nth-child(1) .hc-why__ico {
  --hc-why-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2v4M12 18v4M2 12h4M18 12h4M5 5l3 3M16 16l3 3M5 19l3-3M16 8l3-3'/><circle cx='12' cy='12' r='4'/></svg>");
}
.hc-why__card:nth-child(2) .hc-why__ico {
  --hc-why-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12h4l3-9 4 18 3-9h6'/></svg>");
}
.hc-why__card:nth-child(3) .hc-why__ico {
  --hc-why-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6l9-4 9 4-9 4-9-4z'/><path d='M3 12l9 4 9-4M3 18l9 4 9-4'/></svg>");
}
.hc-why__card:nth-child(4) .hc-why__ico {
  --hc-why-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M9 12l2 2 4-4M12 2l3 3 4-1-1 4 3 3-3 3 1 4-4-1-3 3-3-3-4 1 1-4-3-3 3-3-1-4 4 1z'/></svg>");
}

/* Stagger orb appearance per card index — subtle delay differentiates them */
.hc-why__card:nth-child(1)::before { transition-delay: 0ms; }
.hc-why__card:nth-child(2)::before { transition-delay: 60ms; }
.hc-why__card:nth-child(3)::before { transition-delay: 120ms; }
.hc-why__card:nth-child(4)::before { transition-delay: 180ms; }

/* Mobile compact */
@media (max-width: 1024px) {
  .hc-why__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .hc-why__grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hc-why__card,
  .hc-why__card::before,
  .hc-why__card::after,
  .hc-why__ico,
  .hc-why__ico::after,
  .hc-why__title {
    transition: none !important;
  }
  .hc-why__card:hover {
    transform: none;
  }
  .hc-why__card:hover .hc-why__ico {
    transform: none;
  }
}
