/*
 * Product typography contract.
 *
 * One editorial family carries brand, reading, navigation, and controls.
 * Monospace is reserved for executable material and measured artifacts.
 * This file loads after section styles so local components cannot invent a
 * third typographic voice.
 */

html[data-design-system="halde"]{
  --type-display-weight:520;
  --type-heading-weight:680;
  --type-body-weight:430;
  --type-ui-weight:600;
  --type-meta-weight:600;
  --type-page-title-size:clamp(38px,4.1vw,68px);
  --type-section-title-size:clamp(30px,3.2vw,48px);
  --type-subsection-title-size:clamp(24px,2.4vw,36px);
  --type-product-hero-size:clamp(46px,3.35vw,60px);
  --type-product-hero-weight:500;
  --type-product-hero-tracking:-.058em;
  --type-product-hero-leading:.98;
  --type-product-section-size:clamp(32px,2.65vw,40px);
  --type-product-card-title-size:clamp(23px,1.85vw,30px);

  /* Landing roles. Components consume these names instead of inventing
     section-local font sizes, weights, tracking, and line heights. */
  --type-landing-hero-size:clamp(64px,5vw,103px);
  --type-landing-section-size:clamp(42px,3.1vw,54px);
  --type-landing-subsection-size:clamp(30px,2.8vw,44px);
  --type-landing-lead-size:clamp(17px,.55vw + 12px,19px);
  --type-landing-body-size:18px;
  --type-landing-hero-weight:560;
  --type-landing-section-weight:500;
  --type-landing-body-weight:400;
  --type-landing-display-tracking:-.058em;
  --type-landing-body-tracking:-.018em;
  --type-landing-display-leading:.98;
  --type-landing-body-leading:1.44;
}

@media (max-width:960px){
  html[data-design-system="halde"]{
    --type-page-title-size:clamp(42px,12vw,72px);
    --type-section-title-size:clamp(34px,9vw,52px);
    --type-subsection-title-size:clamp(26px,7vw,40px);
    --type-product-hero-size:clamp(44px,9.2vw,60px);
    --type-product-section-size:clamp(32px,7vw,40px);
    --type-product-card-title-size:clamp(23px,5vw,30px);
    --type-landing-hero-size:clamp(44px,13.5vw,64px);
    --type-landing-section-size:clamp(40px,6vw,50px);
    --type-landing-subsection-size:clamp(28px,8vw,38px);
    --type-landing-body-size:17px;
  }
}

@media (max-width:620px){
  html[data-design-system="halde"]{
    --type-landing-section-size:clamp(38px,10.5vw,44px);
    --type-landing-body-size:16px;
    --type-product-hero-size:clamp(42px,12vw,54px);
    --type-product-section-size:clamp(30px,9vw,36px);
    --type-product-card-title-size:clamp(22px,7vw,28px);
  }
}

html[data-design-system="halde"] body{
  font-family:var(--font-editorial);
  font-weight:var(--type-body-weight);
}

html[data-design-system="halde"] :where(h1,h2,h3,h4,h5,h6,.disp){
  font-family:var(--font-editorial)!important;
  font-stretch:100%;
  font-synthesis:none;
}

html[data-design-system="halde"] :where(p,li,dd,blockquote){
  font-family:var(--font-editorial);
  font-weight:var(--type-body-weight);
}

/* Human-facing interface language stays in the editorial family. */
html[data-design-system="halde"] :where(
  .mastnav,
  .mastnav a,
  .btn,
  .btn2,
  .lnk,
  .chip,
  .intw,
  .lab,
  .tag,
  button,
  input,
  select,
  textarea,
  summary,
  .breadth-chip,
  .closing-links,
  .trace-toggle
){
  font-family:var(--font-editorial)!important;
}

html[data-design-system="halde"] :where(
  .mastnav,
  .btn,
  .btn2,
  .chip,
  .intw,
  .breadth-chip,
  .closing-links
){
  font-weight:var(--type-ui-weight);
  letter-spacing:.045em;
}

html[data-design-system="halde"] :where(.lab,.tag){
  font-weight:var(--type-meta-weight);
  letter-spacing:.075em;
}

/* Executable text and machine evidence keep a distinct, purposeful mono. */
html[data-design-system="halde"] :where(
  code,
  pre,
  samp,
  kbd,
  .mono,
  .lt-window,
  .lt-window *,
  .ds-command,
  .ds-command *,
  .trace-num,
  .trace-mint,
  .replay-uri,
  .cover-top,
  .cover-activity,
  .cover-foot,
  .mint-ctl-meta
){
  font-family:var(--font-technical)!important;
}

html[data-design-system="halde"] :where(code,pre,samp,kbd,.mono){
  font-variant-ligatures:none;
}
