/* Home: research-driven, evolving with AI — dark band for contrast */

.dm-research-roots {
  position: relative;
  overflow: hidden;
  color: #e2e8f0;
  background: linear-gradient(135deg, #0b1220 0%, #152a4a 45%, #1a1744 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dm-research-roots::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 20% 20%, rgba(47, 87, 239, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(185, 102, 231, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.dm-research-roots .container {
  position: relative;
  z-index: 1;
}

.dm-research-roots__kicker {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 0.5rem;
}

.dm-research-roots__title {
  color: #f8fafc;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.dm-research-roots__lede {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 36rem;
  margin-bottom: 0;
}

.dm-research-roots__lede--reading {
  border-left: 3px solid rgba(147, 197, 253, 0.45);
  padding-left: 1rem;
  margin-left: 0;
}

/* Three CTAs: identical shell + even vertical gap (column is ~5/12; side‑by‑side squishes copy) */
.dm-research-roots__ctas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
}

.dm-research-roots__ctas .dm-research-roots__cta-btn {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 0.625rem 1rem;
  border-radius: var(--radius, 0.5rem);
  width: 100%;
}

.dm-research-roots__ctas .dm-research-roots__cta-btn > i {
  flex-shrink: 0;
  font-size: 1.05em;
  line-height: 1;
}

.dm-research-roots__ctas .dm-research-roots__cta-btn > span {
  min-width: 0;
  text-wrap: balance;
}

.dm-research-roots__card-cta {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.dm-research-roots__card-cta > i {
  flex-shrink: 0;
}

.dm-research-roots__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .dm-research-roots__grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }
}

.dm-research-roots__card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card, 0.75rem);
  padding: 1rem 1.1rem;
  height: 100%;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.dm-research-roots__card:hover {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(147, 197, 253, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.dm-research-roots__card-ico {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(47, 87, 239, 0.25);
  color: #93c5fd;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.dm-research-roots__card-ico--violet {
  background: rgba(185, 102, 231, 0.2);
  color: #e9d5ff;
}

.dm-research-roots__card-ico--emerald {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

.dm-research-roots__card-ico--amber {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.dm-research-roots__card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.35rem;
}

.dm-research-roots__card p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0;
  line-height: 1.5;
}

.dm-research-roots__timeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dm-research-roots__timeline strong {
  color: #e2e8f0;
  font-weight: 600;
}

.dm-research-roots__link {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

.dm-research-roots__link:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

/* Secondary actions: same “real button” weight as primary on this dark band */
.dm-research-roots .btn-dm-roots-cta {
  --bs-btn-color: #0f172a;
  --bs-btn-bg: #e2e8f0;
  --bs-btn-border-color: #e2e8f0;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-hover-bg: #f1f5f9;
  --bs-btn-hover-border-color: #f8fafc;
  --bs-btn-focus-shadow-rgb: 148, 163, 184;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.dm-research-roots .btn-dm-roots-cta:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.dm-research-roots .btn-dm-roots-cta--subtle,
.dm-research-roots .btn-dm-roots-cta--subtle:hover {
  box-shadow: none;
}

.dm-research-roots .btn-dm-outline {
  --bs-btn-color: #e2e8f0;
  --bs-btn-border-color: rgba(255, 255, 255, 0.35);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --bs-btn-hover-border-color: rgba(255, 255, 255, 0.5);
  --bs-btn-hover-color: #fff;
}

/* Match primary CTA shell to the trio (histudy’s global .btn-dm-primary min-height/padding can skew this row) */
.dm-research-roots__ctas .btn-dm-primary.dm-research-roots__cta-btn {
  min-height: 3.25rem;
  margin: 0;
  background: linear-gradient(90deg, var(--hs-primary) 0%, #4f64f0 50%, var(--hs-secondary) 135%);
  background-size: 200% 100%;
  border: none;
  box-shadow: 0 4px 20px rgba(47, 87, 239, 0.35);
  color: #fff !important;
  transition: background-position 0.45s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.dm-research-roots__ctas .btn-dm-primary.dm-research-roots__cta-btn:hover {
  background-position: 100% 0;
  box-shadow: 0 6px 24px rgba(47, 87, 239, 0.4);
  color: #fff !important;
  transform: translateY(-1px);
}

.dm-research-roots__ctas .btn-dm-roots-cta.dm-research-roots__cta-btn {
  min-height: 3.25rem;
  margin: 0;
  border-width: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .dm-research-roots__ctas .btn-dm-primary.dm-research-roots__cta-btn:hover,
  .dm-research-roots__ctas .btn-dm-roots-cta.dm-research-roots__cta-btn:hover {
    transform: none;
  }
}
