/*
 * Editorial SEO copy — front end.
 *
 * Two placements, deliberately different in weight:
 *   .hhpfb-seo-intro  under the category H1, above the grid. Restrained: it
 *                     must not compete with the vehicle picker below it.
 *   .hhpfb-seo-body   under the grid, clamped behind a Read more. Given real
 *                     editorial treatment, because a block that reads as an
 *                     afterthought makes the whole page feel like one.
 *
 * The clamp fades with a MASK, not a gradient overlay: a mask fades the text
 * itself to transparent, so it works over any background without having to
 * guess the page colour. And nothing is ever display:none — the full copy is
 * painted at all times, so a crawler reads it whatever the clamp is doing.
 */

.hhpfb-seo-intro,
.hhpfb-seo-body {
    --hh-seo-ink: #111111;
    --hh-seo-body: #3d3d3d;
    --hh-seo-muted: #6b6b6b;
    --hh-seo-accent: #FEDD00;
    --hh-seo-rule: rgba(17, 17, 17, 0.09);
    --hh-seo-measure: 68ch;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--hh-seo-body);
    -webkit-font-smoothing: antialiased;
}

/* ===================== above the grid ===================== */

.hhpfb-seo-intro {
    margin: 2px 0 22px;
    max-width: var(--hh-seo-measure);
}

.hhpfb-seo-heading {
    margin: 0 0 8px;
    color: var(--hh-seo-ink);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.011em;
    text-wrap: balance;
}

.hhpfb-seo-intro .hhpfb-seo-copy {
    font-size: 15.5px;
    line-height: 1.62;
}

.hhpfb-seo-intro .hhpfb-seo-copy p { margin: 0; }

/* ===================== below the grid ===================== */

.hhpfb-seo-body {
    position: relative;
    margin: 48px 0 12px;
    padding-top: 30px;
    border-top: 1px solid var(--hh-seo-rule);
}

/* A short accent stub riding the rule — the one place the brand yellow is
   allowed to appear in this block, so it reads as ours without shouting. */
.hhpfb-seo-body::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 46px;
    height: 3px;
    background: var(--hh-seo-accent);
    border-radius: 0 0 2px 2px;
}

.hhpfb-seo-body .hhpfb-seo-heading {
    font-size: clamp(20px, 2.6vw, 25px);
    margin-bottom: 14px;
}

.hhpfb-seo-copy {
    max-width: var(--hh-seo-measure);
    font-size: 16px;
    line-height: 1.72;
}

.hhpfb-seo-copy > *:first-child { margin-top: 0; }
.hhpfb-seo-copy > *:last-child  { margin-bottom: 0; }

.hhpfb-seo-copy p { margin: 0 0 1.1em; }

/* Lede: the opening paragraph carries a touch more presence, the way a
   considered article opens. */
.hhpfb-seo-body .hhpfb-seo-copy > p:first-of-type {
    font-size: 17px;
    line-height: 1.62;
    color: var(--hh-seo-ink);
}

.hhpfb-seo-copy h2,
.hhpfb-seo-copy h3 {
    margin: 1.7em 0 .45em;
    color: var(--hh-seo-ink);
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.008em;
    text-wrap: balance;
}

.hhpfb-seo-copy ul,
.hhpfb-seo-copy ol { margin: 0 0 1.1em; padding-left: 1.15em; }
.hhpfb-seo-copy li { margin: 0 0 .45em; padding-left: .15em; }
.hhpfb-seo-copy li::marker { color: var(--hh-seo-muted); }

.hhpfb-seo-copy strong { color: var(--hh-seo-ink); font-weight: 650; }

.hhpfb-seo-copy a {
    color: var(--hh-seo-ink);
    text-decoration: underline;
    text-decoration-color: var(--hh-seo-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: background-color 140ms ease;
}

.hhpfb-seo-copy a:hover { background: var(--hh-seo-accent); }

/* ===================== read more ===================== */

.hhpfb-seo-readmore { position: relative; }

/* Only ever applied by seo-content.js, so a no-JS reader gets the full text
   instead of a permanently truncated block. */
.hhpfb-seo-readmore.is-clamped .hhpfb-seo-copy {
    max-height: 190px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, rgba(0, 0, 0, 0.35) 84%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 60%, rgba(0, 0, 0, 0.35) 84%, transparent 100%);
}

.hhpfb-seo-readmore.is-clamped.is-open .hhpfb-seo-copy {
    max-height: none;
    -webkit-mask-image: none;
            mask-image: none;
}

.hhpfb-seo-more {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    padding: 9px 17px;
    background: transparent;
    border: 1.5px solid rgba(17, 17, 17, 0.16);
    border-radius: 999px;
    color: var(--hh-seo-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.005em;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.hhpfb-seo-more:hover {
    border-color: var(--hh-seo-ink);
    background: var(--hh-seo-accent);
    box-shadow: 0 2px 10px rgba(17, 17, 17, 0.09);
}

.hhpfb-seo-more:focus-visible {
    outline: 2px solid var(--hh-seo-ink);
    outline-offset: 2px;
}

.hhpfb-seo-more-chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.is-open .hhpfb-seo-more-chevron { transform: translateY(1px) rotate(-135deg); }

/* ===================== FAQ ===================== */

.hhpfb-seo-faq {
    margin-top: 38px;
    max-width: var(--hh-seo-measure);
}

.hhpfb-seo-faq-title {
    margin: 0 0 4px;
    color: var(--hh-seo-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hhpfb-seo-faq-item {
    border-bottom: 1px solid var(--hh-seo-rule);
}

.hhpfb-seo-faq-item:first-of-type { border-top: 1px solid var(--hh-seo-rule); }

.hhpfb-seo-faq-item > summary {
    position: relative;
    padding: 15px 34px 15px 0;
    color: var(--hh-seo-ink);
    font-size: 15.5px;
    font-weight: 650;
    line-height: 1.45;
    cursor: pointer;
    list-style: none;
    transition: color 140ms ease;
}

.hhpfb-seo-faq-item > summary::-webkit-details-marker { display: none; }
.hhpfb-seo-faq-item > summary:hover { color: #000; }

/* Plus that becomes a minus — reads as "more here" more clearly than a
   chevron when the rows are stacked. */
.hhpfb-seo-faq-item > summary::before,
.hhpfb-seo-faq-item > summary::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    background: var(--hh-seo-ink);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), opacity 160ms ease;
}

.hhpfb-seo-faq-item > summary::before {
    width: 13px; height: 2px; margin-top: -1px;
}

.hhpfb-seo-faq-item > summary::after {
    width: 2px; height: 13px; right: 9px; margin-top: -6.5px;
}

.hhpfb-seo-faq-item[open] > summary::after {
    transform: rotate(90deg);
    opacity: 0;
}

.hhpfb-seo-faq-item > summary:focus-visible {
    outline: 2px solid var(--hh-seo-ink);
    outline-offset: -2px;
    border-radius: 2px;
}

.hhpfb-seo-faq-a {
    padding: 0 34px 18px 0;
    font-size: 15.5px;
    line-height: 1.68;
}

.hhpfb-seo-faq-a p { margin: 0 0 .85em; }
.hhpfb-seo-faq-a p:last-child { margin-bottom: 0; }

/* ===================== home page ===================== */

/* On the home page this sits in the site container rather than the catalog
   grid, so it supplies its own gutters and a little more air. */
.hhpfb-seo-body--home {
    max-width: 1200px;
    margin: 56px auto 0;
    padding: 34px 20px 10px;
}

.hhpfb-seo-body--home::before { left: 20px; }

.hhpfb-seo-body--home .hhpfb-seo-copy,
.hhpfb-seo-body--home .hhpfb-seo-faq { max-width: 74ch; }

/* ===================== responsive ===================== */

@media (max-width: 782px) {
    .hhpfb-seo-body { margin-top: 36px; padding-top: 24px; }
    .hhpfb-seo-copy { font-size: 15.5px; }
    .hhpfb-seo-body .hhpfb-seo-copy > p:first-of-type { font-size: 16px; }
    .hhpfb-seo-readmore.is-clamped .hhpfb-seo-copy { max-height: 156px; }
    .hhpfb-seo-body--home { margin-top: 40px; padding: 28px 16px 8px; }
    .hhpfb-seo-body--home::before { left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .hhpfb-seo-more,
    .hhpfb-seo-more-chevron,
    .hhpfb-seo-faq-item > summary,
    .hhpfb-seo-faq-item > summary::before,
    .hhpfb-seo-faq-item > summary::after,
    .hhpfb-seo-copy a {
        transition-duration: 1ms;
    }
}
