/* =====================================================
   about.css — RapiX Solutions About Page Bundle
   One BEM block per section. var() colours only (RULE 1).
   Loaded only on the About Page template via enqueue.php.
   ===================================================== */

/* About Hero is now the universal Editorial Intro pattern. Its styles live
   in global.css under `.page-hero` so every non-home page renders through
   the same component. No about-specific hero CSS needed here. */

/* =====================================================
   Story (R-A.2, editorial 2-up + stat strip)
   Top: 50/50 content + image, image stretches to match the
   content column height (no off-balance tall portrait).
   Bottom: full-width 3-stat strip framed by hairlines —
   magazine-spread closing punctuation.
   ===================================================== */

.about-story__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
}

.about-story__top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: stretch;
}

.about-story__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 56ch;
    align-self: center;
}

.about-story__heading {
    margin: 0;
}

.about-story__body {
    font-family: var(--font-body);
    font-size: var(--text-body-lg);
    line-height: var(--leading-body);
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: var(--measure-text);
}

.about-story__body p {
    margin: 0;
}

.about-story__media {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    min-height: 360px;
    height: 100%;
    align-self: stretch;
}

.about-story__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Stat strip (full width, framed by hairlines) ---- */

.about-story__stats {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: var(--space-10);
    padding: var(--space-10) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.story-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.story-stat__value {
    font-family: var(--font-heading);
    font-weight: var(--fw-extrabold);
    font-size: clamp( 2.5rem, 5.5vw, 4.5rem );
    line-height: 0.95;
    letter-spacing: var(--tracking-tight);
    color: var(--color-text);
}

.story-stat__label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-muted);
    line-height: var(--leading-snug);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

@media ( max-width: 1024px ) {
    .about-story__inner { gap: var(--space-12); }
    .about-story__top {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
    .about-story__content { align-self: stretch; max-width: 100%; }
    .about-story__media   { min-height: 320px; }
}

@media ( max-width: 768px ) {
    .about-story__inner { gap: var(--space-10); }
    .about-story__top   { gap: var(--space-8); }
    .about-story__media { min-height: 260px; }

    .about-story__stats {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        border-top:    1px solid var(--color-border);
        border-bottom: 1px solid var(--color-border);
    }

    /* Each stat row gets its own padding and a hairline below — turns the
       wall-of-numbers stack into a clean three-row magazine plate. */
    .story-stat {
        padding: var(--space-6) 0;
        border-bottom: 1px solid var(--color-border);
        gap: var(--space-2);
    }
    .story-stat:last-child { border-bottom: 0; }

    .story-stat__value { font-size: clamp( 2.25rem, 9vw, 3rem ); }
}

@media ( max-width: 480px ) {
    .about-story__media { min-height: 220px; }
    .story-stat        { padding: var(--space-5) 0; }
}

/* =====================================================
   Values (R-A.3, editorial numbered list at scale)
   Sticky intro left + numbered editorial list right. Same
   pattern as home's Why Us: italic Cormorant chapter numbers
   + bold sans titles + supporting description.
   ===================================================== */

.about-values__inner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--space-16);
    align-items: start;
}

.about-values__intro {
    position: sticky;
    top: calc( 80px + var(--space-8) );
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.about-values__heading {
    margin: 0;
}

.about-values__sub {
    font-family: var(--font-body);
    font-size: var(--text-body-lg);
    line-height: var(--leading-body);
    color: var(--color-muted);
    max-width: var(--measure-text);
    margin: 0;
}

.about-values__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.value-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-10);
    padding: var(--space-12) 0;
    border-bottom: 1px solid var(--color-border);
}

.value-row:first-child {
    padding-top: var(--space-6);
}

.value-row__num {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 500;
    font-size: clamp( 2.25rem, 5vw, 3rem );
    line-height: 1;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    align-self: start;
    padding-top: 0.1em;
    min-width: 1.8em;
}

.value-row__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.value-row__title {
    font-family: var(--font-heading);
    font-weight: var(--fw-extrabold);
    font-size: var(--text-h2);
    line-height: var(--leading-snug);
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin: 0;
}

.value-row__desc {
    font-family: var(--font-body);
    font-size: var(--text-body-lg);
    line-height: var(--leading-body);
    color: var(--color-muted);
    max-width: var(--measure-text);
    margin: 0;
}

@media ( max-width: 1024px ) {
    .about-values__inner {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
    .about-values__intro {
        position: static;
    }
}

@media ( max-width: 768px ) {
    .value-row {
        gap: var(--space-6);
        padding: var(--space-10) 0;
    }
}

@media ( max-width: 640px ) {
    .value-row {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        padding: var(--space-7) 0;
    }
    .value-row__num {
        font-size: clamp( 1.875rem, 8vw, 2.5rem );
    }
}

/* =====================================================
   Team — Editorial Portrait Grid (R-A.4)
   Uniform circular portraits in an auto-fit grid. Name + role
   render directly below each card so identification needs no
   hover or mental mapping. Adds rows automatically as the team
   grows — scales from 3 to 30+ without any layout change.
   ===================================================== */

.about-team__head {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
    max-width: 880px;
}

.about-team__heading { margin: 0; }

.about-team__sub {
    font-family: var(--font-body);
    font-size: var(--text-body-lg);
    line-height: var(--leading-body);
    color: var(--color-muted);
    max-width: var(--measure-text);
    margin: 0;
}

.about-team__rule {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 0;
    width: 100%;
}

/* ---- Grid ---- */

.about-team__grid {
    display: grid;
    /* auto-fit + minmax = the grid keeps adding columns as the viewport
       widens, and rows when more members are added. */
    grid-template-columns: repeat( auto-fit, minmax( 220px, 1fr ) );
    gap: var(--space-16) var(--space-10);
    padding: var(--space-16) 0;
    justify-items: center;
}

.team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    text-align: center;
    margin: 0;
    width: 100%;
    max-width: 240px;
    transition: transform 0.4s cubic-bezier( 0.2, 0.7, 0.2, 1 );
}

.team-card__shape {
    position: relative;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 100%
    );
    box-shadow: 0 12px 32px rgba( var(--color-text-rgb), 0.08 );
    isolation: isolate;
    transition: box-shadow 0.45s ease;
}

/* White inner ring — sells the magazine-plate look. */
.team-card__shape::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 4px var(--color-white);
    pointer-events: none;
    z-index: 2;
}

.team-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.team-card__initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: var(--fw-extrabold);
    color: var(--color-white);
    font-size: 3.25rem;
    letter-spacing: var(--tracking-tight);
    z-index: 1;
}

/* ---- Name + Role caption (always visible) ---- */

.team-card__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.team-card__name {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--text-body-lg);
    line-height: var(--leading-snug);
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin: 0;
}

.team-card__role {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 500;
    font-size: var(--text-body);
    color: var(--color-primary);
    line-height: var(--leading-snug);
    letter-spacing: -0.01em;
}

/* ---- Hover (subtle, premium) ---- */

.team-card:hover {
    transform: translateY( -8px );
}

.team-card:hover .team-card__shape {
    box-shadow: 0 22px 48px rgba( var(--color-primary-rgb), 0.20 );
}

@media ( prefers-reduced-motion: reduce ) {
    .team-card,
    .team-card__shape { transition: none; }
    .team-card:hover { transform: none; }
}

/* ---- Responsive ---- */

@media ( max-width: 1024px ) {
    .about-team__head { margin-bottom: var(--space-10); }
    .about-team__grid {
        gap: var(--space-12) var(--space-8);
        padding: var(--space-12) 0;
    }
    .team-card__shape { max-width: 180px; }
    .team-card__initials { font-size: 2.75rem; }
}

@media ( max-width: 768px ) {
    .about-team__grid {
        grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
        gap: var(--space-10) var(--space-6);
    }
    .team-card { gap: var(--space-4); }
    .team-card__shape { max-width: 140px; }
    .team-card__initials { font-size: 2rem; }
    .team-card__name { font-size: var(--text-body); }
    .team-card__role { font-size: var(--text-sm); }
}

@media ( max-width: 480px ) {
    .about-team__grid {
        grid-template-columns: repeat( 2, 1fr );
        gap: var(--space-8) var(--space-5);
        padding: var(--space-10) 0;
    }
    .team-card { gap: var(--space-3); max-width: 100%; }
    .team-card__shape { max-width: 132px; }
    .team-card__initials { font-size: 1.875rem; }
    .team-card__name { font-size: var(--text-body); }
    .team-card__role { font-size: var(--text-sm); }
}

@media ( max-width: 360px ) {
    .about-team__grid { gap: var(--space-6) var(--space-4); }
    .team-card__shape { max-width: 108px; }
}

/* About CTA is now the universal Page CTA pattern. Its styles live in
   global.css under `.page-cta` so every non-home page renders through
   the same closing-statement component. No about-specific CTA CSS here. */
