/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  font-family: 'Archivo Black', sans-serif;
  color: #f0f0f0;
}

/* ── Physics canvas ──────────────────────────────── */
#physics-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ── Final settled text ──────────────────────────── */
.final-text {
  position: fixed;
  bottom: 48px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #f0f0f0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.final-text.visible {
  opacity: 1;
}

/* ── Burger button ───────────────────────────────── */
.burger-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.burger-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.burger-btn.hidden {
  pointer-events: none;
}

.burger-btn span {
  display: block;
  width: 30px;
  height: 3px;
  background: #f0f0f0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger-btn:hover span {
  background: #ffffff;
}

/* Animate to X when sidebar open */
.burger-btn.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.burger-btn.open span:nth-child(2) {
  opacity: 0;
}
.burger-btn.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  max-width: 80vw;
  height: 100%;
  background: #111111;
  z-index: 99;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 80px 40px 40px;
}

.sidebar.open {
  right: 0;
}


.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: block;
}

.sidebar ul li a:hover {
  color: #fff;
  padding-left: 8px;
}

/* ── Overlay ─────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}
