/*
 * Shared site typography. Important declarations in this layer take precedence
 * over legacy, unlayered page rules without creating a selector-specificity race.
 */
@layer giftideas-typography {
  body.page {
    --giu-ink: #10213b;
    --giu-on-navy: #fff;
    --giu-accent: #ffa200;
    --giu-h1: clamp(40px, 4.2vw, 64px);
    --giu-h2: clamp(30px, 3.15vw, 46px);
    --giu-h3: clamp(22px, 2.05vw, 29px);
    --giu-heading-ink: var(--giu-ink);
  }
  @media (max-width: 781px) {
    body.page {
      --giu-h1: clamp(36px, 9vw, 48px);
      --giu-h2: 28px;
      --giu-h3: 22px;
    }
  }

  /* Display the approved 152×50 source at its native size or smaller. */
  .gi-site-header img.gi-site-logo {
    width: 152px !important;
    max-width: 100%;
    height: auto !important;
  }
  @media (max-width: 480px) {
    .gi-site-header img.gi-site-logo { width: 144px !important; }
  }

  body.page .wp-site-blocks :is(h1,h2,h3):not(.page-id-523 .wp-block-post-title) {
    font-family: "Giftideas Manrope", Arial, sans-serif !important;
    font-style: normal !important;
    font-weight: 700 !important;
    color: var(--giu-heading-ink) !important;
    overflow-wrap: break-word;
  }
  body.page .wp-site-blocks :is(h1:not(.page-id-523 .wp-block-post-title), .gi-clients-hero h2) {
    font-size: var(--giu-h1) !important;
    line-height: 1.08 !important;
    letter-spacing: -.045em !important;
  }
  body.page .wp-site-blocks h2:not(.gi-clients-hero h2) {
    font-size: var(--giu-h2) !important;
    line-height: 1.13 !important;
    letter-spacing: -.035em !important;
  }
  body.page .wp-site-blocks h3 {
    font-size: var(--giu-h3) !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em !important;
  }

  /* Dark banners and panels; light cards within them continue to use navy. */
  body.page .wp-site-blocks h1:not(.wp-block-post-title,.gi-thank-you-card h1) {
    --giu-heading-ink: var(--giu-on-navy);
  }
  body.page .wp-site-blocks :is(
    .gi-hero-panel, .gi-hero .gi-panel, .gi-cta-row, .gi-clients-cta, .gi-clients-hero,
    .gi-emp-process, .gi-eu-process, .gi-event-process,
    .gi-merch-quote-head, .gi-merch-assurance, .gi-merch-products, .gi-pkg-process,
    .gi-vip-process, .gi-site section.quote, .giq-compare, .giq-process,
    .gi-powerbank-guide .process, .rfq-process,
    .wp-container-core-group-is-layout-e41da69d, .wp-container-core-group-is-layout-22e3a99f,
    .wp-block-column[style*="background-color:#10213b"]
  ) h2,
  body.page .wp-site-blocks :is(
    .gi-emp-step, .gi-eu-step, .gi-event-step, .gi-pkg-step, .gi-vip-step,
    .gi-electronics-detail, .gi-company-card, .giq-compare-grid,
    .gi-merch-assurance-card, .gi-merch-card-body, .wp-block-column[style*="background-color:#10213b"],
    .gi-global-footer-grid
  ) h3,
  body.page .wp-site-blocks .gi-global-footer-cta h2,
  body.page .wp-site-blocks .gi-electronics-routes__inner h2:not(#electronics-routes-title) {
    --giu-heading-ink: var(--giu-on-navy);
  }

  @media (min-width: 901px) {
    body.page .wp-site-blocks .gi-electronics-routes h2 {
      --giu-heading-ink: var(--giu-on-navy);
    }
  }

  /* Repeated subcomponents use role-specific scales across pages. */
  body.page .wp-site-blocks .gi-hero-trust-facts h2 {
    font-size: 26px !important;
    --giu-heading-ink: var(--giu-accent);
  }
  body.page .wp-site-blocks .gi-company-contact h2 {
    font-size: var(--giu-h3) !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em !important;
  }
  body.page .wp-site-blocks .giftidea-rfq-form h3 {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }
  body.page .wp-site-blocks .gi-global-footer-grid h3 {
    font-size: 14px !important;
    line-height: 1.3 !important;
    letter-spacing: .02em !important;
  }
}
