body { background: #f4f1ea; color: #121216; }

.pile-section {
  display: flex; flex-direction: column;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 48px) 0;
}

header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
h1 {
  margin: 0;
  font: 700 clamp(48px, 10vw, 140px)/0.9 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.05em;
}
header p { margin: 0; font: 500 16px 'Space Grotesk', system-ui, sans-serif; color: #6b6a73; }
.drop {
  margin-left: auto;
  padding: 8px 16px; border: 1px solid #121216; border-radius: 999px;
  background: none; font: 600 12px ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer;
}
.drop:hover { background: #121216; color: #f4f1ea; }
html[data-motion="reduce"] .drop { display: none; }

/* Static layout: used for reduced motion and as the starting point for measuring. */
.pile {
  list-style: none; margin: 32px 0 0; padding: 0 0 40px;
  display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start;
}

.tag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55em 1.1em;
  border-radius: 999px;
  font: 500 clamp(18px, 2.6vw, 34px)/1 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.02em;
  white-space: nowrap;
  user-select: none;
}
.tag--a { background: #121216; color: #f4f1ea; }
.tag--b { background: #ff4d2e; color: #fff; }
.tag--c { background: #fff; color: #121216; box-shadow: inset 0 0 0 2px #121216; }
.tag--d { background: #3a86ff; color: #fff; }
.tag--e { background: #ffbe0b; color: #121216; }
.tag--dot { width: 2.4em; height: 2.4em; padding: 0; border-radius: 50%; background: #121216; color: #ffbe0b; }

/* Physics layout: JS switches to this once it has measured each tag. */
.pile.is-physics {
  position: relative; flex: 1; min-height: 60vh; margin-top: 16px; padding: 0;
  overflow: hidden; touch-action: none; cursor: grab;
}
.pile.is-physics:active { cursor: grabbing; }
.pile.is-physics .tag {
  position: absolute; top: 0; left: 0;
  will-change: transform;
}
