/* ==========================================================================
   v4 HERO TRUST STRIP  —  ported for TASK-521-04
   Source: app.lendzi.com  public/css/v4.css
           branch feature/scrum-508-mobile-layout-trust-badge
           commit 9bfba650732c913205e198302de3f2d185d73264

   Section A is a verbatim subset of v4.css with ONE mechanical substitution,
   `.v4-page` -> `.lz-v4`. Section B is WordPress-only: every rule in it
   neutralises a MEASURED leak from Bootstrap 4.5, the lendzi-theme reset or
   elementor-kit-7. See includes/v4-trust-strip/SYNC.md before changing either.

   SPECIFICITY NOTE, so nobody adds a block that is not needed. TASK-521-01's
   B2 rule `.lz-v4.lz-v4 h1,...,p { line-height: inherit }` is (0,2,1) and
   outranks any component rule declaring line-height on a bare element at
   (0,2,0) — that shipped a 114px headline once, and css/v4-hero.css B3 exists
   to undo it. It CANNOT fire on this component: that selector matches only
   h1-h6 and p, and the strip is span / div / a / img. The one line-height the
   strip declares sits on an <a>. If this component ever gains a <p>, re-check.
   ========================================================================== */

/* ==========================================================================
   A1. DESIGN TOKENS  (28 properties)                    [v4.css 43-82, verbatim]

   The THIRD byte-identical copy of this block, after css/v4-amount-card.css:19
   and css/v4-hero.css:39. Duplicated rather than shared for the reason those
   two give: each component's stylesheet is enqueued only when that component
   is on the page, so drawing the tokens from a neighbour's file would strip all
   28 values out from under this one whenever the neighbour is switched off.

   Byte-identity is what makes the duplication cascade-neutral — equal
   specificity plus equal declarations makes enqueue order unobservable. It is
   only safe for a rule against ITSELF: css/v4-hero.css:119-140 records a real
   defect from duplicating `.lz-v4 .lz-mono`, which tied at (0,2,0) with a
   DIFFERENT rule in another file and won on load order. Verify all three with:
     diff <(sed -n '/A1. DESIGN/,/^}/p' css/v4-hero.css) \
          <(sed -n '/A1. DESIGN/,/^}/p' css/v4-trust-strip.css)
   and with docs/scrum-521-02/verify-port.py, which now asserts it.

   css/v4-hero.css:33-35 names extracting a shared css/v4-base.css as the
   intended endgame "once TASK-521-04 makes a third consumer". This card is that
   third consumer and deliberately did NOT do it: the extraction edits both
   shipped stylesheets and forces a re-measure of every off-switch path, which
   is 521-01's and 521-02's scope, not this card's. Filed against the umbrella.
   ========================================================================== */

.lz-v4 {
    --lz-green:        #20c58a;
    --lz-green-deep:   #169e6e;
    --lz-green-soft:   #d6f3e6;
    --lz-green-mist:   #ebf9f2;

    --lz-teal:         #0e3742;
    --lz-teal-deep:    #082730;
    --lz-teal-mid:     #1c4d59;
    --lz-teal-line:    #1a4a55;

    --lz-paper:        #f6f4ef;
    --lz-paper-2:      #efebe2;
    --lz-white:        #ffffff;
    --lz-ink:          #0a2a32;
    --lz-mute:         #5b7480;
    --lz-line:         #e3e0d6;
    --lz-line-2:       #d6d2c5;

    --lz-amber:        #e8a23a;
    --lz-amber-soft:   #fbe9c7;

    --lz-display:      'Sansation', 'Manrope', system-ui, sans-serif;
    --lz-body:         'Albert Sans', 'Manrope', system-ui, sans-serif;
    --lz-mono:         'JetBrains Mono', ui-monospace, monospace;

    --lz-r-sm:         8px;
    --lz-r-md:         14px;
    --lz-r-lg:         22px;
    --lz-r-xl:         32px;
    --lz-r-pill:       999px;

    --lz-shadow-sm:    0 1px 2px rgba(10,42,50,.06), 0 1px 1px rgba(10,42,50,.04);
    --lz-shadow-md:    0 8px 24px -8px rgba(10,42,50,.12), 0 2px 6px rgba(10,42,50,.05);
    --lz-shadow-lg:    0 28px 60px -20px rgba(10,42,50,.22), 0 6px 14px rgba(10,42,50,.06);
}

/* ==========================================================================
   A2. SCOPED RESET + PAGE BASE                         [v4.css 84-125, verbatim]

   Byte-identical to css/v4-hero.css:83-117. Two declarations in it are
   load-bearing here rather than incidental:

     `box-sizing: border-box` on `.lz-v4 *` — Section B's band section carries
     horizontal padding against the theme's `section { width: 100% }`, which is
     only safe as a border box. B3 below re-declares it on the section itself,
     because this rule reaches the section only when `.lz-v4` is an ANCESTOR of
     it, and on a page that renders the strip without the hero it is not.

     `max-width: 100%` on `.lz-v4 img` — the reason v4.css itself declares
     `max-width: none` on the Trustpilot image at <= 900px (A4 below).

   v4.css:124-125's `.lz-display` and `.lz-mono` utilities are DELIBERATELY NOT
   PORTED, for the reason css/v4-hero.css:119-140 records at length: they are
   the only (0,2,0) selectors in v4.css's A2 block, so unlike everything else
   here they CAN tie with a component rule in another file and win on load
   order. That is not hypothetical — it flattened the card's STEP label
   tracking from 1.1px to 0. This strip uses neither utility.
   ========================================================================== */

.lz-v4,
.lz-v4 *,
.lz-v4 *::before,
.lz-v4 *::after {
    box-sizing: border-box;
}

.lz-v4 {
    margin: 0;
    padding: 0;
    font-family: var(--lz-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--lz-ink);
    background: var(--lz-paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.lz-v4 h1, .lz-v4 h2, .lz-v4 h3, .lz-v4 h4, .lz-v4 p,
.lz-v4 ul, .lz-v4 ol, .lz-v4 figure, .lz-v4 button {
    margin: 0;
    padding: 0;
}

.lz-v4 ul, .lz-v4 ol { list-style: none; }
.lz-v4 a { color: inherit; text-decoration: none; }
.lz-v4 img, .lz-v4 svg { display: block; max-width: 100%; }
.lz-v4 button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   A3. THE TRUST STRIP                                 [v4.css 412-469, verbatim]

   The complete block, SOC 2 height override included. Which badges actually
   render is configuration, not markup — Lendzi_V4_Trust_Strip::config() — so
   the stylesheet carries every badge the source styles and the switches decide.
   Leaving a rule out would have made this file, rather than the configuration,
   the thing that decides. See SYNC.md on the footer's own SOC 2 badge.
   ========================================================================== */

/* Hero trust strip — capped at 1250px and centered so on ultrawide / 4K
   screens the eyebrow + stats don't drift apart with an awkward empty gap. */
.lz-v4 .v4-hero__trust {
    max-width: 1250px;
    margin: 32px auto 0;
    padding: 18px 0 24px;
    border-top: 1px solid var(--lz-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: var(--lz-body);
}
.lz-v4 .v4-hero__trust-eyebrow {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lz-mute);
    font-weight: 700;
}
.lz-v4 .v4-hero__trust-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--lz-mute);
}
.lz-v4 .v4-hero__trust-badge {
    display: inline-flex;
    align-items: center;
}
.lz-v4 .v4-hero__trust-badge-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
.lz-v4 .v4-hero__trust-badge-link:focus-visible {
    outline: 2px solid var(--lz-green);
    outline-offset: 3px;
    border-radius: 4px;
}
/* The Trustpilot asset stacks four rows (verdict / stars / review count / wordmark) into a
   near-square, so it needs far more height than the wide logos to read at the same size. */
.lz-v4 .v4-hero__trust-trustpilot-img {
    height: 110px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}
.lz-v4 .v4-hero__trust-badge-img {
    height: 56px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}
/* soc4.png is square where the other badges are wide, so matching their height would
   make it read as the smallest thing in the row. Sized by optical weight instead. */
.lz-v4 .v4-hero__trust-badge-img--soc2 { height: 68px; }

/* ==========================================================================
   A4. THE TRUST STRIP, <= 900px                       [v4.css 893-923, verbatim]

   The complete block, including 923's `--soc2` twin.

   This block is the FIX for the hazard the brief warns about, not the bug.
   `flex-wrap: nowrap` stays on the outer `.v4-hero__trust` while the inner
   `-stats` wraps, so a badge that does not fit drops to a second row instead of
   pushing the band past the viewport. That matters because the band escapes the
   hero's 20px padding with `margin: 18px -20px 0`: an overflow here does not
   clip, it scrolls the whole page sideways. TASK-508-02 re-laid-out the row
   upstream and its own comment (retained below) records the reasoning.

   v4.css's `@media (max-width: 375px)` block contains no trust-strip selector,
   so there is no third breakpoint to port.
   ========================================================================== */

@media (max-width: 900px) {

    /* Full-width trust band. The badges WRAP here — at 320px the logos fill the row and the
       funded stat drops below. A non-wrapping row would not overflow visibly: the -20px
       margins escape the hero's padding, so anything too wide scrolls the whole page
       sideways instead of clipping. border-top inherited from the desktop rule. */
    .lz-v4 .v4-hero__trust {
        max-width: none;
        margin: 18px -20px 0;
        padding: 14px 20px 8px;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
    }
    .lz-v4 .v4-hero__trust-eyebrow { display: none; }
    .lz-v4 .v4-hero__trust-stats {
        flex: 1;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 16px;
        font-size: 12px;
        align-items: center;
        color: var(--lz-mute);
    }
    .lz-v4 .v4-trust-extra { display: none; }
    .lz-v4 .v4-hero__trust-stat { white-space: nowrap; }
    .lz-v4 .v4-hero__trust-trustpilot-img {
        height: 60px;
        max-width: none;
    }
    .lz-v4 .v4-hero__trust-badge-img { height: 34px; }
    .lz-v4 .v4-hero__trust-badge-img--soc2 { height: 42px; }
}

/* ======================== END OF PORTED SECTION ========================== */

/* ==========================================================================
   B1. FONTS — Albert Sans 400 and 700 only

   The two weights this strip asks for: 400 inherited by the stats and the
   funded figure, 700 declared on the eyebrow. Same variable file the hero and
   the card already ship at fonts/v4/, so this adds no font file and no request
   that was not already being made.

   The other two weights css/v4-hero.css declares (500, 600) are omitted, and
   JetBrains Mono is omitted, for the reason that file gives at :326-329:
   declaring only what a component actually uses is what keeps a real per-font
   off-switch. Sansation is not declared here and cannot be — it resolves
   through lendzi-theme's own @font-face (style.css:58-132). This strip does not
   use --lz-display, so that cross-component dependency does not reach it.
   ========================================================================== */

@font-face {
    font-family: 'Albert Sans';
    src: url('../fonts/v4/AlbertSans-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Albert Sans';
    src: url('../fonts/v4/AlbertSans-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   B2. SHARED HOST NEUTRALISERS

   Byte-identical to css/v4-hero.css:387-429 and to the correspondingly-named
   rules in css/v4-amount-card.css. Duplicated, not shared, for A1's reason.

   Two of these look like dead weight in a component that has no <h1> and no
   <button>, and are not. `Lendzi_V4_Trust_Strip::add_scope_class()` puts
   `.lz-v4` on Elementor's DOCUMENT wrapper, exactly as the hero does, so on a
   page that renders the strip while the hero is switched off this scope is an
   ancestor of every other section in the document — the Resource Center's
   headings, the closing CTA's button. Those elements then need the same
   neutralisers the hero's copy currently gives them. Dropping the h1-h6/p and
   button rules here would hand that page the leaks 521-01 measured and fixed.
   ========================================================================== */

.lz-v4 { font-weight: 400; }

.lz-v4.lz-v4 h1,
.lz-v4.lz-v4 h2,
.lz-v4.lz-v4 h3,
.lz-v4.lz-v4 h4,
.lz-v4.lz-v4 h5,
.lz-v4.lz-v4 h6,
.lz-v4.lz-v4 p {
    line-height: inherit;
    font-variant-numeric: normal;
}

.lz-v4 button {
    text-transform: none;
    letter-spacing: normal;
}

.lz-v4 button:hover,
.lz-v4 button:focus {
    text-decoration: none;
}

.lz-v4 {
    text-align: start;
    letter-spacing: normal;
}

.lz-v4 .v4-pill:focus,
.lz-v4 .lz-btn:focus {
    outline: none;
}
.lz-v4 .v4-pill:focus-visible,
.lz-v4 .lz-btn:focus-visible {
    outline: 2px solid var(--lz-green-deep);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .lz-v4 .v4-pill,
    .lz-v4 .lz-btn {
        transition: none;
    }
}

/* ==========================================================================
   B3. THE BAND'S SECTION

   Upstream the band is a child of `<section class="v4-hero">` and inherits that
   section's `padding: 48px 56px 0` as its containing block, which is what makes
   its width `min(1250px, viewport - 112)`. Here the band is its own Elementor
   section, so that section has to play the same part — and only that part. It
   sets padding and nothing else: no background (Elementor's document wrapper
   already carries A2's `--lz-paper`, exactly as v4's `.v4-page` does under its
   own transparent `.v4-hero`), and no Elementor Style control, because
   Elementor emits a set control as `.elementor-<page> .elementor-element-<id>`
   at (0,3,0) and would outrank every ported rule above.

   THE SHORTHAND IS LOAD-BEARING. lendzi-theme/style.css:1061-1064 sets
   `section { padding: 5rem 0; width: 100% }` on every bare <section>, and
   Elementor's Section::get_html_tag() returns `section`. With
   `html { font-size: 62.5% }` that is 50px top and bottom. A `padding-inline`
   longhand would leave both in place and float the band in a 100px void.
   css/v4-hero.css never neutralises this rule explicitly — it defeats it
   incidentally, for the hero only, via A4's own `padding` shorthand — so this
   is the first place on this ticket where it has to be done on purpose.
   Elementor and elementor-kit-7 set no section padding of their own (grepped),
   so there is nothing else here to zero.

   `box-sizing` is re-declared rather than left to A2's `.lz-v4 *`, which
   reaches this section only while `.lz-v4` is an ANCESTOR of it. On a page that
   renders the strip with the hero switched off, the scope class this component
   adds to the document wrapper is what provides that — but the strip's own
   shortcode root sits INSIDE the section, so if that filter ever stops
   applying, `width: 100%` plus 112px of padding computes as a content box and
   overflows by exactly 112px at every desktop width, silently. One line.
   ========================================================================== */

.lz-v4 .v4-trust-band {
    box-sizing: border-box;
    padding: 0 56px;
}

@media (max-width: 900px) {
    .lz-v4 .v4-trust-band {
        padding: 0 20px;
    }
}

/* ==========================================================================
   B4. THE ELEMENTOR BRIDGE

   The same problem css/v4-hero.css B5 solves, one level shallower. Elementor
   emits six boxes between the section and the band:

     section > .elementor-container > .elementor-column
             > .elementor-widget-wrap > .elementor-widget
             > .elementor-widget-container > [data-lz-v4-trust-strip]

   `display: contents` removes all six, leaving the rendered box tree as
   `section > .v4-hero__trust` — one parent, which is what v4 has. Every ported
   rule in Section A then applies with no arithmetic and no offset.

   The container is included DELIBERATELY, and removal is why this needs no
   specificity escalation. Two rules would otherwise own that box:

     elementor-kit-7 caps `.elementor-section-boxed > .elementor-container` at
     1250px, 1024px at <= 1024, and 480px at <= 544. That last one would render
     the mobile band 480px wide inset 12px from the left instead of full-bleed —
     measured, and invisible without measuring.

     Elementor frontend.css makes `.elementor-container` a wrapping flex
     container, so the band becomes a flex item and shrinks to fit: measured 35px
     wide at 1440px.

   A box that is not generated has neither a max-width nor a flex-basis, so both
   fights are won by removal. css/v4-hero.css B5 needed a (0,4,0) compound to
   outrank the kit's caps because its container has to remain a real box (it IS
   the hero's grid); this one does not.

   The section also carries Elementor's `layout: full_width`, which is belt and
   braces rather than the mechanism: verified in
   elementor/includes/elements/section.php:246-258 to be a `prefix_class`
   control with NO `selectors` key, so it renders as the class
   `elementor-section-full_width` and generates no CSS — it creates no (0,3,0)
   rule, which is why setting it does not violate the no-Style-controls rule
   above. It fixes only the 480px cap on its own. Its real value is the editor,
   where the guard below turns `display: contents` off.

   Guarded on `elementor-editor-active` for B5's reason: `display: contents`
   removes the boxes Elementor draws its column handles on. Elementor adds that
   class to the preview body and removes it in Preview mode, so the frontend and
   Preview both get the bridge. Test the editor AND its preview toggle.

   `display: contents` changes boxes only, never selector matching — `>` still
   walks the element tree — so lendzi-theme's `.entry-content > *:not(...)`
   58rem cap still matches `.elementor` and not the band.
   ========================================================================== */

body:not(.elementor-editor-active) .lz-v4 .v4-trust-band > .elementor-container,
body:not(.elementor-editor-active) .lz-v4 .v4-trust-band > .elementor-container > .elementor-column,
body:not(.elementor-editor-active) .lz-v4 .v4-trust-band > .elementor-container > .elementor-column > .elementor-widget-wrap,
body:not(.elementor-editor-active) .lz-v4 .v4-trust-band > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget,
body:not(.elementor-editor-active) .lz-v4 .v4-trust-band > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget > .elementor-widget-container,
body:not(.elementor-editor-active) .lz-v4 .v4-trust-band [data-lz-v4-trust-strip] {
    display: contents;
}

/* ==========================================================================
   B5. WITHDRAWING css/v4-hero.css B11

   B11 gives `.lz-v4 .v4-hero` 48px / 24px / 12px of bottom padding at (0,2,0),
   for one stated reason: the trust band did not exist, so with nothing after it
   the card sat flush against the next section's edge. Its docblock asks whoever
   adds the band to come back here.

   The band now supplies that space itself, with v4's own `margin: 32px auto 0`
   collapsing through the band section's zero top padding — measured 32px above
   900px and 18px at or below it, matching the reference. Left in place the two
   would STACK: 80px desktop against the reference's 32px.

   (0,3,0), one class above B11, so this does not depend on enqueue order. v4's
   own shorthands already declare 0 here, so this restores the reference rather
   than diverging from it.

   The coupling to this file is the mechanism, not an accident: this stylesheet
   is enqueued only on a page that actually renders the strip, so with the strip
   switched off B11 stands unopposed and the hero keeps its closing space — no
   `:has()`, and no test on where the band sits. If the strip is on a page but
   NOT immediately after the hero, the hero closes flush; accepted, and asserted
   against by docs/scrum-521-04/overflow-sweep.js's adjacency check.
   ========================================================================== */

.lz-v4.lz-v4 .v4-hero {
    padding-bottom: 0;
}

/* ==========================================================================
   B6. THE HOST TRANSITIONS EVERY <a>, INCLUDING THIS ONE

   A measured leak, and the one this component's computed-style diff was worth
   writing for. Something in the host stack declares:

       a, path { transition: all 0.15s linear }

   at (0,0,1), which reaches `.v4-hero__trust-badge-link`. v4 declares no
   transition on that element, so this is a straight fidelity difference — but
   `transition: all` also makes it a behavioural one, because `font-size` is an
   animatable property.

   HOW IT PRESENTED, because it is worth knowing what this looks like from the
   outside. The diff reported the link and the Trustpilot image with a font-size
   of 13.5547px against the reference's 12px, at 900px and 600px only. The value
   is not reproducible: a fresh load at 900px reads 12px, a resize from 1440 to
   900 reads 13.7773px, and a second visit to 900px in the same session reads
   12.6653px. It was the 14px -> 12px step at the <= 900px breakpoint, animating
   over 150ms, sampled two frames in. Not a leak in the port's font sizes — the
   `.v4-hero__trust-stats` rule reports a clean 12px throughout — and not
   something a screenshot or a settled measurement would ever show.

   Scoped to the badge link rather than to `.lz-v4 a`, and kept out of B2, for
   the same reason B2 names `.v4-pill` and `.lz-btn` individually: B2 is
   byte-shared with two other stylesheets and must stay that way.

   `initial` rather than `none`, and the difference is not pedantry. Both are
   behaviourally inert, but `none` computes `transition-property: none` where a
   page with no rule at all computes the initial `all` with a 0s duration —
   measured. Section B exists to restore the reference's computed values, so it
   has to land on the reference's values and not merely on a working page. With
   `none` the diff reported 20 residual transition-* differences; with `initial`
   it reports zero.
   ========================================================================== */

.lz-v4 .v4-hero__trust-badge-link {
    transition: initial;
}
