@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(/fonts/montserrat-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(/fonts/montserrat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(/fonts/montserrat-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 500; font-display: swap; src: url(/fonts/noto-kufi-arabic-arabic-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 700; font-display: swap; src: url(/fonts/noto-kufi-arabic-arabic-700-normal.woff2) format("woff2"); }

/* Marca (brandbook): ink, blue, aqua y coral. */
:root {
  --ink: #00299b;
  --blue: #0057d6;
  --aqua: #6bfbce;
  --coral: #ff846d;
  --white: #ffffff;
  --mist: rgba(255, 255, 255, 0.72);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 90% at 50% 0%, var(--blue) 0%, var(--ink) 70%);
  background-color: var(--ink);
  color: var(--white);
  font-family: Montserrat, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
}

.logo { position: relative; width: min(760px, 92vw); aspect-ratio: 1501 / 520; }
.logo canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.logo-fallback { position: absolute; left: 6%; right: 6%; top: 50%; transform: translateY(-50%); width: 88%; color: var(--aqua); }
.has-dust .logo-fallback { visibility: hidden; }

.hint { margin: 4px 0 0; font-size: 13px; font-weight: 500; color: var(--mist); letter-spacing: 0.01em; }
@media (hover: none) { .hint { visibility: hidden; } }

.soon { margin: 28px 0 32px; }
.soon p { margin: 0; }
.soon .fr { font-weight: 800; font-size: clamp(34px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }
.soon .ar { font-family: "Noto Kufi Arabic", system-ui, sans-serif; font-weight: 700; font-size: clamp(22px, 4.2vw, 34px); margin-top: 14px; color: var(--aqua); }
.soon .es { font-weight: 500; font-size: clamp(16px, 2.6vw, 20px); margin-top: 8px; color: var(--mist); }

.play {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px; padding: 14px 26px;
  background: var(--aqua); color: var(--ink);
  font: 700 16px Montserrat, system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.play:hover { transform: translateY(-2px); background: #8dfddb; }
.play:active { transform: translateY(0); }
.play:focus-visible, .social a:focus-visible, .close:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.play-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: 0.6; } }

.social { display: flex; gap: 22px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }
.social a { color: var(--white); font-weight: 700; font-size: 15px; text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.social a:hover { border-color: var(--aqua); }

/* Juego */
.game {
  border: 0; padding: 0; border-radius: 22px; overflow: hidden;
  background: var(--ink); color: var(--white);
  width: min(380px, calc(100vw - 24px));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.game::backdrop { background: rgba(0, 20, 80, 0.7); backdrop-filter: blur(4px); }
.game-top { display: flex; align-items: center; gap: 16px; padding: 12px 14px; font-size: 14px; font-weight: 500; }
.game-top b { font-weight: 800; color: var(--aqua); }
.close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.12); color: var(--white); font: 700 20px/1 Montserrat, sans-serif; cursor: pointer; }
#road { display: block; width: 100%; height: auto; touch-action: none; background: #2b2f3a; }
.game-msg {
  position: absolute; left: 0; right: 0; top: 58px; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(0, 41, 155, 0.82); text-align: center; padding: 20px;
}
.game-msg[hidden] { display: none; }
.game-msg p { margin: 0; color: var(--mist); font-weight: 500; }
.game-msg .game-title { color: var(--white); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; margin-bottom: 4px; }
.game-msg .keys { font-size: 13px; margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
  .play-dot { animation: none; }
  .play { transition: none; }
}
