/* Final typography guardrails for long Persian and English editorial titles. */
:where(h1, h2, h3, h4, h5, h6, .display-title, .section-title) {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}

.display-title {
  font-size: clamp(2.45rem, 5.2vw, 5.8rem);
  line-height: 1.06;
}

.home-hero .display-title {
  font-size: clamp(2.3rem, 5vw, 5.35rem);
}

.section-title {
  font-size: clamp(1.95rem, 3.45vw, 4.1rem);
  line-height: 1.16;
}

.mega-grid h2 {
  font-size: clamp(2.6rem, 5.2vw, 5.35rem);
  line-height: 1.04;
}

.footer-statement h2,
.schedule-layout h2,
.studio-grid h2 {
  font-size: clamp(2rem, 3.65vw, 3.85rem);
  line-height: 1.16;
}

.helima-story__copy h2 {
  font-size: clamp(2.5rem, 4.8vw, 5.15rem);
  line-height: 1.12;
}

.academy-section-heading h2,
.academy-copy-grid h2,
.service-layout h2,
.commission-request h2,
.faq-layout h2,
.lesson-gate h2 {
  font-size: clamp(1.9rem, 3.65vw, 3.65rem);
  line-height: 1.22;
}

.package-card-content h3 {
  font-size: clamp(1.65rem, 2.7vw, 2.8rem);
  line-height: 1.3;
}

.statement-grid h2 {
  font-size: clamp(1.6rem, 3.5vw, 3.05rem);
  line-height: 1.45;
}

.gallery-empty h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  line-height: 1.25;
}

:where(.woocommerce h1, .woocommerce h2, .woocommerce h3, .woocommerce div.product .product_title) {
  font-size: clamp(1.65rem, 3vw, 3rem);
  line-height: 1.3;
}

html[dir="rtl"] .display-title {
  max-width: 19ch;
  font-size: clamp(2.05rem, 4.15vw, 4.65rem);
  line-height: 1.35;
}

html[dir="rtl"] .home-hero .display-title {
  font-size: clamp(2rem, 4vw, 4.4rem);
}

html[dir="rtl"] .section-title {
  max-width: 23ch;
  font-size: clamp(1.75rem, 3vw, 3.3rem);
  line-height: 1.42;
}

html[dir="rtl"] .mega-grid h2 {
  max-width: 13ch;
  font-size: clamp(2.15rem, 4.1vw, 4.15rem);
  font-weight: 500;
  line-height: 1.38;
}

html[dir="rtl"] .helima-story__copy h2 {
  max-width: 18ch;
  font-size: clamp(2.1rem, 3.8vw, 4.1rem);
  font-weight: 500;
  line-height: 1.42;
}

html[dir="rtl"] .footer-statement h2,
html[dir="rtl"] .schedule-layout h2,
html[dir="rtl"] .studio-grid h2,
html[dir="rtl"] .academy-section-heading h2,
html[dir="rtl"] .academy-copy-grid h2,
html[dir="rtl"] .service-layout h2,
html[dir="rtl"] .commission-request h2,
html[dir="rtl"] .faq-layout h2,
html[dir="rtl"] .lesson-gate h2 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 3.1vw, 3.2rem);
  font-weight: 500;
  line-height: 1.42;
}

html[dir="rtl"] .package-card-content h3 {
  font-size: clamp(1.4rem, 2.25vw, 2.25rem);
  line-height: 1.45;
}

html[dir="rtl"] .woocommerce h1,
html[dir="rtl"] .woocommerce h2,
html[dir="rtl"] .woocommerce h3,
html[dir="rtl"] .woocommerce div.product .product_title {
  font-size: clamp(1.55rem, 2.9vw, 2.7rem);
  line-height: 1.45;
}

html[dir="rtl"] :where(.content-card h3, .entry-card h2, .gallery-card__copy h2, .artwork-card-info h3) {
  line-height: 1.6;
}

@media (max-width: 650px) {
  .display-title {
    font-size: clamp(2.15rem, 9vw, 3.2rem);
    line-height: 1.1;
  }

  .home-hero .display-title {
    font-size: clamp(2.1rem, 9vw, 3.1rem);
  }

  .section-title {
    font-size: clamp(1.8rem, 7.5vw, 2.65rem);
  }

  .helima-story__copy h2,
  .mega-grid h2 {
    font-size: clamp(1.95rem, 8.5vw, 3rem);
  }

  .academy-section-heading h2,
  .academy-copy-grid h2,
  .service-layout h2,
  .commission-request h2,
  .faq-layout h2,
  .lesson-gate h2 {
    font-size: clamp(1.65rem, 7vw, 2.55rem);
  }

  .package-card-content h3 {
    font-size: clamp(1.45rem, 6.5vw, 2.3rem);
  }

  .statement-grid h2,
  .gallery-empty h2 {
    font-size: clamp(1.5rem, 6.5vw, 2.45rem);
  }

  :where(.woocommerce h1, .woocommerce h2, .woocommerce h3, .woocommerce div.product .product_title) {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
  }

  html[dir="rtl"] .display-title {
    font-size: clamp(1.95rem, 8.5vw, 2.95rem);
    line-height: 1.4;
  }

  html[dir="rtl"] .home-hero .display-title {
    font-size: clamp(1.9rem, 8.2vw, 2.85rem);
  }

  html[dir="rtl"] .section-title,
  html[dir="rtl"] .helima-story__copy h2,
  html[dir="rtl"] .mega-grid h2 {
    font-size: clamp(1.7rem, 7vw, 2.55rem);
    line-height: 1.45;
  }

  html[dir="rtl"] .academy-section-heading h2,
  html[dir="rtl"] .academy-copy-grid h2,
  html[dir="rtl"] .service-layout h2,
  html[dir="rtl"] .commission-request h2,
  html[dir="rtl"] .faq-layout h2,
  html[dir="rtl"] .lesson-gate h2 {
    font-size: clamp(1.6rem, 6.8vw, 2.45rem);
  }

  html[dir="rtl"] .package-card-content h3 {
    font-size: clamp(1.4rem, 6.2vw, 2.15rem);
  }

  html[dir="rtl"] .statement-grid h2,
  html[dir="rtl"] .gallery-empty h2 {
    font-size: clamp(1.5rem, 6.5vw, 2.35rem);
  }

  html[dir="rtl"] :where(.woocommerce h1, .woocommerce h2, .woocommerce h3, .woocommerce div.product .product_title) {
    font-size: clamp(1.45rem, 6.5vw, 2.35rem);
  }
}
