/* ============================================================
   NEONCADE — Hub (landing + game selection)
   ============================================================ */

.hub {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 40px) 64px;
}

/* ---- masthead ---- */
.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: clamp(36px, 7vw, 72px);
  animation: riseIn 620ms var(--expo) backwards;
}
/* calm chrome entrance (expo, no overshoot) — cascades in before the cards */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.brand { display: flex; flex-direction: column; gap: 12px; }
.brand__mark {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 11vw, 6rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  color: #eef4f9;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.35),
    0 0 30px rgba(61, 224, 255, 0.5),
    0 0 64px rgba(255, 77, 184, 0.3);
  animation: tubeGlow 5.5s ease-in-out infinite;
}
/* neon keyline (gradient on a non-text element — spectrum identity) */
.brand__mark::after {
  content: '';
  position: absolute;
  left: 2px; right: 2px;
  bottom: -8px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lime), var(--cyan) 50%, var(--magenta));
  box-shadow: 0 0 14px rgba(61, 224, 255, 0.5);
}
@keyframes tubeGlow {
  0%, 100% { text-shadow: 0 0 14px rgba(255,255,255,0.35), 0 0 30px rgba(61,224,255,0.5), 0 0 64px rgba(255,77,184,0.3); }
  50% { text-shadow: 0 0 16px rgba(255,255,255,0.45), 0 0 38px rgba(255,77,184,0.45), 0 0 72px rgba(184,255,61,0.22); }
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.brand__tag::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px 2px var(--lime);
  animation: blink 2.4s steps(1) infinite;
}
@keyframes blink { 0%, 70% { opacity: 1; } 71%, 100% { opacity: 0.25; } }

.masthead__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--pop);
}
.iconbtn:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); }
.iconbtn svg { width: 18px; height: 18px; }

/* ---- intro line ---- */
.intro {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: clamp(28px, 5vw, 48px);
  animation: riseIn 620ms var(--expo) 70ms backwards;
}
.intro strong { color: var(--text); font-weight: 700; }

/* ---- game grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(16px, 2.6vw, 26px);
}

.card {
  --c: var(--cyan);
  --c-rgb: 61, 224, 255;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(var(--c-rgb), 0.05), transparent 40%),
    var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transform: perspective(900px) rotateX(0) rotateY(0) translateY(0);
  transition: transform var(--t-med) var(--expo), border-color var(--t-med), box-shadow var(--t-med);
  opacity: 0;
  animation: cardIn 560ms var(--pop) forwards;
}
.card:nth-child(1) { animation-delay: 0.06s; }
.card:nth-child(2) { animation-delay: 0.14s; }
.card:nth-child(3) { animation-delay: 0.22s; }
.card:nth-child(4) { animation-delay: 0.30s; }
.card:nth-child(5) { animation-delay: 0.38s; }
.card:nth-child(6) { animation-delay: 0.46s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.95); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--c);
  box-shadow: 0 0 16px rgba(var(--c-rgb), 0.8);
  z-index: 3;
}
.card:hover {
  border-color: rgba(var(--c-rgb), 0.5);
  box-shadow: 0 24px 60px -24px rgba(var(--c-rgb), 0.5), 0 0 0 1px rgba(var(--c-rgb), 0.25);
}
.card:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }

.card__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: radial-gradient(110% 110% at 50% 0%, rgba(var(--c-rgb), 0.10), transparent 60%), var(--bg-0);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card__preview canvas { width: 100%; height: 100%; }
.card__genre {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c);
  padding: 0.35em 0.7em;
  border: 1px solid rgba(var(--c-rgb), 0.4);
  border-radius: var(--r-pill);
  background: rgba(7, 8, 12, 0.6);
  backdrop-filter: blur(4px);
}

.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.card__desc { font-size: 0.82rem; color: var(--text-dim); line-height: 1.55; flex: 1; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.card__best { display: flex; flex-direction: column; gap: 2px; }
.card__best-label { font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.card__best-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c);
  font-variant-numeric: tabular-nums;
}
.card__play {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--bg-0);
  background: var(--c);
  padding: 0.7em 1.2em;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 24px -8px rgba(var(--c-rgb), 0.7);
  transition: transform var(--t-fast) var(--pop);
}
.card:hover .card__play { transform: scale(1.06); }
.card__play svg { width: 13px; height: 13px; }

/* ---- footer ---- */
.hubfoot {
  margin-top: clamp(40px, 8vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.hubfoot a { color: var(--text-dim); border-bottom: 1px dotted var(--line-strong); }
.hubfoot a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .card { transform: none !important; }
}
