/* Design Colors documentation page: swatches and chips.
   Core swatches read the live tokens from the Block LLC style. */

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--grid-gap);
    margin: 40px 0;
}

.color-swatch {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.color-swatch-preview {
    display: flex;
    align-items: flex-end;
    min-height: 140px;
    padding: 16px 20px;
    font-size: var(--text-eyebrow-size);
    font-weight: var(--weight-eyebrow);
    letter-spacing: var(--text-eyebrow-tracking);
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-border);
}

.color-swatch-ink .color-swatch-preview { background: var(--color-ink); color: var(--color-white); }
.color-swatch-white .color-swatch-preview { background: var(--color-white); color: var(--color-ink); }
.color-swatch-surface .color-swatch-preview { background: var(--color-surface); color: var(--color-ink); }
.color-swatch-accent .color-swatch-preview { background: var(--color-accent); color: var(--color-white); }
.color-swatch-slate .color-swatch-preview { background: var(--color-slate); color: var(--color-white); }
.color-swatch-border .color-swatch-preview { background: var(--color-border); color: var(--color-ink); }

.color-swatch-content {
    padding: 20px;
}

.color-swatch-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.color-swatch-heading h3 {
    margin: 0;
    font-size: var(--text-h4-size);
}

.color-swatch-heading code,
.color-category-list code {
    color: var(--color-slate);
    font-size: 0.85rem;
}

.color-swatch-content p {
    color: var(--color-slate);
}

.color-swatch-usage {
    margin: 16px 0 0;
}

.color-swatch-usage div + div {
    margin-top: 10px;
}

.color-swatch-usage dt {
    font-size: var(--text-eyebrow-size);
    font-weight: var(--weight-label);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.color-swatch-usage dd {
    margin: 2px 0 0;
    font-size: 0.95rem;
}

.color-category-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.color-category-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.color-category-list code {
    margin-left: auto;
}

.color-category-chip,
[class^="color-chip-"],
[class*=" color-chip-"] {
    display: inline-block;
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-border);
}

.color-chip-ink { background: var(--color-ink); }
.color-chip-white { background: var(--color-white); }
.color-chip-surface { background: var(--color-surface); }
.color-chip-accent { background: var(--color-accent); }
.color-chip-slate { background: var(--color-slate); }
.color-chip-border { background: var(--color-border); }

.color-category-sales { background: #2f6fbf; }
.color-category-property { background: #0f9b8e; }
.color-category-construction { background: #e0631c; }
.color-category-maintenance { background: #2fa84f; }
.color-category-investment { background: #d19a1d; }
.color-category-business { background: #7c4dbf; }
.color-category-story { background: #2f6fbf; }
.color-category-people { background: #7c4dbf; }
.color-category-credentials { background: #c9a227; }
.color-category-locations { background: #0f9b8e; }
.color-category-philanthropy { background: #c0435a; }
.color-category-market { background: #5b5fc7; }
.color-category-legacy { background: #8a6d3b; }
.color-category-careers { background: #2fa84f; }

/* ==========================================================
   Design documentation palette overrides
   Brings the Design pages in line with the live site palette
   (Ink, Surface, Slate, blue accent). Documentation only:
   every selector is scoped to the Design pages.
   ========================================================== */

.design-doc-site,
.design-vision,
.design-document {
    --color-dark: var(--color-ink);
    --color-text: var(--color-ink);
    --color-text-muted: var(--color-slate);
    --color-dark-surface-muted: rgba(255, 255, 255, 0.72);
}

.design-doc-site {
    background: var(--color-surface);
}

.design-doc-site .design-doc-header {
    background: var(--color-ink);
}

.design-doc-site .design-doc-sidebar {
    background: var(--color-surface);
}

.design-document-section.section-surface {
    background: var(--color-surface);
}

.design-doc-site .design-document-section.section-dark,
.design-doc-site .design-document-hero,
.component-preview-dark,
.sample-affiliate-card {
    background: var(--color-ink);
}

.sample-width,
.design-document-end,
.sample-cta {
    background: var(--color-surface);
}

.sample-hero-overlay {
    background:
        linear-gradient(
            90deg,
            rgba(26, 28, 31, 0.94) 0%,
            rgba(26, 28, 31, 0.7) 48%,
            rgba(26, 28, 31, 0.18) 100%
        );
}

/* Leadership card sample: grayscale photos that turn to color on hover, as on the live site */
.sample-person-image img {
    filter: grayscale(1);
    transition: filter 250ms ease, transform 250ms ease;
}

.sample-person-card:hover .sample-person-image img,
.sample-person-card:focus-within .sample-person-image img {
    filter: none;
}

@media (prefers-reduced-motion: reduce) {
    .sample-person-image img {
        transition: none;
    }
}