/* track-record.css — The pinned dark "track record" band, and the three
   "work with me" engagement models staged on top of it.

   Extracted from the old components.css. LOAD ORDER MATTERS: these files were
   cut as contiguous slices of one stylesheet, so they must stay linked in this
   order or the cascade changes:
     timeline -> testimonials -> contact -> track-record -> contact-dark -> chrome -> experience -> dark-theme
*/

/* The track record: a full-width dark band that fades in as the
   work deck fades out (crossfade driven by the stack engine) */
/* The reveal wrapper overlaps the deck's tail; the band inside pins
   at the top of the viewport and fades in while stationary (engine-
   driven opacity), then scrolls once fully opaque. The spacer is the
   scroll distance consumed while pinned. */
.pm-reveal {
    position: relative;
    z-index: calc(var(--z-content) + 2);
    /* The wrapper overlaps the deck's tail; it must never eat clicks meant
       for the last card's buttons. The band re-enables itself (JS sets
       pointer-events: auto once the dark is up). */
    pointer-events: none;
    /* The band must already be pinned at the top of the viewport before it
       starts fading in, otherwise the dark would appear as a rectangle sliding
       up the page. This overlap buys it that head start. */
    margin-top: -240vh;
    margin-top: -240svh;
}

/* Long runway: the whole band choreography (deck dissolves → dark → bridge →
   heading → companies → marquee) plays out across this pinned travel */
.pm-reveal-spacer {
    height: 360vh;
    height: 360svh;
}

.pm-band {
    background: var(--color-dark);
    /* no rule here for opacity: see the motion-safe block below */
    position: sticky;
    top: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: 10vh 0 var(--space-xl);
    color: rgba(255, 255, 255, 0.92);
}

/* Before the deck renders, the negative-margin wrapper parks this dark
   band over the hero — it must not paint until the engine's first frame
   sets its inline opacity. Motion-safe only: with reduced motion the
   engine never runs, and the band stays CSS-visible. */
@media (prefers-reduced-motion: no-preference) {
    .pm-band {
        opacity: 0;
    }
}

/* Reduced motion: band flows statically after the list, no pinned runway */
@media (prefers-reduced-motion: reduce) {
    .pm-reveal {
        margin-top: 0;
        /* No engine runs here to re-enable the band */
        pointer-events: auto;
    }

    .pm-reveal-spacer {
        display: none;
    }

    .pm-band {
        position: static;
    }
}

.pm-inner {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Scroll-staggered entrances: JS drives --bandp 0→1 on the band; each block
   fades in over its own window (--bd start). Defaults keep everything
   visible when JS or motion is off. */
.pm-head,
.pm-company,
.pm-proof-label,
.testimonial-marquee-row,
.testimonials-ask {
    --bp: clamp(0, calc((var(--bandp, 1) - var(--bd, 0)) / var(--bw, 0.14)), 1);
    opacity: var(--bp);
    /* Note: the marquee rows' keyframe animation owns their transform, so
       they stagger by opacity alone; label and link also get the rise */
    transform: translateY(calc((1 - var(--bp)) * 24px));
}

/* Sequenced so the floating bubble has fully cleared before the heading
   surfaces — they never share the screen */
.pm-head { --bd: 0.58; }
.pm-company:nth-child(1) { --bd: 0.64; }
.pm-company:nth-child(2) { --bd: 0.69; }
.pm-company:nth-child(3) { --bd: 0.74; }
/* The proof section arrives as a waterfall, not a block: label, then each
   marquee row, then the ask link. Starts exactly when the last company card
   (Morressier, 0.74 + 0.14) finishes; overlapping tight windows so the
   whole cascade still completes by --bandp 1.0. */
.pm-proof-label { --bd: 0.88; --bw: 0.06; }
.testimonial-marquee-row:nth-child(1) { --bd: 0.90; --bw: 0.06; }
.testimonial-marquee-row:nth-child(2) { --bd: 0.92; --bw: 0.06; }
.testimonial-marquee-row:nth-child(3) { --bd: 0.94; --bw: 0.06; }
.testimonials-ask { --bd: 0.96; --bw: 0.04; }

/* Bridges the deck and the PM years. It floats dead-centre over the dark,
   alone on screen, then fades out before the track record surfaces —
   JS drives --bridgep as a 0 → 1 → 0 envelope. */
.pm-bridge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: var(--space-md);
}

/* A plain narrative beat, not a chat bubble: quietly signals there is
   more work than the deck shows */
.pm-bridge-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.5;
    text-align: center;
    letter-spacing: 0.2px;
}

@media (prefers-reduced-motion: no-preference) {
    .pm-bridge {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: calc(var(--z-content) + 5);
        margin: 0;
        padding: 0 var(--space-md);
        width: max-content;
        max-width: min(560px, calc(100vw - 2 * var(--space-md)));
        pointer-events: none;
        opacity: var(--bridgep, 0);
    }
}

.pm-head {
    max-width: 680px;
    margin-bottom: var(--space-lg);
}

.pm-companies {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: var(--space-lg);
}

@media (max-width: 860px) {
    .pm-companies {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.pm-kicker {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-accent-light);
    margin: 0 0 12px;
}

.pm-title {
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 14px;
}

.pm-body {
    font-size: 0.98rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 16px;
}

.pm-links a {
    color: var(--color-accent-light);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.pm-links a:hover {
    text-decoration: underline;
}
.pm-proof-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 var(--space-sm);
}

.pm-band .testimonial-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.pm-band .testimonial-card:hover {
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.pm-band .testimonial-excerpt {
    color: rgba(255, 255, 255, 0.85);
}

.pm-band .testimonial-info h4 {
    color: #fff;
}

.pm-band .testimonial-info p {
    color: rgba(255, 255, 255, 0.55);
}

.pm-band .testimonials-ask {
    color: rgba(255, 255, 255, 0.5);
}

.pm-band .testimonials-ask a {
    color: var(--color-accent-light);
}

/* --- The three engagement models. They live inside the contact section now,
       standing in for the old "Say hi / Scope it / Ship it" process steps. --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: var(--space-lg) 0 var(--space-md);
    text-align: left;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(1.25rem, 2.2vw, 1.8rem);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-fast), border-color var(--transition-fast),
                background var(--transition-fast), box-shadow var(--transition-fast);
}

/* accent-light, not accent: the deep brand blue is near-invisible on the dark */
.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent-light);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.service-card:hover .service-num {
    color: var(--color-accent-light);
}

.service-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.service-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.service-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

@media (max-width: 860px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
