/* ============================================================
   RESULT BLOCK · Duralis Energy
   Architectural variant — closing callout at the end of each
   numbered section on service pages.

   Intent: technical precision, refined blueprint aesthetic.
   Pure white canvas, hairline rules frame the block top and
   bottom, one tiny green bracket marker (⌐) as sole accent,
   centred caption-scale title. Reads like a signature at the
   foot of an engineering drawing.

   Markup contract (required):
     <section class="result-block" data-reveal
              aria-labelledby="result-block-XX-title">
       <div class="result-block__inner">
         <span class="result-block__eyebrow">The Result</span>
         <h3 class="result-block__title" id="result-block-XX-title">
           …
         </h3>
       </div>
     </section>

   - `data-reveal` → picked up by assets/js/scroll-reveal.js,
     which adds `.is-visible` on viewport entry. No extra JS.
   - The eyebrow label can be any short string ("The Result",
     "Why It Matters", etc.) — only visual.
   ============================================================ */

.result-block {
    /* ── design tokens ─────────────────────────── */
    --rb-bg:           #FFFFFF;
    --rb-ink:          #0E1410;
    --rb-accent:       #69A82F;                    /* Duralis brand green */
    --rb-hairline:     rgba(14, 20, 16, 0.10);
    --rb-font-display: 'Funnel Display', 'Inter Tight', system-ui, sans-serif;
    --rb-font-eyebrow: 'Funnel Sans', ui-monospace, monospace;
    --rb-py:           clamp(1.5rem, 3vw, 2.375rem); /* 24 → 38 */
    --rb-max-w:        80rem;                        /* fills container */
    --rb-radius:       0;

    position: relative;
    display: block;
    background: var(--rb-bg);
    color: var(--rb-ink);
    padding: var(--rb-py) clamp(0.75rem, 2vw, 1.25rem);
    margin-top: clamp(1rem, 2vw, 1.75rem);
    border-radius: var(--rb-radius);
    overflow: hidden;
}

/* Top & bottom hairlines — animated on reveal */
.result-block::before,
.result-block::after {
    content: "";
    position: absolute;
    left:  clamp(0.75rem, 2vw, 1.25rem);
    right: clamp(0.75rem, 2vw, 1.25rem);
    height: 1px;
    background: var(--rb-hairline);
    transform: scaleX(0);
    transform-origin: left;
}
.result-block::before { top: 0; }
.result-block::after  { bottom: 0; transform-origin: right; }

.result-block__inner {
    position: relative;
    max-width: var(--rb-max-w);
    margin: 0 auto;
    text-align: center;
}

.result-block__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--rb-font-eyebrow);
    font-size: 0.625rem;                /* 10px */
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rb-ink);
    opacity: 0.72;                      /* ~6.4:1 on white — passes AA */
    margin: 0 0 clamp(0.5rem, 1vw, 0.75rem);
}

/* Green L-bracket marker — L shape via two borders */
.result-block__eyebrow::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-top:  1px solid var(--rb-accent);
    border-left: 1px solid var(--rb-accent);
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.result-block__title {
    font-family: var(--rb-font-display);
    font-weight: 600;
    font-size: clamp(0.9375rem, 1.6vw, 1.1875rem);   /* 15 → 19 */
    line-height: 1.4;
    letter-spacing: -0.005em;
    color: var(--rb-ink);
    margin: 0;
    text-wrap: balance;
}

/* ── Entrance animations (motion-safe) ───────── */
@media (prefers-reduced-motion: no-preference) {
    .result-block {
        opacity: 0;
        transform: translateY(12px);
        transition:
            opacity   650ms ease,
            transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    .result-block.is-visible { opacity: 1; transform: none; }

    .result-block::before,
    .result-block::after {
        transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1) 150ms;
    }
    .result-block::after { transition-delay: 250ms; }

    .result-block.is-visible::before,
    .result-block.is-visible::after { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
    .result-block::before,
    .result-block::after { transform: scaleX(1); }
}

/* Tablet */
@media (max-width: 1023px) and (min-width: 768px) {
    .result-block__title { font-size: clamp(0.9375rem, 1.4vw, 1.0625rem); }
}

/* Mobile */
@media (max-width: 767px) {
    .result-block { --rb-py: 1.5rem; }
    .result-block__title { font-size: clamp(0.875rem, 3vw, 1rem); }
    .result-block__eyebrow { font-size: 0.6rem; }
}

.result-block :focus-visible {
    outline: 2px solid var(--rb-accent);
    outline-offset: 4px;
}
