/* =============================================================
   Home page — the data-driven sections of front-page.php
   =============================================================
   Process entry, spray guns, selected key products, equipment
   systems and technical insights, all rendered from the content
   model. Tokens come from assets/css/tokens.css, the shared helpers
   (.site-container, .section-header, .section-title, .section-sub,
   .tech-eyebrow, .media-placeholder, .link-arrow) from style.css.
   Only new home-* rules live here: white card, 1px border,
   6px radius, no shadow; bands alternate white / #F6F8F9, and each
   new section states its own band because the sections around it
   keep the backgrounds they already have.
   ============================================================= */

/* --- Band and vertical rhythm of a data-driven section --- */
.home-data-section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.home-band-white {
  background-color: #ffffff;
}

.home-band-soft {
  background-color: var(--color-surface-soft);
}

/* --- Card grid: 3 columns, 2 on tablet, 1 on phone --- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.home-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* --- Card shell --- */
.home-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.home-card-media {
  display: block;
  margin: 0;
  background-color: var(--color-surface-gray);
  border-bottom: 1px solid var(--color-border-subtle);
}

.home-card-img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.home-card-media-4-3 .home-card-img {
  aspect-ratio: 4 / 3;
}

.home-card-media-16-9 .home-card-img {
  aspect-ratio: 16 / 9;
}

/* The site's gray placeholder, trimmed to sit flush inside a card. */
.home-card-placeholder {
  border: 0;
  border-radius: 0;
  min-height: 0;
  padding: 24px 20px;
}

.home-card-media-4-3 .home-card-placeholder {
  aspect-ratio: 4 / 3;
}

.home-card-media-16-9 .home-card-placeholder {
  aspect-ratio: 16 / 9;
}

.home-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  flex: 1;
}

.home-card-title {
  font-size: 1.1875rem;
  line-height: 1.35;
  margin-bottom: 0;
}

.home-card-link {
  color: var(--color-ink);
  text-decoration: none;
}

.home-card-link:hover {
  color: var(--color-accent);
}

.home-card-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-body);
  margin-bottom: 0;
}

/* --- Technology and category chips --- */
.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-chip {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  background-color: rgba(23, 110, 166, 0.08);
  border-radius: 4px;
  padding: 4px 8px;
}

/* --- Supply flags: only the flags that are set are printed --- */
.home-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-flag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-ink);
  background-color: var(--color-surface-gray);
  border: 1px solid var(--color-border-subtle);
  border-radius: 4px;
  padding: 4px 10px;
}

/* --- Process entry: one card per technology term --- */
.home-process-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-card);
  padding: 28px 26px;
  color: var(--color-ink);
  text-decoration: none;
}

.home-process-card:hover {
  border-color: var(--color-muted);
  border-left-color: var(--color-accent-hover);
}

.home-process-index {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-muted);
}

.home-process-title {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 0;
}

.home-process-card:hover .home-process-title {
  color: var(--color-accent);
}

.home-process-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-body);
  margin-bottom: 0;
}

.home-process-more {
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
}

.home-process-card:hover .home-process-more {
  text-decoration: underline;
}

/* --- "All …" route under a grid --- */
.home-more {
  margin: 24px 0 0 0;
}

/* --- Responsive: 3 -> 2 -> 1 columns --- */
@media (max-width: 1024px) {
  .home-grid,
  .home-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-grid,
  .home-grid-2 {
    grid-template-columns: 1fr;
  }

  .home-data-section {
    padding-top: var(--space-section-mobile);
    padding-bottom: var(--space-section-mobile);
  }

  .home-card-body {
    padding: 20px;
  }
}
