/*
 * Block styles of core blocks in posts (inc/editor.php,
 * register_block_style). Loaded on single resources and in the editor.
 * Class selectors beat the tag rules of .rich-text.
 *
 * - core/heading  .is-style-icon-blue / .is-style-icon-green — tile with the
 *   tag icon before the text (Figma 337:12442, 337:12484 / M 337:12002);
 * - core/quote    .is-style-mark — gradient card with a quote mark
 *   (337:12521 / M 337:12077);
 * - core/paragraph .is-style-lead — bold lead-out (337:12478 / M 337:12037).
 */

/* .is-style-icon-blue, .is-style-icon-green — 36 → 60 px tile, 32 → 50 px text */
.wp-block-heading.is-style-icon-blue,
.wp-block-heading.is-style-icon-green {
  --heading-tile: clamp(2.25rem, 1.7169rem + 2.2749vw, 3.75rem);
  position: relative;
  min-height: var(--heading-tile);
  padding-top: max(0rem, calc((var(--heading-tile) - 1em) / 2));
  padding-left: calc(var(--heading-tile) + clamp(0.625rem, 0.4028rem + 0.9479vw, 1.25rem));
  color: var(--nv-blue);
  font-weight: 400;
  font-size: clamp(2rem, 1.6001rem + 1.7061vw, 3.125rem);
  line-height: 1;
  letter-spacing: -0.02em;

  /* .is-style-icon-blue::before — tile with the icon */
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: var(--heading-tile);
    height: var(--heading-tile);
    border-radius: var(--nv-radius-s);
    background: var(--nv-ice) url("../../img/icons/heading-tag-blue.svg") center / 66.667% no-repeat;
  }
}

/* .is-style-icon-green — green text and tile */
.wp-block-heading.is-style-icon-green {
  color: var(--nv-green);

  /* .is-style-icon-green::before */
  &::before {
    background: #f6fbef url("../../img/icons/heading-tag-green.svg") center / 66.667% no-repeat;
  }
}

/* .is-style-mark — quote card: mark above the text on phones, top right from 768 px */
.wp-block-quote.is-style-mark {
  position: relative;
  border-radius: var(--nv-radius-s);
  padding: clamp(1.25rem, 0.5836rem + 2.8436vw, 3.125rem) clamp(1.25rem, -0.0830rem + 5.6872vw, 5rem);
  background: linear-gradient(90deg, rgba(204, 219, 232, 0.3) 0%, rgba(246, 247, 249, 0.5) 100%);
  color: var(--nv-navy);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.1833rem + 0.2844vw, 1.4375rem);
  line-height: 1.2;
  letter-spacing: -0.04em;

  /* .is-style-mark::before — 60 × 48 mark */
  &::before {
    content: "";
    display: block;
    width: 3.75rem;
    height: 3rem;
    margin-bottom: 2.5rem;
    background: url("../../img/icons/quote-mark.svg") center / contain no-repeat;
  }

  /* .is-style-mark > p:first-child / :last-child — cap top at the mark's 40 px (phones) or the
     padding edge (768+), baseline at the padding edge */
  & > p:first-child {
    margin-top: -0.24em;
  }

  & > p:last-child {
    margin-bottom: -0.24em;
  }

  /* .is-style-mark p + p — one blank line (Figma keeps the paragraphs in one text node) */
  & p + p {
    margin-top: 1.2em;
  }

  /* @media (width >= 48em) .is-style-mark — mark in the top right corner; text 80 → 50 px from
     the left edge, as from the top and bottom (Vlad, 2026-10-19) */
  @media (width >= 48em) {
    padding-right: 7.5rem;
    padding-left: clamp(1.25rem, 0.5836rem + 2.8436vw, 3.125rem);

    /* .is-style-mark::before */
    &::before {
      position: absolute;
      top: 1.875rem;
      right: 2.5rem;
      margin-bottom: 0;
    }
  }
}

/* .is-style-lead — bold navy paragraph, 20 → 23 px */
p.is-style-lead {
  color: var(--nv-navy);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1833rem + 0.2844vw, 1.4375rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
