/* ============================================================
   WHY IT WINS · Strategic value cards section
   Requires: base.css, post-wf.css (for .an-rise)
   ============================================================ */

.why {
  position: relative; z-index: 2; overflow: hidden;
  background: linear-gradient(180deg, #eef3fb 0%, #ffffff 60%);
  padding: clamp(84px, 12vh, 144px) 0 clamp(92px, 14vh, 156px);
}
.why::before {
  content: ''; position: absolute; left: 50%; top: -8%; transform: translateX(-50%);
  width: 900px; height: 520px; max-width: 96vw; z-index: 0; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(0,212,255,0.12), transparent 70%),
    radial-gradient(closest-side, rgba(255,0,110,0.08), transparent 72%);
  /* almost-invisible breathing aura — felt more than noticed */
  animation: whyAura 26s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
@keyframes whyAura {
  from { transform: translateX(-50%) scale(1);                 opacity: 0.85; }
  to   { transform: translateX(-50%) translateY(22px) scale(1.1); opacity: 1; }
}
/* second, slower ambient pool drifting low in the section */
.why::after {
  content: ''; position: absolute; right: -6%; bottom: -10%; z-index: 0; pointer-events: none;
  width: 620px; height: 480px; max-width: 80vw;
  background: radial-gradient(closest-side, rgba(19,185,214,0.10), transparent 72%);
  animation: whyAura2 32s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
@keyframes whyAura2 {
  from { transform: translate(0, 0) scale(1.05);     opacity: 0.7; }
  to   { transform: translate(-30px, -24px) scale(1); opacity: 0.95; }
}
.why-head {
  position: relative; z-index: 1;
  text-align: center; max-width: 720px; margin: 0 auto 54px; padding: 0 24px;
}
.why-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 30px;
  background: rgba(255,255,255,0.86); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pink);
}
.why-head h2 {
  font-family: 'Cabinet Grotesk','Satoshi',sans-serif;
  margin-top: 22px; font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.08; font-weight: 800; letter-spacing: -1.5px; color: var(--ink); text-wrap: balance;
}
.why-head h2 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.why-head p { margin: 18px auto 0; max-width: 60ch; font-size: 1.08rem; line-height: 1.62; color: var(--slate); text-wrap: pretty; }

.why-grid {
  position: relative; z-index: 1;
  max-width: 1060px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
/* connected-system node at the grid centre */
.why-node {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%; z-index: 2; pointer-events: none;
  background: var(--grad); box-shadow: 0 0 0 6px rgba(0,212,255,0.12), 0 0 24px rgba(255,0,110,0.25);
}
.why-node::before, .why-node::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  border-radius: 50%; border: 1px solid rgba(0,212,255,0.35);
}
.why-node::before { width: 34px; height: 34px; animation: whyPulse 3s ease-out infinite; }
.why-node::after  { width: 34px; height: 34px; animation: whyPulse 3s ease-out infinite 1.5s; }
@keyframes whyPulse {
  0%   { width: 18px; height: 18px; opacity: 0.8; }
  100% { width: 120px; height: 120px; opacity: 0; }
}

.why-card {
  position: relative; overflow: hidden;
  background: rgba(255,255,255,0.92); border: 1px solid var(--line); border-radius: 22px;
  padding: 34px; min-height: 232px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.5s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.why-card.in { opacity: 1; transform: none; }
/* luxurious hover: soft lift + cyan/pink brand glow + stronger shadow */
.why-card:hover {
  transform: translateY(-7px);
  border-color: rgba(0,212,255,0.5);
  box-shadow: 0 26px 60px rgba(0,212,255,0.16), 0 10px 34px rgba(255,0,110,0.10);
  transition-delay: 0s;
}
/* sequential card arrival — staggered after the headline + paragraph
   (why-node is the grid's 1st child, so cards are nth-child 2–5) */
.why-card:nth-child(2) { transition-delay: 0.18s; }
.why-card:nth-child(3) { transition-delay: 0.28s; }
.why-card:nth-child(4) { transition-delay: 0.38s; }
.why-card:nth-child(5) { transition-delay: 0.48s; }
.why-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity 0.3s ease; z-index: 2;
}
.why-card:hover::before { opacity: 1; }
/* light sweep gliding across the glass surface on hover */
.why-card::after {
  content: ''; position: absolute; top: 0; left: -130%;
  width: 70%; height: 100%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: skewX(-16deg);
  opacity: 0;
  transition: left 0.95s var(--ease-film), opacity 0.3s ease;
}
.why-card:hover::after { left: 140%; opacity: 1; }

.why-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.why-idx {
  font-family: 'Cabinet Grotesk','Satoshi',sans-serif;
  font-weight: 900; font-size: 2.3rem; line-height: 1; letter-spacing: -1px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  transform-origin: left center;
  transition: transform 0.45s var(--ease-film);
}
.why-card:hover .why-idx { transform: scale(1.05); }
.why-tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); padding: 5px 11px; border-radius: 20px;
  background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.22);
}
.why-card h3 {
  font-family: 'Cabinet Grotesk','Satoshi',sans-serif;
  margin-top: 20px; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.4px; line-height: 1.2;
  color: var(--ink); max-width: 22ch;
}
.why-card p { margin-top: 12px; font-size: 1rem; line-height: 1.6; color: var(--slate); max-width: 46ch; }

@media (max-width: 820px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-node { display: none; }
}

/* ============================================================
   LIVING SECTION · staggered head reveal (label -> headline -> paragraph)
   The container's blanket .an-rise is neutralised here so the inner
   elements can arrive in sequence instead of all at once.
   ============================================================ */
.why .why-head.an-rise { opacity: 1; transform: none; filter: none; transition: none; }

.why-head .why-label,
.why-head h2,
.why-head p {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease-film), transform 0.9s var(--ease-film), filter 0.9s var(--ease-film);
  will-change: transform, opacity, filter;
}
.why-head.in .why-label { opacity: 1; transform: none; filter: none; transition-delay: 0.05s; }
.why-head.in h2         { opacity: 1; transform: none; filter: none; transition-delay: 0.20s; }
.why-head.in p          { opacity: 1; transform: none; filter: none; transition-delay: 0.38s; }

@media (prefers-reduced-motion: reduce) {
  .why::before, .why::after { animation: none; }
  .why-card::after { display: none; }
  .why-head .why-label,
  .why-head h2,
  .why-head p { opacity: 1; transform: none; filter: none; transition: none; }
}
