/* ByteQuest Homepage World — cinematic overlay */

:root {
  --hq-cyan: #00e5ff;
  --hq-blue: #4f7dff;
  --hq-purple: #8a2eff;
  --hq-white: #ffffff;
  --hq-deep: #000000;
  --hq-glass: rgba(8, 10, 18, 0.42);
  --hq-stroke: rgba(255, 255, 255, 0.14);
  --hq-font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

body.hq-active {
  background: var(--hq-deep) !important;
  color: var(--hq-white);
  overflow-x: hidden;
}

body.hq-active .header-top-news,
body.hq-active .rainbow-header,
body.hq-active .header-default,
body.hq-active .my_switcher,
body.hq-active .rainbow-footer,
body.hq-active .copyright-area,
body.hq-active .rbt-progress-parent,
body.hq-active .popup-mobile-menu {
  display: none !important;
}

body.hq-active .page-wrapper {
  background: var(--hq-deep) !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

.hq-world {
  position: relative;
  font-family: var(--hq-font);
  color: var(--hq-white);
  background: var(--hq-deep);
  min-height: 100vh;
}

.hq-world,
.hq-world * {
  box-sizing: border-box;
}

#hq-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  cursor: grab;
}

#hq-canvas:active {
  cursor: grabbing;
}

.hq-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, transparent 30%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 18%, transparent 78%, rgba(0, 0, 0, 0.55) 100%);
}

.hq-grain {
  position: fixed;
  inset: -20%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: hq-grain 1.2s steps(3) infinite;
}

@keyframes hq-grain {
  to { transform: translate3d(3%, -2%, 0); }
}

.hq-aurora-veil {
  position: fixed;
  inset: -30%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 50% 40% at 20% 20%, rgba(0, 229, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 30%, rgba(138, 46, 255, 0.2), transparent 60%),
    radial-gradient(ellipse 45% 40% at 50% 90%, rgba(79, 125, 255, 0.12), transparent 60%);
  animation: hq-veil 22s ease-in-out infinite alternate;
}

@keyframes hq-veil {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(3%, -2%, 0) scale(1.05); }
}

/* Loading */

.hq-loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hq-loading.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hq-loading-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 28px;
  background:
    radial-gradient(circle at 35% 30%, #fff, var(--hq-cyan) 28%, transparent 62%),
    radial-gradient(circle at 70% 70%, var(--hq-purple), transparent 55%);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.45), 0 0 80px rgba(138, 46, 255, 0.35);
  animation: hq-orb 2.4s ease-in-out infinite;
}

@keyframes hq-orb {
  0%, 100% { transform: scale(1); filter: hue-rotate(0deg); }
  50% { transform: scale(1.08); filter: hue-rotate(25deg); }
}

.hq-loading-kicker,
.hq-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.hq-loading-label {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
}

/* Nav */

.hq-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: var(--hq-glass);
  border: 1px solid var(--hq-stroke);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.hq-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.hq-logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.hq-links {
  display: flex;
  gap: 22px;
}

.hq-links a {
  color: rgba(255, 255, 255, 0.72) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.hq-links a:hover {
  color: #fff !important;
}

.hq-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #061018 !important;
  text-decoration: none !important;
  background: linear-gradient(135deg, var(--hq-cyan), var(--hq-blue) 55%, var(--hq-purple));
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.25);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.hq-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.hq-menu-btn {
  display: none;
  width: 40px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
}

.hq-menu-btn span {
  display: block;
  height: 1.5px;
  width: 18px;
  background: #fff;
  border-radius: 2px;
}

.hq-sheet {
  position: fixed;
  top: 72px;
  left: 16px;
  right: 16px;
  z-index: 21;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(6, 8, 14, 0.86);
  border: 1px solid var(--hq-stroke);
  backdrop-filter: blur(24px);
}

.hq-sheet[hidden] {
  display: none !important;
}

.hq-sheet a {
  color: #fff !important;
  text-decoration: none !important;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
}

.hq-sheet a:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Rail */

.hq-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hq-rail button {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hq-rail button.is-active {
  background: var(--hq-cyan);
  transform: scale(1.35);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.7);
}

.hq-rail button span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hq-rail button:hover span,
.hq-rail button.is-active span {
  opacity: 1;
}

.hq-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hq-hint.is-gone {
  opacity: 0;
}

.hq-hint i {
  display: block;
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, var(--hq-cyan), transparent);
  animation: hq-scan 1.6s ease-in-out infinite;
}

@keyframes hq-scan {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Chapters */

.hq-track {
  position: relative;
  z-index: 5;
  pointer-events: none;
}

.hq-chapter {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 8vw 14vh;
}

.hq-chapter.is-hero {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 18vh 8vw 22vh;
  text-align: center;
}

.hq-chapter.is-right {
  justify-content: flex-end;
}

.hq-chapter.is-finale {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 18vh;
}

.hq-hero-copy h1,
.hq-card h2 {
  margin: 12px 0 16px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
  color: #fff;
}

.hq-hero-copy h1 {
  font-size: clamp(42px, 7.4vw, 92px);
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hq-card h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  max-width: 14ch;
}

.hq-lede,
.hq-card p {
  margin: 0;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
  max-width: 42ch;
}

.hq-hero-copy .hq-lede {
  margin-left: auto;
  margin-right: auto;
}

.hq-card {
  pointer-events: auto;
  max-width: 460px;
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: rgba(8, 10, 18, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hq-card-finale {
  max-width: 520px;
  text-align: center;
}

.hq-card-finale h2,
.hq-card-finale p {
  margin-left: auto;
  margin-right: auto;
}

.hq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  pointer-events: auto;
  justify-content: inherit;
}

.is-hero .hq-actions,
.is-finale .hq-actions {
  justify-content: center;
}

.hq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.hq-btn-solid {
  color: #061018 !important;
  background: linear-gradient(135deg, var(--hq-cyan), var(--hq-blue) 50%, var(--hq-purple));
  box-shadow: 0 10px 28px rgba(79, 125, 255, 0.28);
}

.hq-btn-glass {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hq-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.hq-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hq-mini-links a {
  color: rgba(255, 255, 255, 0.84) !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hq-mini-links a:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.4);
}

.hq-noscript {
  position: relative;
  z-index: 6;
  padding: 24px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .hq-grain,
  .hq-aurora-veil,
  .hq-loading-orb,
  .hq-hint i {
    animation: none !important;
  }
}

@media only screen and (max-width: 900px) {
  .hq-links {
    display: none;
  }

  .hq-menu-btn {
    display: flex;
  }

  .hq-nav {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    justify-content: space-between;
  }

  .hq-rail {
    right: 12px;
  }

  .hq-rail button span {
    display: none;
  }

  .hq-chapter,
  .hq-chapter.is-right {
    justify-content: center;
    padding: 0 20px 12vh;
  }

  .hq-hero-copy h1 {
    font-size: clamp(36px, 11vw, 64px);
  }

  .hq-card {
    width: 100%;
  }
}

@media only screen and (max-width: 520px) {
  .hq-cta {
    display: none;
  }

  .hq-actions {
    flex-direction: column;
  }

  .hq-btn {
    width: 100%;
  }
}
