:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #8a8a8a;
  --space: clamp(1rem, 3vw, 2rem);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vh, 1.5rem);
  padding: var(--space);
  text-align: center;
}

.mark {
  width: clamp(24px, 3vw, 42px);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;
  padding: var(--space);
  font-size: 0.7rem;
  color: var(--fg);
}

.footer a {
  color: var(--fg);
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--muted);
}

/* Cursor-driven image trail */

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }

  .footer,
  .footer * {
    cursor: auto;
  }
}

#trail {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.trail-img {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(160px, 15vw, 340px);
  height: auto;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  object-fit: cover;
}

@media (hover: none) and (pointer: coarse) {
  .trail-img {
    width: clamp(140px, 38vw, 260px);
  }
}

.stage {
  position: relative;
  z-index: 2;
}

.footer {
  position: relative;
  z-index: 3;
}
