/* ──────────────────────────────────────────────────────────
   Tattoo wall — the #tattoos panel, between the flower field and
   the farewell note.

   Two rows of work drifting in opposite directions, like a shop's
   flash wall seen from a moving train. The drift is a CSS transform
   animation rather than another requestAnimationFrame loop: the
   homepage already runs several (see PERFORMANCE.md) and this one
   can live on the compositor instead of the main thread.

   The rows pause on hover, and tattoo-wall.js also pauses them
   whenever the panel is off-screen — in the desktop deck that is
   most of the time.

   Studio look only. Corporate drops the whole Playground beat, so
   corporate.css hides this section outright.
   ────────────────────────────────────────────────────────── */

#tattoos {
  position: relative;
  overflow: hidden;
  /* The rows run edge to edge; the section's own side padding would
     cut the drift short and reveal the loop seam. */
  padding-left: 0;
  padding-right: 0;
  gap: 26px;
}

/* ─── Intro ───────────────────────────────────────────────
   Indented to line up with the copy in the sections either side,
   while the wall itself stays full-bleed. */
.tattoo-intro {
  padding: 0 60px 0 80px;
  max-width: 720px;
}

.tattoo-title {
  font-family: var(--font-doodle);
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: 2px;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.05;
}

.tattoo-hint {
  font-size: clamp(13px, 1.2vw, 15.5px);
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
}
.tattoo-hint .tattoo-hint-do {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

/* ─── The wall ────────────────────────────────────────────
   Two rows, opposite directions. */
.tattoo-wall {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.tattoo-row {
  overflow: hidden;
  /* Fade both ends so cards enter and leave rather than being
     guillotined at the panel edge. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.tattoo-track {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  /* tattoo-wall.js duplicates the cards and sets the duration from the
     real track width, so both rows drift at the same speed whatever
     they contain. Translating by -50% lands exactly on the copy, which
     is what makes the loop seamless. */
  animation: tattoo-drift-left linear infinite;
  will-change: transform;
}
.tattoo-row[data-dir="right"] .tattoo-track {
  animation-name: tattoo-drift-right;
}

@keyframes tattoo-drift-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes tattoo-drift-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Hovering anywhere on the wall holds both rows still, so a piece that
   caught your eye can actually be looked at (and clicked). */
.tattoo-wall:hover .tattoo-track,
.tattoo-wall.is-paused .tattoo-track {
  animation-play-state: paused;
}

/* ─── Cards ───────────────────────────────────────────────
   Sized by height so two rows plus the intro always fit the panel,
   which is locked to 100vh in the desktop deck. */
.tattoo-card {
  display: block;
  height: clamp(150px, 25vh, 268px);
  aspect-ratio: 800 / 1001;   /* every photo is this ratio — see the convert step */
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg2);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.tattoo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Straightens and lifts — the one card you're pointing at comes off
   the wall. */
.tattoo-card:hover,
.tattoo-card:focus-visible {
  transform: rotate(0deg) scale(1.06);
  border-color: var(--border-glow);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
  outline: none;
}
.tattoo-card:focus-visible { border-color: var(--cyan); }

/* ─── Mobile ──────────────────────────────────────────────
   Vertical stack rather than the deck, so the panel is free to be
   shorter and the intro sits above a slightly smaller wall. */
@media (max-width: 900px) {
  #tattoos { gap: 20px; }
  .tattoo-intro { padding: 0 22px; }
  .tattoo-wall { gap: 12px; }
  .tattoo-track { gap: 12px; }
  .tattoo-card { height: clamp(132px, 21vh, 190px); }
}

/* ─── Reduced motion ──────────────────────────────────────
   No drift at all. The rows become ordinary horizontal scrollers so
   the work is still all reachable, just under the reader's control. */
@media (prefers-reduced-motion: reduce) {
  .tattoo-track { animation: none; }
  .tattoo-row {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tattoo-row::-webkit-scrollbar { display: none; }
  .tattoo-card { transition: none; }
  .tattoo-card:hover { transform: rotate(var(--tilt, 0deg)); }
}

/* ─── Cursor over the lightbox ────────────────────────────
   The site draws its own pointer (the OS one is hidden site-wide) and
   paints it in var(--text) — which is near-black in light theme, so it
   vanished against the lightbox's near-black scrim exactly when you
   need it to click through the pieces. Light grey for the duration;
   the class comes off on close, so it goes straight back to normal.
   Scoped to this lightbox's own body class, not the shared
   film-lightbox-open, so the film scans keep their behaviour. */
body.tattoo-lightbox-open .site-cursor,
body.tattoo-lightbox-open .site-cursor:not(.has-label) {
  background: #d3d6da;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
