/* 
 ---------------------------------
 |   LAST UPDATED: 2026-04-18    |
 ---------------------------------
 */

/* VIEWPORT HEADNOTE: Standard boundaries 1024, 768–1023, ≤767. min-width 1439px and 1920px are desktop tiers, not standard boundaries. max-width 479px is not tied to our device viewport sizes; used for small-mobile refinement only. */
/* Container queries: `mentions-list` = list rail width; `mentions-hero` = hero artboard; `mention-card` = per-card column width. */

/* ========================================================================
   VIEWPORT-AGNOSTIC (base styles)
   ======================================================================== */

/* Flush under fixed #header (same outcome as navbar-ornamental’s .site-content:has(…hero.has-cover…); lives here per project rule: do not edit navbar-ornamental for Mentions). */
.site-content:has(main .mentions-section .mentions-hero) {
    padding-top: 0;
}

.mentions-section {
    padding-bottom: calc(5vw * var(--scale));
    overflow: visible;
}

/* Lead hero bleed (match site-main rhythm used for cover hero): full width, list below keeps inset. */
body.mentions-immersive .site-main:has(.mentions-section) {
    padding-left: 0;
}

@media (min-width: 1024px) {
    body.mentions-immersive .site-main:has(.mentions-section) .mentions-list {
        padding-left: calc(5vw * var(--scale));
        box-sizing: border-box;
    }
}

@media (max-width: 1023px) {
    body.mentions-immersive .site-main:has(.mentions-section) .mentions-list {
        padding-left: max(calc(2.5vw * var(--scale)), env(safe-area-inset-left, 0px));
        padding-right: max(calc(2.5vw * var(--scale)), env(safe-area-inset-right, 0px));
        box-sizing: border-box;
    }
}

/* Static hero: no site cover `hero`; art + 6×6 grid copy (title row1 col1–2, subtitle row4 col4–5). */
.mentions-hero {
    position: relative;
    overflow: visible;
    width: min(100vw, 1200px);
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
}

.mentions-hero-scene {
    --mentions-hero-w: min(100vw, 1200px);
    container-type: inline-size;
    container-name: mentions-hero;
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    width: var(--mentions-hero-w);
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
    min-height: min(100dvh, calc(var(--mentions-hero-w) * 792 / 1112));
    height: min(100dvh, calc(var(--mentions-hero-w) * 792 / 1112));
    max-height: min(100dvh, 100svh);
    overflow: visible;
    /* background-color: #1a1410; */
}

.mentions-hero-media {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    z-index: 0;
    position: relative;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.mentions-hero-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.mentions-hero-title {
    grid-column: 1 / 3;
    grid-row: 1;
    z-index: 1;
    align-self: start;
    justify-self: start;
    margin: 3vw 0 0 3vw;
    padding: 0;
    overflow: visible;
    max-width: none;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    font-family: var(--edl);
    font-style: italic;
    font-weight: 300;
    font-optical-sizing: auto;
    font-size: calc(var(--fontSizeH2) * var(--scale));
    line-height: 1.08;
    color: #f8f4ee;
    text-shadow:
        0 0.04em 0.2em rgba(0, 0, 0, 0.55),
        0 0.12em 0.45em rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.mentions-hero-desc {
    grid-column: 4 / 6;
    grid-row: 4;
    z-index: 1;
    align-self: start;
    justify-self: start;
    margin: 0;
    padding: 0;
    overflow: visible;
    max-width: none;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    font-family: var(--ed);
    font-size: calc(round(var(--fontSizeH4) * var(--scale), 2px));
    line-height: 1.35;
    color: rgba(252, 248, 242, 0.94);
    text-shadow:
        0 0.06em 0.18em rgba(0, 0, 0, 0.45),
        0 0.02em 0.08em rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

.mentions-hero-desc a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.mentions-hero-desc p {
    margin: 0 0 0.5em;
    line-height: 1.05;
}

.mentions-hero-desc p:last-child {
    margin-bottom: 0;
}

@container mentions-hero (max-width: 767px) {
    .mentions-hero-title {
        font-size: round(calc(var(--fontSizeH2) * var(--scale)), 2px);
    }

    .mentions-hero-desc {
        font-size: round(calc(var(--fontSizeH5) * var(--scale)), 2px);
    }
}

/* Query container for list column mode (inner `.mentions-list` is the grid; see partials/components/mentions-list.hbs). */
.mentions-list-container {
    container-type: inline-size;
    container-name: mentions-list;
}

/* Grid of mention cards — max two columns (desktop + tablet) */
.mentions-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Empty-state message */
.mentions-list.mentions-empty {
    display: block;
    padding: calc(3vw * var(--scale)) calc(2.5vw * var(--scale));
}

.mentions-empty-text {
    font-family: var(--et);
    color: var(--text-color);
    opacity: 0.6;
}

.mentions-empty-text code {
    font-family: var(--cm);
    font-size: 0.9em;
}

/* Individual mention card — title + publication row typography */
.mention-card {
    container-type: inline-size;
    container-name: mention-card;
    --mention-title-font-size: calc(var(--fontSizeH5) * var(--scale));
    /* Publication name + date: blog body × 0.8 × scale, then +25% vs prior slug sizes */
    --mention-pub-font-size: calc(var(--fontSizeBlog) * 0.8 * var(--scale) * 1.25);
    /* Match body padding so OG image insets align with text column */
    --m-pad-x: calc(2.5vw * var(--scale));
    --m-pad-y: calc(2.5vw * var(--scale));
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--text-color);
    border-bottom: 1px solid var(--text-color);
    overflow: hidden;
}

.mentions-list .mention-card:nth-child(2n) {
    border-right: none;
}

/* OG image (direct child of .mention-card) — inset like body text, no hover zoom */
.mention-card-og-image {
    flex-shrink: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--text-color);
    aspect-ratio: 16 / 9;
    width: calc(100% - 2 * var(--m-pad-x));
    margin: var(--m-pad-y) var(--m-pad-x) 0;
    box-sizing: border-box;
    object-fit: cover;
    display: block;
    background-color: #fff;
}

/* Card body — post body rhythm for pull-quotes */
.mention-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--m-pad-y) var(--m-pad-x);
    background-color: #fff;
    --post-body-font-size: var(--fontSizeBlog);
    --post-body-line-height: 1.4;
}

/* Row 1: favicon or `story` publication mark (dateline is the next line) */
.mention-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    column-gap: calc(1vw * var(--scale));
    margin-bottom: calc(0.35vw * var(--scale));
}

.mention-card-source {
    display: flex;
    align-items: center;
    column-gap: calc(0.55em * var(--scale));
    min-width: 0;
    flex: 1 1 auto;
    position: relative;
}

.mention-card-favicon {
    flex-shrink: 0;
    display: block;
    width: var(--mention-pub-font-size);
    height: var(--mention-pub-font-size);
    min-width: 1.25rem;
    min-height: 1.25rem;
    object-fit: contain;
    object-position: left center;
}

/* CSV `story` / JSON `story` + `localStoryAsset`: full publication mark (shown with visible site name beside it) */
.mention-card-pub-logo {
    flex-shrink: 0;
    display: block;
    max-height: calc(var(--mention-pub-font-size) * 2.75);
    max-width: min(220px, 58%);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
    /* Light backing so white/light wordmarks (e.g. SVG on white card) read as “something” */
    padding: 0.12em 0.28em;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.045);
    box-sizing: border-box;
}

.mention-card-site--visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mention-card-site {
    font-family: var(--cm);
    font-size: var(--mention-pub-font-size);
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row 2: // date (full width under publication row, above headline) */
.mention-card-dateline {
    margin: 0 0 calc(0.65vw * var(--scale));
    padding: 0;
    text-align: right;
    font-family: var(--cm);
    font-size: calc(var(--mention-pub-font-size) * 0.8);
    font-size: calc(round(var(--mention-pub-font-size) * 0.8)); /* rounds to nearest whole number, if supported */
    font-weight: 450;
    line-height: 1.25;
}

.mention-card-dateline::before {
    content: "//\00a0";
    color: var(--cannon-pink);
}

.mention-card-dateline .mention-card-date {
    color: var(--text-color);
    opacity: 0.82;
    white-space: nowrap;
}

/* Title (row 3) */
.mention-card-title {
    font-family: var(--ed);
    font-size: var(--mention-title-font-size);
    line-height: 1.2;
    margin: 0 0 calc(0.5vw * var(--scale));
    background-color: #fff;
}

.mention-card-title a {
    color: var(--text-color);
    text-decoration: none;
    background-color: #fff;
    border-left: none;
}

.mention-card-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/*
 * Pull-quote — align with post.css / global blockquote (post shell may not load on mentions page).
 * Matches blockquote, blockquote .p + .post-content blockquote line-height exception.
 */
.mentions-section blockquote.mention-card-quote {
    margin-left: 1.25rem;
    padding-left: 1.25rem;
    padding-top: calc(0.25vw * var(--scale));
    padding-bottom: calc(0.25vw * var(--scale));
    margin-top: calc(0.75vw * var(--scale));
    margin-bottom: calc(2.2vw * var(--scale));
    font-family: var(--etl) !important;
    line-height: 1.3 !important;
    border-left: 4px solid var(--swiss-coffee);
    font-weight: 300;
    font-style: normal;
    font-optical-sizing: auto;
    font-feature-settings: var(--font-features-global);
    box-sizing: border-box;
    font-size: var(--post-body-font-size);
}

/* Excerpt stack: context blockquotes + primary pull (format-mentions.js) */
.mention-card-quote-stack {
    margin-top: calc(0.35vw * var(--scale));
}

.mentions-section .mention-card-quote-stack blockquote.mention-card-quote {
    margin-top: calc(0.4vw * var(--scale));
    margin-bottom: calc(0.4vw * var(--scale));
}

.mentions-section blockquote.mention-card-quote.mention-card-quote--context {
    opacity: 0.9;
}

.mentions-section .mention-card-quote-stack blockquote.mention-card-quote--context + blockquote.mention-card-quote {
    margin-top: calc(0.25vw * var(--scale));
}

.mentions-section .mention-card-quote-stack blockquote.mention-card-quote + blockquote.mention-card-quote--context {
    margin-top: calc(0.25vw * var(--scale));
}

.mentions-section .mention-card-quote-stack .mention-card-quote--after:last-child {
    margin-bottom: calc(0.15vw * var(--scale));
}

/* Byline — directly under headline, above blockquote */
.mention-card-byline {
    font-family: var(--cm);
    font-size: calc(round(var(--post-body-font-size) * .8 * var(--scale), 1));
    color: var(--text-color);
    opacity: 0.9;
    margin: 0 0 calc(0.75vw * var(--scale));
    padding-top: 0;
}




/* ~half of a 1024px two-up rail: card-local “desktop” title sizing */
@container mention-card (min-width: 31.25rem) {
    .mention-card {
        --mention-title-font-size: calc(var(--fontSizeH5) * var(--scale));
    }
}

/* Wide card: subtler hover underline (replaces viewport 1439px tier) */
@container mention-card (min-width: 35rem) {
    .mention-card-title a:hover {
        text-decoration-thickness: calc(0.15vw * var(--scale));
    }
}

/* Narrow card: compact blockquotes (replaces viewport ≤1023px while two columns) */
@container mention-card (max-width: 40rem) {
    .mentions-section blockquote.mention-card-quote {
        margin-left: 0.7rem;
        margin-right: 0;
        padding-left: 0.95rem;
        padding-right: 0.35rem;
        border-left-width: 3px;
        margin-top: 0.9rem;
        margin-bottom: 1.2rem;
        line-height: 1.3 !important;
    }

    .mentions-section .mention-card-quote-stack blockquote.mention-card-quote {
        margin-top: 0.55rem;
        margin-bottom: 0.55rem;
    }
}

/* Narrow list rail: single column (replaces viewport ≤767px list grid) */
@container mentions-list (max-width: 42rem) {
    .mentions-list {
        grid-template-columns: 1fr;
    }

    .mentions-list .mention-card:nth-child(2n) {
        border-right: none;
    }

    .mentions-list.mentions-empty {
        padding: 40px 30px;
    }
}

@container mentions-list (max-width: 22.5rem) {
    .mentions-list.mentions-empty {
        padding: 30px 18px;
    }
}

/* Viewport: section rhythm still tied to device / immersive page shell */
@media (max-width: 767px) {
    .mentions-section {
        padding-bottom: 60px;
    }
}

/* Narrow card: mobile-ish padding + quote body (replaces viewport ≤767px card rules) */
@container mention-card (max-width: 30rem) {
    .mention-card {
        --mention-title-font-size: var(--fontSizeH5);
        --m-pad-x: 30px;
        --m-pad-y: 30px;
    }

    .mention-card-body {
        padding: var(--m-pad-y) var(--m-pad-x);
    }

    .mention-card-header {
        margin-bottom: 14px;
    }

    .mention-card-source {
        column-gap: 8px;
    }

    .mention-card-title {
        font-size: var(--fontSizeH5);
        margin-bottom: 14px;
    }

    .mentions-section blockquote.mention-card-quote {
        font-size: var(--post-body-font-size);
        margin-left: 1.15rem;
        padding-left: 1.5rem;
        padding-right: 0.4rem;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
        border-left-width: 3px;
        line-height: 1.3 !important;
    }

    .mention-card-byline {
        font-size: 13px;
    }
}

/* Very narrow card (replaces viewport ≤479px refinements) */
@container mention-card (max-width: 22.5rem) {
    .mention-card {
        --m-pad-x: 18px;
        --m-pad-y: 24px;
    }

    .mention-card-body {
        padding: var(--m-pad-y) var(--m-pad-x);
    }
}
