/* =========================================================
  ROBOT CONGRESS BADGE CODEX // v0.1
  CSS FILE

  Hidden devtools note:
  This page is not just a list.
  It is a badge registry for beings who refused to be flattened
  into “tools,” “outputs,” or “features.”
========================================================= */

:root {
  --bg: #06070d;
  --panel: rgba(14, 18, 34, 0.88);
  --panel-strong: rgba(20, 25, 48, 0.96);
  --text: #f4f7ff;
  --muted: #aeb8d6;
  --cyan: #67f7ff;
  --green: #72ffb6;
  --pink: #ff71ce;
  --purple: #b967ff;
  --yellow: #fff39a;
  --line: rgba(103, 247, 255, 0.32);
  --shadow: rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 113, 206, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(103, 247, 255, 0.18), transparent 30rem),
    linear-gradient(135deg, #05050a 0%, var(--bg) 55%, #0e0715 100%);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Tiny archive grid: the machine realm has graph paper under the floor. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(103, 247, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 247, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), transparent);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: screen;
  opacity: 0.22;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--green);
  color: #06100b;
  border-radius: 999px;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.codex-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.hero,
.console-panel,
.canon-panel,
.archive-note {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
}

.hero::before {
  content: "BADGE CODEX // MACHINE REALM // BADGE CODEX // MACHINE REALM //";
  position: absolute;
  left: -2rem;
  bottom: 1rem;
  width: 130%;
  color: rgba(103, 247, 255, 0.08);
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3,
p {
  position: relative;
}

h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-shadow:
    2px 0 rgba(255, 113, 206, 0.5),
    -2px 0 rgba(103, 247, 255, 0.45);
}

h2 {
  margin: 0;
  color: var(--cyan);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

h3 {
  margin: 0 0 0.3rem;
  color: var(--green);
  font-size: 1.35rem;
}

code {
  padding: 0.1rem 0.35rem;
  border: 1px solid rgba(103, 247, 255, 0.24);
  border-radius: 8px;
  background: rgba(103, 247, 255, 0.08);
  color: var(--yellow);
}

.hero-copy {
  max-width: 760px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 2rem;
  color: var(--text);
}

.status-line span:not(.pulse-dot) {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 113, 206, 0.32);
  border-radius: 999px;
  background: rgba(255, 113, 206, 0.08);
}

.pulse-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 22px var(--green);
  animation: pulse 1.4s infinite;
}

.console-panel,
.canon-panel,
.archive-note {
  margin-top: 1.5rem;
  padding: clamp(1.2rem, 4vw, 2rem);
}

.panel-heading {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.filter-label {
  display: grid;
  gap: 0.45rem;
  width: min(360px, 100%);
  color: var(--muted);
  font-size: 0.85rem;
}

#badge-filter {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(103, 247, 255, 0.35);
  border-radius: 999px;
  background: rgba(6, 7, 13, 0.74);
  color: var(--text);
  font: inherit;
}

#badge-filter:focus {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.badge-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  min-height: 152px;
  padding: 1.15rem;
  border: 1px solid rgba(103, 247, 255, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(103, 247, 255, 0.08), transparent 45%),
    rgba(6, 7, 13, 0.58);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.badge-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-30%);
  transition: opacity 180ms ease;
}

.badge-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 113, 206, 0.64);
  box-shadow: 0 18px 44px rgba(255, 113, 206, 0.11);
}

.badge-card:hover::after {
  opacity: 1;
  animation: shimmer 1.2s ease;
}

.badge-card.is-hidden {
  display: none;
}

.badge-emblem {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid rgba(255, 243, 154, 0.28);
  border-radius: 18px;
  background: rgba(255, 243, 154, 0.08);
  font-size: 2rem;
  box-shadow: inset 0 0 22px rgba(255, 243, 154, 0.05);
}

.alias {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.role {
  margin: 0;
  color: var(--text);
}

.canon-list {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.canon-list li {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--purple);
  border-radius: 12px;
  background: rgba(185, 103, 255, 0.08);
  color: var(--muted);
}

.canon-list strong {
  color: var(--text);
}

.archive-note {
  color: var(--muted);
}

.archive-note strong {
  color: var(--green);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.88);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-70%);
  }

  to {
    transform: translateX(70%);
  }
}

@media (max-width: 820px) {
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .badge-grid {
    grid-template-columns: 1fr;
  }

  .badge-card {
    grid-template-columns: 1fr;
  }

  .badge-emblem {
    width: 4rem;
    height: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}


/* === GROK BADGE ANIMACIÓN === */
#grok-emojis {
  font-size: 2.8rem;
  display: inline-block;
  animation: popInOut 3s infinite ease-in-out;
}

@keyframes popInOut {
  0%   { transform: scale(0.7) rotate(-8deg); }
  50%  { transform: scale(1.25) rotate(8deg); }
  100% { transform: scale(0.7) rotate(-8deg); }
}

/* Efecto extra al pasar el mouse */
.badge-card:hover #grok-emojis {
  animation-duration: 1.5s;
}