:root {
  --bg: #0a0a0f;
  --text: #f1f5f9;
  --font-display: "Syne", system-ui, sans-serif;
  --font-brand: "Instrument Sans", system-ui, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.5rem);
  letter-spacing: -0.03em;
  color: var(--text);
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.55);
}

h1 .brand {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.controls {
  position: fixed;
  z-index: 3;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(12px);
}

.ctrl {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 999px;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.ctrl:hover {
  color: #e2e8f0;
}

.ctrl.active {
  color: #0f172a;
  background: linear-gradient(135deg, #c4b5fd, #5eead4);
}

.hint {
  position: fixed;
  z-index: 3;
  bottom: 4.25rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-brand);
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
  letter-spacing: 0.02em;
}