/* Resonant LMS Portal v2.8.1 — responsive typography balance */
:root {
  --rlp-type-display: clamp(44px, 3.8vw, 60px);
  --rlp-type-page-title: clamp(38px, 3.6vw, 56px);
  --rlp-type-article-title: clamp(34px, 3.35vw, 52px);
  --rlp-type-section: clamp(30px, 2.9vw, 44px);
  --rlp-type-subsection: clamp(24px, 2.1vw, 32px);
  --rlp-type-card: clamp(19px, 1.55vw, 26px);
}

/* Japanese headings wrap by phrase and keep the final lines visually balanced. */
.hero__title,
.portal-intro__heading h2,
.home-heading h2,
.product-hero h1,
.product-heading h2,
.contact-hero h1,
.privacy-hero h1,
.proposal-intro h1,
.materials-hero h1,
.material-single__hero h1,
.news-archive__hero h1,
.news-single__hero h1,
.news-single__content h2,
.material-single__content h2,
.home-cta h2,
.product-cta h2 {
  line-break: strict;
  overflow-wrap: normal;
  text-wrap: balance;
}

/* Home hero: give copy and image equal room and prevent one-character orphan lines. */
@media (min-width: 901px) {
  .hero--brand .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
  }

  .hero--brand .hero__copy {
    min-width: 0;
  }
}

.hero__title {
  max-width: 10.5em;
  font-size: var(--rlp-type-display);
  line-height: 1.17;
  letter-spacing: -0.048em;
}

.hero__platform {
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.5;
}

.hero__lead {
  font-size: clamp(14px, 1vw, 16px);
}

/* Home sections use one consistent display-to-section scale. */
.portal-intro__grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(48px, 5.5vw, 76px);
}

.portal-intro__heading h2 {
  font-size: clamp(36px, 3.4vw, 52px);
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.home-heading h2 {
  font-size: var(--rlp-type-section);
  line-height: 1.32;
}

.portal-link-card h3 {
  font-size: var(--rlp-type-card);
  line-height: 1.4;
}

.portal-specialist h2,
.home-cta h2 {
  font-size: var(--rlp-type-subsection);
  line-height: 1.4;
}

/* Product pages. */
.product-hero h1 {
  max-width: 11em;
  font-size: clamp(40px, 4.1vw, 64px);
  line-height: 1.17;
  letter-spacing: -0.045em;
}

.product-heading h2 {
  font-size: var(--rlp-type-section);
  line-height: 1.32;
}

.product-cta h2 {
  font-size: var(--rlp-type-subsection);
  line-height: 1.4;
}

/* Page and archive heroes. */
.contact-hero h1,
.privacy-hero h1,
.proposal-intro h1,
.materials-hero h1,
.news-archive__hero h1 {
  font-size: var(--rlp-type-page-title);
  line-height: 1.22;
  letter-spacing: -0.042em;
}

.material-single__hero h1,
.news-single__hero h1 {
  font-size: var(--rlp-type-article-title);
  line-height: 1.35;
  letter-spacing: -0.038em;
}

.privacy-heading h2,
.contact-heading h2,
.material-single__content h2,
.news-single__content h2 {
  font-size: clamp(27px, 2.4vw, 36px);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .hero__title {
    max-width: 12em;
    font-size: clamp(42px, 7vw, 54px);
  }

  .portal-intro__grid {
    gap: 42px;
  }
}

@media (max-width: 700px) {
  :root {
    --rlp-type-page-title: clamp(34px, 9vw, 42px);
    --rlp-type-article-title: clamp(31px, 8vw, 38px);
    --rlp-type-section: clamp(28px, 7.6vw, 36px);
    --rlp-type-subsection: clamp(23px, 6.4vw, 30px);
    --rlp-type-card: clamp(19px, 5.6vw, 25px);
  }

  .hero__title {
    max-width: none;
    font-size: clamp(34px, 9.4vw, 40px);
    line-height: 1.22;
    letter-spacing: -0.042em;
  }

  .hero__platform {
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .portal-intro__heading h2 {
    font-size: clamp(32px, 8.4vw, 40px);
    line-height: 1.34;
  }

  .product-hero h1 {
    font-size: clamp(35px, 9.4vw, 44px);
    line-height: 1.22;
  }

  .contact-hero h1,
  .privacy-hero h1,
  .proposal-intro h1,
  .materials-hero h1,
  .news-archive__hero h1 {
    font-size: var(--rlp-type-page-title);
  }

  .material-single__hero h1,
  .news-single__hero h1 {
    font-size: var(--rlp-type-article-title);
  }

  .privacy-heading h2,
  .contact-heading h2,
  .material-single__content h2,
  .news-single__content h2 {
    font-size: clamp(25px, 7vw, 30px);
  }
}

@media (max-width: 390px) {
  .hero__title {
    font-size: clamp(32px, 9.2vw, 36px);
  }

  .portal-intro__heading h2 {
    font-size: clamp(30px, 8.2vw, 34px);
  }
}
