/* Claims ("The claims we are working on."; heading from shead.css): the six claim areas as hairline tiles:
   a small dot-matrix icon and a mono key on top, then a large light title, the description and "More".
   15 Oct 2026, James: "Too many dots going on ... Use dots to make relevant icons, eg a car made of dots
   and reduce the size of the graphics." So each area has one pictogram drawn in dots, all on the same
   15 x 15 grid with the same dot (r .36 of a cell), in the dot colour, with a white accent detail of two or
   more dots, and every icon's leftmost dot in column 0 so the icons line up with the titles:
     01 Car finance        a car, front on; accent: headlights
     02 Unaffordable       a credit card; accent: the card number
     03 Diesel emissions   a fuel pump, hose and nozzle; accent: the display
                           (review option: a car side on with a static exhaust puff)
     04 Equal pay          balanced scales; accent: the pivot
                           (review option: two people of equal height with a white equals sign)
     05 Data breach        an open padlock; accent: the keyhole
     06 Anything at scale  a crowd of twelve people; accent: one of them
   The icons are inline SVG in partials/claims.html, so they show without JS. Above each SVG is its dot map
   in a comment (o = dot, W = white accent, p = dim puff); each mark is <circle cx="column" cy="row" r=".36">
   in the matching group (.cl-ic__d, .cl-ic__a, .cl-ic__p). To change an icon, edit its map and its circles
   together.
   Motion is calm and never loops: when an icon scrolls into view its dots fade in once, column by column,
   rising a fraction of a cell, with the white detail last (under 0.8 s in all); hovering or focusing a tile
   brightens its icon left to right. Without JS, or with reduced motion, the icons simply show.
   Layout (review option "Claims grid", claims.js): Even (default) is 3 equal columns from 1100px, 2 from
   640px, 1 below; Bento is 7/5, 5/7, 7/5 from 1000px, 1 below. "More" sits at the foot of each tile. */

.cl {
  --cl-dot: #8fb4ff;
  --cl-dot-on: #b8d0ff;
  --cl-acc: #6f9bff;
  --cl-ic: 64px;
  --cl-ease: cubic-bezier(.22, .61, .36, 1);
  --cl-out: cubic-bezier(.16, 1, .3, 1);
  --cl-g: clamp(1rem, 1.4vw, 1.25rem);
  --cl-pad: clamp(1.25rem, 2.6vw, 2.5rem);
  --mo: 1; /* motion allowed */
}
@media (max-width: 639.98px) {
  .cl {
    --cl-ic: 56px;
    --cl-pad: 1.25rem;
  }
}
@media (min-width: 1000px) {
  .cl {
    --cl-ic: 72px;
    --cl-pad: clamp(1.25rem, 1.6vw, 1.75rem);
  }
}

/* ---------- Grid (hairlines shared; always drawn, only content fades in) ---------- */
.cl__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-inline-start: 1px solid var(--line-dark);
  border-block-start: 1px solid var(--line-dark);
}
.cl__item {
  display: flex;
  min-width: 0;
  border-inline-end: 1px solid var(--line-dark);
  border-block-end: 1px solid var(--line-dark);
}
/* Even grid: 2 columns from 640px, 3 from 1100px */
@media (min-width: 640px) {
  .cl__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .cl__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* ---------- Tile ---------- */
.cl__tile {
  --on: 0; /* 1 while hovered (pointer devices) or keyboard-focused */
  position: relative;
  isolation: isolate;
  overflow: clip;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--cl-pad);
  color: var(--paper);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.cl__tile:focus-visible {
  --on: 1;
  outline: 2px solid var(--cl-acc);
  outline-offset: -4px;
}
@media (hover: hover) {
  .cl__tile:hover { --on: 1; }
}

/* wash and hairline edge, opacity only */
.cl__tile::before,
.cl__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--on);
}
.cl__tile::before {
  z-index: -2;
  background: rgb(255 255 255 / .018);
  transition: opacity .4s var(--cl-ease);
}
.cl__tile::after {
  box-shadow: inset 0 0 0 1px rgb(111 155 255 / .5);
  transition: opacity .3s var(--cl-ease);
}
/* touch: a brief flash on a real tap (claims.js adds .is-press; a scroll never does) */
.cl__tile.is-press::before,
.cl__tile.is-press::after {
  opacity: 1;
  transition-duration: .12s;
}

/* the inner wrapper carries the scroll reveal, so the frame never draws half at a time */
.cl__in {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cl .cl__in.rv { transition-delay: 0s; }

/* ---------- Top row: icon left, key right ---------- */
.cl__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cl__k {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .1em;
  line-height: 1;
  color: var(--mute-dark);
}

/* ---------- Type ---------- */
.cl__t {
  margin: clamp(1rem, 1.6vw, 1.375rem) 0 0;
  font-size: clamp(1.5rem, 1.1rem + 1.25vw, 2.25rem);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: 1.08;
  color: var(--paper);
  text-wrap: balance;
}
.cl__d {
  margin: .875rem 0 0;
  max-width: 34rem;
  font-size: .9375rem;
  font-weight: 300;
  line-height: 1.5;
  color: rgb(255 255 255 / .72);
  text-wrap: pretty;
}
@media (max-width: 639.98px) {
  .cl__d { margin-top: .75rem; }
}

.cl__cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  margin-top: auto;
  padding-top: calc(var(--cl-g) * 1.5);
  font-size: .9375rem;
  line-height: 1.625rem;
  color: var(--paper);
  transform: translateX(calc(var(--on) * var(--mo) * 4px));
  transition: transform .4s var(--cl-ease);
}
@media (max-width: 639.98px) {
  .cl__cta { padding-top: 1rem; }
}
.cl__cta span:first-child {
  font-family: var(--mono);
  color: var(--mute-dark);
}
.cl__cta span:last-child {
  border-bottom: 1px solid rgb(247 247 245 / var(--on));
  transition: border-color .25s;
}

/* ---------- Icon: one pictogram in dots on a 15 x 15 grid ---------- */
.cl__ic {
  flex: none;
  display: block;
  inline-size: var(--cl-ic);
  block-size: var(--cl-ic);
  /* about 1px in, so the icon's first column sits on the titles' ink edge (their capitals' side bearing) */
  margin-inline-start: calc(var(--cl-ic) / 56);
}
.cl-ic {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  overflow: visible; /* the settle rises from a fraction of a cell below */
}
.cl-ic circle { --c: 0; } /* the dot's column (claims.js), for the column-by-column sweeps */
.cl-ic__d circle {
  fill: var(--cl-dot);
  opacity: calc(.82 + var(--on) * .18);
  /* engaged: the icon brightens column by column, left to right; it dims back at once */
  transition:
    opacity .35s var(--cl-ease) calc(var(--on) * var(--c) * 20ms),
    fill .35s var(--cl-ease) calc(var(--on) * var(--c) * 20ms);
}
.cl__tile:focus-visible .cl-ic__d circle { fill: var(--cl-dot-on); }
@media (hover: hover) {
  .cl__tile:hover .cl-ic__d circle { fill: var(--cl-dot-on); }
}
.cl-ic__p circle { /* the exhaust puff: dimmer than the car, and still */
  fill: var(--cl-dot);
  opacity: .5;
}
.cl-ic__a circle { fill: #fff; }

/* ---------- Settle, once, when an icon comes into view (claims.js arms it and sets each dot's --c) ----------
   The dots fade in column by column, left to right, each rising 0.4 of a cell (about 2px at 72px); the white
   detail comes last. Every dot is in place within 0.7 s. */
@media screen and (prefers-reduced-motion: no-preference) {
  .cl[data-armed] .cl__tile:not(.is-on) .cl-ic circle { opacity: 0; }
  .cl[data-armed] .is-on .cl-ic circle { animation: cl-settle .44s var(--cl-out) calc(var(--c) * 16ms) backwards; }
  .cl[data-armed] .is-on .cl-ic__a circle { animation-delay: 260ms; }
}
@keyframes cl-settle {
  from {
    opacity: 0;
    transform: translateY(.4px); /* SVG user units: 0.4 of a cell */
  }
}

@media (prefers-reduced-motion: reduce) {
  .cl { --mo: 0; }
  .cl *,
  .cl *::before,
  .cl *::after {
    animation: none !important;
    transition: none !important;
  }
}
