/* =====================================================================
   MEGAGEN — Homepage brand-pillars band (loads after the redesign layers).
   A cinematic dark band echoing the parent sites' five-pillar hero, with a
   staggered entrance and refined icon interactions. Original design + copy.
   ===================================================================== */

.mg-pillars {
  position: relative;
  background: radial-gradient(120% 150% at 50% -25%, #12294a 0%, #0b1a2e 48%, #070f1b 100%);
  color: #fff;
  padding: clamp(46px, 7vw, 90px) clamp(18px, 5vw, 44px);
  overflow: hidden;
}
.mg-pillars::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(56% 46% at 50% 0%, rgba(0,103,177,.28), transparent 72%);
}
.mg-pillars__wrap { position: relative; max-width: 1200px; margin: 0 auto; }
.mg-pillars__head { text-align: center; margin-bottom: clamp(28px, 5vw, 56px); }
.mg-pillars__eyebrow { display: inline-block; color: #63b7ef; font-weight: 700; font-size: var(--mg-fs-sm, .9375rem); margin-bottom: 12px; }
.mg-pillars__title { color: #fff; font-size: clamp(1.85rem, 1.1rem + 3vw, 3rem); font-weight: 800; line-height: 1.2; margin: 0; text-wrap: balance; }

.mg-pillars__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(6px, 1.4vw, 18px); }

.mg-pillar {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; padding: 26px 16px; border-radius: var(--mg-r-lg, 22px);
  text-decoration: none; color: inherit;
}
/* hairline dividers between pillars (parent-site style) */
.mg-pillar:not(:last-child)::after {
  content: ""; position: absolute; inset-block: 30px; inset-inline-end: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.16), transparent);
}
.mg-pillar__ico {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  color: #8fd0ff; background: rgba(99,183,239,.10); border: 1px solid rgba(143,208,255,.24);
  transition: transform .45s var(--mg-ease, cubic-bezier(.23,1,.32,1)), background-color .3s ease, color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.mg-pillar__ico svg, .mg-pillar__ico img { width: 32px; height: 32px; object-fit: contain; }
.mg-pillar__title { font-size: 1.0625rem; font-weight: 800; color: #fff; transition: color .3s ease; }
.mg-pillar__desc { font-size: .875rem; line-height: 1.95; color: rgba(255,255,255,.66); max-width: 21ch; }

/* interactions live on the children so the stagger delay below never lags hover */
.mg-pillar:hover .mg-pillar__ico,
.mg-pillar:focus-visible .mg-pillar__ico {
  transform: translateY(-4px) scale(1.06); color: #fff;
  background: var(--mg-accent, #0067b1); border-color: transparent;
  box-shadow: 0 16px 34px -12px rgba(0,103,177,.75);
}
.mg-pillar:hover .mg-pillar__title { color: #8fd0ff; }
.mg-pillar:focus-visible { outline: none; }
.mg-pillar:focus-visible .mg-pillar__title { color: #8fd0ff; text-decoration: underline; text-underline-offset: 4px; }

/* staggered entrance — overrides only the reveal transition-delay (hover unaffected) */
.mg-js .mg-pillar[data-reveal] { transition-delay: calc(var(--i, 0) * 85ms); }

@media (max-width: 900px) {
  .mg-pillars__grid { grid-template-columns: repeat(3, 1fr); }
  .mg-pillar:nth-child(3)::after { display: none; }
}
@media (max-width: 600px) {
  .mg-pillars__grid { grid-template-columns: repeat(2, 1fr); }
  .mg-pillar::after { display: none; }
  .mg-pillar { padding: 20px 10px; }
}
@media (max-width: 380px) { .mg-pillars__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .mg-pillar__ico { transition: none !important; }
  .mg-pillar:hover .mg-pillar__ico, .mg-pillar:focus-visible .mg-pillar__ico { transform: none !important; }
  .mg-js .mg-pillar[data-reveal] { transition-delay: 0ms !important; }
}
