/**
 * @theme Savannah · Flamingo Magazine
 * @version 2.1
 * @description Layer 4 of 6 · Kit file. Reusable jcd_ui_ components and
 *              plugin overrides.
 *
 * Tokens only: no hex values and no font names. One !important, the footer
 * module margin reset in # 09, explained there.
 *
 * PLUGIN SCOPING
 * Never style a plugin class unscoped: .pp-button {} leaks into every
 * instance sitewide. PowerPack and UABB put the custom class on a
 * WRAPPER with the real control inside. Inherited properties can be set
 * on either; box properties must target the inner control (# 01).
 *
 * ICON COLOR
 * Font Awesome renders glyphs through ::before, and Beaver Builder sets
 * color on both the <i> and its ::before. Icon rules must target both
 * or nothing visible happens.
 */


/* ==========================================================================
   # 01. BUTTONS
   ========================================================================== */

/**
 * PowerPack puts the custom class on a WRAPPER (.fl-module) with the real
 * <a class="pp-button"> inside, so every BOX property below must target
 * the inner control only.
 *
 * A bare .jcd_ui_btn_pill in this selector list paints the wrapper too:
 * the module picks up the ink fill, the pill radius and 24px of padding,
 * and the button renders inside a second, full-width pill. Measured on
 * Flamingo before the fix: module 1360x102, button 182x44 inside it.
 *
 * The both-forms pattern in NAMING.md is safe for INHERITED properties —
 * font, colour, tracking — because the child inherits them anyway. It is
 * unsafe for BOX properties, which paint a second box. See the bare-case
 * rule below for how the direct-element form is handled instead.
 */

/**
 * ONE selector only. `.jcd_ui_btn_pill a.pp-button` was here too, and it
 * is (0,2,1) — two classes plus an element. Every modifier below is
 * (0,2,0), so the base OUTRANKED all of them and no modifier's resting
 * state ever applied. Hover masked it: modifier hovers are (0,3,0) and
 * won, so buttons looked correct on hover and wrong at rest.
 *
 * Dropping it is safe. Its only job was beating PowerPack's own
 * `a.pp-button, a.pp-button:visited` rule, which is (0,1,1) — the
 * remaining selector at (0,2,0) still beats that.
 *
 * RULE: base and modifier must share specificity so source order decides.
 * Adding an element or a third class to either side breaks every
 * modifier at once, silently.
 */

.jcd_ui_btn_pill .pp-button {
  /**
   * 44px is a WCAG 2.5.5 constant, not a spacing step, so it is
   * deliberately a literal rather than a token. inline-flex is required
   * WITH it: on an inline-block anchor min-height reserves the box but
   * leaves the label sitting at the top of it.
   */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-btn);
  font-weight: var(--jcd-weight-semi);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: var(--jcd-tracking-btn);
  padding: var(--jcd-space-sm) var(--jcd-space-lg);
  border-radius: var(--jcd-radius-pill);
  border: 1px solid var(--jcd-color-ink);
  background-color: var(--jcd-color-ink);
  color: var(--jcd-color-paper);
  transition:
    background-color var(--jcd-duration-base) ease-out,
    border-color var(--jcd-duration-base) ease-out,
    color var(--jcd-duration-base) ease-out;
}

/**
 * Bare case: the class applied DIRECTLY to a link or button, e.g. in an
 * HTML module rather than a PowerPack Smart Button. :has() scopes it out
 * whenever a .pp-button is inside, so the wrapper never matches here.
 *
 * Deliberately its own rule rather than a fourth selector above: an
 * unsupported :has() invalidates the ENTIRE selector list it appears in,
 * which would take every PowerPack button down with it. Isolated, the
 * worst case is that this one rule drops and the plugin path is fine.
 */

.jcd_ui_btn_pill:not(:has(.pp-button)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;                     /* flex drops the space before a trailing <span>→</span> */
  min-height: 44px;
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-btn);
  font-weight: var(--jcd-weight-semi);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: var(--jcd-tracking-btn);
  padding: var(--jcd-space-sm) var(--jcd-space-lg);
  border-radius: var(--jcd-radius-pill);
  border: 1px solid var(--jcd-color-ink);
  background-color: var(--jcd-color-ink);
  color: var(--jcd-color-paper);
  text-decoration: none;
  transition:
    background-color var(--jcd-duration-base) ease-out,
    border-color var(--jcd-duration-base) ease-out,
    color var(--jcd-duration-base) ease-out;
}

/**
 * text-decoration restated: the Beaver Builder theme skin underlines
 * a:hover sitewide, and a bare pill is an <a>.
 */
.jcd_ui_btn_pill:not(:has(.pp-button)):hover,
.jcd_ui_btn_pill:not(:has(.pp-button)):focus-visible {
  background-color: var(--jcd-color-accent);
  border-color: var(--jcd-color-accent);
  color: var(--jcd-color-cta-fg);
  text-decoration: none;
}

.jcd_ui_btn_pill:not(:has(.pp-button)):focus-visible {
  outline: 2px solid var(--jcd-color-focus);
  outline-offset: 3px;
}


.jcd_ui_btn_pill .pp-button:hover,
.jcd_ui_btn_pill .pp-button:focus-visible {
  background-color: var(--jcd-color-accent);
  border-color: var(--jcd-color-accent);
  color: var(--jcd-color-cta-fg);
}

.jcd_ui_btn_pill .pp-button:focus-visible {
  outline: 2px solid var(--jcd-color-focus);
  outline-offset: 3px;
}

/* --- Outline variant --------------------------------------------------- */
.jcd_ui_btn_pill_outline .pp-button {
  background-color: transparent;
  border-color: var(--jcd-color-ink);
  color: var(--jcd-color-ink);
}

.jcd_ui_btn_pill_outline .pp-button:hover,
.jcd_ui_btn_pill_outline .pp-button:focus-visible {
  background-color: var(--jcd-color-ink);
  border-color: var(--jcd-color-ink);
  color: var(--jcd-color-paper);
}

/**
 * Bare case, for an <a class="jcd_ui_btn_pill jcd_ui_btn_pill_outline">
 * in an HTML module or a PowerPack Custom Layout. Same weight as the
 * base pill's bare rule (0,2,0) and later in the file, so it wins by
 * source order; the hover pair matches at (0,3,0). Isolated from the
 * .pp-button selectors above for the same :has() reason as the base.
 */
.jcd_ui_btn_pill_outline:not(:has(.pp-button)) {
  background-color: transparent;
  border-color: var(--jcd-color-ink);
  color: var(--jcd-color-ink);
}

.jcd_ui_btn_pill_outline:not(:has(.pp-button)):hover,
.jcd_ui_btn_pill_outline:not(:has(.pp-button)):focus-visible {
  background-color: var(--jcd-color-ink);
  border-color: var(--jcd-color-ink);
  color: var(--jcd-color-paper);
}

/* --- Inverse variant, for use on ink backgrounds ----------------------- */
.jcd_ui_btn_pill_inverse .pp-button {
  background-color: var(--jcd-color-paper);
  border-color: var(--jcd-color-paper);
  color: var(--jcd-color-ink);
}

.jcd_ui_btn_pill_inverse .pp-button:hover,
.jcd_ui_btn_pill_inverse .pp-button:focus-visible {
  background-color: var(--jcd-color-accent);
  border-color: var(--jcd-color-accent);
  color: var(--jcd-color-cta-fg);
}

/* --- Muted variant ------------------------------------------------------ */
/**
 * Loveable .button-secondary. Rule-FILLED, not transparent, so it reads
 * as a surface beside the outline variant rather than a duplicate of it.
 * Hover INVERTS to an ink fill: the border-colour-only hover it replaces
 * was one pixel of state and effectively invisible.
 */

.jcd_ui_btn_pill_muted .pp-button {
  background-color: var(--jcd-color-rule);
  border-color: var(--jcd-color-rule);
  color: var(--jcd-color-ink);
}

.jcd_ui_btn_pill_muted .pp-button:hover,
.jcd_ui_btn_pill_muted .pp-button:focus-visible {
  background-color: var(--jcd-color-ink);
  border-color: var(--jcd-color-ink);
  color: var(--jcd-color-paper);
}

/* --- CTA variant -------------------------------------------------------- */
/**
 * Loveable .button-tertiary. Accent fill, reserved for the primary
 * conversion on a page and nothing else. If everything is a CTA,
 * nothing is.
 *
 * cta-fg rather than paper: on a light accent, white does not pass.
 * The token is measured per project.
 */

.jcd_ui_btn_pill_cta .pp-button {
  background-color: var(--jcd-color-accent);
  border-color: var(--jcd-color-accent);
  color: var(--jcd-color-cta-fg);
}

.jcd_ui_btn_pill_cta .pp-button:hover,
.jcd_ui_btn_pill_cta .pp-button:focus-visible {
  background-color: var(--jcd-color-ink);
  border-color: var(--jcd-color-ink);
  color: var(--jcd-color-paper);
}

/* --- Outline inverse ---------------------------------------------------- */
/**
 * Loveable .button-inverse. Transparent with a currentColor border, for
 * ink rows and photography.
 *
 * DISTINCT from .jcd_ui_btn_pill_inverse above, which is a SOLID paper
 * fill. Two different treatments — do not merge the names.
 */

.jcd_ui_btn_pill_outline_inverse .pp-button {
  background-color: transparent;
  border-color: currentColor;
  color: var(--jcd-color-paper);
}

.jcd_ui_btn_pill_outline_inverse .pp-button:hover,
.jcd_ui_btn_pill_outline_inverse .pp-button:focus-visible {
  background-color: var(--jcd-color-paper);
  border-color: var(--jcd-color-paper);
  color: var(--jcd-color-ink);
}

/* --- Text link with trailing arrow ------------------------------------- */
.jcd_ui_read_link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-btn);
  font-weight: var(--jcd-weight-semi);
  text-transform: uppercase;
  letter-spacing: var(--jcd-tracking-btn);
  color: var(--jcd-color-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--jcd-color-ink);
  padding-bottom: 2px;
  transition:
    color var(--jcd-duration-base) ease-out,
    border-color var(--jcd-duration-base) ease-out,
    gap var(--jcd-duration-base) ease-out;
}

.jcd_ui_read_link::after {
  content: "\2192";
  display: inline-block;
  transition: transform var(--jcd-duration-base) var(--jcd-ease-out);
}

.jcd_ui_read_link:hover,
.pp-content-post:hover .jcd_ui_read_link,
.pp-content-post:has(a:focus-visible) .jcd_ui_read_link {
  color: var(--jcd-color-accent-text);
  border-bottom-color: var(--jcd-color-accent-text);
  gap: 10px;
}

.jcd_ui_read_link:hover::after,
.pp-content-post:hover .jcd_ui_read_link::after,
.pp-content-post:has(a:focus-visible) .jcd_ui_read_link::after {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .jcd_ui_read_link,
  .jcd_ui_read_link::after {
    transition: none;
  }
}

.jcd_ui_read_link a {
  color: inherit;
  text-decoration: none;
}

.jcd_ui_read_link a:focus-visible {
  outline: 2px solid var(--jcd-color-focus);
  outline-offset: 3px;
  border-radius: var(--jcd-radius-sm);
}


/* ==========================================================================
   # 02. KICKER
   ========================================================================== */

.jcd_ui_kicker,
.jcd_ui_kicker a,
.jcd_ui_kicker .pp-heading,
.jcd_ui_kicker h2,
.jcd_ui_kicker h3,
.jcd_ui_kicker h4,
.jcd_ui_kicker h5,
.jcd_ui_kicker h6 {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-kicker);
  font-weight: var(--jcd-weight-semi);
  text-transform: uppercase;
  letter-spacing: var(--jcd-tracking-kicker);
  line-height: 1.3;
  color: var(--jcd-color-accent-text);
}

/**
 * PowerPack's terms list renders each category as <a rel="tag">. The
 * BB skin colours bare links and BB's Bootstrap base recolours them on
 * hover, so every link state is pinned here.
 */
.jcd_ui_kicker a:link,
.jcd_ui_kicker a:visited,
.jcd_ui_kicker a:hover,
.jcd_ui_kicker a:focus {
  color: var(--jcd-color-accent-text);
  text-decoration: none;
}

.jcd_ui_kicker_muted,
.jcd_ui_kicker_muted .pp-heading {
  color: var(--jcd-color-muted);
}


/* ==========================================================================
   # 03. SECTION HEADER — PP SMART HEADING
   ========================================================================== */

.jcd_ui_section_header .pp-heading-prefix {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-kicker);
  font-weight: var(--jcd-weight-semi);
  text-transform: uppercase;
  letter-spacing: var(--jcd-tracking-kicker);
  line-height: 1.3;
  color: var(--jcd-color-accent-text);
  margin-bottom: var(--jcd-space-sm);
  display: block;
}

.jcd_ui_section_header .pp-heading-prefix a,
.jcd_ui_section_header .pp-heading-prefix a:hover {
  color: var(--jcd-color-accent-text);
  text-decoration: none;
}

.jcd_ui_section_header .pp-primary-title {
  font-family: var(--jcd-font-heading);
  font-weight: var(--jcd-weight-display);
  line-height: 1.1;
  color: var(--jcd-color-ink);
}

.jcd_ui_section_header .pp-sub-heading,
.jcd_ui_section_header .pp-sub-heading p {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-body);
  font-weight: var(--jcd-weight-regular);
  line-height: 1.6;
  color: var(--jcd-color-muted);
  margin-top: var(--jcd-space-lg);
}


/* ==========================================================================
   # 04. PULL QUOTE
   ========================================================================== */

.jcd_ui_pull_quote {
  font-family: var(--jcd-font-serif);
  font-size: var(--jcd-text-h3);
  font-weight: var(--jcd-weight-light);
  line-height: 1.3;
  color: var(--jcd-color-ink);
  border-left: 2px solid var(--jcd-color-accent);
  padding-left: var(--jcd-space-lg);
  margin: var(--jcd-space-xl) 0;
}

.jcd_ui_pull_quote__attribution {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-caption);
  font-weight: var(--jcd-weight-regular);
  letter-spacing: var(--jcd-tracking-tight);
  text-transform: uppercase;
  color: var(--jcd-color-muted);
  margin-top: var(--jcd-space-md);
}


/* ==========================================================================
   # 05. AD LABEL
   ========================================================================== */

.jcd_ui_ad_label {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-kicker);
  font-weight: var(--jcd-weight-regular);
  text-transform: uppercase;
  letter-spacing: var(--jcd-tracking-kicker);
  color: var(--jcd-color-muted);
  text-align: center;
  margin-bottom: var(--jcd-space-sm);
}

/**
 * Placeholder slot — no real media, so the kit carries no external
 * dependency and registered BB templates stay portable.
 */
.jcd_ui_ad_slot {
  background-color: var(--jcd-color-rule);
  display: flex;
  align-items: center;
  justify-content: center;
}

.jcd_ui_ad_rail {
  position: sticky;
  top: var(--jcd-header-offset);
}

@media (max-width: 992px) {
  .jcd_ui_ad_rail {
    position: static;
  }
}


/* ==========================================================================
   # 06. NUMBERED LIST
   ========================================================================== */

.jcd_ui_numbered_list ol {
  list-style: none;
  counter-reset: jcd-list;
  margin: 0;
  padding: 0;
}

.jcd_ui_numbered_list li {
  counter-increment: jcd-list;
  display: flex;
  gap: var(--jcd-space-md);
  padding: var(--jcd-space-md) 0;
  border-bottom: 1px solid var(--jcd-color-rule);
}

.jcd_ui_numbered_list li::before {
  content: counter(jcd-list, decimal-leading-zero);
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-lead);
  font-weight: var(--jcd-weight-semi);
  color: var(--jcd-color-accent-text);
  flex-shrink: 0;
}


/* ==========================================================================
   # 07. FORM FIELDS — GRAVITY FORMS
   ========================================================================== */

.jcd_ui_field .gform_wrapper .gfield input[type="text"],
.jcd_ui_field .gform_wrapper .gfield input[type="email"],
.jcd_ui_field .gform_wrapper .gfield input[type="tel"],
.jcd_ui_field .gform_wrapper .gfield textarea,
.jcd_ui_field .gform_wrapper .gfield select {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-body);
  color: var(--jcd-color-ink);
  background: transparent;
  border: 1px solid var(--jcd-color-rule);
  border-radius: var(--jcd-radius-sm);
  padding: var(--jcd-space-sm) var(--jcd-space-md);
  transition: border-color var(--jcd-duration-base) ease-out;
}

.jcd_ui_field .gform_wrapper .gfield input::placeholder,
.jcd_ui_field .gform_wrapper .gfield textarea::placeholder {
  color: var(--jcd-color-placeholder);
}

/**
 * Gravity Forms' default focus box-shadow is removed sitewide by many
 * themes and replaced with nothing, leaving no visible focus state.
 * A ring is substituted — WCAG 2.4.7.
 */
.jcd_ui_field .gform_wrapper .gfield input:focus,
.jcd_ui_field .gform_wrapper .gfield textarea:focus,
.jcd_ui_field .gform_wrapper .gfield select:focus {
  box-shadow: none;
  border-color: var(--jcd-color-ink);
  outline: 2px solid var(--jcd-color-focus);
  outline-offset: 2px;
}

/**
 * Labels are always visible. Placeholder-as-label fails recognition
 * over recall and disappears the moment typing starts.
 */
.jcd_ui_field .gform_wrapper .gfield_label {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-caption);
  font-weight: var(--jcd-weight-medium);
  color: var(--jcd-color-ink);
  margin-bottom: var(--jcd-space-xs);
}

.jcd_ui_field .gform_wrapper .gfield_error .gfield_label,
.jcd_ui_field .gform_wrapper .validation_message {
  color: var(--jcd-color-accent-text);
}

/* --- Underline field variant ------------------------------------------- */
.jcd_ui_field_underline .gform_wrapper .gfield input {
  border: 0;
  border-bottom: 1px solid var(--jcd-color-rule);
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

.jcd_ui_field_underline .gform_wrapper .gfield input:focus {
  border-bottom-color: var(--jcd-color-ink);
}

/* --- Submit ------------------------------------------------------------- */
/**
 * GF 3.0+ Orbital theme. Uses CSS API variables per the GF docs at
 * docs.gravityforms.com/submit-button-css-selectors/
 *
 * Applied GLOBALLY — covers every GF form on the site regardless of
 * whether jcd_ui_field is on the PP module wrapper.
 *
 * Three placements:
 *   .gform_footer        — standard single-page forms
 *   .gform_page_footer   — last page of multi-page forms
 *   .gfield--type-submit — inline submit (end of last row)
 *
 * REQUIRES the Orbital theme. functions.php (§13, the
 * gform_form_theme_slug filter) forces it on every form, because the
 * PowerPack Gravity Forms module otherwise renders the legacy 2.5 theme.
 * On the legacy theme these variables do nothing.
 *
 * Do NOT use direct property overrides here — GF's framework
 * specificity beats them without !important. That includes height,
 * text-transform, letter-spacing and the font family — as direct
 * properties they rendered a 38px, sentence-case button (audit
 * 2026-10-14). Every value is a --gf-ctrl-btn-* variable.
 */

/* Footer and page-footer */
.gform-theme--framework .gform_footer button[type="submit"].gform_button,
.gform-theme--framework .gform_page_footer button[type="submit"].gform_button {
  --gf-ctrl-btn-bg-color-primary:           var(--jcd-color-accent);
  --gf-ctrl-btn-bg-color-hover-primary:     var(--jcd-color-ink);
  --gf-ctrl-btn-border-color-primary:       var(--jcd-color-accent);
  --gf-ctrl-btn-border-color-hover-primary: var(--jcd-color-ink);
  --gf-ctrl-btn-color-primary:              var(--jcd-color-cta-fg);
  --gf-ctrl-btn-color-hover-primary:        var(--jcd-color-paper);
  --gf-ctrl-btn-radius:                     var(--jcd-radius-pill);
  --gf-ctrl-btn-font-size:                  var(--jcd-text-btn);
  --gf-ctrl-btn-font-weight:                var(--jcd-weight-semi);
  --gf-ctrl-btn-padding-x:                  var(--jcd-space-lg);
  --gf-ctrl-btn-padding-y:                  var(--jcd-space-sm);
  --gf-ctrl-btn-size:                       44px;   /* WCAG 2.5.5 target */
  --gf-ctrl-btn-text-transform:             uppercase;
  --gf-ctrl-btn-letter-spacing:             var(--jcd-tracking-btn);
  --gf-ctrl-btn-font-family:                var(--jcd-font-sans);
}

/* Inline submit — different class from footer submit */
.gform-theme--framework .gfield--type-submit button[type="submit"].button {
  --gf-ctrl-btn-bg-color-primary:           var(--jcd-color-accent);
  --gf-ctrl-btn-bg-color-hover-primary:     var(--jcd-color-ink);
  --gf-ctrl-btn-border-color-primary:       var(--jcd-color-accent);
  --gf-ctrl-btn-border-color-hover-primary: var(--jcd-color-ink);
  --gf-ctrl-btn-color-primary:              var(--jcd-color-cta-fg);
  --gf-ctrl-btn-color-hover-primary:        var(--jcd-color-paper);
  --gf-ctrl-btn-radius:                     var(--jcd-radius-pill);
  --gf-ctrl-btn-font-size:                  var(--jcd-text-btn);
  --gf-ctrl-btn-font-weight:                var(--jcd-weight-semi);
  --gf-ctrl-btn-padding-x:                  var(--jcd-space-lg);
  --gf-ctrl-btn-size:                       44px;   /* WCAG 2.5.5 target */
  --gf-ctrl-btn-text-transform:             uppercase;
  --gf-ctrl-btn-letter-spacing:             var(--jcd-tracking-btn);
  --gf-ctrl-btn-font-family:                var(--jcd-font-sans);
}

/* Submission spinner — white on accent or ink fill */
.gform-theme--framework {
  --gf-form-spinner-fg-color: var(--jcd-color-paper);
  --gf-form-spinner-bg-color: rgba(255, 255, 255, 0.35);
}

/* Active press — no variable exists for this, direct property is safe */
.gform-theme--framework .gform_footer button[type="submit"].gform_button:active,
.gform-theme--framework .gform_page_footer button[type="submit"].gform_button:active,
.gform-theme--framework .gfield--type-submit button[type="submit"].button:active {
  transform: translateY(1px);
}


/* ==========================================================================
   # 08. INVERSE CONTEXT
   ========================================================================== */

/**
 * Applied to a ROW sitting on ink — newsletter bands, dark CTAs.
 * The inverse palette exists so components do not need a variant each.
 */

/**
 * TOKEN FLIP, not a rule override.
 *
 * Three tokens reverse meaning on a dark ground:
 *
 * --jcd-color-accent-text is a DARKENED accent, for use as text where
 * the accent itself is too light against paper. On ink that reasoning
 * inverts — the darkened value moves toward the background and gets
 * worse, the accent moves away from it and gets better.
 *
 * --jcd-color-focus is typically a dark value and is invisible on ink.
 *
 * --jcd-color-muted is the one that actually bites. Nine kit rules set it
 * directly: the muted kicker, the section header's sub-heading, the
 * pull-quote attribution, the ad label and five footer parts (blurb,
 * heading, menu links, social icons, legal line). .jcd_ui_inverse setting
 * `color` on the row does NOT reach them, because each sets its own color
 * at higher specificity. Adding jcd_ui_inverse to a dark footer therefore
 * looks like it should fix the muted text and does not. Re-pointing the
 * token does.
 *
 * Re-declaring the three here re-points every rule that consumes them
 * (in the kit files: 19 accent-text rules, 12 focus rings and 9 muted
 * rules) without restating a single selector. Custom properties inherit,
 * so the descendants read the new values. accent-text and focus are
 * registered in _base.css, and their inherits: true is what keeps that
 * working; muted is not registered and inherits by default.
 *
 * jcd_ui_on_ink carries the flip WITHOUT the background and body colour,
 * for surfaces already dark by other means: a Themer header over video,
 * an off-canvas panel, an image hero. Apply it to the row or panel.
 */

.jcd_ui_inverse,
.jcd_ui_on_ink {
  --jcd-color-accent-text: var(--jcd-color-inverse-accent);
  --jcd-color-focus:       var(--jcd-color-inverse-accent);
  --jcd-color-muted:       var(--jcd-color-inverse-muted);
}

.jcd_ui_inverse {
  background-color: var(--jcd-color-ink);
  color: var(--jcd-color-inverse-body);
}

.jcd_ui_inverse h1,
.jcd_ui_inverse h2,
.jcd_ui_inverse h3,
.jcd_ui_inverse h4 {
  color: var(--jcd-color-paper);
}

/**
 * The section header pins its title span to ink at (0,2,0), which
 * outranks the h2 flip above (0,1,1). Paired here, like the fields.
 */
.jcd_ui_inverse .jcd_ui_section_header .pp-primary-title {
  color: var(--jcd-color-paper);
}

.jcd_ui_inverse .jcd_ui_field .gform_wrapper .gfield_label {
  color: var(--jcd-color-inverse-muted);
}

.jcd_ui_inverse .jcd_ui_field .gform_wrapper .gfield input {
  color: var(--jcd-color-paper);
  border-color: var(--jcd-color-inverse-rule);
}

.jcd_ui_inverse .jcd_ui_field .gform_wrapper .gfield input::placeholder {
  color: var(--jcd-color-inverse-muted);
}


/* ==========================================================================
   # 09. FOOTER
   ========================================================================== */

/**
 * SPACING MODEL
 * Beaver Builder adds a bottom margin to every module and PowerPack
 * adds its own to headings. Those stack, compound, and are visible in
 * three different places. Instead: zero all module margins and let a
 * single flex gap on the column own the rhythm.
 */

.section_is_footer,
.section_is_footer_legal {
  border-top: 1px solid var(--jcd-color-rule);
}

.section_is_footer .fl-col-content {
  display: flex;
  flex-direction: column;
  gap: var(--jcd-space-md);
}

/**
 * BB writes module margins at node specificity from each module's
 * Margins fields, so clearing them centrally needs !important. The
 * alternative is zeroing Margins by hand on every module — fine, but
 * easy to miss on the next one added.
 */
.section_is_footer .fl-module,
.section_is_footer .fl-module > .fl-module-content,
.section_is_footer_legal .fl-module,
.section_is_footer_legal .fl-module > .fl-module-content {
  margin: 0 !important;
}

.jcd_ui_footer_logo img {
  height: 24px;
  width: auto;
}

.jcd_ui_footer_blurb {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-caption);
  line-height: 1.625;
  color: var(--jcd-color-muted);
  max-width: 24rem;
}

/**
 * Beaver Builder's footer columns have no gutter, so between 769px and
 * about 1200px the blurb ran right up to the next column's heading.
 * Every column but the last gets one step of space on its right; the
 * stacked columns on phones take theirs from the media query below.
 * (0,4,0) beats BB's per-node column padding (0,3,0). (QA 2026-11-16)
 */
.section_is_footer .fl-col:not(:last-child) > .fl-col-content {
  padding-right: var(--jcd-space-xl);
}

.jcd_ui_footer_heading,
.jcd_ui_footer_heading .pp-heading,
.jcd_ui_footer_heading h2,
.jcd_ui_footer_heading h3 {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-kicker);
  font-weight: var(--jcd-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--jcd-tracking-kicker);
  line-height: 1.3;
  color: var(--jcd-color-muted);
}

.jcd_ui_footer_heading_accent,
.jcd_ui_footer_heading_accent .pp-heading,
.jcd_ui_footer_heading_accent h2,
.jcd_ui_footer_heading_accent h3 {
  color: var(--jcd-color-accent-text);
}

.section_is_footer .pp-advanced-menu ul,
.section_is_footer_legal .pp-advanced-menu ul {
  margin: 0;
  padding: 0;
}

.section_is_footer .pp-advanced-menu .menu > li,
.section_is_footer_legal .pp-advanced-menu .menu > li {
  margin: 0;
}

.jcd_ui_footer_menu .pp-advanced-menu .menu > li > a,
.jcd_ui_footer_legal_menu .pp-advanced-menu .menu > li > a {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-caption);
  font-weight: var(--jcd-weight-regular);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--jcd-color-muted);
  padding: var(--jcd-space-xs) 0;
  transition: color var(--jcd-duration-base) ease-out;
}

.jcd_ui_footer_menu .pp-advanced-menu .menu > li > a:hover,
.jcd_ui_footer_menu .pp-advanced-menu .menu > li > a:focus-visible,
.jcd_ui_footer_legal_menu .pp-advanced-menu .menu > li > a:hover,
.jcd_ui_footer_legal_menu .pp-advanced-menu .menu > li > a:focus-visible {
  color: var(--jcd-color-accent-text);
}

.jcd_ui_footer_menu .pp-advanced-menu .menu > li > a:focus-visible,
.jcd_ui_footer_legal_menu .pp-advanced-menu .menu > li > a:focus-visible {
  outline: 2px solid var(--jcd-color-focus);
  outline-offset: 3px;
  border-radius: var(--jcd-radius-sm);
}

.jcd_ui_footer_legal_menu .pp-advanced-menu-horizontal {
  justify-content: flex-end;
  gap: var(--jcd-space-lg);
}

.jcd_ui_footer_social .pp-social-icon a,
.jcd_ui_footer_social .pp-social-icon a i,
.jcd_ui_footer_social .pp-social-icon a i::before {
  color: var(--jcd-color-muted);
  transition: color var(--jcd-duration-base) ease-out;
}

.jcd_ui_footer_social .pp-social-icon a:hover,
.jcd_ui_footer_social .pp-social-icon a:hover i,
.jcd_ui_footer_social .pp-social-icon a:hover i::before,
.jcd_ui_footer_social .pp-social-icon a:focus-visible,
.jcd_ui_footer_social .pp-social-icon a:focus-visible i,
.jcd_ui_footer_social .pp-social-icon a:focus-visible i::before {
  color: var(--jcd-color-accent-text);
}

.jcd_ui_footer_social .pp-social-icon a:focus-visible {
  outline: 2px solid var(--jcd-color-focus);
  outline-offset: 3px;
  border-radius: var(--jcd-radius-sm);
}

.jcd_ui_footer_social .pp-social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.section_is_footer_legal .fl-col-group {
  align-items: center;
}

.jcd_ui_footer_legal {
  font-family: var(--jcd-font-sans);
  font-size: var(--jcd-text-caption);
  color: var(--jcd-color-muted);
}

@media (max-width: 992px) {
  .jcd_ui_footer_legal_menu .pp-advanced-menu-horizontal {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .jcd_ui_footer_blurb {
    max-width: none;
  }

  /**
   * The flex gap spaces modules WITHIN a column, never BETWEEN columns.
   * Stacked, the columns butted together: blurb into the next heading,
   * the last link into the next column, the copyright into the legal
   * menu. One band step between stacked footer columns; the legal bar,
   * the column gap. (QA 2026-10-21)
   */
  .section_is_footer .fl-col + .fl-col {
    margin-top: var(--jcd-space-xl);
  }

  .section_is_footer .fl-col:not(:last-child) > .fl-col-content {
    padding-right: 0;
  }

  .section_is_footer_legal .fl-col + .fl-col {
    margin-top: var(--jcd-space-md);
  }
}


/* ==========================================================================
   # 10. POWERPACK / UABB TRANSITIONS
   ========================================================================== */

/**
 * One grouped rule. Vendor prefixes are omitted deliberately —
 * -webkit-, -moz- and -o- transition support ended years ago, and
 * -ms-transition was never implemented by any browser.
 */

span.pp-icon,
.pp-video-play-icon,
.pp-video-play-icon svg,
.pp-video-gallery .pp-video-title,
.pp-faq-item .pp-faq-button-icon,
.pp-categories-outer .swiper-button-prev,
.pp-categories-outer .swiper-button-next,
.pp-content-post-carousel .owl-nav button[class*="owl"],
.pp-image-carousel-wrapper .pp-swiper-button,
.pp-social-icon,
.pp-social-icon a,
.pp-testimonials-wrap .owl-theme .owl-dots .owl-dot span {
  transition: all var(--jcd-duration-fast) linear;
}

.pp-testimonials button {
  box-shadow: none;
}

/* ==========================================================================
   # 11. POST GRID TITLE LINKS
   ========================================================================== */

/**
 * [wpbb post:link text="title"] renders an <a> inside the heading.
 * Without this it takes the base link colour. Titles are headings
 * first: they inherit the heading colour and carry no underline.
 */
.pp-content-grid-post-title a,
.pp-content-grid-post-title a:hover,
.pp-content-grid-post-title a:focus {
  color: inherit;
  text-decoration: none;
}


/* ==========================================================================
   # 12. POST MEDIA FRAME
   ========================================================================== */

/**
 * The image wrapper inside a Content Grid custom layout (markup in the
 * build guide).
 *
 * The frame is fixed and the image scales INSIDE it. overflow on the
 * frame is what clips the scale — without it the image grows past its
 * own box. transform never affects layout, so the row cannot shift.
 *
 * Ratio is per row. Set --jcd-media-ratio on the row's class. The default
 * is the token in _tokens.css (4 / 3); the var() fallback only matters
 * for a project that never declares it.
 */

.jcd_ui_post_media {
  overflow: hidden;
  display: block;
}

.jcd_ui_post_media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--jcd-media-ratio, 4 / 3);
  object-fit: cover;
  transition: transform var(--jcd-duration-slow) var(--jcd-ease);
}

/**
 * focus-within as well as hover: the title link is the only focusable
 * thing in the card, so keyboard users get the same feedback.
 */
.pp-content-post:hover .jcd_ui_post_media img,
.pp-content-post:focus-within .jcd_ui_post_media img {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .jcd_ui_post_media img {
    transition: none;
  }
  .pp-content-post:hover .jcd_ui_post_media img,
  .pp-content-post:focus-within .jcd_ui_post_media img {
    transform: none;
  }
}