/*
 * Siavash Habibi — Foundation (single source of type, weight, family)
 * Loaded BEFORE style.css. Colors/spacing/gallery-gap stay owned by Core
 * (siavash-habibi-core → Design). This file owns typography only.
 * Rules: 6 size roles + display, 3 weights, 1 family per language,
 * 2 breakpoints (520 / 1024, both defined by Core). Never hard-code
 * font-size / font-weight / font-family elsewhere; use these tokens.
 */
:root{
  --sh-t-micro:.75rem;                                        /* 12  labels, meta   */
  --sh-t-small:.875rem;                                       /* 14  captions, UI   */
  --sh-t-body:1rem;                                           /* 16  running text   */
  --sh-t-lead:clamp(1.0625rem,1rem + .2vw,1.125rem);          /* 17–18 descriptions */
  --sh-t-h3:clamp(1.125rem,1.02rem + .45vw,1.375rem);         /* 18–22 subheading   */
  --sh-t-h2:clamp(1.5rem,1.15rem + 1.4vw,2.25rem);            /* 24–36 headline     */
  --sh-t-display:clamp(2.75rem,1.7rem + 4.4vw,4.5rem);        /* 44–72 hero only    */
  --sh-w-light:300;--sh-w-regular:300;--sh-w-strong:400;
  --sh-w-body:300;   /* plain text: one step below regular (owner, 2.11.0) */
  --sh-w-sub:300;    /* h3-h6 subheadings (300 is the floor) */
  --sh-lh-title:1.2;--sh-lh-heading:1.3;--sh-lh-body:1.8;
  --sh-font-fa:"Vazirmatn",Tahoma,Arial,sans-serif;
  --sh-font-en:"Inter",Arial,sans-serif;
  --sh-font:var(--sh-font-en);
}
:lang(fa){--sh-font:var(--sh-font-fa);--sh-lh-body:1.8}
:lang(en){--sh-lh-body:1.6}
:where(html){-webkit-text-size-adjust:100%;text-size-adjust:100%}
:where(body){font-family:var(--sh-font);font-size:var(--sh-t-body);font-weight:var(--sh-w-regular);line-height:var(--sh-lh-body)}
:where(h1,h2){font-size:var(--sh-t-h2);font-weight:var(--sh-w-light);line-height:var(--sh-lh-title)}
:where(h3,h4){font-size:var(--sh-t-h3);font-weight:var(--sh-w-regular);line-height:var(--sh-lh-title)}
:where(button,input,select,textarea){font:inherit}
:where(strong,b,th){font-weight:var(--sh-w-strong)}
:where(small,figcaption){font-size:var(--sh-t-small)}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* 2.11.0 — plain text and subheadings one weight step lighter in every state.
   Core forces body 400 / headings 600 with !important, so this layer needs
   higher specificity. h1/h2 titles, <strong>/<b>/<th>, buttons and the
   lightbox controls keep their own weights. */
html body:not(.wp-admin){font-weight:var(--sh-w-body)!important}
html body:not(.wp-admin) :is(p,li,dd,dt,blockquote,figcaption,small,address,label,input,textarea,select,.section-note,.intro-copy,.hero-role,.hero-disciplines){font-weight:var(--sh-w-body)!important}
html body:not(.wp-admin) :is(h3,h4,h5,h6){font-weight:var(--sh-w-sub)!important}
html body:not(.wp-admin) :is(strong,b,th){font-weight:var(--sh-w-strong)!important}

/* 2.14.0 — every font one weight step lighter (600→400, 400→300, 300 stays:
   it is the lightest weight of the 3-weight system) and titles one size step
   smaller. Core sets these through :root custom properties, so a higher-
   specificity html:root block re-points them without touching Core. */
html:root{
  --sh-type-body-weight:300;--sh-type-title-weight:400;
  --sh-gallery-title-weight:400;--sh-gallery-body-weight:300;
  --sh-button-font-weight:400;--sh-hero-title-weight-user:700;
  --sh-hero-title-base-size:var(--sh-t-display);
}

/* 2.16.0 — titles one more size step smaller (h2 28–42 → 24–36, h3 20–26 → 18–22);
   hero title one step larger and heavier (display 40–64 → 44–72, weight 600 → 700).
   Everything reads these tokens (Core --sh-type-* resolve to them), so no per-page rules. */

/* 2.19.0 — titles smaller on tablet and phone (owner request). Desktop (>1024) is unchanged.
   --sh-t-h2 drives h1 and the biography/gallery/category name (.bio-name-main): 24–36 -> 20–28.
   --sh-t-h3 drives every h2/h3 title (Core maps h2 to the h3 role): 18–22 -> 17–20.
   Tokens only; Core's --sh-type-* and every page rule read them, so nothing else changes. */
@media (max-width:1024px){
  :root{
    --sh-t-h2:clamp(1.25rem,1rem + 1.2vw,1.75rem);
    --sh-t-h3:clamp(1.0625rem,.98rem + .4vw,1.25rem);
  }
}
