/* ============================================
   HOMEPAGE - "Your Tools. Our Mastery."

   Pink ground with a faint grid, two rows of platform logos scrolling in
   opposite directions, and a table of every platform grouped by category.
   Type comes from css/theme.css; this file adds layout and surfaces only.
   Markup: tools/home_tools.py.
   ============================================ */

.tools {
  background-color: #fdeef1;
  background-image:
    linear-gradient(rgba(241, 163, 183, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 163, 183, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
}

/* The hero's pink highlight would disappear on this ground, so the title is
   dark purple with an indigo highlight here. */
.tools .section-title { color: var(--heading-strong); }
.tools .section-title em { color: #3230e0; }

/* ---------- Logo rows ---------- */
.tools__logos {
  display: grid;
  gap: 14px;
  margin-bottom: 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.tools__row { overflow: hidden; }

.tools__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: tools-scroll 50s linear infinite;
}

.tools__row--reverse .tools__track { animation-direction: reverse; }
.tools__row:hover .tools__track { animation-play-state: paused; }

/* Each card owns its trailing space so the loop has no seam. */
.tools__logo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 188px;
  height: 76px;
  margin-right: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px -20px rgba(35, 13, 79, 0.4);
}

.tools__logo img {
  width: auto;
  height: 30px;
  max-width: 130px;
  object-fit: contain;
}

/* Gusto's and Odoo's artwork sits inside a lot of empty canvas; enlarge them
   to match the other wordmarks without changing the card. */
.tools__logo img[src$="gusto.svg"] { transform: scale(2); }
.tools__logo img[src$="odoo-seeklogo.svg"] { transform: scale(2.2); }

@keyframes tools-scroll {
  to { transform: translateX(-50%); }
}

/* ---------- Platform table ---------- */
.tools__table {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #f2dde4;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 60px -46px rgba(35, 13, 79, 0.35);
  overflow: hidden;
}

/* Dividers drawn as shadows so they stay correct when the columns wrap;
   the table's overflow clips the ones on its outer edge. */
.tools__col {
  padding: 30px 32px 34px;
  box-shadow: 1px 0 0 #f2e2e8, 0 1px 0 #f2e2e8;
  transition: background-color 0.2s ease;
}

.tools__col:hover { background: #ffffff; }

.tools__category {
  margin: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0dce3;
  font: 600 13px/20px var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3230e0;
}

.tools__list {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tools__list li {
  position: relative;
  padding-left: 20px;
  font-size: var(--fs-body);
  line-height: 24px;
  color: var(--heading-strong);
}

.tools__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3230e0;
}

.tools__note {
  margin: 32px 0 0;
  text-align: center;
  color: var(--ink-muted);
}

.tools__note a {
  font-weight: 500;
  white-space: nowrap;
  color: #3230e0;
  text-decoration: underline;
  text-decoration-color: rgba(50, 48, 224, 0.35);
  text-underline-offset: 4px;
}

.tools__note a:hover { text-decoration-color: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .tools__col { padding: 26px 24px 30px; }
  .tools__category { letter-spacing: 0.06em; }
}

@media (max-width: 1024px) {
  .tools__table { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Five columns in a three-up grid leave a gap: the last column spans it. */
  .tools__col:last-child { grid-column: span 2; }
}

@media (max-width: 640px) {
  .tools__logos { gap: 10px; margin-bottom: 28px; }
  .tools__logo { width: 140px; height: 60px; margin-right: 10px; border-radius: 14px; }
  .tools__logo img { height: 24px; max-width: 100px; }

  .tools__table { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 18px; }
  .tools__col { padding: 20px 16px 22px; }
  /* Same label height on every row so the rules line up when a label wraps */
  .tools__category {
    display: flex;
    align-items: flex-end;
    min-height: 52px;
    padding-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.05em;
  }
  .tools__list { gap: 10px; margin-top: 14px; }
  .tools__list li { padding-left: 16px; font-size: var(--fs-small); line-height: 22px; }
  .tools__list li::before { top: 8px; }

  .tools__col:last-child { grid-column: 1 / -1; }
  .tools__col:last-child .tools__category { min-height: 0; }
  .tools__col:last-child .tools__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .tools__logos { -webkit-mask-image: none; mask-image: none; }
  .tools__track {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    animation: none;
  }
  .tools__logo { margin-right: 0; }
  .tools__logo--repeat,
  .tools__row--reverse { display: none; }
  .tools__col { transition: none; }
}
