/* SmartHerb 8Riew — RS-DM06.5
 * Public home content-density, typography hierarchy and dark service-link contrast.
 * Scope: public_home.php only.
 */

body.public-shell.page-public-home #main-content.sh-home {
  --sh-home-type-display: clamp(2.5rem, 4.65vw, 4.45rem);
  --sh-home-type-section: clamp(1.82rem, 2.55vw, 2.72rem);
  --sh-home-type-card: clamp(1.08rem, .58vw + .98rem, 1.28rem);
  --sh-home-type-body: clamp(.98rem, .22vw + .93rem, 1.06rem);
  --sh-home-type-small: clamp(.84rem, .14vw + .81rem, .92rem);
  font-size: 1rem;
}

/* The hero now delegates route discovery to search and the service cards below. */
body.public-shell.page-public-home #main-content .sh-hero__content {
  max-width: 690px;
}

body.public-shell.page-public-home #main-content .sh-hero__title {
  max-width: 14ch;
  font-size: var(--sh-home-type-display);
  line-height: 1.08;
  letter-spacing: -.038em;
}

body.public-shell.page-public-home #main-content .sh-hero__lead {
  max-width: 56ch;
  font-size: var(--sh-home-type-body);
  line-height: 1.72;
}

body.public-shell.page-public-home #main-content .sh-hero__promise span,
body.public-shell.page-public-home #main-content .sh-eyebrow,
body.public-shell.page-public-home #main-content .sh-network-signal__copy {
  font-size: var(--sh-home-type-small);
  line-height: 1.4;
}

body.public-shell.page-public-home #main-content .sh-hero__meta-copy small {
  font-size: .78rem;
}

body.public-shell.page-public-home #main-content .sh-hero__meta-copy strong {
  font-size: .94rem;
}

body.public-shell.page-public-home #main-content .sh-section-head h2,
body.public-shell.page-public-home #main-content .sh-vision-copy h2,
body.public-shell.page-public-home #main-content .sh-matching-journey__head h2,
body.public-shell.page-public-home #main-content .sh-area-copy h2,
body.public-shell.page-public-home #main-content .sh-final-cta h2 {
  font-size: var(--sh-home-type-section);
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}

body.public-shell.page-public-home #main-content .sh-section-head p,
body.public-shell.page-public-home #main-content .sh-vision-copy__lead,
body.public-shell.page-public-home #main-content .sh-matching-journey__head p,
body.public-shell.page-public-home #main-content .sh-area-copy p,
body.public-shell.page-public-home #main-content .sh-final-cta p {
  max-width: 62ch;
  font-size: var(--sh-home-type-body);
  line-height: 1.72;
}

body.public-shell.page-public-home #main-content .sh-service-card h3,
body.public-shell.page-public-home #main-content .sh-ecosystem-card h3,
body.public-shell.page-public-home #main-content .sh-herb-card h3,
body.public-shell.page-public-home #main-content .sh-project-card h3 {
  font-size: var(--sh-home-type-card);
  line-height: 1.36;
  letter-spacing: -.012em;
  text-wrap: balance;
}

body.public-shell.page-public-home #main-content .sh-service-card p,
body.public-shell.page-public-home #main-content .sh-ecosystem-card p,
body.public-shell.page-public-home #main-content .sh-herb-card p,
body.public-shell.page-public-home #main-content .sh-project-card > p,
body.public-shell.page-public-home #main-content .sh-journey-step p {
  font-size: var(--sh-home-type-small);
  line-height: 1.68;
}

body.public-shell.page-public-home #main-content .sh-service-card__link {
  gap: .75rem;
  border-top: 1px solid rgba(13, 101, 67, .16);
  padding-top: 1rem;
  color: #0b5b40;
  font-size: .94rem;
  line-height: 1.4;
}

body.public-shell.page-public-home #main-content .sh-service-card__link b {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: rgba(13, 101, 67, .1);
  color: currentColor;
  font-size: 1rem;
}

html[data-theme="dark"] body.public-shell.page-public-home #main-content .sh-service-card__link,
body.public-shell.page-public-home.theme-dark #main-content .sh-service-card__link {
  border-top-color: rgba(255, 255, 255, .3);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] body.public-shell.page-public-home #main-content .sh-service-card__link b,
body.public-shell.page-public-home.theme-dark #main-content .sh-service-card__link b {
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

html[data-theme="dark"] body.public-shell.page-public-home #main-content .sh-service-card:hover .sh-service-card__link,
html[data-theme="dark"] body.public-shell.page-public-home #main-content .sh-service-card:focus-visible .sh-service-card__link,
body.public-shell.page-public-home.theme-dark #main-content .sh-service-card:hover .sh-service-card__link,
body.public-shell.page-public-home.theme-dark #main-content .sh-service-card:focus-visible .sh-service-card__link {
  border-top-color: rgba(255, 255, 255, .58);
}

@media (max-width: 991.98px) {
  body.public-shell.page-public-home #main-content.sh-home {
    --sh-home-type-display: clamp(2.35rem, 7vw, 3.65rem);
    --sh-home-type-section: clamp(1.75rem, 4vw, 2.35rem);
  }

  body.public-shell.page-public-home #main-content .sh-hero__content {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  body.public-shell.page-public-home #main-content.sh-home {
    --sh-home-type-card: clamp(1.05rem, 2.8vw, 1.2rem);
    --sh-home-type-body: 1rem;
    --sh-home-type-small: .9rem;
  }

  body.public-shell.page-public-home #main-content .sh-hero__title,
  body.public-shell.page-public-home #main-content .sh-section-head h2,
  body.public-shell.page-public-home #main-content .sh-vision-copy h2,
  body.public-shell.page-public-home #main-content .sh-matching-journey__head h2,
  body.public-shell.page-public-home #main-content .sh-area-copy h2,
  body.public-shell.page-public-home #main-content .sh-final-cta h2 {
    max-width: none;
  }
}

@media (max-width: 479.98px) {
  body.public-shell.page-public-home #main-content.sh-home {
    --sh-home-type-display: clamp(2.05rem, 10.2vw, 2.72rem);
    --sh-home-type-section: clamp(1.58rem, 7.4vw, 2rem);
    --sh-home-type-body: .98rem;
    --sh-home-type-small: .88rem;
  }

  body.public-shell.page-public-home #main-content .sh-hero__title {
    line-height: 1.12;
    letter-spacing: -.028em;
  }

  body.public-shell.page-public-home #main-content .sh-hero__lead,
  body.public-shell.page-public-home #main-content .sh-section-head p,
  body.public-shell.page-public-home #main-content .sh-vision-copy__lead,
  body.public-shell.page-public-home #main-content .sh-matching-journey__head p,
  body.public-shell.page-public-home #main-content .sh-area-copy p,
  body.public-shell.page-public-home #main-content .sh-final-cta p {
    line-height: 1.66;
  }

  body.public-shell.page-public-home #main-content .sh-service-card__link {
    font-size: .92rem;
  }
}
