/* ==========================================================================
   The category scene (owner handoff "IP Handoff: Category Illustrations (responsive scene, 18 categories)", 2026-11-21,
   docs/IP-Handoff-Category-Illustrations.md; docs/IP-Reference.md section CV; registry L40)
   ==========================================================================
   The illustration at the top of the listing page's claim card: a 136px-high scene - sky, a grass strip, a ground line, a sun in the top right corner and ONE
   category drawing standing on the line in the middle. It changes with the listing's main category (18 drawings, resources/views/web/partials/cat-scene/art/, chosen by
   App\Support\CategoryScene from config/category_scenes.php). The sky, the grass and the ground line stretch to any width; the drawing NEVER stretches - it is a fixed
   339.5 x 136 SVG, centred, and only a card narrower than that shrinks it, proportionally. On a wider card extra background (trees, bushes, clouds, a bird) appears on
   both sides of the drawing in two tiers, by the width of the SCENE (a container query, never the viewport's): from 600px tier 1, from 900px tier 2. No JavaScript, no
   images: inline SVG and this file.
   Loaded by web/listing-detail.blade.php alone, after the claim card's own stylesheet. Every selector starts from .cat-scene. Colours are the design system's tokens
   (handoff section 3) - sky --category-sky-tint, grass and light green --success-border, line --brand-blue-dark, beige --category-amber-tint, sun --illustration-sun - and no
   colour is written here; no corner, no shadow and no font of its own (the card clips the scene's top corners).
   Replaced the storefront the claim card had (docs section CQ): its stylesheet rules, its script and its stand-ins are gone with it. */

.cat-scene {
  position: relative;
  height: 136px;
  overflow: hidden;
  color: var(--brand-blue-dark);              /* strokes use currentColor */
  background: var(--category-sky-tint);
  container-type: inline-size;
}
.cat-scene::before {                          /* grass */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: var(--success-border);
}
.cat-scene::after {                           /* ground line, full width */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 2px;
  background: var(--brand-blue-dark);
}
.cat-scene__sun {
  position: absolute;
  top: 0;
  right: 0;
}
.cat-scene__sun circle {
  fill: var(--illustration-sun);
}
.cat-scene__sun g {
  stroke: var(--illustration-sun);
}

/* The extras: two 330px-wide strips, one at each edge, empty until the scene is wide enough for their tiers. */
.cat-scene__deco {
  position: absolute;
  top: 0;
  width: 330px;
  height: 136px;
}
.cat-scene__deco--l {
  left: 0;
}
.cat-scene__deco--r {
  right: 0;
}
.cat-scene__t1,
.cat-scene__t2 {
  display: none;                              /* off by default: phone, and a browser without container queries */
}

/* The drawing: fixed size, centred, never stretched. A scene narrower than its 339.5px only shrinks it, proportionally (max-width / height: auto) - and then its feet must
   still stand on the ground line. The SVG's own ground is 22.2px above its bottom edge (the drawing sits at y = 113.8 of 136) while the line is 22px above the scene's bottom, so
   at its full size bottom: 0 puts the two together; shrunk to the fraction s the ground would be 22.2 x s above the bottom instead and the drawing would sink up to 3px into the grass
   (a 320px phone: s = 0.85). The translateY term lifts it by the difference, 22.2px x (1 - s): the percentage is of the drawing's own height (136 x s), and 22.2 / 136 = 16.3235%.
   At s = 1 the term is 0 - the handoff's own placement, unchanged at 340px and wider. */
.cat-scene__art {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, calc(16.3235% - 22.2px));
  max-width: 100%;
  height: auto;
}

/* The shapes inside every SVG: the classes of the drawings, filled with the design system's tokens. */
.cat-scene .h {
  fill: var(--category-amber-tint);
}
.cat-scene .g {
  fill: var(--success-border);
}
.cat-scene .k {
  fill: var(--category-sky-tint);
}
.cat-scene .l {
  fill: var(--brand-blue-dark);
  stroke: none;
}
.cat-scene .p0 {
  stroke: none;
}

@container (min-width: 600px) {
  .cat-scene__t1 {
    display: inline;
  }
}
@container (min-width: 900px) {
  .cat-scene__t2 {
    display: inline;
  }
}
