/* Factsogy homepage: follow cards and podcast RSS strip. Requires base.css. */

/* ---------- Follow ---------- */

.follow-list {
    display: grid;
    /* Fits one row of five on desktop, reflows by itself as platforms are added */
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.follow-card {
    --brand: var(--accent);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 28px 16px;
    height: 100%;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.follow-card:hover {
    color: inherit;
    border-color: var(--brand);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* Platform brand colours for the icon and hover state */
.follow-card--youtube { --brand: #ff0000; }
.follow-card--tiktok { --brand: #25f4ee; }
.follow-card--instagram { --brand: #e1306c; }
.follow-card--facebook { --brand: #1877f2; }
.follow-card--spotify { --brand: #1db954; }

@media (prefers-color-scheme: light) {
    .follow-card--tiktok { --brand: #111214; }
}

.follow-icon {
    width: 44px;
    height: 44px;
    color: var(--brand);
}

.follow-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.follow-platform {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 30px;
    line-height: 1;
    text-transform: uppercase;
}

.follow-handle {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.follow-cta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 16px;
    background: var(--text);
    color: var(--bg);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.follow-cta::after {
    content: "\2192";
    font-size: 18px;
    transition: transform 0.25s var(--ease-out);
}

.follow-card:hover .follow-cta {
    background: var(--brand);
    color: #ffffff;
}

.follow-card--tiktok:hover .follow-cta {
    color: #111214;
}

@media (prefers-color-scheme: light) {
    .follow-card--tiktok:hover .follow-cta {
        color: #ffffff;
    }
}

.follow-card:hover .follow-cta::after {
    transform: translateX(4px);
}

.podcast-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 32px;
    align-items: center;
    margin-top: 16px;
    padding: 20px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.podcast-strip p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.podcast-strip strong {
    color: var(--text);
}

.rss-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rss-copy code {
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    padding: 10px 12px;
}

.copy-status {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #1db954;
}

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

@media (max-width: 960px) {
    .podcast-strip {
        grid-template-columns: 1fr;
    }

    .rss-copy {
        flex-wrap: wrap;
    }

    .rss-copy code {
        max-width: 100%;
        flex: 1 1 200px;
    }
}

@media (max-width: 640px) {
    .follow-list {
        grid-template-columns: 1fr;
    }
}

/* ~200px-wide cards: keep the platform name on one line */
@media (min-width: 961px) {
    .follow-card {
        padding: 20px;
    }

    .follow-platform {
        font-size: 26px;
    }
}
