:root {
  --bg-1: #f8f3ea;
  --bg-2: #ebdfcf;
  --text: #1b2430;
  --muted: #5a6578;
  --brand: #a06437;
  --brand-2: #284f70;
  --line: rgba(27, 36, 48, 0.14);
  --ok: #2c945d;
  --shadow: 0 36px 90px rgba(42, 28, 16, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(160, 100, 55, 0.22), transparent 34%),
    radial-gradient(circle at 84% 80%, rgba(40, 79, 112, 0.25), transparent 40%),
    linear-gradient(130deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

#flow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(30px);
  pointer-events: none;
  opacity: 0.5;
}

.ambient-a {
  width: 34rem;
  height: 34rem;
  top: -12rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(160, 100, 55, 0.42), transparent 68%);
  animation: ambientDrift 14s ease-in-out infinite;
}

.ambient-b {
  width: 30rem;
  height: 30rem;
  bottom: -10rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(40, 79, 112, 0.34), transparent 70%);
  animation: ambientDrift 18s ease-in-out infinite reverse;
}

.cursor-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center,
      rgba(255, 255, 255, 0.46) 0%,
      rgba(160, 100, 55, 0.2) 36%,
      rgba(40, 79, 112, 0.16) 56%,
      transparent 74%);
  filter: blur(16px);
  z-index: 2;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 16px;
  position: relative;
  z-index: 3;
}

.hero-card {
  width: min(980px, 100%);
  min-height: min(82vh, 760px);
  padding: clamp(24px, 4vw, 44px);
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 160ms ease-out;
}

.hero-card.minimal {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg,
      transparent 0deg,
      rgba(40, 79, 112, 0.14) 80deg,
      rgba(160, 100, 55, 0.14) 150deg,
      transparent 250deg,
      rgba(255, 255, 255, 0.24) 320deg,
      transparent 360deg);
  animation: auroraSpin 14s linear infinite;
  pointer-events: none;
  opacity: 0.7;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.28), transparent 50%);
  pointer-events: none;
  opacity: 0.8;
}

.interactive-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  will-change: transform;
}

.b1 {
  width: 140px;
  height: 140px;
  top: 8%;
  left: 10%;
  background: radial-gradient(circle, rgba(40, 79, 112, 0.34), transparent 70%);
}

.b2 {
  width: 180px;
  height: 180px;
  top: 12%;
  right: 12%;
  background: radial-gradient(circle, rgba(160, 100, 55, 0.4), transparent 70%);
}

.b3 {
  width: 220px;
  height: 220px;
  bottom: 14%;
  right: 10%;
  background: radial-gradient(circle, rgba(40, 79, 112, 0.3), transparent 70%);
}

.b4 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 14%;
  background: radial-gradient(circle, rgba(160, 100, 55, 0.3), transparent 70%);
}

.b5 {
  width: 380px;
  height: 380px;
  top: 46%;
  left: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.52), transparent 72%);
}

.brand-row,
.kicker,
h1,
.subtitle,
.actions,
.hint,
.progress-wrap,
.footnote {
  position: relative;
  z-index: 2;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(44, 148, 93, 0.3);
  animation: pulse 2.1s ease-in-out infinite;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--brand-2);
  font-weight: 800;
}

h1 {
  margin: 10px 0 14px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 8vw, 6rem);
  line-height: 0.9;
  max-width: 12ch;
  letter-spacing: 0.01em;
  text-shadow: 0 10px 24px rgba(255, 255, 255, 0.4);
  transition: transform 180ms ease-out;
}

.coming-title {
  margin: 8px 0 4px;
  text-align: center;
  font-size: clamp(2.8rem, 10vw, 8rem);
  letter-spacing: 0.05em;
}

.game-wrap {
  width: min(520px, 100%);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(10, 14, 24, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 14px 36px rgba(9, 15, 28, 0.28);
  position: relative;
  z-index: 2;
}

#pacman-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 30%, rgba(26, 38, 66, 0.4), rgba(5, 9, 18, 0.98));
}

.game-meta {
  margin: 10px 4px 0;
  text-align: center;
  color: rgba(238, 242, 255, 0.86);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.75;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease;
  will-change: transform;
}

.btn-solid {
  color: #ffffff;
  background: linear-gradient(145deg, #2f516b, #436985);
  box-shadow: 0 14px 26px rgba(47, 81, 107, 0.26);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.hint {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.progress-wrap {
  margin-top: 24px;
  width: min(560px, 100%);
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(31, 36, 48, 0.12);
  overflow: hidden;
}

.progress-fill {
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transform-origin: left;
}

.progress-label {
  margin: 10px 2px 0;
  color: var(--muted);
  font-weight: 700;
}

#progress-value {
  color: var(--text);
}

.footnote {
  margin-top: 18px;
  color: rgba(31, 36, 48, 0.72);
  font-size: 0.92rem;
}

.pointer-burst,
.pointer-spark {
  position: fixed;
  pointer-events: none;
  z-index: 3;
}

.pointer-burst {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  mix-blend-mode: screen;
  animation: burst 620ms ease-out forwards;
}

.pointer-spark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(160, 100, 55, 0.75) 62%, rgba(40, 79, 112, 0) 72%);
  animation: sparkFly 720ms ease-out forwards;
}

@keyframes ambientDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(14px, -18px, 0) scale(1.06);
  }
}

@keyframes auroraSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(44, 148, 93, 0.3);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(44, 148, 93, 0.08);
  }
}

@keyframes burst {
  from {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0.55;
  }
  to {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

@keyframes sparkFly {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  to {
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(0.2);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 18px 12px;
  }

  .hero-card {
    border-radius: 24px;
    min-height: auto;
  }

  .cursor-glow {
    width: 320px;
    height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
