/* v01 Gallery Walk: shared tokens, wayfinding bar and 3D primitives */

:root {
  --ink: #151513;
  --wall: #f5f4f0;
  --paper: #fbfaf7;
  --muted: #6d6a64;
  --line: rgba(21, 21, 19, 0.14);
  --dot: #c0352b;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --hand: "Rock Salt", "Marker Felt", "Comic Sans MS", cursive;
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  body { overflow-x: clip; }
}

img { max-width: 100%; }

a { color: inherit; }

button { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font: 500 13px/1 var(--mono);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Wayfinding bar */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px 0 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-stretch: 118%;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mark i {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  display: inline-block;
  flex: none;
}

.bar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill:hover, .mark:hover { background: #fff; border-color: var(--ink); }

.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--dot);
  color: #fff;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0;
}
.count.bump { animation: bump 0.5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

:focus-visible { outline: 3px solid var(--dot); outline-offset: 3px; }

/* 3D primitives (used by both pages) */
.pl, .grp {
  position: absolute;
  left: 0; top: 0;
}
.grp { width: 0; height: 0; transform-style: preserve-3d; }
.pl { transform-origin: 50% 50%; }

@media (max-width: 420px) {
  .mark span.long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
