/* ==========================================================================
   NOVUS IDEA — Custom Studio Stylesheet
   Demoscene / VGA Mode X / x86-64 JIT Engineering Theme
   ========================================================================== */

:root {
  --bg-void: #070510;
  --bg-deep: #0c081a;
  --bg-panel: #130d26;
  --bg-card: #181130;
  --bg-card-hover: #1f163d;
  --border-subtle: rgba(5, 129, 218, 0.22);
  --border-cyan: rgba(0, 229, 255, 0.55);
  --border-amber: rgba(255, 176, 0, 0.5);

  --cyan: #00e5ff;
  --itch-blue: #0581da;
  --amber: #ffb000;
  --magenta: #ff2a85;
  --emerald: #00e676;

  --text-main: #f0f4f8;
  --text-muted: #9aa8c7;
  --text-dim: #687796;

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-pixel: 'Press Start 2P', monospace;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Optional CRT Scanline Overlay (toggled via body.crt-enabled) */
body.crt-enabled::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0.22) 4px
  );
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #7df3ff;
}

/* Typography Helpers */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.font-pixel { font-family: var(--font-pixel); }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-tag.tag-amber {
  color: var(--amber);
  background: rgba(255, 176, 0, 0.1);
  border-color: rgba(255, 176, 0, 0.35);
}

.section-tag.tag-emerald {
  color: var(--emerald);
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.35);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 740px;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
#mainNav {
  background: rgba(7, 5, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
  transition: all 0.25s ease;
}

#mainNav.navbar-shrink {
  background: rgba(7, 5, 16, 0.96);
  padding: 0.6rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff !important;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--itch-blue), var(--cyan));
  color: #05030a;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
  padding: 5px;
}

.brand-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#mainNav .nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem !important;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--cyan);
}

.navbar-toggler {
  border: 1px solid var(--border-subtle);
  color: var(--cyan);
  padding: 0.4rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.35);
}

.crt-toggle-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(19, 13, 38, 0.8);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.crt-toggle-btn:hover,
.crt-toggle-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-cyber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.8rem 1.45rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-cyber-primary {
  background: linear-gradient(135deg, var(--itch-blue) 0%, #00b8d4 100%);
  color: #ffffff;
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 4px 20px rgba(5, 129, 218, 0.38);
}

.btn-cyber-primary:hover {
  background: linear-gradient(135deg, #0795ff 0%, var(--cyan) 100%);
  color: #040308;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.5);
}

.btn-cyber-amber {
  background: linear-gradient(135deg, #ff8f00 0%, var(--amber) 100%);
  color: #090612;
  border-color: rgba(255, 213, 79, 0.6);
  box-shadow: 0 4px 20px rgba(255, 176, 0, 0.3);
}

.btn-cyber-amber:hover {
  background: linear-gradient(135deg, var(--amber) 0%, #ffd54f 100%);
  color: #05030a;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 176, 0, 0.45);
}

.btn-cyber-outline {
  background: rgba(19, 13, 38, 0.65);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-cyber-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  transform: translateY(-2px);
}

.btn-cyber-sm {
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
}

/* ==========================================================================
   Hero / Masthead
   ========================================================================== */
.hero-masthead {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex;
  align-items: center;
  padding: 7.5rem 0 5rem;
  background:
    radial-gradient(circle at 50% 22%, rgba(5, 129, 218, 0.22) 0%, transparent 58%),
    radial-gradient(circle at 80% 75%, rgba(255, 42, 133, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #0b0518 0%, var(--bg-void) 100%);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

#beamCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--cyan);
  background: rgba(19, 13, 38, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.hero-title .text-gradient-cyan {
  background: linear-gradient(90deg, #ffffff 0%, var(--cyan) 55%, var(--itch-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 2rem;
}

.hero-telemetry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.telemetry-item {
  background: rgba(19, 13, 38, 0.65);
  border: 1px solid rgba(5, 129, 218, 0.2);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.telemetry-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cyan);
}

.telemetry-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Hero Featured Card */
.hero-spotlight-card {
  background: rgba(19, 13, 38, 0.85);
  border: 1px solid var(--border-cyan);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(5, 129, 218, 0.2);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: rgba(7, 5, 16, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* ==========================================================================
   Section Layout & Panels
   ========================================================================== */
.studio-section {
  padding: 6rem 0;
  position: relative;
}

.section-alt {
  background-color: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.cyber-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.cyber-panel.panel-amber {
  border-color: var(--border-amber);
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.06) 0%, var(--bg-panel) 100%);
}

.cyber-panel.panel-cyan {
  border-color: var(--border-cyan);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.06) 0%, var(--bg-panel) 100%);
}

/* ==========================================================================
   Primary Product: Racing The Beam (#rtb)
   ========================================================================== */
.gallery-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-cyan);
  background: #000;
  aspect-ratio: 16 / 9;
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease;
}

.gallery-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 1rem;
  background: linear-gradient(0deg, rgba(7, 5, 16, 0.92) 0%, rgba(7, 5, 16, 0.5) 75%, transparent 100%);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.gallery-thumb-btn {
  padding: 0;
  border: 2px solid rgba(5, 129, 218, 0.25);
  border-radius: 7px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  opacity: 0.65;
  transition: all 0.2s ease;
}

.gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb-btn:hover,
.gallery-thumb-btn.active {
  opacity: 1;
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

/* Edition Cards (PWYW itch.io vs Steam & Epic P2P Crossplay) */
.edition-card {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.edition-card:hover {
  transform: translateY(-3px);
}

.edition-card.edition-multiplayer {
  border-color: var(--border-amber);
  background: linear-gradient(165deg, rgba(255, 176, 0, 0.09) 0%, var(--bg-card) 55%);
  box-shadow: 0 10px 30px rgba(255, 176, 0, 0.1);
}

.edition-card.edition-itch {
  border-color: var(--border-cyan);
  background: linear-gradient(165deg, rgba(0, 229, 255, 0.08) 0%, var(--bg-card) 55%);
}

.edition-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

.badge-pwyw {
  background: rgba(0, 230, 118, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(0, 230, 118, 0.4);
}

.badge-p2p {
  background: rgba(255, 176, 0, 0.16);
  color: var(--amber);
  border: 1px solid rgba(255, 176, 0, 0.45);
}

.feature-check-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.feature-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
  font-size: 0.93rem;
  color: var(--text-main);
}

.feature-check-list li i {
  margin-top: 0.3rem;
  flex-shrink: 0;
}

/* Spec Pills */
.spec-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.spec-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
}

.spec-pill.pill-cyan {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.28);
}

.spec-pill.pill-amber {
  color: var(--amber);
  background: rgba(255, 176, 0, 0.1);
  border-color: rgba(255, 176, 0, 0.32);
}

/* ==========================================================================
   CyberVGA Engine Architecture Cards (#cybervga)
   ========================================================================== */
.arch-card {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.22s ease;
}

.arch-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.arch-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.arch-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--cyan);
  display: inline-grid;
  place-items: center;
  font-size: 1.1rem;
}

.arch-file-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  background: rgba(255, 176, 0, 0.1);
  border: 1px solid rgba(255, 176, 0, 0.28);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.arch-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.55rem;
}

.arch-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.code-terminal {
  background: #05030a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #d7e3f8;
  overflow-x: auto;
}

.code-terminal .cmd-prompt {
  color: var(--emerald);
  user-select: none;
}

.code-terminal .cmd-comment {
  color: var(--text-dim);
}

/* ==========================================================================
   Games & In-Development Catalog Grid (#games)
   ========================================================================== */
.game-card {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 22px rgba(5, 129, 218, 0.22);
}

.game-card.card-indev {
  border-color: rgba(0, 230, 118, 0.4);
}

.game-card.card-indev:hover {
  border-color: var(--emerald);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 22px rgba(0, 230, 118, 0.2);
}

.game-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #05030a;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.game-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-card:hover .game-thumb-wrap img {
  transform: scale(1.04);
}

.game-status-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.status-browser {
  background: rgba(5, 129, 218, 0.88);
  color: #fff;
  border: 1px solid rgba(0, 229, 255, 0.6);
}

.status-dos {
  background: rgba(255, 176, 0, 0.9);
  color: #080510;
  border: 1px solid #ffd54f;
}

.status-indev {
  background: rgba(0, 230, 118, 0.9);
  color: #04120a;
  border: 1px solid #69f0ae;
}

.game-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-genre-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 0.35rem;
}

.game-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.game-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.game-card-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   About & Contact Sections
   ========================================================================== */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.75rem;
  height: 100%;
  text-align: center;
  transition: all 0.2s ease;
}

.contact-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--cyan);
  display: inline-grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.social-pill:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  transform: translateY(-2px);
}

.studio-footer {
  background: #040209;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}

@media (max-width: 767.98px) {
  .hero-masthead {
    padding: 6.5rem 0 3.5rem;
    min-height: auto;
  }
  .gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
  .cyber-panel {
    padding: 1.35rem;
  }
}
