/* ==========================================================================
   Testimonial Bento Box Block — Smith 2.0
   Figma "Testimonial Bento Box" (file YDqR9R05jMcvheFSGQdXvO, node 10363:55394)

   Navy (#0e1b44) section. Centered Section Title (Hoefler-serif H2 + Barlow
   subtext), then a CSS-grid BENTO of up to 4 cards:
     Row 1 = Card 1 (pine-glade) + Card 2 (surfie-green) — two equal 1fr cols.
     Row 2 = Card 3 WIDE (selective-yellow, ~823px) + Card 4 NARROW (pine-glade,
             ~416px). Gaps: 40px between cards, 80px between title and grid.
   Square corners on all cards. Avatars are 100px circles. Collapses to a single
   column on mobile.
   ========================================================================== */

.testimonial-bento {
    /* Local fallbacks; the theme also defines these globally in :root. */
    --color-white: #ffffff;
    --color-pampas: #f9f8f5;            /* cream */
    --color-blue-zodiac: #0e1b44;       /* navy */
    --color-secondary: #0e1b44;         /* navy (semantic alias) */
    --color-surfie-green: #0f7e7c;      /* teal */
    --color-primary: #0f7e7c;           /* teal (semantic alias) */
    --color-pine-glade: #b9c789;        /* sage/olive */
    --color-selective-yellow: #f0b200;  /* gold */
    /* NOTE: do NOT redefine --font-family-heading/--font-family-base here —
       they must inherit the global tokens (Adobe Garamond Pro / Barlow). */

    /* Smith 2.0 focus pages: white section; tiles carry the brand colours. */
    background-color: var(--color-white);
    padding: clamp(3.5rem, 9vw, 7rem) clamp(1.25rem, 5vw, 4rem);
    color: var(--color-blue-zodiac);
}

/* The frame's bento section has NO top padding (10957:14685 is pb-112 only) —
   the grid starts at the section's top edge. Scout 20-02: the Business bento
   text matched line-for-line but the whole grid sat ~112px low (26.5% pair).
   Title-less bentos (all three focus pages) drop the top padding. */
.testimonial-bento:not(:has(.testimonial-bento__title)) {
    padding-top: 0;
    color: var(--color-blue-zodiac);
}

.testimonial-bento__inner {
    width: 100%;
    max-width: 1280px;     /* Figma Container/container-large = 1280px */
    margin-inline: auto;
    /* Figma: Container has 80px gap between Section Title and Bentobox. */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5rem; /* 80px */
}

/* --- Section title ------------------------------------------------------- */
.testimonial-bento__title {
    /* Figma: max-width 768px, 24px gap, centered. */
    width: 100%;
    max-width: 768px;
    margin-inline: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* 24px */
}

.testimonial-bento__heading {
    margin: 0;
    font-family: var(--font-family-heading);
    font-weight: 400; /* 400: Smith Style Guide - Hoefler Text is Regular. See docs/DECISIONS.md D8 */
    /* Figma Heading/H2: 52px, line-height 1.2, letter-spacing -0.52px. */
    font-size: 3.25rem; /* up to 52px */
    line-height: 1.2;
    letter-spacing: -0.52px;
    color: var(--color-blue-zodiac);
}

.testimonial-bento__subheading {
    margin: 0;
    font-family: var(--font-family-base);
    font-weight: 400;
    /* Figma: 24px, line-height 1.5. */
    font-size: 1.5rem; /* 24px */
    line-height: 1.5;
    color: var(--color-blue-zodiac);
}

/* --- Bento grid ---------------------------------------------------------- */
.testimonial-bento__grid {
    width: 100%;
    display: grid;
    /* Six equal tracks so tiles can span half (3), wide (4), narrow (2) or full
       (6). grid-auto-flow: dense packs mixed spans into a masonry-like layout. */
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: auto;
    grid-auto-flow: row dense;
    gap: 2.5rem; /* 40px */
    align-items: stretch;
}

/* Span footprints. */
.testimonial-bento__card--span-normal { grid-column: span 3; }
.testimonial-bento__card--span-wide   { grid-column: span 4; }
.testimonial-bento__card--span-narrow { grid-column: span 2; }
.testimonial-bento__card--span-full   { grid-column: 1 / -1; }

/* --- Card shell ---------------------------------------------------------- */
.testimonial-bento__card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem; /* 40px */
    border-radius: 0;
    gap: 1.5rem;
}

/* Per-card background colours. */
.testimonial-bento__card--navy { background-color: var(--color-blue-zodiac); color: var(--color-white); }
.testimonial-bento__card--teal { background-color: var(--color-surfie-green); color: var(--color-white); }
.testimonial-bento__card--sage { background-color: var(--color-pine-glade); color: var(--color-blue-zodiac); }
.testimonial-bento__card--gold { background-color: var(--color-selective-yellow); color: var(--color-blue-zodiac); }

/* Full-row card lays photo beside content. */
.testimonial-bento__card--span-full.testimonial-bento__card--photo {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
}

/* --- Quote --------------------------------------------------------------- */
.testimonial-bento__quote {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5em; /* blank line between paragraphs (Figma) */
    font-family: var(--font-family-base);
    font-weight: 400;
    font-size: 1.5rem; /* DEV Figma 10957:14685: Barlow 24px */
    line-height: 1.5;
    color: inherit;
    /* Reset the global `blockquote` treatment (cream box + teal left border +
       italic light text from base/_typography.scss). Figma places the quote
       directly on the coloured card; leaving the box in made white text on
       navy/teal cards invisible (cream-on-white). */
    background: none;
    border: 0;
    padding: 0;
    font-style: normal;
}

/* --- Photo tiles (large image + name + media list) ----------------------- */
.testimonial-bento__photo {
    display: block;
    width: 100%;
    max-width: 250px;
    margin-inline: auto;
}

.testimonial-bento__card--span-full .testimonial-bento__photo {
    flex: 0 0 400px;
    max-width: 400px;
    margin: 0;
}

.testimonial-bento__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.testimonial-bento__media {
    margin: 0;
    font-family: var(--font-family-base);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.5;
    color: inherit;
    opacity: 0.9;
}

/* --- Avatar -------------------------------------------------------------- */
.testimonial-bento__avatar {
    display: flex;
    align-items: center;
    /* Figma: 16px gap between avatar image and name/title. */
    gap: 1rem; /* 16px */
    width: 100%;
}

.testimonial-bento__avatar-img {
    flex: 0 0 auto;
    display: block;
    /* DEV Figma: 111px circular avatar. */
    width: 111px;
    height: 111px;
    border-radius: 50%;
    overflow: hidden;
}

.testimonial-bento__avatar-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.testimonial-bento__avatar-img--placeholder {
    background-color: rgba(14, 27, 68, 0.15);
}

.testimonial-bento__avatar-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-family: var(--font-family-base);
    line-height: 1.5;
}

.testimonial-bento__name {
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem; /* DEV Figma 24px */
    color: inherit;
}

.testimonial-bento__role {
    margin: 0;
    font-style: italic;
    font-weight: 400;
    font-size: 1rem;
    color: inherit;
    opacity: 0.9;
}

/* --- Responsive: collapse to a single column ----------------------------- */
@media (max-width: 900px) {
    .testimonial-bento {
        padding: 4rem 1.5rem; /* tighter section padding on mobile */
    }

    .testimonial-bento__inner {
        gap: 3rem;
    }

    .testimonial-bento__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* 24px */
    }

    /* One card per row, in source order, regardless of span. */
    .testimonial-bento__card--span-normal,
    .testimonial-bento__card--span-wide,
    .testimonial-bento__card--span-narrow,
    .testimonial-bento__card--span-full {
        grid-column: 1 / -1;
    }

    .testimonial-bento__card--span-full.testimonial-bento__card--photo {
        flex-direction: column;
        align-items: stretch;
    }

    .testimonial-bento__card--span-full .testimonial-bento__photo {
        flex-basis: auto;
        max-width: 100%;
    }

    .testimonial-bento__heading {
        font-size: 2.5rem;
    }
}



/* DEV bento (10957:14685): first quote paragraph is a serif bold lead. */
.testimonial-bento__quote p { margin: 0; }
.testimonial-bento__quote p:first-child,
.testimonial-bento__quote p:last-child:not(:only-child) {
    /* DEV bento: opening AND closing quote lines are HoeflerText Bold 24px
       (Figma 10957:14690-14751 — every quote card closes on a serif line). */
    font-family: var(--font-family-heading, Georgia, serif);
    font-weight: 400;
    font-size: 1.5rem; /* 24px per design (was 28px) */
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* DEV bento: 40px gap between quote and avatar row. */
.testimonial-bento__card { gap: 2.5rem; }

/* DEV bento (10957:14747): full-row QUOTE card = composite photo left, centered
   quote + attribution right. Photo is the 400px book+portrait composite. */
.testimonial-bento__card--span-full.testimonial-bento__card--quote {
    flex-direction: row;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5rem);
}

.testimonial-bento__card--span-full.testimonial-bento__card--quote .testimonial-bento__photo {
    flex: 0 0 400px;
    max-width: 400px;
    margin: 0;
}

.testimonial-bento__full-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem; /* 40px between quote and attribution (Figma) */
    text-align: center;
}

.testimonial-bento__full-body .testimonial-bento__quote {
    max-width: 800px;
}

/* Full card quote body is Barlow throughout; the CLOSING line is the serif
   bold one ("I would hire them again!"), inverting the normal first-line lead. */
.testimonial-bento__card--span-full.testimonial-bento__card--quote .testimonial-bento__quote p:first-child {
    font-family: var(--font-family-base);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5;
}

.testimonial-bento__card--span-full.testimonial-bento__card--quote .testimonial-bento__quote p:last-child:not(:only-child) {
    font-family: var(--font-family-heading, Georgia, serif);
    font-weight: 400;
    font-size: 1.5rem; /* 24px per design */
    line-height: 1.3;
}

@media (max-width: 900px) {
    .testimonial-bento__card--span-full.testimonial-bento__card--quote {
        flex-direction: column;
        align-items: stretch;
    }

    .testimonial-bento__card--span-full.testimonial-bento__card--quote .testimonial-bento__photo {
        flex-basis: auto;
        margin-inline: auto;
    }
}


/* The frames give bento cards FIXED heights with centred content (Row 1 669,
   Row 2 608, Row 3 833, full-width 480 — 10957:14689-14747); auto-height
   cards ran short and the grid drifted downward cumulatively (Scout 21-11:
   Business bento 10.9% with a bottom-heavy diff and Mary's text ~64px high
   in her card). Cards already justify-center, so min-heights recreate the
   frame geometry: 669+40+608+40+833+40+480 + pb112 = 2822 exactly. */
@media (min-width: 901px) {
    .testimonial-bento__card--1,
    .testimonial-bento__card--2 { min-height: 669px; }

    .testimonial-bento__card--3,
    .testimonial-bento__card--4 { min-height: 608px; }

    .testimonial-bento__card--5,
    .testimonial-bento__card--6 { min-height: 833px; }

    .testimonial-bento__card--7 { min-height: 480px; }
}


/* Tall photo cell (--6, e.g. Jen Fisher): the frame centers name/role/outlets
   under the artwork; we ran them ragged-left. */
.testimonial-bento__card--photo.testimonial-bento__card--6 {
    text-align: center;
}
