/* ============================================================
   Swarm family — product hub, product pages, and synergy story.
   Reuses site.css tokens (--ink, --accent, --sage, --surface, etc.).
   ============================================================ */

/* ---- Family product grid (hub + homepage band) ---- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* Compact four-product doorway directly below the homepage hero. */
.home-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-product-strip .product-card {
    gap: 10px;
    min-height: 100%;
    padding: 20px;
}

.home-product-strip .product-card p {
    font-size: 0.9rem;
    line-height: 1.45;
}

.product-card {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 24px;
    border-radius: var(--radius-xl, 18px);
    background: var(--surface, #fff);
    border: 1px solid var(--line, rgba(17, 20, 24, 0.1));
    box-shadow: var(--shadow, 0 10px 30px rgba(17, 20, 24, 0.06));
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(17, 20, 24, 0.14);
}

.product-card--star {
    grid-column: span 3;
    grid-template-columns: auto 1fr;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(15, 98, 254, 0.10), rgba(69, 137, 255, 0.06)),
        var(--surface, #fff);
}

.product-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-card__mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: contain;
    background: var(--surface-strong, #f5f7fa);
    padding: 6px;
    border: 1px solid rgba(17, 20, 24, 0.08);
}

.product-card__name {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.1;
    letter-spacing: 0;
}

.product-card__tier {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark, #0043ce);
}

.product-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--sage, #475569);
}

.product-card__cta {
    font-weight: 700;
    color: var(--accent-dark, #0043ce);
    font-size: 0.9rem;
}

/* ---- Download page: product-first choices, setup second ---- */
.download-page {
    display: grid;
    gap: 28px;
}

.download-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.download-product-card {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 100%;
    padding: 24px;
    border: 1px solid var(--line, rgba(17, 20, 24, 0.1));
    border-radius: var(--radius-xl, 18px);
    background: #fff;
}

.download-product-card--featured {
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.12), rgba(255, 255, 255, 0.94));
    border-color: rgba(15, 98, 254, 0.25);
}

.download-product-card__head {
    display: flex;
    gap: 14px;
    align-items: center;
}

.download-product-card__head h2 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.1;
}

.download-product-card p {
    margin: 0;
    color: var(--sage, #475569);
    line-height: 1.5;
}

.download-product-card__meta {
    color: var(--muted, #64748b);
    font-size: 0.86rem;
    line-height: 1.4;
}

.download-product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: auto;
    padding-top: 4px;
}

.download-product-actions .button {
    padding: 10px 14px;
}

.download-next,
.download-help {
    display: grid;
    gap: 14px;
}

.download-next-grid,
.download-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.download-help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-next-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 100%;
    padding: 16px;
    border: 1px solid var(--line, rgba(17, 20, 24, 0.1));
    border-radius: var(--radius-lg, 14px);
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.download-next-link:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong, rgba(17, 20, 24, 0.2));
    box-shadow: var(--shadow-hover);
}

.download-next-link > span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft, #e7f0ff);
    color: var(--accent-dark, #0043ce);
    font-weight: 700;
}

.download-next-link strong,
.download-next-link small {
    display: block;
}

.download-next-link small {
    margin-top: 3px;
    color: var(--muted, #64748b);
    line-height: 1.35;
}

.download-next-link b {
    color: var(--accent-dark, #0043ce);
}

.download-note {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(15, 98, 254, 0.16);
    border-radius: var(--radius-lg, 14px);
    background: #edf5ff;
}

.download-note > div {
    display: grid;
    gap: 2px;
}

.download-note span {
    color: var(--muted, #64748b);
    line-height: 1.4;
}

.download-note .text-link {
    margin-left: auto;
    white-space: nowrap;
}

/* ---- SwarmSpan utility band (set apart from the three apps) ---- */
.utility-band {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    border-radius: var(--radius-xl, 18px);
    background:
        linear-gradient(135deg, rgba(10, 10, 11, 0.04), rgba(71, 85, 105, 0.06)),
        var(--surface, #fff);
    border: 1px dashed rgba(17, 20, 24, 0.18);
}

.utility-band__mark {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.utility-band__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sage, #475569);
}

.utility-band h3 {
    margin: 2px 0 4px;
    font-size: 1.12rem;
    line-height: 1.15;
}

.utility-band p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--sage, #475569);
}

/* ---- "Common Context" synergy diagram ---- */
.synergy-diagram {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
}

.synergy-core {
    justify-self: center;
    max-width: 460px;
    padding: 18px 24px;
    border-radius: 999px;
    background: var(--ink, #0a0a0b);
    color: #fff;
}

.synergy-core strong {
    display: block;
    font-size: 1.05rem;
}

.synergy-core span {
    font-size: 0.85rem;
    opacity: 0.8;
}

.synergy-ring {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.synergy-node {
    padding: 16px;
    border-radius: var(--radius-lg, 14px);
    background: var(--surface-strong, #f5f7fa);
    border: 1px solid rgba(17, 20, 24, 0.08);
}

.synergy-node strong {
    display: block;
    font-size: 0.98rem;
    margin-bottom: 4px;
}

.synergy-node span {
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--sage, #475569);
}

.synergy-node--utility {
    grid-column: span 3;
    border-style: dashed;
    background: transparent;
}

/* ---- "Works with the rest of Swarm" cross-link band ---- */
.works-with {
    display: grid;
    gap: 12px;
}

.works-with__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.works-with__links a {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: var(--radius-lg, 14px);
    background: var(--surface-strong, #f5f7fa);
    border: 1px solid rgba(17, 20, 24, 0.08);
    text-decoration: none;
    color: inherit;
}

.works-with__links strong {
    font-size: 0.95rem;
}

.works-with__links span {
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--sage, #475569);
}

.mobile-companion-showcase {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 34px;
    align-items: center;
}

.mobile-companion-showcase__media {
    margin: 0;
}

.mobile-companion-showcase__media img,
.mobile-app-hero__shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl, 18px);
    box-shadow: 0 24px 70px rgba(17, 20, 24, 0.18);
}

.mobile-companion-showcase__copy {
    display: grid;
    gap: 16px;
}

.mobile-companion-showcase--spaced {
    margin-bottom: 1.5rem;
}

.store-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 168px;
    min-height: 54px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #050609;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(17, 20, 24, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(17, 20, 24, 0.24);
}

.store-badge__icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.store-badge small,
.store-badge strong {
    display: block;
    line-height: 1.1;
}

.store-badge small {
    font-size: 0.68rem;
    opacity: 0.76;
}

.store-badge strong {
    font-size: 1.08rem;
    letter-spacing: 0;
}

.mobile-app-hero {
    align-items: center;
}

.mobile-app-hero__shot {
    max-width: 520px;
}

/* ---- Roadmap / "coming soon" synergy features ---- */
.roadmap-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark, #0043ce);
    background: var(--accent-soft, #edf5ff);
    padding: 3px 8px;
    border-radius: 999px;
}

/* ---- Privacy callout (work email only, not personal) ---- */
.privacy-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    padding: 20px 24px;
    border-radius: var(--radius-xl, 18px);
    background:
        linear-gradient(135deg, rgba(15, 98, 254, 0.08), rgba(69, 137, 255, 0.05)),
        var(--surface, #fff);
    border: 1px solid rgba(15, 98, 254, 0.22);
}

.privacy-note .glyph {
    color: var(--accent-dark, #0043ce);
}

.privacy-note h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
    line-height: 1.2;
}

.privacy-note p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--sage, #475569);
}

.now-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0a7d3c;
    background: rgba(10, 125, 60, 0.12);
    padding: 3px 8px;
    border-radius: 999px;
}

@media (max-width: 980px) {
    .product-grid,
    .synergy-ring,
    .works-with__links,
    .mobile-companion-showcase {
        grid-template-columns: 1fr;
    }

    .download-product-grid,
    .download-next-grid,
    .download-help-grid {
        grid-template-columns: 1fr;
    }

    .home-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .privacy-note {
        grid-template-columns: 1fr;
    }

    .product-card--star {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .synergy-node--utility {
        grid-column: span 1;
    }

    .utility-band {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

@media (max-width: 620px) {
    .download-note {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .download-note .text-link {
        width: 100%;
        margin-left: 44px;
    }
}

@media (max-width: 620px) {
    .home-product-grid {
        grid-template-columns: 1fr;
    }
}
