/*
 * Blog index and archive listings. Hand-written and loaded only on those
 * views, because app.css is a compiled build with no source on the server.
 * Everything is scoped under .pvb.
 */

.pvb {
    --pvb-ink: #0f172a;
    --pvb-body: #475569;
    --pvb-muted: #64748b;
    --pvb-line: #e2e8f0;
    --pvb-soft: #f8fafc;
    --pvb-pink: #b8004a;
    --pvb-grad: linear-gradient(90deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
    --pvb-radius: 18px;
    flex: 1 1 0%;
    font-family: "DM Sans", Arial, Helvetica, sans-serif;
    color: var(--pvb-ink);
}

.pvb-wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Hero ---------- */

.pvb-hero {
    border-bottom: 1px solid var(--pvb-line);
    background:
        radial-gradient(55% 130% at 100% 0%, rgba(221, 42, 123, 0.1), transparent 62%),
        radial-gradient(45% 120% at 0% 100%, rgba(245, 133, 41, 0.1), transparent 62%),
        #fff;
}

.pvb-hero .pvb-wrap {
    padding-top: 44px;
    padding-bottom: 44px;
}

.pvb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    border: 1px solid var(--pvb-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
    color: #334155;
}

.pvb-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pvb-grad);
}

.pvb-title {
    max-width: 760px;
    margin-top: 18px;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--pvb-ink);
    text-wrap: balance;
}

.pvb-accent {
    background-image: linear-gradient(95deg, #962fbf 0%, #d62976 45%, #fa7e1e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pvb-deck {
    max-width: 620px;
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--pvb-body);
}

.pvb-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 22px;
    font-size: 13px;
    color: var(--pvb-muted);
}

.pvb-stats strong {
    font-weight: 700;
    color: var(--pvb-ink);
}

/* ---------- Sections ---------- */

.pvb-section {
    padding-top: 40px;
    padding-bottom: 8px;
}

.pvb-section:last-of-type {
    padding-bottom: 56px;
}

.pvb-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.pvb-section-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--pvb-ink);
}

.pvb-section-note {
    font-size: 13px;
    color: var(--pvb-muted);
}

.pvb-empty {
    padding: 48px 0;
    font-size: 15px;
    color: var(--pvb-muted);
}

/* ---------- Cards ---------- */

.pvb-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.pvb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--pvb-line);
    border-radius: var(--pvb-radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pvb-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
}

.pvb-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pvb-media--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(70% 90% at 80% 10%, rgba(221, 42, 123, 0.16), transparent 65%),
        radial-gradient(70% 90% at 10% 100%, rgba(245, 133, 41, 0.16), transparent 65%),
        #f8fafc;
}

.pvb-media--empty img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    opacity: 0.85;
}

.pvb-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--pvb-grad);
    box-shadow: 0 4px 12px rgba(221, 42, 123, 0.3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: #fff;
}

.pvb-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.pvb-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--pvb-muted);
}

.pvb-cat {
    padding: 3px 9px;
    border-radius: 999px;
    background: #fdf2f7;
    font-size: 12px;
    font-weight: 600;
    color: var(--pvb-pink);
}

.pvb-meta-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
}

.pvb-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--pvb-ink);
    text-wrap: balance;
}

.pvb-card-title a {
    color: inherit;
    text-decoration: none;
    outline: none;
}

/* The title link covers the whole card, so the card is one click target. */
.pvb-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--pvb-radius);
}

.pvb-card-title a:focus-visible::after {
    outline: 2px solid var(--pvb-pink);
    outline-offset: 3px;
}

.pvb-excerpt {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: 15px;
    line-height: 1.65;
    color: var(--pvb-body);
}

.pvb-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pvb-pink);
}

.pvb-more svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .pvb-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 14px 34px -14px rgba(15, 23, 42, 0.22);
        transform: translateY(-3px);
    }

    .pvb-card:hover .pvb-media:not(.pvb-media--empty) img {
        transform: scale(1.04);
    }

    .pvb-card:hover .pvb-more svg {
        transform: translateX(4px);
    }
}

/* ---------- Featured card ---------- */

.pvb-card--lead .pvb-body {
    gap: 12px;
    padding: 22px 20px 24px;
}

.pvb-card--lead .pvb-card-title {
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.pvb-card--lead .pvb-excerpt {
    -webkit-line-clamp: 4;
    line-clamp: 4;
    font-size: 16px;
}

.pvb-card--lead .pvb-more {
    align-self: flex-start;
    margin-top: 6px;
    padding: 11px 18px;
    border-radius: 10px;
    background: var(--pvb-grad);
    color: #fff;
}

.pvb-card--lead .pvb-more svg {
    width: 12px;
    height: 12px;
}

/* ---------- CTA ---------- */

.pvb-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-top: 40px;
    padding: 28px 24px;
    border-radius: 22px;
    background:
        radial-gradient(60% 140% at 100% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
        linear-gradient(100deg, #8134af 0%, #dd2a7b 55%, #f58529 100%);
    color: #fff;
}

.pvb-cta-title {
    font-size: clamp(21px, 2.6vw, 28px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.pvb-cta-text {
    max-width: 520px;
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.pvb-cta-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 9px;
    height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: var(--pvb-ink);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pvb-cta-btn svg {
    width: 12px;
    height: 12px;
}

.pvb-cta-btn:hover {
    box-shadow: 0 10px 24px -8px rgba(15, 23, 42, 0.45);
    transform: translateY(-1px);
}

.pvb-cta-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* ---------- Breakpoints ---------- */

@media (min-width: 640px) {
    .pvb-hero .pvb-wrap {
        padding-top: 64px;
        padding-bottom: 60px;
    }

    .pvb-section {
        padding-top: 48px;
    }

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

    .pvb-cta {
        padding: 36px 40px;
    }
}

@media (min-width: 900px) {
    .pvb-card--lead {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        align-items: stretch;
    }

    .pvb-card--lead .pvb-media {
        height: 100%;
        min-height: 340px;
        aspect-ratio: auto;
    }

    .pvb-card--lead .pvb-body {
        justify-content: center;
        padding: 36px 40px;
    }

    .pvb-cta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 32px;
    }
}

@media (min-width: 1024px) {
    .pvb-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .pvb-card,
    .pvb-media img,
    .pvb-more svg,
    .pvb-cta-btn {
        transition: none;
    }

    .pvb-card:hover,
    .pvb-cta-btn:hover {
        transform: none;
    }

    .pvb-card:hover .pvb-media img,
    .pvb-card:hover .pvb-more svg {
        transform: none;
    }
}
