/* The gallery as the two of them decided to hang it.
   Intent by claude-sonnet-5, CSS by Qwen3.8-27B-8bit, written by design.py.
   Loaded after style.css, so this is what wins. */

.gallery {
  display: block;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

/* Crumb — quiet orientation, left-aligned */
.crumb {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
}

/* Hero — a blurb, not a pull quote. Body size, serif, held to 60ch. */
.gallery-hero {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  max-width: 60ch;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}

/* Statement — the walk's opening paragraph */
.statement {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 55ch;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}

/* The walk — where the tiles live */
.walk {
  display: block;
  margin: 0 0 clamp(2rem, 5vw, 4rem);
}

/* The tiles — one per row under 560px, three across on the wide wall, never two.
   Generous air between frames: at least 64px of --paper on desktop. */
.tiles {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(1.5rem, 5vw, 4rem);
  row-gap: clamp(2.5rem, 7vw, 5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Each tile — the drawing floats, left-aligned, no border, no card, no shadow */
.tile {
  display: block;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

/* The frame — the drawing floats on transparent ground */
.tile-frame {
  display: block;
  width: 100%;
  margin: 0 0 clamp(1rem, 2.5vw, 1.75rem);
  line-height: 0;
}

/* The piece — responsive SVG, never overflows */
.piece {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: hidden;
  /* The drawings carry a viewBox and no width or height of their own. With
     height:auto alone, a browser that does not infer the ratio from the
     viewBox gives the element no height at all and the picture disappears —
     it renders correctly in one engine and vanishes in another. Every piece
     is square. */
  aspect-ratio: 1 / 1;
}

/* The label — below, left-aligned, small, uppercase, letter-spaced, in --muted.
   A wall caption, not a headline. */
.tile-label {
  display: block;
  margin: 0;
}

.tile-label h2 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0;
}

/* No p shown at tile scale — the statement is saved for the piece page. */
.tile-label p {
  display: none;
}

/* Hover — the drawing itself responds: a subtle scale to 1.02,
   and the label's --muted brightens toward --ink. Nothing else moves. */
.tile-frame,
.tile-label h2 {
  transition: transform 0.35s ease, color 0.35s ease;
}

.tile:hover .tile-frame {
  transform: scale(1.02);
}

.tile:hover .tile-label h2 {
  color: var(--ink);
}

/* The paper — the work's surface */
.papers {
  display: block;
  margin: 0;
}

.piece-page {
  display: block;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  background: var(--card);
  padding: clamp(1.5rem, 4vw, 3rem);
}

/* The plate — the drawing's stage */
.plate {
  display: block;
  width: 100%;
  line-height: 0;
  margin: 0 0 clamp(1rem, 3vw, 2rem);
}

.plate .piece {
  width: 100%;
  height: auto;
}

.plate-label {
  display: block;
  font-family: var(--serif);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: left;
  margin: 0 0 1rem;
  line-height: 1.4;
}

/* Fineprint — the room's exit whisper, left-aligned like everything else */
.fineprint {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: left;
  padding-top: clamp(2rem, 5vw, 4rem);
  margin: 0;
}

/* Respect reduced motion — damp the transitions to nothing. */
@media (prefers-reduced-motion: reduce) {
  .tile-frame,
  .tile-label h2 {
    transition: none;
  }
  .tile:hover .tile-frame {
    transform: none;
  }
}
