/* ============================================================
   homepage.css — Hero · Tool Grid · Category Blocks · Why Section
   MoneyMaths | Homepage only
   ============================================================ */

/* ── 1. Hero Section ─────────────────────────────────────── */

.hero {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-16);
  background: linear-gradient(
    160deg,
    var(--color-primary-50) 0%,
    #ffffff 55%,
    var(--color-accent-50) 100%
  );
  position: relative;
  overflow: hidden;
}

/* Subtle decorative circles */
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgb(26 107 85 / 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgb(245 158 11 / 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero__inner {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-success-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-success);
  margin-bottom: var(--space-6);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.hero__badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-text);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-5);
}

@media (min-width: 640px) {
  .hero__title { font-size: var(--text-5xl); }
}

.hero__title-accent {
  color: var(--color-primary);
  position: relative;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

@media (min-width: 640px) {
  .hero__subtitle { font-size: var(--text-xl); }
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-8);
}

@media (min-width: 480px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
  }
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-6);
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

.hero__trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-success);
  flex-shrink: 0;
}

/* ── 2. Tools Section ────────────────────────────────────── */

.tools-section {
  padding-block: var(--space-16) var(--space-20);
}

/* ── 3. Category Block ───────────────────────────────────── */

.category-block {
  margin-bottom: var(--space-16);
}

.category-block:last-child {
  margin-bottom: 0;
}

.category-block__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 2px solid var(--color-border);
}

.category-block__icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-50);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

.category-block__icon svg {
  width: 24px;
  height: 24px;
}

.category-block__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
  letter-spacing: var(--tracking-tight);
}

.category-block__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ── 4. Tool Grid ────────────────────────────────────────── */

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 480px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── 5. Why Section ──────────────────────────────────────── */

.why-section {
  background: var(--color-border-light);
  border-top: 1px solid var(--color-border);
}

.why-section .section__title {
  margin-bottom: var(--space-12);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 640px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .why-grid { grid-template-columns: repeat(4, 1fr); }
}

.why-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.why-item__icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-50);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.why-item__icon svg {
  width: 24px;
  height: 24px;
}

.why-item__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.why-item__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}
