/* ============================================================================
   Client marks — plate + name lockup
   ---------------------------------------------------------------------------
   The plate holds either the client's real logo or an authored emblem for the
   one client whose artwork we do not have. Same shape, same height, same
   accent — see ClientMark.tsx for why the original circular seal could not
   survive a 5:1 wordmark.
   ========================================================================= */

/* Per-client accents. Green, blue and yellow are the three stops of the loop
   gradient, so the roster stays inside the brand instead of importing three
   arbitrary client colours. Every ink/tint pair below clears 4.5:1. */
/* Accent follows the KIND of body, not the individual client: park districts
   green, municipalities blue, public authorities the yellow end. Two park
   districts sharing a green is the system working, not a collision — the seal
   motif and the initials are what tell them apart. Anchor Packaging is the one
   client on the list that is not a public body, and it takes the deep ink blue
   precisely so it does not pretend to be. Every ink/tint pair clears 4.5:1. */
.cid--wilmette  { --cid-ink: #2E6B3A;         --cid-tint: #DFEEE1; --cid-soft: rgba(46, 107, 58, .16); }
.cid--oakpark   { --cid-ink: #1F6B5B;         --cid-tint: #DCEDE8; --cid-soft: rgba(31, 107, 91, .16); }
.cid--racine    { --cid-ink: var(--blue-600); --cid-tint: #EBF4FF; --cid-soft: rgba(27, 84, 174, .16); }
.cid--wauwatosa { --cid-ink: var(--blue-600); --cid-tint: #EBF4FF; --cid-soft: rgba(27, 84, 174, .16); }
.cid--lancaster { --cid-ink: #6E6E0C;         --cid-tint: #FAFAC0; --cid-soft: rgba(110, 110, 12, .18); }
.cid--anchor    { --cid-ink: var(--blue-900); --cid-tint: #DCE6F5; --cid-soft: rgba(14, 47, 99, .18); }

/* --- The plate --------------------------------------------------------------
   One shape for both kinds of mark. Every plate is the same HEIGHT, which is
   what keeps three lockups aligned across a row of cards; the width varies,
   because Anchor's wordmark is 5.1:1 and Wilmette's mark is square, and forcing
   either into the other's box ruins it.

   `--logo-ratio` comes from the component as the artwork's true aspect ratio.
   It is a preference, not an instruction: the clamp below refuses to go
   narrower than a square or wider than 2.2 squares, so a very wide wordmark
   scales down to fit rather than eating the card.                           */

.seal {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--seal-size, 72px);
  flex: none;
  border-radius: var(--r-md);
  color: var(--cid-ink);
}

/* --- Real artwork ----------------------------------------------------------
   White rather than the client tint, because these are the clients' own files
   in their own colours and a tinted ground would shift how their brand reads.
   Contained, never cropped: a logo is the one image on this site that must not
   be `cover`.                                                               */
.seal--logo {
  width: calc(var(--seal-size, 72px) * clamp(1, var(--logo-ratio, 1), 2.2));
  padding: calc(var(--seal-size, 72px) * 0.14);
  background: var(--white);
  box-shadow: 0 8px 18px var(--cid-soft), inset 0 0 0 1px var(--border);
}
.seal--logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* --- Authored emblem -------------------------------------------------------
   For the one client whose artwork we do not have. Square, tinted in their
   accent, holding a motif for the kind of body and the agency's own initials.
   Drawing a real public body's seal from memory would be inventing their
   trademark; initials and a category icon are facts already in the content. */
.seal--emblem {
  width: var(--seal-size, 72px);
  background: var(--cid-tint);
  box-shadow: 0 8px 18px var(--cid-soft), inset 0 0 0 1px var(--cid-soft);
}

/* The motif and initials stack. Percentages rather than pixels so one rule
   serves every size the plate is used at. */
.seal__motif {
  position: absolute;
  top: 22%;
  left: 50%;
  width: 40%;
  transform: translateX(-50%);
  line-height: 0;
}
.seal__motif svg { display: block; width: 100%; height: auto; }
.seal__initials {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: calc(var(--seal-size, 72px) * 0.145);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-indent: 0.14em;   /* re-centres against the trailing letterspace */
  color: currentColor;
}

/* The motif is drawn at a fixed 30px inside ClientMark; the rule above scales
   it to the plate so every size stays proportional. */

/* --- Lockup ---------------------------------------------------------------- */

.cid {
  --seal-size: clamp(62px, 3.6vw, 78px);
  flex: 1;                /* fills the band rather than shrink-wrapping */
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.35rem);
  min-width: 0;
}

.cid__text { min-width: 0; }

.cid__kind {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--cid-ink);
  margin-bottom: 0.35rem;
}

.cid__name {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 48, 'wdth' 100;
  font-size: clamp(1.1rem, 0.95rem + 0.55vw, 1.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
}

/* --- Watermark ------------------------------------------------------------- */

.cwm {
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  line-height: 0;
  pointer-events: none;
  color: var(--cid-ink, var(--blue-500));
  opacity: 0.055;
  transform: rotate(-8deg);
}
/* Sized for a third-width card: any bigger and the motif reads as clutter
   across the copy rather than as a mark in the corner. */
.cwm svg { width: 214px; height: 214px; }

.cwm--wilmette  { color: #2E6B3A; }
.cwm--oakpark   { color: #1F6B5B; }
.cwm--racine    { color: var(--blue-600); }
.cwm--wauwatosa { color: var(--blue-600); }
.cwm--lancaster { color: #6E6E0C; opacity: 0.075; }
.cwm--anchor    { color: var(--blue-900); }

@media (max-width: 767px) {
  .cwm { display: none; }
}

/* On a phone the plate is competing with the card, not heading it. */
@media (max-width: 559px) {
  .cid { --seal-size: 58px; gap: 0.85rem; }
}
