/*
 * HONGYUAN_GLOBAL_TYPOGRAPHY_V01
 * Shared typography authority for homepage and reused public pages.
 */

:root {
  --hongyuan-type-body: 16px;
  --hongyuan-type-body-line: 1.65;
  --hongyuan-type-small: 12px;
  --hongyuan-type-nav: 14px;
  --hongyuan-type-button: 14px;
  --hongyuan-type-eyebrow: 12px;
  --hongyuan-type-hero-title: clamp(44px, 5.2vw, 74px);
  --hongyuan-type-hero-title-line: 1.015;
  --hongyuan-type-section-title: clamp(32px, 4vw, 48px);
  --hongyuan-type-section-title-line: 1.14;
  --hongyuan-type-card-title: 25px;
  --hongyuan-type-card-title-line: 1.14;
  --hongyuan-type-copy: 15px;
  --hongyuan-type-copy-line: 1.75;
  --hongyuan-type-label: 11px;
  --hongyuan-type-label-line: 1.35;
  --hongyuan-letter-title: -0.035em;
  --hongyuan-letter-tight: -0.02em;
  --hongyuan-letter-ui: 0;
  --hongyuan-section-space: 96px;
}

html[data-hongyuan-route-language="en"] {
  --hongyuan-active-font: var(--hongyuan-font-en);
  --hongyuan-type-hero-title: clamp(52px, 4.55vw, 86px);
  --hongyuan-letter-title: -0.038em;
}

html[data-hongyuan-route-language="cn"],
html:not([data-hongyuan-route-language="en"]) {
  --hongyuan-active-font: var(--hongyuan-font-sans);
}

body {
  font-family: var(--hongyuan-font-family) !important;
  font-size: var(--hongyuan-type-body);
  line-height: var(--hongyuan-type-body-line);
  letter-spacing: var(--hongyuan-letter-ui);
}

button,
input,
textarea,
select {
  font-family: var(--hongyuan-font-family) !important;
}

.hongyuan-brand-copy strong {
  font-size: 18px;
  line-height: 1;
  letter-spacing: var(--hongyuan-letter-tight);
}

.hongyuan-brand-copy small {
  font-size: var(--hongyuan-type-small);
  line-height: 1.25;
}

.hongyuan-nav-link,
.hongyuan-nav-button {
  font-size: var(--hongyuan-type-nav);
  line-height: 1.25;
  letter-spacing: var(--hongyuan-letter-ui);
}

.hongyuan-header-cta,
.hongyuan-btn {
  font-size: var(--hongyuan-type-button);
  line-height: 1.2;
}

.hongyuan-eyebrow,
.hongyuan-product-eyebrow,
.hongyuan-product-form-nav .hongyuan-eyebrow,
.hongyuan-product-products .hongyuan-eyebrow,
.hongyuan-product-procurement .hongyuan-eyebrow {
  font-size: var(--hongyuan-type-eyebrow);
  line-height: var(--hongyuan-type-label-line);
  letter-spacing: .14em;
}

.hongyuan-hero-copy h1,
.hongyuan-hero-copper-v2 .hongyuan-hero-copy h1,
.hongyuan-hero-copper-v2 .hongyuan-hero-copy h1.hongyuan-hero-title-en,
.hongyuan-product-hero h1 {
  font-size: var(--hongyuan-type-hero-title);
  line-height: var(--hongyuan-type-hero-title-line);
  letter-spacing: var(--hongyuan-letter-title);
}

.hongyuan-hero-desc,
.hongyuan-product-hero-desc {
  font-size: 18px;
  line-height: 1.72;
  letter-spacing: 0;
}

.hongyuan-section-head h2,
.hongyuan-rfq-copy h2,
.hongyuan-quality-copy h2,
.hongyuan-product-form-nav-head h2,
.hongyuan-product-section-head h2,
.hongyuan-product-procurement-head h2,
.hongyuan-product-bottom-cta h2 {
  font-size: var(--hongyuan-type-section-title);
  line-height: var(--hongyuan-type-section-title-line);
  letter-spacing: var(--hongyuan-letter-title);
}

.hongyuan-section-desc,
.hongyuan-product-form-nav-head > p,
.hongyuan-product-section-head > p,
.hongyuan-product-procurement-head > p {
  font-size: var(--hongyuan-type-copy);
  line-height: var(--hongyuan-type-copy-line);
}

.hongyuan-product-card-heading h3,
.hongyuan-case-detail-head h3,
.hongyuan-industry-feature-copy h3 {
  font-size: var(--hongyuan-type-card-title);
  line-height: var(--hongyuan-type-card-title-line);
  letter-spacing: var(--hongyuan-letter-title);
}

.hongyuan-product-card-desc,
.hongyuan-product-note,
.hongyuan-product-contact-card p,
.hongyuan-product-empty p {
  font-size: 13px;
  line-height: var(--hongyuan-type-copy-line);
}

.hongyuan-product-filter-reset,
.hongyuan-product-filter-pills button,
.hongyuan-product-card-quote,
.hongyuan-product-more,
.hongyuan-product-pagination button {
  font-size: var(--hongyuan-type-label);
  line-height: var(--hongyuan-type-label-line);
}

.hongyuan-product-search input {
  font-size: 14px;
}

.hongyuan-footer-links h3 {
  font-size: 16px;
  line-height: 1.3;
}

.hongyuan-footer-links a,
.hongyuan-footer-bottom {
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 960px) {
  :root {
    --hongyuan-type-hero-title: 42px;
    --hongyuan-type-section-title: 34px;
    --hongyuan-section-space: 78px;
  }
  html[data-hongyuan-route-language="en"] {
    --hongyuan-type-hero-title: clamp(38px, 8vw, 58px);
  }
  .hongyuan-hero-desc,
  .hongyuan-product-hero-desc {
    font-size: 16px;
  }
}

@media (max-width: 680px) {
  :root {
    --hongyuan-type-body: 15px;
    --hongyuan-type-hero-title: 38px;
    --hongyuan-type-section-title: 30px;
    --hongyuan-type-card-title: 23px;
  }
  html[data-hongyuan-route-language="en"] {
    --hongyuan-type-hero-title: clamp(28px, 5.2vw, 46px);
  }
  .hongyuan-product-search input {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  html[data-hongyuan-route-language="en"] {
    --hongyuan-type-hero-title: clamp(22px, 6.05vw, 28px);
  }
}

/* HONGYUAN_GLOBAL_SHELL_NAV_FIX_V03: keep shared header fixed after fragment mounting. */
[data-hongyuan-shell-header] {
  display: block;
  min-height: var(--hongyuan-header-height, 76px);
}

[data-hongyuan-shell-header] .hongyuan-svg-sprite {
  position: absolute !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

[data-hongyuan-shell-header] .hongyuan-site-header {
  display: block !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1200 !important;
  min-height: 76px !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
  background: rgba(255,255,255,.96) !important;
}

html[data-hongyuan-product-list-page="1"] body {
  padding-top: 0 !important;
}

[data-hongyuan-shell-header] .hongyuan-header-inner {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
}

[data-hongyuan-shell-header] .hongyuan-brand,
[data-hongyuan-shell-header] .hongyuan-primary-nav,
[data-hongyuan-shell-header] .hongyuan-header-actions {
  opacity: 1 !important;
  visibility: visible !important;
}

@media (min-width: 961px) {
  [data-hongyuan-shell-header] .hongyuan-primary-nav {
    display: flex !important;
  }

  [data-hongyuan-shell-header] .hongyuan-nav-item.hongyuan-has-mega > .hongyuan-mega-panel {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  [data-hongyuan-shell-header] .hongyuan-nav-item.hongyuan-has-mega:hover > .hongyuan-mega-panel,
  [data-hongyuan-shell-header] .hongyuan-nav-item.hongyuan-has-mega:focus-within > .hongyuan-mega-panel,
  [data-hongyuan-shell-header] .hongyuan-nav-item.hongyuan-has-mega.is-open > .hongyuan-mega-panel {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  [data-hongyuan-shell-header] .hongyuan-header-mega-intro,
  [data-hongyuan-shell-header] .hongyuan-header-mega-visual-layout,
  [data-hongyuan-shell-header] .hongyuan-header-mega-grade-layout,
  [data-hongyuan-shell-header] .hongyuan-header-mega-product-grid,
  [data-hongyuan-shell-header] .hongyuan-header-mega-grade-visuals,
  [data-hongyuan-shell-header] .hongyuan-header-mega-side {
    opacity: 1 !important;
    visibility: visible !important;
  }
}
