/*
 * Healing Wisdom — hub (index) tool cards
 * Uses tokens from hw-tool-shell.css
 */

:root {
  /* Hub-only accents (shell keeps --hw-tool-*); tweak palette here. */
  --hw-hub-radial-blue: rgba(74, 115, 188, 0.24);
  --hw-hub-radial-sage: rgba(118, 176, 95, 0.18);
  --hw-hub-bg-sky: #dfe7f4;
  --hw-hub-bg-cloud: #eef2fa;
  --hw-hub-bg-mint: #e8f2ec;
  --hw-hub-tools-bar-top: #4a7dd4;
  --hw-hub-infra-title: #15382a;
  --hw-hub-infra-bar-top: #6cb892;
  --hw-hub-infra-bar-bottom: #2f6b52;
  --hw-hub-card-icon-blue: #244a8c;
  --hw-hub-card-icon-green: #256348;
  --hw-hub-cta-hover: #162f61;
  --hw-hub-infra-cta: #2f6b52;
  --hw-hub-infra-cta-hover: #1a4a38;
}

/* Index-only main: soft ocean + sage wash behind the grid pattern */
.hw-tool-body--hub {
  background:
    radial-gradient(ellipse 130% 85% at 0% -15%, var(--hw-hub-radial-blue), transparent 58%),
    radial-gradient(ellipse 75% 50% at 100% 5%, var(--hw-hub-radial-sage), transparent 52%),
    linear-gradient(168deg, var(--hw-hub-bg-sky) 0%, var(--hw-hub-bg-cloud) 22%, var(--hw-tool-mist) 52%, var(--hw-hub-bg-mint) 100%);
}

.hw-tool-hub-main {
  padding-top: 1.65rem;
  padding-bottom: 2.15rem;
}

.hw-tool-hub-section {
  margin-top: 1.65rem;
}

.hw-tool-hub-section:first-child {
  margin-top: 0;
}

.hw-tool-hub-section-head {
  margin-bottom: 0.75rem;
}

.hw-tool-hub-section-head h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  margin: 0;
  font-size: 1.28rem;
  font-weight: 500;
  color: var(--hw-tool-ink);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hw-tool-hub-section--tools .hw-tool-hub-section-head h2::before {
  content: "";
  width: 4px;
  height: 1.05em;
  border-radius: 3px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--hw-hub-tools-bar-top), var(--hw-tool-header-bg-end));
  box-shadow: 0 1px 3px rgba(32, 62, 122, 0.25);
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-section-head h2 {
  color: var(--hw-hub-infra-title);
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-section-head h2::before {
  content: "";
  width: 4px;
  height: 1.05em;
  border-radius: 3px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--hw-hub-infra-bar-top), var(--hw-hub-infra-bar-bottom));
  box-shadow: 0 1px 3px rgba(47, 107, 82, 0.22);
}

.hw-tool-hub-section--guidelines .hw-tool-hub-section-head h2::before {
  content: "";
  width: 4px;
  height: 1.05em;
  border-radius: 3px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #d4a85c, #a07232);
  box-shadow: 0 1px 3px rgba(124, 94, 16, 0.22);
}

.hw-tool-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: 0.8rem;
  padding: 0;
}

.hw-tool-hub-card {
  background: linear-gradient(152deg, #ffffff 0%, #f8faff 45%, #f9fcf9 100%);
  border-radius: 11px;
  padding: 1.05rem 1.15rem 1.05rem 1.45rem;
  border: 1px solid rgba(32, 62, 122, 0.14);
  box-shadow: 0 8px 22px rgba(15, 26, 51, 0.045);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-card {
  background: linear-gradient(152deg, #ffffff 0%, #f7faf9 50%, #f5fbfa 100%);
  border-color: rgba(47, 107, 82, 0.16);
}

.hw-tool-hub-card:hover {
  border-color: rgba(32, 62, 122, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 26, 51, 0.07);
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-card:hover {
  border-color: rgba(47, 107, 82, 0.38);
}

.hw-tool-hub-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 11px;
}

.hw-tool-hub-card-body {
  position: relative;
  z-index: 0;
}

.hw-tool-hub-card-icon {
  font-size: 1.2rem;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.5rem;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  color: var(--hw-hub-card-icon-blue);
  background: linear-gradient(145deg, rgba(45, 90, 158, 0.16), rgba(45, 90, 158, 0.05));
  border: 1px solid rgba(32, 62, 122, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-card-icon {
  color: var(--hw-hub-card-icon-green);
  background: linear-gradient(145deg, rgba(47, 107, 82, 0.2), rgba(47, 107, 82, 0.06));
  border-color: rgba(47, 107, 82, 0.14);
}

.hw-tool-hub-card:hover .hw-tool-hub-card-icon {
  box-shadow: 0 4px 12px rgba(32, 62, 122, 0.12);
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-card:hover .hw-tool-hub-card-icon {
  box-shadow: 0 4px 12px rgba(47, 107, 82, 0.14);
}

.hw-tool-hub-card h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--hw-tool-ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.25;
}

.hw-tool-hub-external-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58em;
  opacity: 0.62;
  margin-left: 0.28rem;
  vertical-align: 0.12em;
  font-weight: 400;
}

.hw-tool-hub-external-hint svg {
  width: 1em;
  height: 1em;
  display: block;
}

.hw-tool-hub-card p {
  margin: 0 0 0.55rem 0;
  font-size: 0.875rem;
  line-height: 1.42;
  color: var(--hw-tool-text-soft);
}

.hw-tool-hub-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hw-tool-ocean);
  border-bottom: 2px solid transparent;
  transition: gap 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hw-tool-hub-card:hover .hw-tool-hub-card-cta {
  gap: 0.5rem;
  color: var(--hw-hub-cta-hover);
  border-bottom-color: rgba(32, 62, 122, 0.35);
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-card-cta {
  color: var(--hw-hub-infra-cta);
}

.hw-tool-hub-section--infrastructure .hw-tool-hub-card:hover .hw-tool-hub-card-cta {
  color: var(--hw-hub-infra-cta-hover);
  border-bottom-color: rgba(47, 107, 82, 0.4);
}

.hw-tool-hub-footer-simple {
  text-align: center;
  padding: 2.5rem 0 2rem;
  color: var(--hw-tool-text-soft);
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .hw-tool-hub-main {
    padding-top: 1.35rem;
    padding-bottom: 1.85rem;
  }

  .hw-tool-hub-section {
    margin-top: 1.35rem;
  }

  .hw-tool-hub-grid {
    gap: 0.7rem;
  }

  .hw-tool-hub-card {
    padding: 0.95rem 1.05rem 0.95rem 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-tool-hub-card {
    transition: none;
  }

  .hw-tool-hub-card:hover {
    transform: none;
  }
}
