/* ==========================================================================
   About (about.html): page-only styles, linked after site.css. Owner: B (vision 9.5).
   Tokens of site.css only: no new colours, sizes or durations, and only its two layout breakpoints
   (48em tablet, 68.75em desktop). The components themselves live in site.css (page head and kicker, the index,
   rows with a link line, spec cells, N13 team, N9 wide figure, N10 lockup, N24's arrow square); this file places
   them. Two pieces are this page's own: N25, the four doors (Version 1's spec cells four across, site.css 5.12 with
   --spec-rows: 4 and .spec__foot, plus the link rule below), and the two Spark link rows (.spark-link).
   ========================================================================== */

@layer components {

  /* --- 1-2. Intro: Version 1's About intro. Text on column 5 (cols 5-11), the in-page index on column 1
         (cols 1-3, sticky while the text scrolls past it); on tablet and phones the text first, then the index --- */
  .intro { margin-top: var(--block-gap); display: grid; gap: var(--s-7) var(--gutter); }
  .intro__text { color: var(--ink-2); }
  .intro__text > * + * { margin-top: 1.25em; }
  .intro__first { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink); }
  .intro__close {                                   /* the closing line on a black rule */
    font: var(--w-strong) var(--fs-h4) / 1.45 var(--font-sans); letter-spacing: -0.01em; color: var(--ink);
    padding-top: var(--s-5); border-top: var(--hair) solid var(--ink);
  }
  .intro__text .intro__close { margin-top: var(--s-7); }
  @media (min-width: 68.75em) {
    .intro { grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: var(--s-8); }
    .intro__index { grid-column: 1 / span 3; grid-row: 1; align-self: start; position: sticky; top: calc(var(--header-h) + var(--s-6)); }
    .intro__text { grid-column: 5 / span 7; grid-row: 1; }
  }
  /* the index's rows at least 44 px tall, so each is an easy target on a touch screen (vision 7.3, 2.5.8) */
  .intro__index .index__list a { min-height: 2.75rem; align-items: center; }

  /* --- 02 Who we help: N25, the four doors. A service name that wraps in its cell keeps the arrow right after its
         last word (the markup holds the last word and the arrow together), as everywhere a .link stands alone; the
         link's padding makes each line a 44 px target without moving the text --- */
  .doors .spec__foot { font-size: var(--fs-small); line-height: 1.45; text-wrap: balance; }
  .doors .spec__foot .link { display: inline; padding-block: var(--s-3); }
  .doors .spec__foot .icon { margin-left: 0.25em; vertical-align: -0.2em; }

  /* --- 03 Team: the display line and its lead, then N13 (two per row from 48em, one on phones) --- */
  .lede-lead + .team { margin-top: var(--s-8); }
  @media (max-width: 47.99em) { .lede-lead + .team { margin-top: var(--s-7); } }

  /* --- 04 Spark + Combination --- */
  /* One row on desktop: the lockup on cols 1-4, the display line on cols 5-12, centred on each other. The first
     track is never narrower than the lockup itself, so between 1100 and about 1270 px, where four columns are
     narrower than the full-size lockup, the line moves right by the difference instead of the lockup wrapping. */
  .spark-head { display: grid; gap: var(--s-5) var(--gutter); align-items: center; justify-items: start; }
  /* (a declined Spark mark is written as span.lockup__name and drawn by site.css 5.28, phone size included: B-01) */
  @media (min-width: 68.75em) {
    .spark-head { grid-template-columns: minmax(max-content, calc((100% - 2 * var(--gutter)) / 3)) minmax(0, 1fr); }
    .spark-head > .lockup { flex-wrap: nowrap; }
  }
  /* the photo of Darius and Yousef across the column: 3:2, its own 4:3 on phones (site.css N9 .fig--3x2) */
  .spark-photo { margin-top: var(--s-8); }
  /* the two paragraphs, then the two link rows, on the column 5 axis and one measure wide, so the rows' arrows end
     where the text does. A link row looks like N24 (Home's Services 4.2: the name, its line, an arrow in the square)
     but the whole row is the link, so the focus ring goes round the name and the line together and never crosses
     the line, and the line is part of the target */
  .spark-text { margin-top: var(--s-7); color: var(--ink-2); }
  .spark-text > p:first-child { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink); }
  .spark-links { margin-top: var(--s-7); max-width: var(--measure); border-block: var(--hair) solid var(--line); }
  .spark-links > li + li { border-top: var(--hair) solid var(--line); }
  .spark-link {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-4); row-gap: var(--s-1); align-items: center;
    padding-block: var(--s-5); color: var(--ink); text-decoration: none;
  }
  .spark-link__name { grid-column: 1; font: var(--w-strong) var(--fs-h4) / 1.35 var(--font-sans); letter-spacing: -0.012em; }
  .spark-link__line { grid-column: 1; font-size: var(--fs-small); line-height: 1.65; color: var(--ink-2); }
  .spark-link > .acc__icon { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .spark-link:hover > .acc__icon { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .spark-link:hover > .acc__icon--go::before { translate: 2px 0; }
  @media (min-width: 68.75em) {
    .spark-text, .spark-links { margin-left: calc((100% + var(--gutter)) / 3); }
  }
  /* "The wider Spark team": a Version 1 row (its title on cols 1-4, the lead on cols 5-11), then N13 three across */
  .spark-team { margin-top: var(--s-9); }
  .spark-team + .team--3 { margin-top: var(--s-5); }
  .spark-out { margin-top: var(--s-7); }
  @media (max-width: 47.99em) {
    .spark-photo { margin-top: var(--s-6); }
    .spark-team { margin-top: var(--s-8); }
  }

  /* --- Print: nothing sticky; blocks that must not split across pages --- */
  @media print {
    .intro__index { position: static; }
    .spark-head, .spark-photo, .spark-text, .spark-team, .spark-links > li { break-inside: avoid; }
  }
}
