/* ============================================================================
   BANARASI KARKHANA — Typography layer
   Applies the type system from brand-tokens.css. Loaded AFTER brand-tokens.css.
   Global font adoption (Dawn's --font-*-family vars) is handled in theme.liquid;
   this file owns the brand's own classes + display-axis tuning.
   ========================================================================== */

/* ---- Optical sizing: let Fraunces' opsz follow font-size automatically ---- */
.bk-display,
.bk-h1, .bk-h2, .bk-h3,
.bk-standfirst {
  font-family: var(--bk-font-display);
  font-optical-sizing: auto;            /* opsz tracks size — the clean, correct approach */
  font-variation-settings: "SOFT" 0, "WONK" 0; /* SOFT 0 = Didone-sharp hairlines. WONK 0 = calm authority.
                                                   Toggle WONK 1 in the live polish pass for more character. */
  text-wrap: balance;
}

/* ---- Display headings ----------------------------------------------------- */
.bk-h1 {
  font-size: var(--bk-fs-h1);
  font-weight: 500;
  line-height: var(--bk-leading-display);
  letter-spacing: var(--bk-tracking-display);
  color: var(--bk-ink);
  margin: 0;
}
.bk-h2 {
  font-size: var(--bk-fs-h2);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: var(--bk-tracking-display);
  color: var(--bk-ink);
  margin: 0;
}
.bk-h3 {
  font-size: var(--bk-fs-h3);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--bk-ink);
  margin: 0;
}

/* ---- Standfirst / lead — Fraunces italic, the weaver's-poem voice --------- */
.bk-standfirst {
  font-size: var(--bk-fs-standfirst);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--bk-ink-soft);
  max-width: 48ch;
  margin: 0;
}

/* ---- Eyebrow / tracked-caps label — the ONLY place we use all-caps -------- */
.bk-eyebrow {
  font-family: var(--bk-font-body);
  font-size: var(--bk-fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--bk-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--bk-ink-soft);
  display: inline-block;
}

/* ---- Body editorial ------------------------------------------------------- */
.bk-body {
  font-family: var(--bk-font-body);
  font-size: var(--bk-fs-body-lg);
  line-height: var(--bk-leading-body);
  color: var(--bk-ink);
}
.bk-body--sm { font-size: var(--bk-fs-body); }
.bk-caption {
  font-family: var(--bk-font-body);
  font-size: var(--bk-fs-caption);
  line-height: 1.5;
  color: var(--bk-ink-soft);
}

/* Lock editorial prose to a comfortable measure (62–72ch) */
.bk-measure { max-width: var(--bk-measure); }

/* ---- Price — tabular lining figures so columns align ---------------------- */
.bk-price {
  font-family: var(--bk-font-body);
  font-size: var(--bk-fs-price);
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--bk-ink);
}

/* ---- Bilingual lockup — Devanagari sits above/before Latin at ~0.85x,
        in muted ink, never the gold (provenance, not decoration) ----------- */
.bk-deva {
  font-family: var(--bk-font-deva);
  font-weight: 500;
  color: var(--bk-ink);
  line-height: 1.1;
}
.bk-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}
.bk-lockup .bk-deva { font-size: 0.85em; color: var(--bk-ink-soft); }

/* ---- Weave-term inline link — brass underline, bilingual, educational ----- */
.bk-term {
  color: var(--bk-ink);
  text-decoration: none;
  background-image: linear-gradient(var(--bk-brass), var(--bk-brass));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--bk-dur-fast) var(--bk-ease);
}
.bk-term:hover,
.bk-term:focus-visible { background-size: 100% 1px; }

/* ---- Editorial body defaults inside long-form copy ------------------------ */
.bk-prose { max-width: var(--bk-measure); }
.bk-prose p { margin: 0 0 1.25em; font-size: var(--bk-fs-body-lg); line-height: var(--bk-leading-body); color: var(--bk-ink); }
.bk-prose em { font-family: var(--bk-font-display); font-style: italic; }
