/* ==========================================================================
   K05 — Iconography, Marks & Imagery (kit/iconography.html)
   Icon grid, hand-drawn mark cards, proof stamps, imagery rules, loupe.
   ========================================================================== */

/* ---- Icons ------------------------------------------------------------ */

/* Line icon: 24 px grid, 1.5 px stroke, round caps. Size via width/height. */
.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.icon-grid__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 8px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.icon-grid__name {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Sizes + "icon trails label" examples */
.icon-usage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-top: 24px;
}

.icon-usage__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.icon-usage__card--tight {
  gap: 12px;
}

/* ---- Section action bar (Replay button above a demo) ------------------ */
.section-actions {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 20px;
}

.section-actions__btn {
  padding-inline: 18px;
}

/* ---- Hand-drawn marks ------------------------------------------------- */
.mark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.mark-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Host for the generated svg.mark (see proof.js) */
.mark-card__canvas {
  position: relative;
  height: 90px;
  margin: 8px 10px;
}

.mark-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.mark-card__name {
  font-size: 15px;
  font-weight: 600;
}

/* ---- Proof stamps ----------------------------------------------------- */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.stamp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stamp-card__caption {
  text-align: center;
}

/* Large rubber stamp. Rotation per instance: style="--tilt:-6deg" */
.proof-stamp {
  padding: 8px 14px;
  border: 2.5px solid var(--accent);
  color: var(--accent-text);
  font-family: var(--f-mono);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: rotate(var(--tilt, -6deg));
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0, 0, 0, .72) 75%, #000 95%);
          mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0, 0, 0, .72) 75%, #000 95%);
}

/* Round award seal */
.proof-stamp--round {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  padding: 0;
  border: 3px double var(--accent);
  border-radius: 50%;
  font-size: 13px;
  text-align: center;
}

.proof-stamp__sub {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .1em;
}

/* ---- Imagery ---------------------------------------------------------- */
.imagery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  align-items: end;
}

.imagery-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.imagery-card__body {
  display: contents;
}

.imagery-card__title {
  font-weight: 600;
}

.imagery-card__text {
  font-size: 15px;
  color: var(--muted);
  text-wrap: pretty;
}

.never-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.never-list__label {
  color: var(--error);
}

/* ---- Loupe ------------------------------------------------------------ */
.loupe {
  position: relative;
  height: clamp(260px, 34vw, 420px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: zoom-in;
  user-select: none;
}

/* The "image" being inspected (placeholder stripes + wordmark) */
.loupe__art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6%;
  background: repeating-linear-gradient(135deg, var(--ph) 0 10px, var(--ph-stripe) 10px 11px);
  filter: var(--img-filter);
}

.loupe__word {
  font-family: 'Newsreader', serif;
  font-size: clamp(72px, 11vw, 168px);
  line-height: .9;
  letter-spacing: -.03em;
  color: var(--ink);
}

.loupe__caption {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ph-ink);
}

/* Round lens, centred on the pointer (left/top set by JS) */
.loupe__lens {
  position: absolute;
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4);
  pointer-events: none;
}

/* Copy of the art, scaled; left/top/width/height set by JS */
.loupe__art--zoomed {
  inset: auto;
  transform: scale(2.5);
  transform-origin: 0 0;
}

.loupe__tag {
  position: absolute;
  margin: 110px 0 0 -22px;
  padding: 4px 8px;
  background: var(--ink);
  color: var(--canvas);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}
