/* contractor.css — demo5, "The contractor" (task 22). The ONE bespoke stylesheet, recorded in decisions.md (rule 8).
   It sits in the library's last layer, `client`, on top of the library's own styles.css, and reads only the library's tokens.
   Every class it adds starts cx- (the library owns .tile, .tiles, .split, .card-link…: demo4's .job__ph collision).
   What is new here, and why the library has no part for it: the figures bar (B9), the standards marks (B1, B16), the tall photograph
   tiles, the project cards and their filter (B3), the two audience doors (B8), and the red action band. Spacing from the layout-system
   scale, corners from the radius scale, hover by hover-effects, entrances from the library's own data-in. */
@layer client {
  /* ---- type: the condensed display at 600 (the library ships its strong weight, 700, on headings) -------------------- */
  .h1, .h2 { font-weight: var(--fw-semibold); }
  .h1 { font-size: clamp(44px, 5.6vw, 80px); line-height: 1; letter-spacing: -0.02em; }

  .cx-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

  /* ---- header on the warm charcoal, with the mark ------------------------------------------------------------------------ */
  .cx-hd, .cx-hd .menu__panel { background-color: var(--c-primary); }
  .cx-brand { display: flex; align-items: center; gap: var(--space-12); }
  .cx-logo { width: 28px; height: 28px; flex: none; fill: #FFFFFF; }
  .cx-logo__brace { fill: none; stroke: var(--c-accent); stroke-width: 2.8; stroke-linecap: round; }
  .cx-hd .hd__word { font-size: 22px; }
  .cx-hd .hd__nav a[aria-current="page"], .cx-hd .menu__panel a[aria-current="page"] {
    color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 6px;
  }
  .cx-hd .hd__call { color: var(--w-90); font-weight: var(--fw-medium); }
  .cx-hd .hd__call:hover { color: var(--w-90); }

  /* ---- the opening: the library's fullphoto hero, the words low-left, the figures bar across its foot -------------------- */
  /* the opening and its figures end on the first screen at 1440 x 900 (notice 48px, header 72px) */
  [data-layout="fullphoto"] .cx-open { min-height: max(600px, calc(100svh - var(--hd-h) - 48px)); }
  [data-layout="fullphoto"] .cx-open .hero__in { padding-block: var(--space-64) var(--space-48); }
  .cx-open img { object-position: 50% 35%; }
  .cx-open .h1 { max-width: 20ch; font-size: clamp(44px, 5.2vw, 76px); }
  .cx-open .hero__sub { max-width: 52ch; color: var(--w-90); }
  /* a lighter scrim than the kit's .ground--left from 900px: dark under the words at the left, the photograph clear at the right
     (the draft's picture). verify.mjs measures the words over the rendered pixels. Below 900 the kit's own scrim stays. */
  @media (min-width: 900px) {
    .ground.cx-open::after {
      background:
        linear-gradient(to right, rgba(var(--c-dark-rgb), .86) 0%, rgba(var(--c-dark-rgb), .64) 45%, rgba(var(--c-dark-rgb), .14) 100%),
        linear-gradient(to top, rgba(var(--c-dark-rgb), .5) 0%, rgba(var(--c-dark-rgb), 0) 45%);
    }
  }
  .cx-open__tel { display: none; margin: var(--space-16) 0 0; color: var(--w-90); }
  .cx-open__tel b { color: #FFFFFF; font-weight: var(--fw-semibold); }
  @media (max-width: 959px) { .cx-open__tel { display: block; } }

  .cx-figs { background-color: rgba(29, 27, 25, .86); }
  .cx-figs__row { list-style: none; margin: 0; padding: var(--space-24) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-24); }
  .cx-figs b { display: block; font-family: var(--f-display); font-weight: var(--fw-bold); font-size: clamp(40px, 3.9vw, 56px); line-height: 1; letter-spacing: -0.01em; color: #FFFFFF; }
  .cx-figs span { display: block; margin-top: var(--space-8); max-width: 30ch; font-size: var(--t-body-sm); line-height: 1.4; color: var(--w-90); }
  .cx-figs__note { margin: var(--space-16) 0 0; padding-bottom: var(--space-16); font-size: var(--t-caption); line-height: 1.4; color: var(--w-60); }

  /* ---- the standards strip: five round marks, no boxes, not links -------------------------------------------------------- */
  .band.cx-marks { padding-block: var(--space-48); }
  @media (min-width: 1080px) { .cx-kinds, .cx-projects { --sec-y: var(--space-112); } }
  .cx-marks__row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-24); }
  .cx-mark { display: flex; gap: var(--space-16); align-items: flex-start; }
  .cx-mark__ic { flex: none; width: 48px; height: 48px; }
  .cx-mark__ic > :first-child { fill: var(--c-primary); }
  .cx-mark__ic > :not(:first-child) { fill: none; stroke: #FFFFFF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .cx-mark p { margin: 0; }
  .cx-mark b { display: block; font-weight: var(--fw-semibold); font-size: var(--t-body); line-height: 1.3; }
  .cx-mark span { display: block; margin-top: var(--space-4); font-size: var(--t-body-sm); line-height: 1.4; color: var(--c-muted); }
  .cx-marks__more { margin: var(--space-32) 0 0; }

  /* ---- a band's opening: the heading left, one line right ------------------------------------------------------------------ */
  .cx-head { display: grid; gap: var(--space-12); margin-bottom: var(--space-48); }
  .cx-head .lead { margin: 0; }
  @media (min-width: 900px) { .cx-head { grid-template-columns: 1fr 1fr; gap: var(--space-32); align-items: end; } }

  /* ---- four tall tiles: photographs with the words on them, each a link ----------------------------------------------------- */
  .cx-tiles { display: grid; gap: var(--space-24); grid-template-columns: repeat(4, 1fr); }
  .cx-tile {
    position: relative; isolation: isolate; display: block; aspect-ratio: 3 / 4; overflow: hidden;
    border-radius: var(--r-md); background-color: var(--c-primary); color: #FFFFFF; text-decoration: none;
    transition: transform var(--hover-move) var(--hover-ease), box-shadow var(--hover-move) var(--hover-ease);
  }
  .cx-tile picture, .cx-tile img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .cx-tile img { object-fit: cover; transition: transform var(--hover-slow) var(--hover-ease); }
  .cx-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(var(--c-dark-rgb), .92) 0%, rgba(var(--c-dark-rgb), .5) 45%, rgba(var(--c-dark-rgb), 0) 72%); }
  .cx-tile__words { position: absolute; inset: auto 0 0 0; z-index: 1; padding: var(--space-24); }
  .cx-tile__t { display: block; font-family: var(--f-display); font-weight: var(--fw-semibold); font-size: 24px; line-height: 1.15; }
  .cx-tile__l { display: block; margin-top: var(--space-8); font-size: var(--t-body-sm); line-height: 1.45; color: var(--w-90); }
  @media (hover: hover) {
    .cx-tile:hover { transform: translateY(var(--lift-card)); box-shadow: var(--shadow-emphatic); }
    .cx-tile:hover img { transform: scale(var(--zoom-img)); }
  }

  /* ---- the projects band on the charcoal, the filter and the cards -------------------------------------------------------- */
  .cx-projects { background-color: var(--c-primary); }
  .cx-projects__head { display: flex; flex-wrap: wrap; gap: var(--space-24); align-items: center; justify-content: space-between; margin-bottom: var(--space-48); }
  .cx-filters { display: flex; flex-wrap: wrap; gap: var(--space-8); }
  .cx-filters:empty { display: none; }
  .cx-filters button {
    min-height: 44px; padding: 0 var(--space-16); border: 0; border-radius: var(--r-pill); cursor: pointer;
    background-color: transparent; color: var(--w-90); box-shadow: inset 0 0 0 2px var(--w-42);
    font: var(--fw-medium) var(--t-body-sm) / 1 var(--f-body);
    transition: background-color var(--hover-fast) var(--hover-ease), color var(--hover-fast) var(--hover-ease), box-shadow var(--hover-fast) var(--hover-ease);
  }
  .cx-filters button[aria-pressed="true"] { background-color: #FFFFFF; color: var(--c-dark); box-shadow: inset 0 0 0 2px #FFFFFF; }
  @media (hover: hover) { .cx-filters button[aria-pressed="false"]:hover { color: #FFFFFF; box-shadow: inset 0 0 0 2px #FFFFFF; } }

  .cx-cards { display: grid; gap: var(--space-24); grid-template-columns: repeat(4, 1fr); }
  .cx-cell[hidden] { display: none; }
  .cx-card { display: block; color: inherit; text-decoration: none; border-radius: var(--r-md); }
  .cx-card__ph { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-md); background-color: var(--c-mid); }
  .cx-card__ph img { width: 100%; height: 100%; object-fit: cover; }
  .cx-card__t { margin: var(--space-16) 0 0; font-family: var(--f-display); font-weight: var(--fw-semibold); font-size: var(--t-card); line-height: 1.25; letter-spacing: -0.005em; color: var(--c-ink); }
  .cx-card__facts { margin: var(--space-8) 0 0; font-size: var(--t-body-sm); line-height: 1.4; color: var(--c-caption); }
  .cx-card--link { transition: transform var(--hover-move) var(--hover-ease); }
  .cx-card--link img { transition: transform var(--hover-slow) var(--hover-ease); }
  @media (hover: hover) {
    .cx-card--link:hover { transform: translateY(var(--lift-card)); }
    .cx-card--link:hover img { transform: scale(var(--zoom-img)); }
  }
  .cx-projects__foot { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); align-items: baseline; margin: var(--space-48) 0 0; font-size: var(--t-body-sm); color: var(--w-60); }

  /* ---- the two front doors: photographs edge to edge, the whole panel is the link ----------------------------------------- */
  .cx-doors { display: grid; grid-template-columns: 1fr 1fr; }
  .cx-door { display: flex; align-items: flex-end; min-height: clamp(440px, 40vw, 580px); color: #FFFFFF; text-decoration: none; }
  .cx-door img { transition: transform var(--hover-slow) var(--hover-ease); }
  /* the kit's .ground scrim holds a whole frame of words; here the words are only at the foot, so the top of the photograph stays clear */
  .ground.cx-door::after { background: linear-gradient(to top, rgba(var(--c-dark-rgb), .92) 0%, rgba(var(--c-dark-rgb), .66) 42%, rgba(var(--c-dark-rgb), .12) 100%); }
  .cx-door__words { display: block; max-width: 560px; padding: var(--space-48); }
  .cx-doors .cx-door:first-child .cx-door__words { padding-left: calc(max(0px, (100vw - var(--content-max)) / 2) + var(--pad-x)); max-width: calc(560px + max(0px, (100vw - var(--content-max)) / 2) + var(--pad-x)); }
  .cx-door__t { font-size: var(--t-sm-heading); line-height: 1.12; color: #FFFFFF; }
  .cx-door__l { margin: var(--space-12) 0 var(--space-24); color: var(--w-90); }
  @media (hover: hover) {
    .cx-door:hover img { transform: scale(var(--zoom-img)); }
    .cx-door:hover .btn { background-color: var(--c-accent-hover); transform: translateY(var(--lift-btn)); }
    .cx-door:hover .btn--light { background-color: var(--c-alt); }
  }

  /* ---- the action band: the accent ground, once a page --------------------------------------------------------------------- */
  .band.cx-act { background-color: var(--c-accent); padding-block: var(--space-96); }
  .cx-act__in { display: grid; gap: var(--space-32); align-items: center; }
  .cx-act .h2 { max-width: 24ch; color: #FFFFFF; }
  .cx-act__go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-24); margin: 0; }
  .cx-act__tel { color: #FFFFFF; }
  .cx-act__tel b { font-weight: var(--fw-semibold); }
  @media (min-width: 1080px) { .cx-act__in { grid-template-columns: 3fr 2fr; } .cx-act__go { justify-content: flex-end; } }

  /* ---- footer: the number is plain text, never a link -------------------------------------------------------------------- */
  .foot .cx-foot-num { color: var(--w-90); font-weight: var(--fw-semibold); }
  /* three columns, not the statement footer's four: there are no social accounts to fill the fourth */
  @media (min-width: 900px) { .foot--statement .foot__cols { grid-template-columns: repeat(3, 1fr); } }

  /* ---- tablet and phone ------------------------------------------------------------------------------------------------ */
  @media (max-width: 1079px) {
    .cx-marks__row { grid-template-columns: repeat(3, 1fr); }
    .cx-tiles, .cx-cards { grid-template-columns: repeat(2, 1fr); }
    .cx-figs__row { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 899px) {
    .cx-doors { grid-template-columns: 1fr; }
    .cx-doors .cx-door:first-child .cx-door__words { padding-left: var(--pad-x); }
    .cx-door__words { padding: var(--space-32) var(--pad-x); }
    .cx-door { min-height: 440px; }
  }
  @media (max-width: 699px) {
    [data-layout="fullphoto"] .cx-open { min-height: 0; }
    [data-layout="fullphoto"] .cx-open .hero__in { padding-block: var(--space-48) var(--space-32); }
    .cx-open .hero__act .btn { flex: 1 1 100%; }
    .cx-figs__row { gap: var(--space-16) var(--space-24); padding-top: var(--space-16); }
    .cx-marks__row { grid-template-columns: 1fr; gap: var(--space-16); }
    .cx-tiles, .cx-cards { grid-template-columns: 1fr; }
    .cx-tile { aspect-ratio: 16 / 10; }
    .cx-card__ph { aspect-ratio: 16 / 10; }
    .cx-door { min-height: 400px; }
    .band.cx-act { padding-block: var(--space-64); }
  }

  @media (prefers-reduced-motion: reduce) {
    .cx-tile:hover, .cx-card--link:hover, .cx-door:hover .btn { transform: none; }
    .cx-tile:hover img, .cx-card--link:hover img, .cx-door:hover img { transform: none; }
  }
}

/* ===========================================================================================================================
   The inner pages (written in Part A so Part B adds no style: part-b-spec.md gives the markup for each). Same layer, same tokens.
   =========================================================================================================================== */
@layer client {
  /* the library's .pend is set in the pairing's serif voice, which this site does not ship: the body face, italic */
  .pend { font-family: var(--f-body); }

  /* ---- page head: the charcoal band every inner page without a photograph opens with ---------------------------------------- */
  .band.cx-pagehead { background-color: var(--c-primary); padding-block: var(--space-96) var(--space-64); }
  .cx-pagehead .h1, .cx-open--page .h1, .cx-projects--page .h1 { max-width: 20ch; font-size: clamp(44px, 4.6vw, 64px); }
  .cx-pagehead .lead { margin-top: var(--space-16); max-width: 56ch; color: var(--w-90); }
  /* the number on the first screen at every width: the header carries it from 960px, the page head below that (as the opening) */
  .cx-pagehead__tel { display: none; margin: var(--space-24) 0 0; color: var(--w-90); }
  @media (max-width: 959px) { .cx-pagehead__tel { display: block; } }
  .cx-pagehead__tel b { color: #FFFFFF; font-weight: var(--fw-semibold); }
  .cx-pagehead__num { margin: var(--space-24) 0 0; font-family: var(--f-display); font-weight: var(--fw-bold); font-size: clamp(40px, 4vw, 56px); line-height: 1; letter-spacing: -0.01em; color: #FFFFFF; }
  .cx-pagehead__mail { margin: var(--space-12) 0 0; }

  /* ---- page head on a photograph: the homepage's opening, shorter (project, contractors) ------------------------------------ */
  [data-layout="fullphoto"] .cx-open.cx-open--page { min-height: clamp(520px, 50vw, 680px); }
  .cx-open__facts { margin: var(--space-16) 0 0; color: var(--w-90); }
  /* a shorter frame puts the words over more of the sky: a heavier left scrim than the homepage's (the dry run measured the
     contractors' line at 4.44:1 over the wide crop's sky with the homepage's) */
  @media (min-width: 900px) {
    .ground.cx-open--page::after {
      background:
        linear-gradient(to right, rgba(var(--c-dark-rgb), .9) 0%, rgba(var(--c-dark-rgb), .76) 45%, rgba(var(--c-dark-rgb), .22) 100%),
        linear-gradient(to top, rgba(var(--c-dark-rgb), .55) 0%, rgba(var(--c-dark-rgb), 0) 45%);
    }
  }

  /* a sub-heading inside a band: the condensed face at the small-section stop */
  .h2.cx-sub { font-size: var(--t-sm-heading); line-height: 1.12; }

  /* ---- Services: one section per kind of job, photograph and words, sides alternating -------------------------------------- */
  .cx-jobs { display: grid; gap: var(--space-112); }
  .cx-job { display: grid; gap: var(--space-32); align-items: center; scroll-margin-top: calc(var(--hd-h) + var(--space-24)); }
  .cx-job__ph { margin: 0; aspect-ratio: 4 / 3; }
  .cx-job__ph img, .cx-pair .frame img, .cx-story__ph img, .cx-steps__ph .frame img { height: 100%; object-fit: cover; }
  .cx-job .lead { margin-top: var(--space-12); }
  .cx-job .btn { margin-top: var(--space-32); }
  .cx-parts { display: grid; gap: var(--space-16); margin: var(--space-24) 0 0; }
  .cx-parts .h4, .cx-points .h4 { margin: 0; }
  .cx-parts p, .cx-points p { margin: var(--space-4) 0 0; color: var(--c-muted); }
  @media (min-width: 900px) {
    .cx-job { grid-template-columns: 1fr 1fr; gap: var(--space-64); }
    .cx-job--flip .cx-job__ph { order: 2; }
  }

  /* ---- a column of running text with sub-headings (project, about) ---------------------------------------------------------- */
  .cx-text { max-width: var(--content-max-text); }
  .cx-text .cx-sub { margin-top: var(--space-48); }
  .cx-text > .cx-sub:first-child { margin-top: 0; }
  .cx-text p { margin-top: var(--space-12); }

  /* ---- two framed photographs with captions (project) ---------------------------------------------------------------------- */
  .cx-pair { display: grid; gap: var(--space-24); }
  .cx-pair figure, .cx-steps__ph { margin: 0; }
  .cx-pair .frame { aspect-ratio: 4 / 3; }
  .cx-pair figcaption, .cx-steps__ph figcaption, .cx-note { margin-top: var(--space-12); font-size: var(--t-body-sm); line-height: 1.4; color: var(--c-muted); }
  @media (min-width: 720px) { .cx-pair { grid-template-columns: 1fr 1fr; } }

  /* ---- two related tiles (project): the homepage's tiles, wide ------------------------------------------------------------- */
  .cx-tiles.cx-tiles--two { grid-template-columns: repeat(2, 1fr); }
  .cx-tiles--two .cx-tile { aspect-ratio: 16 / 10; }

  /* ---- the five marks, explained (standards) ------------------------------------------------------------------------------ */
  .cx-explain { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-48); }
  .cx-explain .cx-mark span { font-size: var(--t-body); line-height: 1.7; }
  .cx-explain .cx-mark b { font-family: var(--f-display); font-size: var(--t-card); }
  @media (min-width: 900px) { .cx-explain { grid-template-columns: 1fr 1fr; gap: var(--space-48) var(--space-64); } }

  /* ---- numbered steps beside a photograph (standards: the only place numbers label order) --------------------------------- */
  .cx-steps { display: grid; gap: var(--space-48); align-items: start; }
  .cx-steps__ph .frame { aspect-ratio: 1; }
  .cx-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-32); }
  .cx-steps__list .h3 { margin-top: var(--space-12); }
  .cx-steps__list p { margin: var(--space-8) 0 0; color: var(--c-muted); }
  @media (min-width: 640px) { .cx-steps__list { grid-template-columns: 1fr 1fr; gap: var(--space-48) var(--space-32); } }
  @media (min-width: 1080px) { .cx-steps { grid-template-columns: 5fr 7fr; gap: var(--space-64); } }

  /* ---- short titled points in a grid, no boxes (standards: what to expect; contractors: what we offer) ---------------------- */
  .cx-points { display: grid; gap: var(--space-32) var(--space-48); }
  @media (min-width: 640px) { .cx-points { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 1080px) { .cx-points { grid-template-columns: repeat(3, 1fr); } }

  /* ---- the estimator beside the pack form (contractors), in the library's .split ------------------------------------------- */
  .cx-person__name { margin: var(--space-24) 0 0; font-family: var(--f-display); font-weight: var(--fw-semibold); font-size: var(--t-sm-heading); line-height: 1.1; }
  .cx-person__name span { font-family: var(--f-body); font-weight: var(--fw-regular); font-size: var(--t-body); color: var(--c-muted); }
  .cx-person__reach { margin: var(--space-16) 0 0; }
  .cx-person__reach b { font-weight: var(--fw-semibold); }

  /* ---- the story beside a tall photograph (about), in the library's .split ---------------------------------------------------- */
  .cx-story__ph { margin: 0; aspect-ratio: 4 / 5; }
  .split.cx-story { align-items: start; }

  /* ---- the Projects page: the homepage's projects band, opening the page ----------------------------------------------------- */
  .band.cx-projects--page { padding-top: var(--space-96); }
  .cx-projects__head .lead { margin-top: var(--space-16); color: var(--w-90); }

  /* ---- contact: the areas line under the hours ----------------------------------------------------------------------------- */
  .cx-areas-line { margin-top: var(--space-24); color: var(--c-muted); }

  @media (max-width: 699px) {
    .band.cx-pagehead { padding-block: var(--space-48) var(--space-48); }
    .cx-jobs { gap: var(--space-64); }
    .cx-tiles.cx-tiles--two { grid-template-columns: 1fr; }
    .band.cx-projects--page { padding-top: var(--space-48); }
  }
}

/* The way back to webhatcher's homepage, in the sample-page notice bar (added for the webhatcher copy only).
   The bar stays with the reader: sticky, one fixed height, above the page's own header, which now sticks
   just below it. The full message shows only where it fits on one line; elsewhere a short one does. */
:root { --notice-h: 52px; }
.notice {
  position: sticky; top: 0; z-index: 60;
  box-sizing: border-box; height: var(--notice-h); padding-block: 0;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.notice > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice__short { display: inline; }
.notice__full { display: none; }
@media (min-width: 1320px) { .notice__short { display: none; } .notice__full { display: inline; } }
.notice__home {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 16px 0 12px;
  border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 999px;
  color: #FFFFFF; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 200ms ease-out;
}
.notice__home svg { width: 16px; height: 16px; fill: currentColor; }
.notice__home:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
@media (hover: hover) { .notice__home:hover { background-color: rgba(255, 255, 255, .16); } }
.hd { top: var(--notice-h); }
.band, .bleed, .hero { scroll-margin-top: calc(var(--hd-h) + var(--notice-h) + var(--space-12)); }
