/* Homepage content. Layout, tokens, header and footer come from shared/site.css. */

.home-section {
  padding-block: 88px;
}

.home-section-alt {
  background: var(--theme-bg-secondary);
}

.home-eyebrow {
  margin-bottom: 12px;
  color: var(--theme-color-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-title {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 700;
}

.home-lead {
  margin-top: 16px;
  color: var(--theme-text-secondary);
  font-size: 18px;
}


/* Hero */

.home-hero {
  padding-block: 72px 56px;
}

.home-hero-title {
  font-size: clamp(2.25rem, 5.4vw, 3.75rem);
  font-weight: 800;
}

.home-highlight {
  color: var(--theme-color-primary);
}

.home-hero-lead {
  margin-top: 20px;
  color: var(--theme-text-secondary);
  font-size: clamp(17px, 1.6vw, 20px);
}

.home-license {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-lg);
  background: var(--theme-surface-raised);
  color: var(--theme-text-secondary);
  box-shadow: var(--theme-shadow-sm);
  text-decoration: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.home-license:hover {
  border-color: var(--theme-color-primary);
  color: var(--theme-color-primary);
  box-shadow: var(--theme-shadow-md);
}

.home-license .home-tile-icon {
  width: 36px;
  height: 36px;
}

.home-license-label {
  color: var(--theme-text-primary);
  font-size: 15px;
  font-weight: 700;
}

.home-hero-image {
  display: block;
  width: 100%;
  height: clamp(140px, 22vw, 360px);
  margin-top: 48px;
  border-radius: var(--theme-radius-lg);
  object-fit: cover;
  box-shadow: var(--theme-shadow-md);
}

/* Cards and grids */

.home-grid {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

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

.home-grid-resources {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

/* Resource categories */

.home-group {
  margin-top: 56px;
}

.home-group-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 700;
}

.home-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--theme-border-subtle);
}

.home-group-text {
  margin-top: 6px;
  color: var(--theme-text-secondary);
  font-size: 16px;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-lg);
  background: var(--theme-surface-raised);
  box-shadow: var(--theme-shadow-sm);
}

.home-card-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.home-card-text {
  color: var(--theme-text-secondary);
  font-size: 15px;
}

.home-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--theme-radius-md);
  background: var(--site-primary-soft);
  color: var(--theme-color-primary);
}

.home-chip {
  padding: 3px 10px;
  border-radius: var(--theme-radius-full);
  background: var(--theme-bg-tertiary);
  color: var(--theme-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.home-resource {
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.home-resource:hover {
  transform: translateY(-2px);
  border-color: var(--theme-color-primary);
  box-shadow: var(--theme-shadow-md);
}

.home-resource-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.home-resource-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--theme-color-primary);
  font-size: 15px;
  font-weight: 600;
}

:root[dir="rtl"] .home-resource-open svg {
  transform: scaleX(-1);
}

.home-principle {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Breakpoints */

@media (max-width: 1024px) {
  .home-grid-4,
  .home-grid-resources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-section {
    padding-block: 64px;
  }

  .home-hero {
    padding-block: 48px 40px;
  }

  .home-hero-image {
    margin-top: 32px;
  }
}

@media (max-width: 560px) {
  .home-section {
    padding-block: 48px;
  }

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

  .home-group {
    margin-top: 40px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .home-resource {
    transition: none;
  }

  .home-resource:hover {
    transform: none;
  }
}
