/* ===== Crypto Soccer styles ===== */
.cs-app {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0a1018 0%, #060a10 100%);
  color: var(--ink);
  font-family: var(--font-body);
  position: relative;
  /* FIX 3: aislar repaint del juego del resto del documento */
  contain: layout style paint;
}

.cs-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.cs-help-btn {
  width: 24px; height: 24px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  transition: all 160ms;
}
.cs-help-btn:hover {
  background: rgba(34, 211, 238, 0.22);
  transform: scale(1.08);
}
.cs-help-panel {
  position: absolute;
  inset: 16px;
  z-index: 30;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(94, 234, 212, 0.12), transparent 50%),
    rgba(4, 7, 12, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow:
    0 20px 60px -12px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  animation: cs-help-pop 240ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
@keyframes cs-help-pop {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
.cs-help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.18);
  margin-bottom: 16px;
}
.cs-help-head strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cs-help-head strong::before {
  content: '⚽';
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.6));
}
.cs-help-head button {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms;
}
.cs-help-head button:hover {
  background: rgba(251, 113, 133, 0.15);
  border-color: rgba(251, 113, 133, 0.4);
  color: #fb7185;
}
.cs-help-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cs-help-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  transition: all 200ms;
}
.cs-help-list li:hover {
  background: rgba(34, 211, 238, 0.05);
  border-color: rgba(34, 211, 238, 0.2);
}
.cs-help-list li strong { color: var(--ink); font-weight: 600; }
.cs-help-step {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(94, 234, 212, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px -4px rgba(34, 211, 238, 0.3);
}
@media (max-width: 700px) {
  .cs-help-list { grid-template-columns: 1fr; }
  .cs-help-panel { padding: 16px; }
  .cs-help-head strong { font-size: 16px; }
}
.cs-help-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 3px;
}
.cs-help-dot {
  width: 9px; height: 9px;
  border-radius: 2px;
}
.cs-help-foot {
  font-size: 10px;
  color: var(--ink-3);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-style: italic;
}
.cs-help-foot strong { color: #fbbf24; font-weight: 600; }
.cs-team {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-team-b { justify-content: flex-end; }
.cs-team strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.cs-team-a strong { color: #5eead4; }
.cs-team-b strong { color: #fb7185; }
.cs-team-tokens { display: inline-flex; gap: 3px; }
.cs-mini-tok {
  width: 18px; height: 18px;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  border: 1px solid rgba(255,255,255,0.2);
}
.cs-team-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  min-width: 28px;
  text-align: center;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.cs-team-target {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

/* Team wallet sub-line */
.cs-team-id {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 1px;
}
.cs-team-wallet {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: #fbbf24;
}

/* Claim button glow */
.cs-claim-glow {
  animation: cs-claim-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(34,211,238,0.18), 0 6px 18px -4px rgba(34,211,238,0.5);
}
@keyframes cs-claim-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(34,211,238,0.22), 0 8px 22px -4px rgba(34,211,238,0.6); }
}

/* Confetti */
.cs-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}
.cs-confetto {
  position: absolute;
  bottom: 40%;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  transform-origin: center;
  animation: cs-confetto-fly 2.2s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
@keyframes cs-confetto-fly {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.3); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--vx), var(--vy)) rotate(var(--rot)) scale(1); }
}

/* Falling coins land at the winner's wallet side */
.cs-fall {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 49;
}
.cs-fall-coin {
  position: absolute;
  top: -20px;
  font-size: 22px;
  color: #fbbf24;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.9), 0 0 4px rgba(251, 191, 36, 0.8);
  font-weight: 700;
  opacity: 0;
}
.cs-fall-left {
  animation: cs-fall-left 1.5s cubic-bezier(0.4, 0, 0.4, 1) forwards;
}
.cs-fall-right {
  animation: cs-fall-right 1.5s cubic-bezier(0.4, 0, 0.4, 1) forwards;
}
@keyframes cs-fall-left {
  0%  { opacity: 0; top: -20px; transform: scale(1.2); }
  15% { opacity: 1; }
  100% { opacity: 0; top: 60px; transform: scale(0.3); }
}
@keyframes cs-fall-right {
  0%  { opacity: 0; top: -20px; transform: scale(1.2); }
  15% { opacity: 1; }
  100% { opacity: 0; top: 60px; transform: scale(0.3); }
}

/* Mute button — tap target WCAG 2.5.5 (44×44 px minimum) */
.cs-mute {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  /* 44px tap target */
  min-height: 44px;
  min-width: 44px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
}
.cs-mute:hover { color: var(--ink); }
.cs-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}
.cs-clock-time {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.cs-clock-label {
  font-family: var(--font-mono);
  /* FIX 3: 8px es ilegible — mínimo 10px per WCAG SC 1.4.4 */
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #fb7185;
}

.cs-field-wrap {
  flex: 1;
  min-height: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #051018 0%, #02070c 100%);
}
.cs-field {
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  /* FIX 2: promover a GPU layer — evita repaint en cada RAF tick */
  will-change: transform;
}
.cs-token {
  transition: transform 80ms linear;
  /* FIX 2: cada token en su propia GPU layer para drag fluido */
  will-change: transform;
}
.cs-token:active { cursor: grabbing !important; }

/* FIX 4 — Drag discoverable: jiggle suave en modo pre-START */
@keyframes cs-jiggle {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-2deg) scale(1.04); }
  60%       { transform: rotate(2deg)  scale(1.04); }
  80%       { transform: rotate(-1deg); }
}
.cs-token-discoverable {
  animation: cs-jiggle 1.5s ease-in-out infinite;
  cursor: default;
}
.cs-token:hover circle:nth-child(2) {
  filter: brightness(1.15);
}

.cs-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(0,0,0,0.3);
}
.cs-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  /* FIX 3: WCAG AA — ratio ~4.6:1 sobre fondo rgba(0,0,0,0.3) */
  color: rgba(255,255,255,0.78);
}
.cs-controls {
  display: flex;
  gap: 6px;
}

/* ===== Snap-scroll: each section = full viewport ===== */
html { scroll-snap-type: y mandatory; scroll-behavior: smooth; }
body { scroll-snap-type: y mandatory; }

main > section,
.site-footer {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Each section gets minimum viewport height + reset internal padding */
main > section.hero,
main > section.sec-overview,
main > section.sec-solutions,
main > section.sec-ecosystem,
main > section.sec-work,
main > section.sec-process,
main > section.sec-boosterx,
main > section.sec-stack,
main > section.sec-impact,
main > section.sec-voice,
main > section.sec-cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 80px;
}

/* Footer doesn't need snap, content is short */
.site-footer { min-height: auto; scroll-snap-align: none; }

/* Hero already has its own min-height behavior — keep contained */
.hero { overflow: hidden; }

/* On small screens, disable snap so users can scroll naturally */
@media (max-width: 900px) {
  html, body { scroll-snap-type: none; }
  main > section { min-height: auto; padding-top: 80px; padding-bottom: 60px; }
}

/* ===== Accessibility: reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .cs-token, .cs-start-pulse, .cs-claim-glow, .cs-help-panel,
  .cs-confetto, [class*="float-"], svg animate {
    animation: none !important;
    transition: none !important;
  }
  .cs-token { transition: transform 0s !important; }
}
