/* ===========================================================================
   HERO MIX (13 Oct 2026, chat HERO MIX, his notes in _staging-hero-mix/ideas.md)
   Two heroes that mix A and C (his picks so far: Mix, and Big, which is A's
   full-width poster title over the same parts). Mix mixes A and C: A's poster title, cut to three lines, with a
   short intro on the right (a smaller A, the way C sets it); C's fact row
   (client, role, one year), no badges; A's full-bleed picture. Follows the
   reader's theme like A and C. Tokens only.

   Its own switches, all frame structure, so they are review bar rows:
   data-hm-pic   logo | site | none   the card's picture
   data-hm-mark  none | client | eyebrow   where the client's logos sit
   (The full stop and the numbers were locked 13 Oct: a grey circle, look A.)
   data-hm-link  card | link | none   the outbound link
   data-hm-via   off | on   the Engaged via fact
   =========================================================================== */

/* Pieces the mix adds; hidden in A (Today). The side column melts away there
   so the intro goes back to A's own grid. */
.hm-short, .hm-card, .hm-marks { display: none; }
.hm-side { display: contents; }

:root[data-intro="big"] .cs-intro {
  background: var(--color-bg); color: var(--color-text-primary);
  /* Sizes follow the hero's own width, so the review rails beside the page
     never squeeze it into the desktop layout. */
  container: hm / inline-size;

  .cs-intro-grid {
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "eb" "title" "side" "facts";
    column-gap: var(--space-800); align-items: end;
    padding-block: var(--space-900) 0;
  }
  .cs-intro-eb { grid-area: eb; margin-bottom: var(--space-500); color: var(--color-text-tertiary); }

  /* A's poster title, sized so a nine-word title sets in three lines. */
  .cs-title {
    grid-area: title; text-transform: uppercase; line-height: 0.92; /* mock-ok: A's poster scale, one step down so it holds three lines */
    color: var(--color-text-primary); max-width: 14ch;
    font-size: clamp(2.75rem, 6.6cqi, 7.25rem); font-size: clamp(3rem, 11.2cqi, 10.5rem);
  }

  /* The right-hand column: the intro, then the link card. */
  .hm-side { grid-area: side; display: grid; gap: var(--space-500); align-content: end; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--space-800); align-items: end; margin-top: var(--space-700); padding-bottom: 0; } /* mock-ok: A's result size */
  .cs-result { margin: 0; line-height: var(--line-snug); font-size: clamp(1.125rem, 1.6cqi, 1.375rem); font-size: clamp(1.25rem, 2.2cqi, 1.75rem); color: var(--color-text-primary); max-width: 30ch; } /* mock-ok: C's intro size */

  /* C's fact row: hairlines, labels over values, no pills. */
  .cs-facts {
    grid-area: facts; display: flex; flex-wrap: wrap; margin-top: var(--space-800);
    border-top: var(--border-strong); border-bottom: var(--border-hairline);
  }
  .cs-facts > div { flex: 1 1 0; min-width: 10rem; display: grid; gap: var(--space-200); align-content: start; padding: var(--space-400) var(--space-400) var(--space-500); }
  .cs-facts > div:first-child { padding-left: 0; }
  .cs-facts > div + div { border-left: var(--border-hairline); }
  .cs-facts dt { color: var(--color-text-tertiary); }
  /* every value sits on the See it link's line: the link needs a 44px box, so each value gets the same box, centred (his ask 24 Oct) */
  .cs-facts dd { font-size: var(--text-meta); color: var(--color-text-primary); display: flex; align-items: center; min-height: var(--touch-target-min); }
  .cs-facts [data-fact="role"] { flex-grow: 1.4; }
  .cs-facts [data-fact="year"] { flex-grow: 0.6; }
  .hm-short { display: inline; }
  .hm-full { display: none; }

  /* The picture: A's full bleed, under the fact row. */
  .cs-cover { margin-top: var(--space-700); }
  .cs-cover > :is(img, .cs-stage) { height: min(70svh, 56cqi); }

  /* The old link line gives way to the mix's own. */
  .cs-live { display: none; }
}

/* Engaged via: only on request (his note: filler at most). */
:root[data-intro="big"] .cs-intro .cs-facts [data-fact="via"] { display: none; }

/* --- The link ------------------------------------------------------------ */
/* Card: the article's picture, where it ran, a short blurb, the link. */
:root[data-intro="big"][data-hm-link="card"] .cs-intro .hm-card {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-400); align-items: center;
  padding: var(--space-300); border: var(--border-hairline); border-radius: var(--radius-lg);
  background: var(--color-surface); color: var(--color-text-primary); text-decoration: none;
}
.hm-card-img { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface-sunken); }
.hm-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-card-text { display: grid; gap: var(--space-100); min-width: 0; }
.hm-card-src { font: var(--weight-semibold) var(--text-label)/1.4 var(--font-mono); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-text-tertiary); }
.hm-card-title { font-weight: var(--weight-semibold); line-height: var(--line-snug); }
.hm-card-blurb { font-size: var(--text-meta); color: var(--color-text-secondary); line-height: var(--line-snug); }
.hm-card-title svg { width: 1em; height: 1em; vertical-align: -0.12em; margin-left: var(--space-100); }
:root[data-intro="big"] .cs-intro .hm-card:hover { border-color: var(--color-border-strong); }
:root[data-intro="big"] .cs-intro .hm-card:hover .hm-card-title { text-decoration: underline; text-underline-offset: 0.15em; }
:root[data-intro="big"] .cs-intro .hm-card:focus-visible { outline: var(--focus-ring, 2px solid currentColor); outline-offset: var(--focus-ring-offset); }

/* Plain: a last cell in the fact row, C's "See it". Hidden: the link is
   locked to Card (outranks the fact row's grid below). */
.hm-link-fact { display: none; }
:root[data-intro="big"] .cs-intro .cs-facts > .hm-link-fact { display: none; }
.hm-link-fact a { display: inline-flex; align-items: center; gap: var(--space-100); min-height: var(--touch-target-min); font-size: var(--text-meta); font-weight: var(--weight-semibold); color: var(--color-text-primary); }
.hm-link-fact a svg { width: 1em; height: 1em; }

/* --- The full stop: locked 13 Oct, a grey circle (his pick) ------------- */
/* The title draws ONE full stop. Before, the typed one (Anton's square) and
   the round one showed side by side. The typed stop stays in the text for
   screen readers. Applies to every hero. */
.cs .cs-intro .hm-stop { display: inline; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root:is([data-intro]) .cs .cs-intro .cs-title::after { background: var(--neutral-500); border-radius: var(--dot-radius); }

/* --- Smaller screens ----------------------------------------------------- */
@container hm (max-width: 859.98px) {
  :root[data-intro="big"] .cs-intro .cs-intro-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "eb" "title" "side" "facts";
  }
}
@container hm (max-width: 767.98px) {
  :root[data-intro="big"] .cs-intro .cs-intro-grid { padding-top: var(--space-700); }
  :root[data-intro="big"] .cs-intro .cs-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-600); }
  :root[data-intro="big"] .cs-intro .cs-facts > div { min-width: 0; padding-left: 0; }
  :root[data-intro="big"] .cs-intro .cs-facts > div + div { border-left: none; }
  :root[data-intro="big"] .cs-intro .cs-facts > div:nth-child(even) { padding-left: var(--space-400); border-left: var(--border-hairline); }
  :root[data-intro="big"] .cs-intro .cs-cover > :is(img, .cs-stage) { height: auto; aspect-ratio: 4 / 5; }
}

@container hm (max-width: 1023.98px) {
  :root[data-intro="big"] .cs-intro .hm-side { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-500); }
}

/* --- The card's picture ---------------------------------------------------- */
/* Logo: the client's real mark on a plain tile. Site: a live picture of the
   linked page's top. None: words only. */
/* The mark fills the tile: no tile inside the card. */
.hm-card-img--logo { aspect-ratio: 1; width: 4.5rem; }
.hm-card-img--logo img { object-fit: contain; }
:root[data-hm-pic="logo"] .hm-card { grid-template-columns: 4.5rem minmax(0, 1fr) !important; }
.hm-card-img--site img { object-position: 50% 0; }


/* --- Logos: the client's real marks, beside the client or the eyebrow --- */
:root[data-intro="big"][data-hm-mark="eyebrow"] .cs-intro .hm-marks--eyebrow { display: flex; }
.hm-marks { gap: var(--space-200); flex-wrap: wrap; }
.hm-marks img { display: block; border-radius: var(--radius-sm); object-fit: contain; }
.hm-marks--client { margin-bottom: var(--space-300); }
.hm-marks--client img { width: 2.5rem; height: 2.5rem; }
.hm-marks--eyebrow { margin-bottom: var(--space-400); }
.hm-marks--eyebrow img { width: 3.5rem; height: 3.5rem; }

/* No widows or orphans (his rule, 13 Oct): the hero's words wrap as a
   paragraph; hero-mix.js also ties the last two words. */
.cs-intro :is(.cs-title, .cs-result, .hm-card-title, .hm-card-blurb, .cs-facts dd) { text-wrap: pretty; }
