/* Design 01 · work page only, loaded after styles.css (which holds the browser frame, the concept mock and the menus'
   current-page marks that the homepage and the pricing page share).
   Request (owner, 2026-11-04): a work page one level deeper than the homepage cards, with the projects clearly set
   apart. Design (white board, picked by the owner from three tries on 2026-11-04): every project sits on its own white
   card with a thin border and a soft shadow. Its tags, name and type head the card across its full width, closed by a
   hairline; below them the picture with its swatch cards and the facts (goal, key decisions, meaning for the owner)
   sit side by side. On narrow screens everything stacks in that order. No project numbers (owner, 2026-11-04).
   Colour rule as in styles.css: only the four palette variables carry colour (the hero's brush stroke, the concept
   mock's chips); text, lines, labels and the cards are neutral. The one exception is each project's own colours on
   its swatch cards: project material like the screenshot (owner, 2026-11-04), set as --swatch from shared/work.json
   inside data-palette, where the colour check lets through only the colours work.json lists. Motion: none. No :root
   here: the colour check reads the palette from styles.css. */

/* The hero states the work headline, so the first project follows it closer than a new section would */
.hero + .cases { margin-top: clamp(2.5rem, 5vw, 4rem); }

/* The cards set the projects apart, so they sit closer than page sections do */
.cases { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.case {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "label label" "name name" "meta meta" "shot facts";
  align-items: start;
  column-gap: clamp(2.5rem, 6vw, 5.5rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.case-media { grid-area: shot; }
/* The text block dissolves into the card's grid, so its head (tags, name, type) can span both columns */
.case-text { display: contents; }

/* Head: the tags (professional terms, styled as the homepage feature labels), the name and the type, then a hairline */
.case-label { grid-area: label; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.case h3 { grid-area: name; margin-top: 0.75rem; font-size: clamp(2rem, 1.2rem + 2vw, 2.8rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.case .work-meta { grid-area: meta; margin: 0.5rem 0 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); font-size: 1rem; }

/* Goal, key decisions, for the owner: three parts divided by hairlines; the goal reads largest ("Goal first") */
.case-facts { grid-area: facts; }
.case-facts > div + div { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.case-facts dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.case-facts dd { margin: 0.5rem 0 0; }
.case-goal { font-size: 1.375rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; text-wrap: balance; }
.decisions { display: grid; gap: 0.75rem; }
.decisions li { color: var(--ink-soft); }
.decisions b { color: var(--ink); }

/* Swatch cards, Pantone style: the colour on top, a white label with name, HEX and RGB below, so the words always
   sit on white (AA); a hairline keeps near-white colours visible against the page */
.palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.625rem; margin-top: 1rem; container-type: inline-size; }
.swatch { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.swatch-colour { display: block; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--hairline-soft); background: var(--swatch); }
.swatch-label { display: grid; gap: 0.1rem; padding: 0.5rem 0.55rem 0.6rem; font-size: 0.6875rem; line-height: 1.3; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.swatch-label b { font-size: 0.8125rem; color: var(--ink); }
/* Narrow rows of cards (screens below about 1400px, where the board's padding leaves the picture column narrower,
   and phones): every card puts the RGB numbers under the word "RGB", so the labels never clip and all cards in a row
   break the same way */
@container (max-width: 38rem) {
  .swatch-rgb span { display: block; }
}

@media (max-width: 900px) {
  .case { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "name" "meta" "shot" "facts"; }
  .case-facts { margin-top: 2rem; }
}
/* Phones: five cards in a row would squeeze the labels, so each card turns sideways (colour left, label right),
   two to a row */
@media (max-width: 560px) {
  .palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatch { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); }
  .swatch-colour { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--hairline-soft); }
}
