/* =========================================================================
   Circus Bazaar Magazine — fonts.css
   Purpose: centralised font registrations + presentation rules
   Files expected (case-sensitive) in /assets/fonts/:
     - Mono45Headline-Regular.woff2
     - SteelfishRgRegular.woff2
     - MastroSubHeadRegularItalic.woff2
     - EditSerifProRegular.woff2
     - EditSerifProRegularIt.woff2
     - EditSerifProBold.woff2
     - EditSerifProBoldIt.woff2
   Notes:
     - Keep filenames exact. Adjust URL paths if you move files.
     - All presentation rules target the Gutenberg class names the editor adds:
         .has-<slug>-font-family
       Some WP installs produce slightly different variants; the selectors below
       include safe alternates where appropriate.
   ========================================================================= */

/* ------------------------------------------------------------
   1) FONT REGISTRATIONS (@font-face)
   ------------------------------------------------------------ */

/* Mono45 Headline — Regular */
@font-face {
  font-family: "Mono45 Headline";
  src: url("../fonts/Mono45Headline-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Steelfish — Regular */
@font-face {
  font-family: "Steelfish";
  src: url("../fonts/SteelfishRgRegular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Mastro SubHead — Regular Italic (subhead/display face) */
@font-face {
  font-family: "Mastro SubHead";
  src: url("../fonts/MastroSubHeadRegularItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* EditSerifPro — Regular (400) */
@font-face {
  font-family: "EditSerifPro";
  src: url("../fonts/EditSerifProRegular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* EditSerifPro — Regular Italic (400 italic) */
@font-face {
  font-family: "EditSerifPro";
  src: url("../fonts/EditSerifProRegularIt.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* EditSerifPro — Bold (700) */
@font-face {
  font-family: "EditSerifPro";
  src: url("../fonts/EditSerifProBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* EditSerifPro — Bold Italic (700 italic) */
@font-face {
  font-family: "EditSerifPro";
  src: url("../fonts/EditSerifProBoldIt.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------------------------
   2) HELPER SELECTOR LISTS (catch editor slug variants)
   ------------------------------------------------------------ */

/* Mono45 selector variants */
:root {
  --mono45-selectors: ".has-mono45-headline-font-family, .has-mono-45-headline-font-family, [class*=\"has-mono45-headline-font-family\"]";
}

/* Steelfish selector variants */
:root {
  --steelfish-selectors: ".has-steelfish-font-family, [class*=\"has-steelfish-font-family\"]";
}

/* Mastro SubHead selector variants */
:root {
  --mastro-subhead-selectors: ".has-mastro-subhead-font-family, .has-mastro-subhead-fontfamily, [class*=\"has-mastro-subhead-font-family\"]";
}

/* EditSerifPro selector variants */
:root {
  --editserif-selectors: ".has-editserifpro-font-family, [class*=\"has-editserifpro-font-family\"]";
}

/* ------------------------------------------------------------
   3) PRESENTATION RULES
   - Display faces: uppercase + display tracking
   - Body face: readable tracking, features enabled, no synthesis
   ------------------------------------------------------------ */

/* -------------------------
   Mono45 — display headline rules
   ------------------------- */
.has-mono45-headline-font-family,
.has-mono-45-headline-font-family,
[class*="has-mono45-headline-font-family"] {
  font-family: "Mono45 Headline", sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important; /* brand tracking for Mono45 */
  line-height: 0.96 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* Ensure descendants inherit transform and spacing cleanly */
.has-mono45-headline-font-family *,
.has-mono-45-headline-font-family *,
[class*="has-mono45-headline-font-family"] * {
  text-transform: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
}

/* -------------------------
   Steelfish — display headline rules
   ------------------------- */
.has-steelfish-font-family,
[class*="has-steelfish-font-family"] {
  font-family: "Steelfish", sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important; /* brand tracking for Steelfish */
  line-height: 0.94 !important; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* Ensure descendants inherit transform and spacing cleanly */
.has-steelfish-font-family *,
[class*="has-steelfish-font-family"] * {
  text-transform: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
}

/* -------------------------
   Mastro SubHead — subhead/display (italic-only)
   ------------------------- */
.has-mastro-subhead-font-family,
[class*="has-mastro-subhead-font-family"],
.has-mastro-subhead-fontfamily {
  font-family: "Mastro SubHead", Georgia, "Times New Roman", serif !important;
  font-style: italic !important;
  letter-spacing: 0.015em !important;
  line-height: 1.12 !important; /* tight for subheads */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

.has-mastro-subhead-font-family *,
[class*="has-mastro-subhead-font-family"] * {
  font-family: inherit !important;
  font-style: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
}

/* -------------------------
   EditSerifPro — body text rules
   ------------------------- */
/* When EditSerifPro is chosen in the editor it will add a class like:
   .has-editserifpro-font-family — these rules apply to those blocks. */
.has-editserifpro-font-family,
[class*="has-editserifpro-font-family"] {
  font-family: "EditSerifPro", Georgia, "Times New Roman", serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1;
  font-synthesis: none; /* prevents browser from synthesizing bold/italic */
}

/* Inherit within the block so inline tags behave normally */
.has-editserifpro-font-family *,
[class*="has-editserifpro-font-family"] * {
  font-family: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
}

/* Ensure strong/bold uses the real 700 face */
.has-editserifpro-font-family b,
.has-editserifpro-font-family strong,
[class*="has-editserifpro-font-family"] b,
[class*="has-editserifpro-font-family"] strong {
  font-weight: 700 !important;
}

/* Ensure italic markers use the italic face */
.has-editserifpro-font-family em,
.has-editserifpro-font-family i,
[class*="has-editserifpro-font-family"] em,
[class*="has-editserifpro-font-family"] i {
  font-style: italic !important;
}

/* ------------------------------------------------------------
   4) EDITOR PREVIEW HELPERS
   - Small helpers so the Site Editor preview mirrors front-end
   ------------------------------------------------------------ */

/* Ensure editor iframe inherits our smoothing/settings (the class below
   is added by the editor inside the iframe root in many setups) */
.editor-styles-wrapper .has-editserifpro-font-family,
.editor-styles-wrapper .has-mono45-headline-font-family,
.editor-styles-wrapper .has-mono-45-headline-font-family,
.editor-styles-wrapper .has-steelfish-font-family,
.editor-styles-wrapper .has-mastro-subhead-font-family {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Small utility: display-style tuning for large headings (can be used in block styles) */
@media (min-width: 900px) {
  .has-editserifpro-font-family.is-style-display,
  .has-editserifpro-font-family h1,
  .has-editserifpro-font-family h2,
  .has-editserifpro-font-family .wp-block-heading {
    letter-spacing: 0.01em !important;
    line-height: 1.15 !important;
  }
}

/* ------------------------------------------------------------
   End of file
   ------------------------------------------------------------ */

