/* Ignite Consulting — self-hosted fonts (latin). Drops the Google Fonts dependency
   so the type system renders instantly, including behind the GFW in China.
   CJK falls back to the system stack (PingFang SC / Microsoft YaHei / Songti) set in tailwind.config. */

@font-face{font-family:'Instrument Serif';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/instrument-serif-400.woff2') format('woff2');}
@font-face{font-family:'Instrument Serif';font-style:italic;font-weight:400;font-display:swap;src:url('/assets/fonts/instrument-serif-400i.woff2') format('woff2');}

@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/inter-400.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/inter-500.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/inter-600.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/inter-700.woff2') format('woff2');}

@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/jetbrains-mono-400.woff2') format('woff2');}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/jetbrains-mono-500.woff2') format('woff2');}

/* 2026-06-17 EN type upgrade: Source Serif 4 (display) + Hanken Grotesk (body), variable, self-hosted latin.
   Replaces Instrument Serif (400-only, too thin) + Inter (generic) on EN pages. zh keeps its serif system. */
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:200 900;font-display:swap;src:url('/assets/fonts/source-serif-4-latin.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:400 700;font-display:swap;src:url('/assets/fonts/hanken-grotesk-latin.woff2') format('woff2');}

/* cursor-follow gold sheen on cards (driven by ignite-fx.js --mx/--my) */
.card{--mx:50%;--my:0%;}
@media (hover:hover) and (pointer:fine){
  .card{background-image:radial-gradient(240px 240px at var(--mx) var(--my), rgba(233,207,148,.055), transparent 62%);}
}

/* ===== ZH typography refinement (2026-06-14) =====
   CJK glyphs are visually denser than Latin, so the Latin-tuned fluid scale reads oversized in
   Chinese ("字太大"). Re-tune the type-scale tokens for zh pages only. html:lang(zh) has higher
   specificity than each page's inline :root, so this wins everywhere without editing any page.
   EN pages (html lang="en") never match :lang(zh) and are untouched. */
html:lang(zh){
  --step-hero: clamp(2.3rem, 1.55rem + 3.1vw, 3.9rem);   /* hero: was ~108px -> ~62px desktop, ~38px mobile */
  --step-3:    clamp(1.7rem, 1.4rem + 1.4vw, 2.5rem);     /* big section headings */
  --step-2:    clamp(1.38rem, 1.22rem + 0.7vw, 1.8rem);
  --step-1:    clamp(1.1rem, 1.03rem + 0.32vw, 1.26rem);  /* lead / card title */
  --step-0:    clamp(0.95rem, 0.91rem + 0.16vw, 1.04rem); /* body copy: ~17-19px -> ~15-16.5px */
}
:lang(zh) .display{ line-height:1.18; letter-spacing:.01em; }
:lang(zh) .h2{ line-height:1.24; letter-spacing:0; }
:lang(zh) .lead{ line-height:1.8; }
:lang(zh) .article-body p, :lang(zh) .reading p{ line-height:1.95; }   /* CJK reads better with airier leading */
:lang(zh) .article-body h3{ font-size:1.1rem; line-height:1.55; }

/* ===== EN display weights (2026-06-17) =====
   Instrument Serif was 400-only, so EN headings had no authority. Source Serif 4 is variable (200-900);
   give headings real ink-mass centrally so we don't touch 122 inline copies. zh is untouched (:lang(zh) wins). */
html:lang(en){ --step-hero: clamp(3rem, 2.2rem + 3.2vw, 5rem); }   /* longer EN headlines sprawled at 6.75rem; tighten to a controlled hero (~80px) */
html:lang(en) .display{ font-weight:680; }
html:lang(en) h1, html:lang(en) h2, html:lang(en) .h1, html:lang(en) .h2{ font-weight:600; }
html:lang(en) .index-num, html:lang(en) .counter, html:lang(en) .footer-word, html:lang(en) #loader .ld-num{ font-weight:680; }
