:root {
  --bg: #ffffff;
  --blue: #1b4aa3;
  --ink: #111111;
  --muted: #8d8d8d;
  --line: rgba(17, 17, 17, 0.07);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-width: 1024px;
}

/* ── page above the footer ── */
.intro {
  height: 100vh;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.scroll { font-size: 14px; color: var(--muted); }
.scroll span { display: inline-block; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ── footer ── */
.footer {
  position: relative;
  height: 100vh;
  min-height: 760px;
  overflow: hidden;
  background: var(--bg);
  user-select: none;
  -webkit-user-select: none;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.ui { position: absolute; inset: 0; pointer-events: none; }
.ui a, .ui button { pointer-events: auto; }

/* top row: two link columns · centred logo + button · two link columns */
.cols {
  position: absolute;
  top: 64px;
  display: grid;
  grid-template-columns: 170px auto;
}
.cols-left { left: 40px; }
.cols-right { right: 40px; grid-template-columns: 170px 140px; }
.col { display: flex; flex-direction: column; align-items: flex-start; }
.col h4 {
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 22px;
}
.col a {
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.3s var(--ease);
}
.col a:hover { color: var(--blue); }

.center {
  position: absolute;
  left: 50%;
  top: 56px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.logo.ready { cursor: pointer; }
.logo.busy { cursor: progress; }
.logo:focus-visible { outline: 2px solid var(--blue); outline-offset: 8px; border-radius: 8px; }
.word { font-size: 36px; font-weight: 500; line-height: 1; letter-spacing: -0.045em; }

/* ── die logo: a WebGL rounded cube (see main.js). The canvas overhangs the 34px slot
   so the die can hop and tilt without clipping. ── */
.die-scene {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
}
#die-canvas {
  position: absolute;
  left: -31px;
  top: -31px;
  width: 96px;
  height: 96px;
  pointer-events: none;
}

/* entrance */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(5px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease), background 0.3s var(--ease);
  transition-delay: calc(var(--d) * 80ms + 120ms);
}
.footer.in .reveal { opacity: 1; transform: none; filter: none; }

/* ── multiplayer cursors ── */
.cursors { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.cursor {
  position: absolute;
  left: 0; top: 0;
  will-change: transform, opacity;
  transform-origin: 0 0;
  transition: opacity 0.5s var(--ease);
}
.cursor .arrow { position: absolute; left: -3px; top: -2.2px; }
.cursor .tag {
  position: absolute;
  left: 15px; top: 21px;
  padding: 4px 9px 5px;
  border-radius: 999px;
  color: #fff;
  font: 500 12px/1 'Geist', sans-serif;
  white-space: nowrap;
}

.ripple {
  position: absolute;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid var(--c);
  pointer-events: none;
  animation: ripple 0.6s var(--ease) forwards;
}
@keyframes ripple {
  from { transform: scale(0.2); opacity: 0.9; }
  to { transform: scale(1.25); opacity: 0; }
}
