/* ============================================================================
   tribute.css
   Public-facing styles for the tribute wall at /messages and /family,
   plus the print / Save-as-PDF stylesheet used from the family view.
   Inherits tokens and Sherman Sans from site.css.
   ============================================================================ */

/* --------------------------------------------------------------------------
   Wall pager and empty state
   -------------------------------------------------------------------------- */
.wall-empty {
    padding: 64px 24px;
    text-align: center;
    color: var(--su-medium-gray);
    font-family: var(--font-sans);
}

.wall-pager {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px 0;
}

/* --------------------------------------------------------------------------
   Tribute Wall
   -------------------------------------------------------------------------- */
.wall-hero {
    background: linear-gradient(180deg, var(--su-cream) 0%, var(--su-warm-white) 100%);
    padding: 64px 32px 40px;
    text-align: center;
}

.wall-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.wall-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--su-blue);
    margin: 0 0 20px;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.wall-lede {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--su-dark-gray);
    margin: 0 auto 24px;
    max-width: 600px;
}

.wall-cta { margin: 0; }

.wall-filters {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 32px 0;
}

.chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.chip {
    display: inline-block;
    padding: 8px 16px;
    background: var(--su-white);
    border: 1px solid var(--su-border);
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--su-dark-gray);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.chip:hover, .chip:focus-visible {
    border-color: var(--su-orange);
    color: var(--su-orange-dark);
    outline: none;
}

.chip.is-active {
    background: var(--su-blue);
    border-color: var(--su-blue);
    color: var(--su-white);
}

.wall-main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.wall-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    /* Masonry via CSS columns — each card packs tightly under the previous
       one in its column regardless of neighbors' heights. Reading order is
       top-to-bottom within a column, then column-to-column. */
    column-width: 320px;
    column-gap: 24px;
}

.wall-card {
    position: relative;
    background: var(--su-white);
    border: 1px solid var(--su-border);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    /* Masonry: full-column width, don't split across a column break,
       and use margin-bottom since column-gap only handles horizontal. */
    display: inline-block;
    width: 100%;
    margin: 0 0 24px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.wall-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.wall-card-private {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--su-medium-gray);
    color: var(--su-white);
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
}

.wall-card-message {
    margin: 0 0 20px;
    padding: 0;
    border: none;
    flex: 1;
}

.wall-card-message p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--su-dark-gray);
    margin: 0 0 10px;
}

.wall-card-message p:last-child { margin-bottom: 0; }

.wall-card-attribution {
    padding-top: 16px;
    border-top: 1px solid var(--su-border);
}

.wall-card-name {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--su-blue);
    margin: 0;
}

.wall-card-affil {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: var(--su-orange-dark);
    margin: 2px 0 0;
    font-weight: 500;
}

.wall-card-date {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--su-medium-gray);
    margin-top: 4px;
    display: block;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .wall-hero { padding: 48px 20px 32px; }
    .wall-main { padding: 24px 20px 56px; }
    .wall-grid { column-count: 1; column-width: auto; }
    .wall-filters { padding: 20px 20px 0; }
}

/* --------------------------------------------------------------------------
   Print / Save as PDF — keyed off the tribute wall layout.
   Goal: a clean, single-column keepsake of the messages, with the page
   chrome (site header, filters, pager, the print button itself) removed.
   -------------------------------------------------------------------------- */
@media print {
    .site-header,
    .wall-filters,
    .wall-pager,
    .wall-print,
    .skip-link,
    footer { display: none !important; }

    body { background: #fff; color: #000; }

    .wall-hero {
        background: none;
        padding: 0 0 16pt;
        text-align: left;
        border-bottom: 1pt solid #999;
        margin-bottom: 16pt;
    }

    .wall-hero-inner { max-width: none; padding: 0; }

    .wall-title {
        font-size: 22pt;
        margin: 0 0 6pt;
    }

    .hero-eyebrow {
        font-size: 10pt;
        letter-spacing: 0.08em;
        margin: 0 0 4pt;
    }

    .wall-lede {
        font-size: 11pt;
        margin: 0;
    }

    .wall-main { padding: 0; }

    /* Single column, readable line length for print. */
    .wall-grid {
        display: block;
        column-count: 1;
    }

    .wall-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: none;
        border-top: 0.5pt solid #bbb;
        background: none;
        padding: 10pt 0 10pt;
        margin: 0;
        box-shadow: none;
    }

    .wall-card:first-child { border-top: none; }

    .wall-card-message {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
    }

    .wall-card-attribution {
        font-size: 9.5pt;
        color: #333;
        margin-top: 6pt;
    }

    .wall-card-private {
        color: #555;
        border: 0.5pt solid #999;
        padding: 1pt 4pt;
        font-size: 8pt;
    }

    /* Let long URLs break instead of overflowing the page */
    a { color: inherit; text-decoration: none; word-wrap: break-word; }
}
