:root {
  --azul-comunidad: #203da5;
  --azul-segura: #07164f;
  --azul-solidaria: #00405e;
  --amarillo-sin-barreras: #fbbe4b;
  --verde-sustentabilidad: #97b321;
  --azul-tu-red: #2d4193;
  --verde-saludable: #74c1b3;
  --naranja-inclusion: #eb6630;
  --morado-integracion: #7626ff;
  --footer-angle: 12deg; /* fallback, se recalcula por JS */
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 1.5rem; }

/* ── Hero: fondo placeholder + fade-in suave ─────────────────── */
.hero-section {
  background-color: #0a1a3a;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  scale: 1.03;
  transition: opacity .8s ease-out, scale 1.2s ease-out;
}
.hero-bg.loaded {
  opacity: 1;
  scale: 1;
}

/* ── Dot animations ──────────────────────────────────────────── */
.dot-float {
  animation: dotFloat 4s ease-in-out infinite;
}
.dot-drift {
  animation: dotDrift 6s ease-in-out infinite;
}
.dot-glow {
  animation: dotGlow 3s ease-in-out infinite;
}
.dot-twinkle {
  animation: dotTwinkle 2.5s ease-in-out infinite;
}
.dot-orbit {
  animation: dotOrbit 5s linear infinite;
}

@keyframes dotFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}
@keyframes dotDrift {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(10px, -8px); }
  50%      { transform: translate(-6px, -16px); }
  75%      { transform: translate(-12px, -4px); }
}
@keyframes dotGlow {
  0%, 100% { opacity: .3; transform: scale(1); box-shadow: 0 0 0 rgba(255,191,0,0); }
  50%      { opacity: .9; transform: scale(1.6); box-shadow: 0 0 12px rgba(255,191,0,.5); }
}
@keyframes dotTwinkle {
  0%, 100% { opacity: .2; transform: scale(.7); }
  30%      { opacity: 1;  transform: scale(1.2); }
  60%      { opacity: .4; transform: scale(.9); }
}
@keyframes dotOrbit {
  0%   { transform: rotate(0deg)   translateX(30px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(30px) rotate(-360deg); }
}

/* ── Command Palette (Spotlight) ─────────────────────────────── */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  pointer-events: none;
  transition: background .25s ease, backdrop-filter .25s ease;
}
.cmd-backdrop.active {
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.cmd-modal {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 14px;
  width: 92%;
  max-width: 560px;
  box-shadow: 0 25px 70px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.06);
  overflow: hidden;
  transform: translateY(-16px) scale(.97);
  opacity: 0;
  transition: transform .25s cubic-bezier(.2,.9,.3,1), opacity .2s ease;
}
.cmd-backdrop.active .cmd-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Input row */
.cmd-input-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.cmd-icon {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  flex-shrink: 0;
}
.cmd-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: #1f2937;
}
.cmd-input-row input::placeholder { color: #9ca3af; }
.cmd-kbd {
  font-size: .7rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,.06);
  color: #6b7280;
  font-family: system-ui, sans-serif;
  white-space: nowrap;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.08);
}

/* Results list */
.cmd-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 420px;
  overflow-y: auto;
}
.cmd-result {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease;
}
.cmd-result.active {
  background: var(--azul-comunidad);
}
.cmd-result-icon {
  width: 18px;
  height: 18px;
  color: #6b7280;
  flex-shrink: 0;
}
.cmd-result.active .cmd-result-icon { color: #fff; }
.cmd-result-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cmd-result-title {
  font-size: .92rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.cmd-result-title-text {
  display: inline;
}
.cmd-result.active .cmd-result-title { color: #fff; }
.cmd-result-desc {
  font-size: .75rem;
  color: #9ca3af;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-result.active .cmd-result-desc { color: rgba(255,255,255,.7); }
.cmd-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: rgba(0,0,0,.06);
  color: #6b7280;
  white-space: nowrap;
  line-height: 1.6;
}
.cmd-result.active .cmd-tag {
  background: rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
}
.cmd-more {
  padding: .5rem .85rem;
  text-align: center;
  font-size: .72rem;
  color: #9ca3af;
  font-style: italic;
}
.cmd-match {
  color: var(--azul-comunidad);
  font-weight: 600;
}
.cmd-result.active .cmd-match { color: #fbbf24; }
.cmd-ext {
  width: 14px;
  height: 14px;
  color: #9ca3af;
  margin-left: auto;
  flex-shrink: 0;
}
.cmd-result.active .cmd-ext { color: rgba(255,255,255,.6); }

/* Empty state */
.cmd-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: .9rem;
}

/* Footer hints */
.cmd-footer {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  padding: .55rem 1rem;
  border-top: 1px solid rgba(0,0,0,.06);
  font-size: .7rem;
  color: #9ca3af;
}
.cmd-footer kbd {
  font-size: .65rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
  font-family: system-ui, sans-serif;
  margin-right: 2px;
}
.cmd-footer-tip {
  margin-left: auto;
  opacity: 0.7;
}
.cmd-footer-tip kbd {
  background: linear-gradient(135deg, var(--azul-comunidad) 0%, color-mix(in srgb, var(--azul-comunidad) 80%, #000) 100%);
  color: white;
  border-color: transparent;
}

/* ── Pong: rebotan en diagonal por la pantalla ───────────────── */
.dot-pong-a { animation: pongA 8s  linear infinite; }
.dot-pong-b { animation: pongB 10s linear infinite; }
.dot-pong-c { animation: pongC 12s linear infinite; }
.dot-pong-d { animation: pongD 9s  linear infinite; }

@keyframes pongA {
  0%   { top: 5%;  left: 5%;  }
  25%  { top: 80%; left: 60%; }
  50%  { top: 15%; left: 90%; }
  75%  { top: 70%; left: 20%; }
  100% { top: 5%;  left: 5%;  }
}
@keyframes pongB {
  0%   { top: 90%; left: 85%; }
  25%  { top: 10%; left: 40%; }
  50%  { top: 75%; left: 5%;  }
  75%  { top: 20%; left: 70%; }
  100% { top: 90%; left: 85%; }
}
@keyframes pongC {
  0%   { top: 50%; left: 2%;  }
  20%  { top: 8%;  left: 35%; }
  40%  { top: 60%; left: 75%; }
  60%  { top: 85%; left: 45%; }
  80%  { top: 30%; left: 90%; }
  100% { top: 50%; left: 2%;  }
}
@keyframes pongD {
  0%   { top: 15%; left: 92%; }
  25%  { top: 70%; left: 50%; }
  50%  { top: 5%;  left: 15%; }
  75%  { top: 85%; left: 75%; }
  100% { top: 15%; left: 92%; }
}

