/* Reading text roles use the existing Manrope face and Giftideas palette. */
@layer giftideas-typography {
  body.page .wp-site-blocks {
    --giu-reading-font: "Giftideas Manrope", Arial, sans-serif;
    --giu-reading-light: #36475b;
    --giu-reading-dark: #dce5ef;
    --giu-reading-ink: var(--giu-reading-light);
    --giu-reading-lead: 18px;
  }

  @media (max-width: 781px) {
    body.page .wp-site-blocks { --giu-reading-lead: 16px; }
  }

  /* Surfaces pass down the appropriate ink. Nested light cards reset it. */
  body.page .wp-site-blocks :where(
    .gi-standard-hero, .gi-enquiry-hero, .gi-hero, .gi-emp-hero, .gi-eu-hero,
    .gi-vip-hero, .gi-event-hero, .gi-merch-hero, .gi-pkg-hero, .gin-hero,
    .gi-site .hero, .gi-powerbank-guide .hero, .guide-hero, .giq-hero, .rfq-hero, .gi-clients-hero,
    .gi-emp-process, .gi-eu-process, .gi-event-process, .gi-vip-process,
    .gi-pkg-process, .gi-merch-assurance, .gi-merch-products, .gi-merch-quote-head,
    .gi-cta, .gi-clients-cta, .gi-site section.quote, .gi-standard-quote,
    .gi-company-card, .gi-product-next, .gi-electronics-detail, .rfq-compare thead, .gi-merch-table thead,
    .giq-compare, .giq-process, .gi-powerbank-guide .process,
    .rfq-process, .gi-global-footer-main, .gi-global-footer-cta,
    .wp-container-core-group-is-layout-e41da69d, .wp-container-core-group-is-layout-22e3a99f,
    [style*="background-color:#10213b"], [style*="background-color:#14243a"],
    [style*="background-color:#0c1b31"], [style*="background-color:#08172b"],
    [style*="background-color:#313131"], [style*="background-color:#34445a"],
    [style*="background-color:#505050"], [style*="background-color:#153b61"]
  ) {
    --giu-reading-ink: var(--giu-reading-dark);
  }

  body.page .wp-site-blocks :where(
    .gi-quote-card, .gi-thank-you-card, .gi-electronics-card,
    [style*="background-color:#ffffff"], [style*="background-color:#fffdf9"],
    [style*="background-color:#fff7eb"], [style*="background-color:#fff4df"],
    [style*="background-color:#f5f3ef"], [style*="background-color:#f3efe8"],
    [style*="background-color:#ff9f2f"], [style*="background-color:#ffa200"]
  ) {
    --giu-reading-ink: var(--giu-reading-light);
  }

  @media (min-width: 901px) {
    body.page .wp-site-blocks :where(.gi-electronics-routes) {
      --giu-reading-ink: var(--giu-reading-dark);
    }
  }

  /*
   * Apply the reading styles to content rather than menus, interactive controls
   * or small promotional labels. Inline emphasis and link affordances can inherit.
   */
  body.page .wp-site-blocks :where(.entry-content, main, .gi-global-footer-main, .gi-global-footer-cta)
    :is(p, li, dd, dt, td, th, blockquote, figcaption, summary, .gi-site-footer-copy):not(:where(
      form *, nav *, [role="navigation"] *, .cmplz-cookiebanner *, .gi-company-contact__links *,
      [class*="kicker"], [class*="eyebrow"], [class*="badge"], [class*="pill"], [class*="actions"],
      [class*="trustlabel"], [class*="overline"], [class*="chip"], .wp-block-buttons *,
      p[style*="letter-spacing:0."][style*="font-size:12px"],
      p[style*="letter-spacing:0."][style*="font-size:13px"],
      p[style*="color:#ff6600"][style*="font-size:12px"],
      li:has(> :is(p, ul, ol)), .cmplz-title, .wp-block-post-title
    )) {
    font-family: var(--giu-reading-font) !important;
    font-size: var(--giu-copy-size, 16px) !important;
    line-height: var(--giu-copy-leading, 1.6) !important;
    color: var(--giu-reading-ink) !important;
  }

  body.page .wp-site-blocks :where(figcaption, .wp-element-caption, .gi-proof-note, .gi-quote-proof, .gic-configuration-note) {
    --giu-copy-size: 14px;
    --giu-copy-leading: 1.5;
  }

  body.page .wp-site-blocks :where(
    .gi-standard-hero, .gi-enquiry-hero, .gi-hero, .gi-emp-hero, .gi-eu-hero,
    .gi-vip-hero, .gi-event-hero, .gi-merch-hero, .gi-pkg-hero, .gin-hero,
    .gi-site .hero, .gi-powerbank-guide .hero, .guide-hero, .giq-hero, .rfq-hero, .gi-clients-hero
  ) :is(h1, h2) + p:not(:where(.gi-hero-trust-facts *, .gi-hero-panel *, .gi-panel *)) {
    --giu-copy-size: var(--giu-reading-lead);
    --giu-copy-leading: 1.55;
    font-family: var(--giu-reading-font) !important;
    font-size: var(--giu-copy-size) !important;
    line-height: var(--giu-copy-leading) !important;
    color: var(--giu-reading-ink) !important;
  }
}
