/* ==========================================================================
   BLOCK STYLES — layout modules for posts
   ==========================================================================

   Every rule here is keyed to an `is-style-*` class registered in
   includes/block-styles.php. Selectors are written so the same file styles
   both the front end and the block editor canvas, which is why nothing here
   depends on a page wrapper or a template body class.

   A redesign is an edit to this file. Published posts keep their class names
   and are never re-edited.

   Contrast note: --color-green (#ABC230) is 3.51:1 on --color-blue-dark and
   5.41:1 on --color-blue-darker. Anywhere green sits on teal below, the
   background is --color-blue-darker so the pairing clears 4.5:1.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Bands — full-width tinted sections
   -------------------------------------------------------------------------- */

.is-style-karna-band-light,
.is-style-karna-band-teal,
.is-style-karna-band-deep {
  padding: var(--space-5) var(--space-3);
  margin-block: var(--space-5);
  border-radius: var(--radius-md);
}

.is-style-karna-band-light {
  background: var(--color-light-gray);
  color: var(--color-text);
}

.is-style-karna-band-teal {
  background: var(--color-blue-dark);
  color: var(--color-white);
}

.is-style-karna-band-deep {
  background: var(--color-blue-darker);
  color: var(--color-white);
}

.is-style-karna-band-teal :is(h1, h2, h3, h4),
.is-style-karna-band-deep :is(h1, h2, h3, h4) {
  color: var(--color-white);
}

/* Green on deep teal only — clears 4.5:1. */
.is-style-karna-band-deep .is-style-karna-eyebrow {
  color: var(--color-green);
}

.is-style-karna-band-teal .is-style-karna-eyebrow {
  color: var(--color-white);
}

.is-style-karna-band-teal a,
.is-style-karna-band-deep a {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* --------------------------------------------------------------------------
   Callout — a boxed aside inside the article flow
   -------------------------------------------------------------------------- */

.is-style-karna-callout {
  background: var(--color-light-gray);
  border-left: 4px solid var(--color-blue-dark);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-3);
  margin-block: var(--space-4);
}

.is-style-karna-callout > :first-child { margin-top: 0; }
.is-style-karna-callout > :last-child  { margin-bottom: 0; }


/* --------------------------------------------------------------------------
   Pull quote
   -------------------------------------------------------------------------- */

.is-style-karna-pullquote {
  border-top: 3px solid var(--color-green);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
  margin-block: var(--space-5);
}

.is-style-karna-pullquote p:not(.is-style-karna-caption) {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  line-height: var(--lh-snug);
  color: var(--color-blue-darker);
  margin: 0;
}

.is-style-karna-pullquote .is-style-karna-caption {
  margin-top: var(--space-2);
}


/* --------------------------------------------------------------------------
   Key points
   -------------------------------------------------------------------------- */

.is-style-karna-key-points {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-green);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-block: var(--space-4);
}

.is-style-karna-key-points > :first-child { margin-top: 0; }
.is-style-karna-key-points > :last-child  { margin-bottom: 0; }

.is-style-karna-key-points h3 {
  font-size: var(--text-lg);
  color: var(--color-blue-darker);
}


/* --------------------------------------------------------------------------
   Editor note — internal-looking, for caveats and corrections
   -------------------------------------------------------------------------- */

.is-style-karna-note {
  background: #FFF8E5;
  border: 1px dashed #C9A227;
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  margin-block: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-gray-web);
}

.is-style-karna-note > :first-child { margin-top: 0; }
.is-style-karna-note > :last-child  { margin-bottom: 0; }


/* --------------------------------------------------------------------------
   Framed media
   -------------------------------------------------------------------------- */

.is-style-karna-media-frame {
  padding: var(--space-2);
  background: var(--color-light-gray);
  border-radius: var(--radius-md);
  margin-block: var(--space-4);
}

.is-style-karna-media-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}


/* --------------------------------------------------------------------------
   Call to action
   -------------------------------------------------------------------------- */

.is-style-karna-cta {
  background: var(--color-blue-darker);
  color: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-4);
  margin-block: var(--space-5);
  text-align: center;
}

.is-style-karna-cta :is(h1, h2, h3) {
  color: var(--color-white);
  margin-top: 0;
}

.is-style-karna-cta .wp-block-button__link {
  background: var(--color-green);
  color: #173404;
  font-weight: 700;
  border-radius: 24px;
  padding: 12px 28px;
}

.is-style-karna-cta .wp-block-button__link:hover,
.is-style-karna-cta .wp-block-button__link:focus {
  background: var(--color-white);
  color: var(--color-blue-darker);
}


/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */

.is-style-karna-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-blue-dark);
  margin-bottom: var(--space-1);
}

.is-style-karna-section-head {
  font-family: var(--font-heading);
  color: var(--color-blue-darker);
  margin-bottom: var(--space-2);
}

.is-style-karna-underlined {
  padding-bottom: var(--space-1);
  border-bottom: 3px solid var(--color-green);
  display: inline-block;
}


/* --------------------------------------------------------------------------
   Paragraphs
   -------------------------------------------------------------------------- */

.is-style-karna-lead {
  font-size: var(--text-md);
  line-height: var(--lh-loose);
  color: var(--color-gray-web);
}

.is-style-karna-caption {
  font-size: var(--text-sm);
  color: var(--color-gray-web);
  font-style: italic;
}

.is-style-karna-small {
  font-size: var(--text-xs);
  color: var(--color-gray-web);
}


/* --------------------------------------------------------------------------
   Checklist
   -------------------------------------------------------------------------- */

.is-style-karna-checklist {
  list-style: none;
  padding-left: 0;
}

.is-style-karna-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: var(--space-1);
}

/* Decorative only — the list semantics already carry the meaning. */
.is-style-karna-checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--color-green);
}


/* --------------------------------------------------------------------------
   Reduced motion / print
   -------------------------------------------------------------------------- */

@media print {
  .is-style-karna-band-teal,
  .is-style-karna-band-deep,
  .is-style-karna-cta {
    background: none;
    color: #000;
    border: 1px solid #000;
  }
  .is-style-karna-band-teal :is(h1, h2, h3, h4),
  .is-style-karna-band-deep :is(h1, h2, h3, h4),
  .is-style-karna-cta :is(h1, h2, h3) {
    color: #000;
  }
}
