/*
 * Harlowelife Chinese typography system
 * Loaded after the exported stylesheet so every static route shares one scale.
 */

:where(.cn, .artist-cn) {
  --type-display-font: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --type-body-font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --type-latin-font: C059, "Iowan Old Style", Baskerville, serif;

  --type-display: clamp(3rem, 5.5vw, 5rem);
  --type-page-title: clamp(2.5rem, 4vw, 4rem);
  --type-section-title: clamp(2rem, 3vw, 3rem);
  --type-card-title: clamp(1.375rem, 1.7vw, 1.75rem);
  --type-lead: clamp(1.0625rem, 1.2vw, 1.25rem);
  --type-body: 1rem;
  --type-small: 0.875rem;
  --type-label: 0.75rem;

  --leading-display: 1.12;
  --leading-title: 1.22;
  --leading-section: 1.3;
  --leading-card: 1.4;
  --leading-body: 1.75;
  --leading-small: 1.7;
  --leading-label: 1.45;

  font-family: var(--type-body-font);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

:where(.cn, .artist-cn) :is(h1, h2, h3) {
  font-family: var(--type-display-font) !important;
  font-weight: 400;
  text-wrap: balance;
}

:where(.cn, .artist-cn) h1 {
  font-size: var(--type-display) !important;
  line-height: var(--leading-display) !important;
  letter-spacing: -0.04em;
}

:where(.cn, .artist-cn) h2 {
  font-size: var(--type-section-title) !important;
  line-height: var(--leading-section) !important;
  letter-spacing: -0.03em;
}

:where(.cn, .artist-cn) h3 {
  font-size: var(--type-card-title) !important;
  line-height: var(--leading-card) !important;
  letter-spacing: -0.02em;
}

.cn-shop-home h1,
.cn-legal h1 {
  font-size: var(--type-page-title) !important;
  line-height: var(--leading-title) !important;
}

:where(.cn, .artist-cn) :is(article h2, article h3),
.artist-card h2 {
  font-size: var(--type-card-title) !important;
  line-height: var(--leading-card) !important;
}

:where(.cn, .artist-cn) :is(p, li, dd, dt, blockquote, figcaption) {
  font-family: var(--type-body-font) !important;
}

:where(.cn, .artist-cn) :is(p, li) {
  font-size: var(--type-body) !important;
  line-height: var(--leading-body) !important;
}

:where(.cn, .artist-cn) :is(.cn-lead, .shop-lead, .blog-hero > p:last-child, .artist-hero-copy > p) {
  font-size: var(--type-lead) !important;
  line-height: var(--leading-body) !important;
}

:where(.cn, .artist-cn) :is(
  .feature-copy p,
  .shop-card p,
  .shop-service p,
  .shop-journal-grid p,
  .shop-footer p,
  .cn-hero-note,
  .cn-validation-note,
  .shop-note,
  .early-access-benefits li
) {
  font-size: var(--type-small) !important;
  line-height: var(--leading-small) !important;
}

:where(.cn, .artist-cn) :is(small, figcaption) {
  font-family: var(--type-body-font) !important;
  font-size: var(--type-label) !important;
  line-height: var(--leading-label) !important;
}

:where(.cn, .artist-cn) :is(
  .cn-kicker,
  .cn-relic-label,
  .shop-eyebrow,
  .shop-head > div > span,
  .shop-scent-head > span,
  .shop-journal-grid span
) {
  font-family: var(--type-body-font) !important;
  font-size: var(--type-label) !important;
  line-height: var(--leading-label) !important;
  letter-spacing: 0.12em;
}

:where(.cn, .artist-cn) :is(nav a, button, input, select, textarea, label) {
  font-family: var(--type-body-font) !important;
}

:where(.cn, .artist-cn) :is(nav a, button, .cn-primary, .shop-actions a, .shop-final > a) {
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
}

:where(.cn, .artist-cn) :is(input, select, textarea) {
  font-size: var(--type-body) !important;
  line-height: 1.5 !important;
}

.shop-price strong,
.feature-copy h3,
.shop-card h3,
.shop-card strong,
.shop-category span {
  font-family: var(--type-latin-font) !important;
}

@media (max-width: 620px) {
  :where(.cn, .artist-cn) {
    --type-display: 2.75rem;
    --type-page-title: 2.375rem;
    --type-section-title: 1.875rem;
    --type-card-title: 1.375rem;
    --type-lead: 1.0625rem;
  }

  :where(.cn, .artist-cn) h1 {
    letter-spacing: -0.03em;
  }
}
