:root {
  --paper: #EAE7E0;
  --ink: #1B1B18;
  --caption: #6B6862;
  --pitch: #3F5233;
  --hairline: #C9C3B8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  background-color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink);
}

/* ---------- Branding ---------- */

.brand-overlay {
  position: fixed;
  top: 44px;
  left: 48px;
  z-index: 20;
  pointer-events: none;
}

.brand-overlay .eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--pitch);
  margin-bottom: 10px;
  font-weight: 500;
}

.brand-overlay h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
}

.brand-overlay h1 .amp {
  font-weight: 300;
  color: var(--caption);
}

.brand-overlay .subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--caption);
  margin-top: 12px;
}

/* ---------- HUD counter ---------- */

.hud {
  position: fixed;
  bottom: 40px;
  left: 48px;
  z-index: 20;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--caption);
  pointer-events: none;
}

.hud::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pitch);
  margin-right: 8px;
  vertical-align: middle;
}

/* ---------- Custom cursor ---------- */

.cursor-tag {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  pointer-events: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--paper);
  background: var(--ink);
  padding: 5px 10px;
  border-radius: 20px;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

.canvas-viewport:hover .cursor-tag {
  opacity: 1;
}

.canvas-viewport.dragging .cursor-tag {
  opacity: 0;
}

/* ---------- Canvas ---------- */

.canvas-viewport {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  cursor: none;
}

.draggable-canvas {
  position: absolute;
  width: 300vw;
  height: 300vh;
  top: -100vh;
  left: -100vw;
}

/* ---------- Archive photo cards ---------- */

.photo-card {
  position: absolute;
  width: 230px;
  background: #fff;
  padding: 10px 10px 0 10px;
  box-shadow: 0 14px 30px rgba(27, 27, 24, 0.10);
  user-select: none;
  border: 1px solid var(--hairline);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s ease;
  will-change: transform;
}

.photo-card .frame {
  overflow: hidden;
  background: #ddd;
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(35%) contrast(1.05);
  pointer-events: none;
}

.photo-card .tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--caption);
  padding: 8px 2px 10px 2px;
}

.photo-card .tag .no {
  color: var(--pitch);
  font-weight: 500;
}

.photo-card:hover {
  transform: scale(1.06) !important;
  z-index: 1000 !important;
  box-shadow: 0 24px 46px rgba(27, 27, 24, 0.18);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .photo-card,
  .cursor-tag {
    transition: none !important;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .brand-overlay {
    top: 28px;
    left: 24px;
  }
  .hud {
    left: 24px;
    bottom: 24px;
  }
  .photo-card {
    width: 170px;
  }
  .cursor-tag {
    display: none;
  }
}
