/* Bundled stylesheet. See assets/src/css/manifest.json. */

/* IBM Plex typography — Arabic and French/Latin front ends.
 * Loaded after the legacy page CSS to keep old forced font declarations from
 * overriding the new family. These rules never affect WP admin or icon fonts. */
:root {
  --tm-font-arabic: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  --tm-font-latin: "IBM Plex Sans", Arial, Helvetica, sans-serif;
  --tm-font-body: var(--tm-font-arabic);
  --tm-font-heading: var(--tm-font-arabic);
  --tm-font-interface: var(--tm-font-arabic);
  --tm-font-reading: var(--tm-font-arabic);
  --tm-title-size: clamp(2.1rem, 3.15vw, 3.4rem);
  --tm-title-size-mobile: 2rem;
  --tm-section-heading-size: clamp(2rem, 3vw, 3rem);
}
body.tm-ui-reset:not(.tme-english):not(.tm-english-mirror) {
  --tm-font-body: var(--tm-font-arabic);
  --tm-font-heading: var(--tm-font-arabic);
  --tm-font-interface: var(--tm-font-arabic);
  --tm-font-reading: var(--tm-font-arabic);
}
body.tme-english, body.tm-english-mirror {
  --tm-font-body: var(--tm-font-latin);
  --tm-font-heading: var(--tm-font-latin);
  --tm-font-interface: var(--tm-font-latin);
  --tm-font-reading: var(--tm-font-latin);
}
body.tm-ui-reset, body.tm-ui-reset .tm-site, body.tm-ui-reset .tm-main,
body.tm-ui-reset .tm-footer, body.tm-ui-reset :where(button, input, textarea, select, option) {
  font-family: var(--tm-font-body) !important;
}
/* Keep heading glyphs cohesive across all festival sections without touching icons. */
body.tm-ui-reset :is(h1, h2, h3, h4, h5, h6),
body.tm-ui-reset .tm-main :where([class*="__title"], [class*="__heading"], [class*="-heading"], [class*="-title"]) {
  font-family: var(--tm-font-heading) !important;
}
/* Editorial French headings previously had a hardcoded Arial override. */
body.tme-english .tm-story__content :is(h2,h3,h4),
body.tm-english-mirror .tm-story__content :is(h2,h3,h4) {
  font-family: var(--tm-font-heading) !important;
}
body.tm-ui-reset .tm-main :where(p, li, blockquote, figcaption, dl, dt, dd) {
  font-family: var(--tm-font-body) !important;
}
/* Reduce the former Kufi-sized headings while keeping the rest of the layout. */
@media (min-width: 821px) {
  body.tm-ui-reset .tm-main :is(
    .tm-gourara__copy h2, .tm-workshops-heading--curated h2,
    .tm-gourara-showcase__heading h2, .tm-initiatives__head h2,
    .tmcp-opening h2, .tmcp-tribute__copy h2
  ) {
    font-size: clamp(2rem, 3.1vw, 3.25rem) !important;
    font-weight: 700 !important;
    line-height: 1.32 !important;
  }
}
body.tm-ui-reset .tm-story__title {
  font-family: var(--tm-font-heading) !important;
  font-size: clamp(1.9rem, 2.85vw, 2.875rem) !important;
  font-weight: 700 !important;
  line-height: 1.36 !important;
  letter-spacing: normal !important;
}
body.tme-english .tm-story__title, body.tm-english-mirror .tm-story__title {
  line-height: 1.22 !important;
  letter-spacing: normal !important;
}
body.tm-ui-reset .tm-story__content {
  font-family: var(--tm-font-reading) !important;
  font-weight: 400 !important;
  line-height: 1.98 !important;
}
body.tm-ui-reset .tm-story__content :is(h2,h3,h4) {
  font-family: var(--tm-font-heading) !important;
  font-weight: 700 !important;
}
body.tme-english .tm-story__content, body.tm-english-mirror .tm-story__content {
  line-height: 1.82 !important;
}
/* Shared editorial heading scale — sections, not cards or hero titles. */
body.home.tm-ui-reset .tm-home-blocks :is(
  .tm-festival-news__header h2,
  .tm-festival-countdown h2,
  .tm-official-competition__header h2,
  .tm-initiatives__head h2,
  .tm-home-films__title h2,
  .tm-home-juries__title h2,
  .tm-home-honors__header h2,
  .tm-home-partners__header h2,
  .tm-home-publications .tm-home-editorial-head h2,
  .tm-home-gallery .tm-home-editorial-head h2
) {
  margin-block: 0 !important;
  font-family: var(--tm-font-heading) !important;
  font-size: var(--tm-section-heading-size) !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-wrap: balance;
}
/* Main titles of inner editorial sections also use one shared scale. */
body.tm-ui-reset .tm-main :is(
  .tm-en-section-head h2,
  .tm-media-section-title h2,
  .tm-competitions-heading h2,
  .tm-reels__header h2,
  .tm-workshops-heading h2,
  .tm-workshop-tabs__panel-title,
  .tm-jury-deck__header h2,
  .tm-films-catalog-section__header h2
) {
  font-family: var(--tm-font-heading) !important;
  font-size: clamp(1.75rem, 2.75vw, 2.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-wrap: balance;
}
/* Repeat the correct font behavior once instead of the retired sections-typography layer. */
body.tm-ui-reset .tm-main :where(
  p, ul, ol, li, blockquote, time, figcaption, input, textarea, select, option
) { font-synthesis: none; }
body.tm-ui-reset :where(.dashicons, [class^="dashicons-"], [class*=" dashicons-"]) {
  font-family: dashicons !important;
}
@media (max-width: 820px) {
  body.home.tm-ui-reset { --tm-section-heading-size: clamp(1.5rem, 3.5vw, 1.85rem); }
  body.tm-ui-reset .tm-story__title {
    font-size: clamp(1.7rem, 4.8vw, 2.15rem) !important;
    line-height: 1.4 !important;
  }
}
@media (max-width: 640px) {
  body.home.tm-ui-reset { --tm-section-heading-size: clamp(1.5rem, 5.8vw, 1.75rem); }
  body.tm-ui-reset .tm-story__title { font-size: clamp(1.6rem, 7vw, 2rem) !important; }
}
@media (max-width: 380px) {
  body.home.tm-ui-reset { --tm-section-heading-size: 1.45rem; }
}
