/* ==========================================================================
   Strive Haus — Case studies page (/work)
   Loaded AFTER home.css. Everything here is additive: colours, type, buttons,
   nav, closing CTA and footer all come from home.css unchanged.
   ========================================================================== */

/* ---------- Nav (current page state) ---------- */

.nav-link-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

/* ---------- Page header ---------- */

.pf-hero {
    position: relative;
    background: var(--bg);
    overflow: hidden;
}

.pf-hero-inner {
    position: relative;
    z-index: 10;
    padding: 190px 48px 90px;
    max-width: 1320px;
}

.pf-back {
    /* Block-level so it owns its own line above the eyebrow. */
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 0.875rem;
    color: var(--text-faint);
    transition: color 0.2s ease;
}
.pf-back:hover { color: var(--text); }
.pf-back svg { width: 15px; height: 15px; }

.pf-title {
    font-size: clamp(2.75rem, 5.8vw, 4.75rem);
    font-weight: 500;
    line-height: 1.0;
    letter-spacing: -0.042em;
    margin-bottom: 24px;
    max-width: 900px;
    text-wrap: balance;
}

.pf-sub {
    font-size: 1.1875rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 560px;
}

.pf-trust {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 28px;
    padding: 8px 16px 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.8125rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}
.pf-trust .yc-mark { width: 19px; height: 19px; font-size: 0.8125rem; }

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

.pf-main { position: relative; background: var(--bg); }
.pf-main .section-inner { padding: 0 48px 130px; }

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

.pf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 52px 26px;
}

.pf-card { min-width: 0; }

/* ---------- Media / player facade ---------- */

.pf-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.pf-media:hover { border-color: rgba(255, 255, 255, 0.22); transform: translateY(-3px); }
.pf-media.is-playing { cursor: default; transform: none; }
.pf-media.is-playing:hover { border-color: var(--border); }

.pf-media iframe,
.pf-media video {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    background: #000;
}

.pf-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Poster is decorative — the title beneath it names the video. */
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
}
.pf-poster.is-loaded { opacity: 1; }
.pf-media:hover .pf-poster { transform: scale(1.02); }

/* The looping preview stacks over the poster, which stays underneath as the
   first paint and as the reduced-motion / save-data fallback. */
.pf-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.pf-preview.is-loaded { opacity: 1; }

/* No play button, so the card needs its own affordance: it lifts, brightens
   its border, and nudges the frame on hover. */
.pf-media::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0);
    transition: box-shadow 0.25s ease;
    pointer-events: none;
}
.pf-media:hover::after,
.pf-media:focus-visible::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }

.pf-media:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 3px;
}

.pf-media.is-playing::after { content: none; }

/* Spinner shown between the click and the player taking over. */
.pf-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 10, 0.72);
}
.pf-loading::after {
    content: '';
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: pf-spin 0.7s linear infinite;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ---------- Card meta ---------- */

.pf-meta { margin-top: 16px; }

/* The type descriptor sits directly under the video, using the site's
   uppercase micro-label convention (same as .section-label). */
.pf-type {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 9px;
}

.pf-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pf-meta-top h3 {
    font-size: 1.0625rem;
    font-weight: 500;
    letter-spacing: -0.015em;
}

.pf-title-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}
.pf-title-link:hover { color: #ffffff; }
.pf-title-link svg {
    width: 12px;
    height: 12px;
    color: var(--text-ghost);
    transition: transform 0.2s ease, color 0.2s ease;
}
.pf-title-link:hover svg { transform: translate(1px, -1px); color: var(--text-muted); }

/* Non-YC accelerator badge. The YC pill is an outline wrapped around a coloured
   mark; here the mark IS the badge, so the outline is dropped and the chip is
   sized to match the pill it sits beside. */
.accel-pill {
    padding: 0;
    border: none;
}
.accel-mini {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 7px;
    border-radius: 4px;
    background: var(--text);
    color: #08080a;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
}

.pf-views {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--text-faint);
    white-space: nowrap;
}

.pf-desc {
    margin-top: 7px;
    font-size: 0.9375rem;
    color: var(--text-faint);
}


/* ---------- Empty state ---------- */

.pf-empty {
    padding: 90px 0;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.9375rem;
}

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

@media (max-width: 1024px) {
    .pf-hero-inner { padding: 170px 32px 72px; }
    .pf-main .section-inner { padding: 0 32px 110px; }
}

@media (max-width: 768px) {
    .pf-hero-inner { padding: 140px 24px 60px; }
    .pf-main .section-inner { padding: 0 24px 90px; }

    .pf-grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 480px) {
    .pf-hero-inner { padding: 128px 20px 52px; }
    .pf-main .section-inner { padding: 0 20px 76px; }
    .pf-views { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pf-media:hover { transform: none; }
    .pf-media:hover .pf-poster { transform: none; }
    /* work.js also skips the looping previews entirely at this setting. */
}
