/* ============================================================
   Greater Zion — V4 Block Toolkit
   ------------------------------------------------------------
   Styling for the v4 editor tools (block styles + patterns)
   registered in lib/v4-block-toolkit.php. Loaded on the front
   end AND injected into the block-editor iframe so what an
   editor sees while typing matches the published page.

   Two class conventions:
     .is-style-gz-v4-*  → registered block STYLES (WP prefixes
                          the slug with `is-style-`). One-click
                          from the block Styles panel.
     .gz-v4-*           → helper classes used inside the v4
                          PATTERNS (stat label/value, hero, cta).

   Self-contained tokens (`--gzv4-*`) so it does not depend on
   gz-global.css being present — important inside the editor
   iframe, which does not load the front-end stylesheet.
   ============================================================ */

:root {
  --gzv4-dark-blue:  #364b54;
  --gzv4-blue-deep:  #243339;
  --gzv4-orange:     #EB6B40;
  --gzv4-aqua:       #42B5BF;
  --gzv4-sand:       #F4ECDF;
  --gzv4-sand-light: #FAF6F0;
  --gzv4-stone:      #3D3D3B;
  --gzv4-stone-soft: #6F6E6A;
  --gzv4-line:       #E6DFD2;
  --gzv4-white:      #ffffff;

  --gzv4-display: "Barlow Condensed", "Barlow", "Arial Narrow", sans-serif;
  --gzv4-body:    "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gzv4-ease:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============== Text styles ============== */

/* Eyebrow — small uppercase kicker above a headline (paragraph style) */
.is-style-gz-v4-eyebrow {
  font-family: var(--gzv4-body);
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gzv4-orange);
  margin: 0 0 0.6rem;
}

/* Lede — larger intro paragraph */
.is-style-gz-v4-lede {
  font-family: var(--gzv4-body);
  font-size: clamp(1.0625rem, 1.5vw, 1.35rem);
  line-height: 1.6;
  color: var(--gzv4-stone);
  max-width: 46rem;
  margin: 0;
  text-wrap: pretty;
}

/* Display — big Barlow Condensed heading (heading style) */
.is-style-gz-v4-display {
  font-family: var(--gzv4-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.012em;
  line-height: 0.95;
  font-size: clamp(2rem, 5vw, 3.75rem);
  color: var(--gzv4-dark-blue);
  margin: 0 0 1rem;
  text-wrap: balance;
}

/* ============== Buttons ============== */

/* Shared button shape for both v4 button styles */
.is-style-gz-v4-orange .wp-block-button__link,
.is-style-gz-v4-outline .wp-block-button__link {
  font-family: var(--gzv4-body);
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.9em 1.75em;
  text-decoration: none;
  transition:
    transform 0.2s var(--gzv4-ease),
    background-color 0.2s var(--gzv4-ease),
    color 0.2s var(--gzv4-ease),
    box-shadow 0.2s var(--gzv4-ease);
}

/* Solid orange (brand orange used as-is — never darkened) */
.is-style-gz-v4-orange .wp-block-button__link {
  background: var(--gzv4-orange);
  color: #15191C;
  border: none;
  box-shadow: 0 8px 22px rgba(235, 107, 64, 0.26);
}
.is-style-gz-v4-orange .wp-block-button__link:hover,
.is-style-gz-v4-orange .wp-block-button__link:focus-visible {
  background: var(--gzv4-sand-light);
  color: var(--gzv4-blue-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(20, 25, 28, 0.28);
}

/* Outline */
.is-style-gz-v4-outline .wp-block-button__link {
  background: transparent;
  color: var(--gzv4-dark-blue);
  border: 2px solid var(--gzv4-dark-blue);
}
.is-style-gz-v4-outline .wp-block-button__link:hover,
.is-style-gz-v4-outline .wp-block-button__link:focus-visible {
  background: var(--gzv4-dark-blue);
  color: var(--gzv4-sand-light);
  transform: translateY(-2px);
}

/* ============== Pull quote ============== */
/* The compound selector (element + 2 classes) plus trailing source order
   overrides the theme's `.page-content .article-content blockquote` box
   (specificity 0,2,1): a 1px border, border-radius, inline-block, and a
   FontAwesome `::before` quote-mark. Reset all of it back to a clean rule. */
blockquote.wp-block-quote.is-style-gz-v4-pullquote {
  display: block;
  border: none;
  border-left: 3px solid var(--gzv4-orange);
  border-radius: 0;
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  position: relative;
  font-family: var(--gzv4-body);
}
blockquote.wp-block-quote.is-style-gz-v4-pullquote::before {
  content: none;
  display: none;
}
blockquote.wp-block-quote.is-style-gz-v4-pullquote p {
  font-family: var(--gzv4-body);
  font-weight: 700;
  font-size: clamp(1.375rem, 2.4vw, 1.9rem);
  line-height: 1.25;
  color: var(--gzv4-dark-blue);
  margin: 0 0 0.5rem;
  text-wrap: pretty;
}
/* The theme absolutely-positions cite (`bottom:-1rem; background:#fff`) at a
   higher specificity, which floats it out of flow. !important on the layout
   props is the reliable way to pull it back inline. */
blockquote.wp-block-quote.is-style-gz-v4-pullquote cite {
  position: static !important;
  bottom: auto !important;
  background: none !important;
  padding: 0 !important;
  display: block;
  margin-top: 0.5rem;
  font-family: var(--gzv4-body) !important;
  font-style: normal;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gzv4-stone-soft) !important;
}
.is-style-gz-v4-section-dark blockquote.wp-block-quote.is-style-gz-v4-pullquote p {
  color: var(--gzv4-sand-light);
}

/* ============== Callout / note ============== */
.is-style-gz-v4-callout {
  box-sizing: border-box;
  max-width: 100%;
  background: var(--gzv4-sand);
  border-left: 4px solid var(--gzv4-orange);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  color: var(--gzv4-stone);
}
.is-style-gz-v4-callout > :first-child { margin-top: 0; }
.is-style-gz-v4-callout > :last-child  { margin-bottom: 0; }
.is-style-gz-v4-callout h1,
.is-style-gz-v4-callout h2,
.is-style-gz-v4-callout h3,
.is-style-gz-v4-callout h4 {
  font-family: var(--gzv4-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--gzv4-dark-blue);
  margin: 0 0 0.4rem;
}

/* ============== Card ============== */
.is-style-gz-v4-card {
  box-sizing: border-box;
  max-width: 100%;
  background: var(--gzv4-white);
  border: 1px solid var(--gzv4-line);
  border-radius: 14px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 10px 30px rgba(20, 25, 28, 0.06);
}

/* ============== Section bands ============== */
/* border-box + max-width:100% so the horizontal padding stays INSIDE the
   container width — without it the padding overflows the viewport on narrow
   screens and clips the content on the right. */
.is-style-gz-v4-section-dark,
.is-style-gz-v4-section-sand {
  box-sizing: border-box;
  max-width: 100%;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4rem);
}
/* Tighter band around a stat strip so the sand frame hugs the numbers. */
.gz-v4-statband {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.is-style-gz-v4-section-sand {
  background: var(--gzv4-sand);
  color: var(--gzv4-stone);
}
.is-style-gz-v4-section-dark {
  background: var(--gzv4-dark-blue);
  color: var(--gzv4-sand-light);
}

/* On dark bands, pull the type + links to light so contrast holds */
.is-style-gz-v4-section-dark .is-style-gz-v4-display,
.is-style-gz-v4-section-dark h1,
.is-style-gz-v4-section-dark h2,
.is-style-gz-v4-section-dark h3,
.is-style-gz-v4-section-dark h4 {
  color: var(--gzv4-sand-light);
}
.is-style-gz-v4-section-dark p,
.is-style-gz-v4-section-dark .is-style-gz-v4-lede {
  color: rgba(250, 246, 240, 0.88);
}
.is-style-gz-v4-section-dark a:not(.wp-block-button__link) {
  color: var(--gzv4-aqua);
}
/* Outline buttons need light treatment on the dark band */
.is-style-gz-v4-section-dark .is-style-gz-v4-outline .wp-block-button__link {
  color: var(--gzv4-sand-light);
  border-color: rgba(250, 246, 240, 0.5);
}
.is-style-gz-v4-section-dark .is-style-gz-v4-outline .wp-block-button__link:hover,
.is-style-gz-v4-section-dark .is-style-gz-v4-outline .wp-block-button__link:focus-visible {
  background: var(--gzv4-sand-light);
  color: var(--gzv4-blue-deep);
  border-color: var(--gzv4-sand-light);
}

/* ============== Stat strip ============== */
.is-style-gz-v4-stats {
  border-top: 1px solid var(--gzv4-line);
  border-bottom: 1px solid var(--gzv4-line);
  gap: 0 !important;
}
.is-style-gz-v4-stats .wp-block-column {
  padding: 1.25rem 1.5rem;
}
.is-style-gz-v4-stats .wp-block-column + .wp-block-column {
  border-left: 1px solid var(--gzv4-line);
}
.gz-v4-stat__label {
  font-family: var(--gzv4-body);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gzv4-stone-soft);
  margin: 0 0 0.4rem;
}
.gz-v4-stat__value {
  font-family: var(--gzv4-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.05;
  color: var(--gzv4-dark-blue);
  margin: 0;
  /* Keep multi-word values whole in narrow columns instead of snapping
     mid-word (theme content inherits an aggressive word-break otherwise). */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
/* Dark-band stats: lighten the divider + value */
.is-style-gz-v4-section-dark .is-style-gz-v4-stats,
.is-style-gz-v4-section-dark .is-style-gz-v4-stats .wp-block-column + .wp-block-column {
  border-color: rgba(250, 246, 240, 0.18);
}
.is-style-gz-v4-section-dark .gz-v4-stat__value { color: var(--gzv4-sand-light); }
.is-style-gz-v4-section-dark .gz-v4-stat__label { color: rgba(250, 246, 240, 0.7); }

/* Stack the strip on small screens: stRow → column, side borders → top */
@media (max-width: 781px) {
  .is-style-gz-v4-stats .wp-block-column + .wp-block-column {
    border-left: none;
    border-top: 1px solid var(--gzv4-line);
  }
  .is-style-gz-v4-section-dark .is-style-gz-v4-stats .wp-block-column + .wp-block-column {
    border-top-color: rgba(250, 246, 240, 0.18);
  }
}

/* ============== Pattern helpers (hero / cta) ============== */
.gz-v4-hero .is-style-gz-v4-display { margin-bottom: 1.25rem; }

.gz-v4-cta { text-align: center; }
.gz-v4-cta .is-style-gz-v4-lede { margin-inline: auto; }
.gz-v4-cta .wp-block-buttons {
  justify-content: center;
  margin-top: 1.75rem;
}
