/* Company page: scroll-driven founding story, then Team and Board. */

.page-template-template-company #main { padding-top: 0; }

/* ── Story ── */
/* A tall track with the stage stuck inside it; company.js turns scroll
   position into which step is showing and how far the photo has panned. */
.company-story {
    position: relative;
    height: calc(var(--track, 12) * 52svh);
    background: var(--paper);
}

.story-stage {
    --bg-x: 0px;
    position: sticky;
    top: 0;
    height: 100svh;
    padding-top: var(--nav-height);
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(circle at 26% 92%, rgba(172, 129, 242, 0.06), transparent 28rem), var(--paper);
}

.story-bg {
    position: absolute;
    top: var(--nav-height);
    bottom: 0;
    left: 50%;
    z-index: 0;
    width: 122%;
    height: auto;
    max-width: none;
    min-height: calc(100% - var(--nav-height));
    object-fit: cover;
    object-position: center;
    transform: translate3d(calc(-50% + var(--bg-x)), 0, 0);
}
/* White-to-violet wash over the photo so the copy reads. */
.story-stage::after {
    content: '';
    position: absolute;
    inset: var(--nav-height) 0 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.18) 48%, rgba(172, 129, 242, 0.18) 100%),
        rgba(172, 129, 242, 0.28);
    pointer-events: none;
}

.story-steps {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: var(--page-gutter);
    width: min(43rem, 41vw);
    min-height: 18rem;
    transform: translateY(-45%);
    pointer-events: none;
}
.story-step {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(42px);
}
.story-step p + p { margin-top: clamp(0.35rem, 0.75vw, 0.65rem); }

.story-headline {
    color: rgba(37, 42, 76, 0.66);
    font-size: clamp(2.3rem, 3vw, 3.6rem);
    line-height: 1.15;
    text-wrap: balance;
}
.story-headline .accent { color: rgba(255, 255, 255, 0.95); }

.story-copy {
    color: rgba(37, 42, 76, 0.74);
    font-size: clamp(1rem, 1.18vw, 1.2rem);
    line-height: 1.85;
    text-wrap: pretty;
}
.story-copy.is-large {
    font-size: clamp(1.08rem, 1.32vw, 1.35rem);
    line-height: 1.78;
}

/* ── People ── */
.people-section {
    padding: clamp(2.2rem, 3.4vw, 3.6rem) var(--page-gutter) clamp(1.75rem, 2.5vw, 2.75rem);
    background: radial-gradient(circle at 26% 12%, rgba(172, 129, 242, 0.06), transparent 28rem), var(--paper);
}
.people-board {
    padding-top: clamp(1.25rem, 2vw, 2rem);
    padding-bottom: clamp(6.5rem, 9vw, 9.5rem);
    border-top: 1px solid rgba(37, 42, 76, 0.08);
}
.people-board .people-intro { padding-top: clamp(2.2rem, 3.4vw, 3.6rem); }

.people-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
    gap: clamp(4rem, 8vw, 8.5rem);
    align-items: start;
    margin-bottom: clamp(1.15rem, 1.8vw, 1.7rem);
}
.people-intro h2 {
    color: rgba(37, 42, 76, 0.62);
    font-size: clamp(2.3rem, 3vw, 3.6rem);
    line-height: 1.15;
    text-wrap: balance;
}
.people-copy {
    margin-top: 0.1rem;
    color: var(--text);
    font-size: clamp(0.96rem, 1.08vw, 1.08rem);
    line-height: 1.9;
    text-wrap: pretty;
}
.people-copy p + p { margin-top: 0.9rem; }

.people-grid-heading {
    margin: clamp(1.5rem, 2.4vw, 2.4rem) 0 0.9rem;
    color: rgba(37, 42, 76, 0.62);
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.people-rule {
    width: 2.5rem;
    height: 2px;
    margin-bottom: clamp(1.15rem, 1.7vw, 1.7rem);
    background: var(--violet-deep);
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(10.8rem, 13vw, 14.8rem), 1fr));
    gap: clamp(1rem, 1.45vw, 1.35rem);
}
.person-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(37, 42, 76, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 46px rgba(37, 42, 76, 0.035);
}
.person-portrait {
    aspect-ratio: 1.16 / 1;
    overflow: hidden;
    background: #F6F8FB;
}
.person-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}
.person-info {
    position: relative;
    min-height: 5.6rem;
    padding: 0.9rem 2.65rem 1rem 0.9rem;
}
.person-name {
    color: var(--violet-deep);
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 0.86vw, 0.92rem);
    font-weight: 600;
    line-height: 1.25;
    text-wrap: pretty;
}
.person-role {
    margin-top: 0.48rem;
    color: #111A4D;
    font-size: clamp(0.72rem, 0.78vw, 0.82rem);
    font-weight: 400;
    line-height: 1.38;
}
.person-link {
    position: absolute;
    right: 0.9rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.38rem;
    height: 1.38rem;
    border: 1px solid var(--violet-deep);
    border-radius: 999px;
    color: var(--violet-deep);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.person-link:hover {
    border-color: var(--navy);
    background: rgba(111, 79, 232, 0.08);
    color: var(--navy);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .story-bg {
        left: 50%;
        width: 156%;
        object-position: 64% center;
    }
    .story-steps {
        left: 1.5rem;
        right: 1.5rem;
        width: auto;
        min-height: 22rem;
        transform: translateY(-42%);
    }
    .people-intro {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }
    .people-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
}

/* Reduced motion: the story reads as ordinary stacked copy over the photo. */
@media (prefers-reduced-motion: reduce) {
    .company-story { height: auto; }
    .story-stage {
        position: relative;
        height: auto;
        padding: calc(var(--nav-height) + clamp(6rem, 12vw, 10rem)) var(--page-gutter) clamp(6rem, 12vw, 10rem);
    }
    .story-bg { transform: translateX(-50%); }
    .story-steps {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }
    .story-step {
        position: relative;
        opacity: 1;
        transform: none;
        margin-top: 3rem;
    }
    .story-step:first-child { margin-top: 0; }
}
