/* =========================
   HOME - SPECIFIC LAYOUT
========================== */

/* Hero + value proposition share width */
.hero,
.value-prop {
  max-width: 640px;
}

/* Hero */
.hero {
  text-align: center;
  margin: 0 auto 64px;
  padding-top: 32px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.hero .lead {
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Section titles */
.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: var(--space-lg);
}

/* Main tools */
.tools-featured,
.tools-secondary {
  margin-bottom: 64px;
}

.tools-grid-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
  align-items: stretch; /* Cards with same height */
}

.tool-featured {
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  align-items: stretch;
}

.tool-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
}

.tool-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: var(--space-sm);
  align-self: center;
}

.tool-featured h3 {
  font-size: 1.5rem;
}

.tool-featured h3,
.tool-card h3 {
  font-weight: 600;
  margin: 0;
}

.tool-featured p {
  color: var(--muted);
  line-height: 1.6;
  flex-grow: 1;
}

.tool-featured .btn {
  margin-top: var(--space-sm);
  width: 100%; /* Full-width button */
  align-self: stretch;
}

.tool-featured small {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: calc(-1 * var(--space-sm)); /* Compensates the gap */
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  max-width: 960px;
  margin: 0 auto;
}

.tool-card {
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: var(--space-sm);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--border);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.tool-card h3 {
  font-size: 1.125rem;
}

.tool-card p {
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

/* Value proposition */
.value-prop {
  margin: 0 auto 64px;
}

.value-prop .card {
  padding: 32px;
  text-align: center;
  background: var(--bg-soft);
  border: none;
}

.value-prop .lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* Responsive */
@media (width <= 768px) {
  .hero {
    padding-top: var(--space-lg);
  }

  .hero,
  .value-prop,
  .tools-featured,
  .tools-secondary {
    margin-bottom: 48px;
  }

  .tools-grid-featured {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .tool-card {
    padding: 20px 16px;
  }

  .tool-card h3 {
    font-size: 1rem;
  }

}

@media (width <= 480px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
