/*
 * voices.css
 * Employee voices and Life at AGS, on the home page, the Employee Voices page
 * (archive-employee-voice.php) and each story (single-employee-voice.php):
 * section bands, the photo mosaic with its click-to-play video
 * (sections/home-life.php), the home page's quote and face row
 * (sections/home-testimonials.php), story cards (components/story-card.php) and
 * the story page.
 */


/* ─── Section bands ─────────────────────────────────────────── */

.page-section {
    padding: 120px 0;
}

.page-section--mist {
    background-color: var(--mist);
}


/* ─── Life at AGS mosaic ────────────────────────────────────── */
/* The first tile (the video, or the first photo) is the large one. mosaic--N is the
   number of tiles, so missing photos close up the grid. */

.mosaic {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    grid-template-rows: 260px 260px;
    gap: 16px;
}

.mosaic > :first-child {
    grid-row: span 2;
}

.mosaic--4 > :last-child {
    grid-column: span 2;
}

.mosaic--3 {
    grid-template-columns: 1.25fr 1fr;
}

.mosaic--2 {
    grid-template-columns: 1.25fr 1fr;
    grid-template-rows: 400px;
}

.mosaic--1 {
    grid-template-columns: 1fr;
    grid-template-rows: 440px;
}

.mosaic--2 > :first-child,
.mosaic--1 > :first-child {
    grid-row: auto;
}

.tile {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--r-lg);
    background-color: var(--navy-800);
}

.tile img,
.tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile img {
    transition: transform 0.6s ease;
}

.tile:hover img {
    transform: scale(1.03);
}

.tile video {
    background-color: var(--navy-950);
}

.tile-cap {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 9px 12px;
    border-radius: 999px;
    background-color: rgba(11, 22, 48, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--white);
    font: 600 13px/1 var(--f-body);
}

/* Play button over the poster; main.js swaps it for the player on click. */
.tile-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, rgba(11, 22, 48, 0.05), rgba(11, 22, 48, 0.6));
    color: var(--white);
    cursor: pointer;
}

/* No poster image: the AGS mark on the brand gradient, so the tile is not an empty box */
.tile-play--bare {
    background: linear-gradient(140deg, var(--navy-800), var(--blue-600));
}

.tile-play--bare::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("../img/logo-mark-white.png") no-repeat 50% 45% / min(52%, 460px) auto;
    opacity: 0.12;
    pointer-events: none;
}

.tile-play--bare .tile-play__btn {
    position: relative;
}

.tile-play:focus-visible {
    outline-color: var(--sky-400);
    outline-offset: -6px;
}

.tile-play__btn {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--navy-800);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease;
}

.tile-play:hover .tile-play__btn {
    transform: scale(1.06);
}

.tile-play__btn svg {
    width: 30px;
    height: 30px;
    margin-left: 4px;
}

.tile-play__meta {
    position: absolute;
    left: 24px;
    bottom: 24px;
    text-align: left;
}

.tile-play__meta b {
    display: block;
    font: var(--fw-display) 26px/1.1 var(--f-display);
    letter-spacing: -0.015em;
}

.tile-play__meta span {
    font: 500 14px/1 var(--f-body);
    color: #DCE5F2;
}


/* ─── Home: one story quoted, and the face row ──────────────── */

.home-voices {
    background-color: var(--navy-800);
    color: var(--on-navy);
}

.voice-feature {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 72px;
    align-items: center;
}

.voice-feature--text {
    grid-template-columns: minmax(0, 860px);
}

.voice-feature__portrait {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--r-xl);
    background: linear-gradient(160deg, var(--blue-100), var(--mist));
}

.voice-feature__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

.voice-feature__quote {
    margin: 28px 0 0;
}

.quote-mark {
    display: block;
    height: 44px;
    font: 800 120px/0.6 var(--f-display);
    color: var(--sky-400);
}

/* Reading size: the quotes run to 100 words. */
.big-quote p {
    max-width: 640px;
    color: var(--white);
    font-size: clamp(18px, 1.5vw, 21px);
    line-height: 1.6;
}

.quote-by {
    margin-top: 22px;
}

.quote-by a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--white);
    font: 700 18px/1.2 var(--f-display);
}

.quote-by a:hover {
    color: var(--sky-300);
}

.quote-by span {
    display: block;
    font-size: 15px;
    color: var(--on-navy-muted);
}

.voice-faces {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 44px 0 0;
    padding: 0;
}

.voice-faces a {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background-color: var(--blue-100);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.voice-faces a:hover,
.voice-faces a.is-featured {
    border-color: var(--amber-500);
}

.voice-faces a:hover {
    transform: translateY(-2px);
}

.voice-faces img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 16%;
}

.voice-faces__initial {
    font: 700 20px/1 var(--f-display);
    color: var(--navy-800);
}

.voice-feature__all {
    margin-top: 28px;
    color: var(--sky-300);
}

.voice-feature__all:hover {
    color: var(--white);
}


/* ─── Face mosaic (Home hero and About, when no team photo is set) ── */

/* No team photo: six portraits from the employee stories, the middle column set lower */
.home-hero__media--faces {
    padding-bottom: 30px;
}

.home-hero__media--faces::before {
    display: none;
}

.hero-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hero-mosaic__tile {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: linear-gradient(160deg, var(--blue-100), var(--mist));
    box-shadow: var(--sh-lg);
}

.hero-mosaic__tile:nth-child(3n + 2) {
    transform: translateY(30px);
}

.hero-mosaic__tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
}

/* On About it takes the photo's place in the split */
.split__media.split__media--faces {
    aspect-ratio: auto;
    overflow: visible;
    padding-bottom: 30px;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

@media (max-width: 860px) {

    /* Phones: one row of three faces */
    .hero-mosaic {
        gap: 10px;
    }

    .hero-mosaic__tile:nth-child(n + 4) {
        display: none;
    }
}


/* ─── Story cards ───────────────────────────────────────────── */
/* The name's link stretches over the whole card. */

.story-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.story-grid--five {
    grid-template-columns: repeat(5, 1fr);
}

.story-grid > li {
    display: flex;
    min-width: 0;
}

.story-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background-color: var(--white);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.story-card:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
}

.story-card__pic {
    aspect-ratio: 4 / 4.4;
    overflow: hidden;
    background: linear-gradient(170deg, var(--blue-100), var(--mist));
}

.story-card__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 14%;
}

.story-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 22px 22px 24px;
}

.story-card__name {
    font-size: 19px;
}

.story-card__name a {
    color: var(--navy-800);
}

.story-card__name a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.story-card:hover .story-card__name a {
    color: var(--blue-600);
}

.story-card__role {
    max-width: none;
    font: 600 14px/1.3 var(--f-body);
    color: var(--blue-600);
}

.story-card__quote {
    margin: 10px 0 0;
}

.story-card__quote p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: 15px;
    line-height: 1.55;
    color: var(--slate-600);
}

.story-card__more {
    min-height: 0;
    margin-top: auto;
    padding-top: 16px;
    font-size: 15px;
}

.story-card:hover .story-card__more svg {
    transform: translateX(3px);
}

.voices-index__empty {
    color: var(--slate-600);
}


/* ─── Story page ────────────────────────────────────────────── */
/* Navy hero (components.css .page-hero) with the quote as the H1 and the photo
   flush with the hero's bottom edge. */

.story-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 72px;
    align-items: center;
}

.story-hero--photo .story-hero__grid {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.story-hero h1 {
    max-width: 760px;
    font-size: clamp(32px, 3.6vw, 52px);
    line-height: 1.1;
}

.story-hero__role {
    margin: 10px 0 0;
    color: var(--sky-300);
    font: 600 18px/1.3 var(--f-display);
}

/* The quote runs to 100 words: reading size, never a headline. */
.story-hero__quote {
    max-width: 620px;
    margin: 28px 0 0;
    padding: 0 0 0 20px;
    border-left: 3px solid var(--sky-400);
}

.story-hero__quote p {
    margin: 0;
    color: var(--white);
    font-size: clamp(17px, 1.35vw, 20px);
    line-height: 1.6;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    margin: 32px 0 0;
}

.story-meta dt {
    font-size: 14px;
    line-height: 1.3;
    color: #8FA3C3;
}

.story-meta dd {
    margin: 4px 0 0;
    color: var(--white);
    font: 700 17px/1.3 var(--f-display);
}

.story-hero__portrait {
    position: relative;
    z-index: 1;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 6px solid var(--white);
    border-radius: var(--r-xl);
    background: linear-gradient(160deg, var(--blue-100), var(--mist));
    box-shadow: var(--sh-lg);
}

.story-hero__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
}

.story-main {
    padding: 72px 0 96px;
}

.story-body {
    max-width: 760px;
}

.story-prose {
    font-size: 17.5px;
    line-height: 1.75;
    color: var(--slate-700);
}

.story-prose > * + * {
    margin-top: 18px;
}

.story-prose p {
    max-width: none;
    color: inherit;
}

.story-prose > p:first-child {
    font-size: clamp(18px, 1.6vw, 21px);
    line-height: 1.6;
}

.story-prose h2 {
    margin-top: 52px;
    font-size: 28px;
}

.story-prose h3 {
    margin-top: 36px;
    font-size: 21px;
}

.story-prose > :first-child {
    margin-top: 0;
}

.story-prose li + li {
    margin-top: 8px;
}

.story-prose a {
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.story-prose blockquote {
    margin: 36px 0;
    padding: 28px 32px;
    border-left: 4px solid var(--blue-600);
    border-radius: var(--r-lg);
    background-color: var(--ice);
    color: var(--navy-800);
    font: 600 21px/1.5 var(--f-display);
}

.story-prose img {
    border-radius: var(--r-lg);
}

/* Apply panel at the end of the story */
.inline-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 44px;
    padding: 32px;
    border-radius: var(--r-lg);
    background-color: var(--navy-800);
}

.story-body > .inline-cta:first-child {
    margin-top: 0;
}

.inline-cta p {
    max-width: none;
    color: var(--on-navy);
}

.inline-cta .inline-cta__title {
    color: var(--white);
    font: 700 21px/1.3 var(--f-display);
}

.inline-cta .inline-cta__title + p {
    margin-top: 4px;
}

.inline-cta__actions {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 12px;
}

.story-more {
    padding: 80px 0;
}

.story-more__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 28px;
}

.story-more__head h2 {
    font-size: 26px;
}


/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 1100px) {

    .voice-feature {
        grid-template-columns: 340px 1fr;
        gap: 48px;
    }

    .story-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-grid--five {
        grid-template-columns: repeat(3, 1fr);
    }

    .story-hero--photo .story-hero__grid {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 48px;
    }
}

@media (max-width: 860px) {

    .page-section {
        padding: 76px 0;
    }

    .mosaic,
    .mosaic--3,
    .mosaic--2 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 260px;
        grid-auto-rows: 160px;
        gap: 12px;
    }

    .mosaic--1 {
        grid-template-rows: 260px;
    }

    .mosaic > :first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    /* An odd photo out takes the full width. */
    .mosaic--4 > :last-child,
    .mosaic--2 > :last-child {
        grid-column: 1 / -1;
    }

    .tile-play__btn {
        width: 68px;
        height: 68px;
    }

    .tile-play__meta {
        left: 18px;
        bottom: 18px;
    }

    .tile-play__meta b {
        font-size: 21px;
    }

    .voice-feature,
    .voice-feature--text {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .voice-feature__portrait {
        max-width: 300px;
    }

    .story-grid,
    .story-grid--five {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .story-card__body {
        padding: 16px;
    }

    .story-card__name {
        font-size: 16.5px;
    }

    .story-card__role {
        font-size: 13px;
    }

    .story-card__quote {
        display: none;
    }

    .story-hero--photo .story-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .story-hero__portrait {
        width: 100%;
        max-width: 260px;
    }

    .story-main {
        padding: 48px 0 64px;
    }

    .story-prose {
        font-size: 17px;
    }

    .story-prose h2 {
        margin-top: 40px;
        font-size: 24px;
    }

    .inline-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 28px 24px;
    }

    .inline-cta .btn {
        width: 100%;
    }

    .story-more {
        padding: 56px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tile:hover img,
    .tile-play:hover .tile-play__btn,
    .voice-faces a:hover,
    .story-card:hover,
    .story-card:hover .story-card__more svg {
        transform: none;
    }
}
