/* ============================================================================
   tests-arcade.css — gamified "arcade" styling for the Tests catalogue + detail.
   Scoped under .tq-* classes (unique prefix, no collision with existing styles).
   Brand system: violet #7c3aed / cyan #0ea5e9, Space Grotesk + Plus Jakarta Sans.
   ========================================================================== */
.tq {
  --tq-v: #7c3aed; --tq-v2: #6d28d9; --tq-cy: #0ea5e9; --tq-ink: #0b0a14; --tq-muted: #6b6680;
  --tq-grad: linear-gradient(115deg, #7c3aed 0%, #6366f1 45%, #0ea5e9 100%);
  --tq-grot: "Space Grotesk", system-ui, sans-serif;
}

/* ===== ARCADE HERO ===== */
.tq-hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: clamp(1.8rem, 4vw, 3rem);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(14,165,233,0.35), transparent 55%),
    radial-gradient(80% 120% at 0% 100%, rgba(124,58,237,0.5), transparent 55%),
    linear-gradient(160deg, #1a1330 0%, #0f0b1f 100%);
  color: #fff; box-shadow: 0 40px 90px -46px rgba(76,29,149,0.8);
}
.tq-hero::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 34px 34px; -webkit-mask-image: radial-gradient(70% 90% at 30% 10%, #000, transparent 75%); mask-image: radial-gradient(70% 90% at 30% 10%, #000, transparent 75%);
}
.tq-hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 2rem; align-items: center; }
.tq-eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--tq-grot); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: #c4b5fd;
  border: 1px solid rgba(196,181,253,0.3); padding: 0.35rem 0.7rem; border-radius: 999px;
}
.tq-eyebrow .tq-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,0.25); animation: tqPulse 1.6s infinite; }
@keyframes tqPulse { 50% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } }
.tq-title { font-family: var(--tq-grot); font-weight: 600; font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.02; letter-spacing: -0.02em; margin: 1rem 0 0.6rem; color: #fff; }
.tq-title em { font-style: normal; background: linear-gradient(100deg, #a78bfa, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
/* Win over the global `.z2h-public-page h1` color rule (0,2,2) on the dark hero. */
.z2h-public-page .tq-hero .tq-title { color: #fff; -webkit-text-fill-color: #fff; }
.z2h-public-page .tq-hero .tq-title em { -webkit-text-fill-color: transparent; }
.tq-sub { color: #c9c4e6; max-width: 46ch; line-height: 1.6; margin: 0 0 1.3rem; }
.tq-hud { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tq-hud__pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.85rem; border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); font-family: var(--tq-grot); font-weight: 600; font-size: 0.85rem; }
.tq-hud__pill i { color: #a78bfa; }
.tq-hud__pill i.tq-hp { color: #fb7185; }
.tq-props { position: relative; height: 100%; min-height: 180px; }
.tq-prop { position: absolute; display: grid; place-items: center; border-radius: 16px; font-size: 1.4rem; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); width: 64px; height: 64px; color: #fff; box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6); animation: tqBob 5s ease-in-out infinite; }
.tq-prop--a { top: 6%; left: 16%; color: #fb7185; animation-delay: 0s; }
.tq-prop--b { top: 40%; right: 8%; color: #38bdf8; width: 76px; height: 76px; font-size: 1.7rem; animation-delay: -1.5s; }
.tq-prop--c { bottom: 4%; left: 34%; color: #fde047; animation-delay: -3s; }
@keyframes tqBob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }

/* ===== QUEST FEATURE CARDS ===== */
.tq-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.4rem; }
.tq-step { position: relative; background: #fff; border: 1px solid rgba(20,16,40,0.09); border-radius: 18px; padding: 1.2rem; box-shadow: 0 12px 30px -20px rgba(76,29,149,0.4); transition: transform 0.3s, box-shadow 0.3s; }
.tq-step:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -22px rgba(76,29,149,0.55); }
.tq-step__ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 1.1rem; background: var(--tq-grad); margin-bottom: 0.7rem; box-shadow: 0 10px 22px -10px rgba(124,58,237,0.7); }
.tq-step strong { font-family: var(--tq-grot); display: block; font-size: 1.05rem; margin-bottom: 0.2rem; color: var(--tq-ink); }
.tq-step span { color: var(--tq-muted); font-size: 0.9rem; line-height: 1.5; }
.tq-step__n { position: absolute; top: 1rem; right: 1.1rem; font-family: var(--tq-grot); font-weight: 700; color: rgba(124,58,237,0.18); font-size: 1.6rem; }

/* ===== GAME CARTRIDGE CARDS ===== */
.tq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; margin-top: 1.6rem; }
.tq-card { position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--tq-ink); background: #fff; border: 1px solid rgba(20,16,40,0.09); box-shadow: 0 14px 34px -22px rgba(76,29,149,0.5); transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s; }
.tq-card:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -30px rgba(76,29,149,0.6); }
.tq-card__cover { position: relative; height: 172px; overflow: hidden; background: radial-gradient(120% 120% at 100% 0%, rgba(14,165,233,0.55), transparent 55%), linear-gradient(150deg, #7c3aed, #4c1d95); background-size: cover; background-position: center; }
.tq-card__cover::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 26px 26px; opacity: 0.6; }
.tq-card__cover--img::after { display: none; }
.tq-card__glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; color: rgba(255,255,255,0.95); z-index: 1; transition: transform 0.4s; text-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.tq-card:hover .tq-card__glyph { transform: scale(1.08) rotate(-4deg); }
.tq-card__shine { position: absolute; top: 0; left: -60%; width: 50%; height: 100%; z-index: 2; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent); transition: left 0.6s; }
.tq-card:hover .tq-card__shine { left: 120%; }
.tq-card__badges { position: absolute; top: 0.8rem; left: 0.8rem; z-index: 3; display: flex; gap: 0.4rem; }
.tq-badge { font-family: var(--tq-grot); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3rem 0.6rem; border-radius: 999px; background: rgba(15,11,31,0.55); color: #fff; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(4px); }
.tq-badge--hp { color: #fecdd3; }
.tq-card__body { padding: 1.1rem 1.2rem; flex: 1; }
.tq-card__title { font-family: var(--tq-grot); font-weight: 600; font-size: 1.2rem; margin: 0 0 0.3rem; }
.tq-card__desc { color: var(--tq-muted); font-size: 0.92rem; line-height: 1.5; margin: 0 0 0.8rem; }
.tq-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tq-chip { font-size: 0.76rem; color: #4b4560; background: rgba(124,58,237,0.07); border: 1px solid rgba(124,58,237,0.14); padding: 0.25rem 0.55rem; border-radius: 8px; }
.tq-card__foot { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.2rem; border-top: 1px solid rgba(20,16,40,0.08); }
.tq-price { font-family: var(--tq-grot); font-weight: 700; font-size: 1.15rem; }
.tq-cta { font-family: var(--tq-grot); font-weight: 600; color: var(--tq-v2); display: inline-flex; align-items: center; gap: 0.4rem; transition: gap 0.25s; }
.tq-card:hover .tq-cta { gap: 0.7rem; }

/* ===== EMPTY STATE ===== */
.tq-empty { text-align: center; padding: 3rem 1rem; color: var(--tq-muted); }
.tq-empty__icon { font-size: 2rem; color: var(--tq-v); margin-bottom: 0.6rem; }
.tq-empty__title { font-family: var(--tq-grot); font-weight: 600; color: var(--tq-ink); margin: 0; }

/* ===== DETAIL: phase map upgrade ===== */
.tq-map { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 1rem 0 0; }
.tq-map__node { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--tq-grot); font-weight: 700; color: var(--tq-v2); background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.18); transition: transform 0.2s; }
.tq-map__node:hover { transform: translateY(-3px); }
.tq-map__node.is-start { background: var(--tq-grad); color: #fff; border-color: transparent; }
.tq-map__node.is-finish { background: #100d1f; color: #fde047; border-color: rgba(253,224,71,0.4); }

@media (max-width: 800px) {
  .tq-hero__inner { grid-template-columns: 1fr; }
  .tq-props { display: none; }
  .tq-steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tq-eyebrow .tq-dot, .tq-prop { animation: none; }
  .tq-card, .tq-step, .tq-map__node, .tq-card__glyph, .tq-card__shine, .tq-cta { transition: none; }
}
