/* ============================================================
   testimonial.css — quote + author
   ============================================================
   The project testimonial: a large quote with a decorative opening mark,
   and the author (photo + name + role) alongside.
   Shares its column ratio and gutter with .split--60-40 (--split-60-40 and
   --split-gap in tokens.css) so the two line up down the page.
   Conventions: _shared/bricks-builder/css-conventions.md

   Last updated: 2026-10-12 (auto-stamped by the pre-commit hook)
   ============================================================ */
.testimonial {
    display: grid;
    /* Same ratio + gap as .split--60-40: the quote column matches the
       story text column, the author column starts where the "Min rolle"
       panel does — one shared gutter down the page. */
    grid-template-columns: var(--split-60-40);
    align-items: center;
    gap: var(--split-gap);
}

.testimonial-quote {
    /* Rendered as <blockquote>: neutralise the browser's default indent
       AND Bricks core's blockquote skin (georgia serif, 4px left border,
       30px padding) — the house type + the column edge own this look. */
    margin: 0;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: var(--text-l);
    line-height: 1.6;
    color: var(--text-base);
}

/* Large opening quote mark. Decorative only, so it is a pseudo-element
   rather than real content. Flows as its own line so the quote text
   fills the full column width. Tight line-height trims the glyph's
   mostly-empty em box. */
.testimonial-quote::before {
    content: "\201C";
    display: block;
    font-family: var(--font-highlight);
    font-size: 4em;
    line-height: 0.5;
    color: var(--action-primary);
}

/* Spans its whole grid column so the divider (.divider-gradient-l on
   the element) draws on the column edge — the same x as the story
   panel's hairline; the content centres inside. */
.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-s);
    text-align: center;
}

/* Name + role live in a wrapper block so they can group tighter than
   the photo (proximity: the pair belongs together) — same structural
   pattern as the .split--60-40 panel. */
.testimonial-author > :last-child {
    display: flex;
    flex-direction: column;
    align-items: center;   /* the Theme Style's block default is flex-start */
    gap: var(--space-2xs);
}

.testimonial-photo {
    /* 240px cap — sized to fill its column beside the quote. */
    inline-size: min(15rem, 40vw);
    block-size: auto;
    aspect-ratio: 1;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.testimonial-name {
    margin-block: 0;   /* Bricks doesn't reset p margins — the gap owns the spacing */
    font-size: var(--text-m);
    font-weight: 700;
    color: var(--text-heading);
}

.testimonial-role {
    margin-block: 0;
    font-size: var(--text-s);
    color: var(--text-secondary);
}

/* The section around the testimonial is the query container, so the
   stacking follows the section's width wherever the block is placed. */
.brxe-section:has(> .brxe-container > .testimonial) {
    container: testimonial / inline-size;
}

/* Stack the author above the quote when the section is narrow; the vertical
   divider makes no sense stacked, so the utility is switched off. */
@container testimonial (inline-size < 54rem) {
    .testimonial {
        grid-template-columns: 1fr;
        gap: var(--space-l);
    }
    .testimonial-author {
        order: -1;
        border-inline-start: 0;
        border-image: none;
    }
}
