/* ============================================================
   INVIXUS.TECH — Design System
   ============================================================ */

:root {
  --bg-void:        #050508;
  --bg-dark:        #08080f;
  --surface:        #0f0f1a;
  --surface-raised: #141428;
  --border:         rgba(0, 255, 255, 0.12);
  --border-bright:  rgba(0, 255, 255, 0.35);

  --cyan:           #00ffff;
  --cyan-dim:       rgba(0, 255, 255, 0.35);
  --cyan-faint:     rgba(0, 255, 255, 0.08);
  --electric-blue:  #0066ff;
  --neon-purple:    #7b2fff;
  --accent-green:   #00ff88;
  --accent-orange:  #ff6600;

  --text-primary:   #e8eaf0;
  --text-secondary: #7a8499;
  --text-dim:       #3a4255;

  --font-display:   'Orbitron', sans-serif;
  --font-mono:      'Share Tech Mono', monospace;

  --section-pad-x:  clamp(2rem, 6vw, 7rem);

  --glow-cyan:      0 0 12px rgba(0,255,255,0.6), 0 0 30px rgba(0,255,255,0.3), 0 0 60px rgba(0,255,255,0.12);
  --glow-blue:      0 0 15px rgba(0,102,255,0.5), 0 0 40px rgba(0,102,255,0.2);
  --glow-purple:    0 0 15px rgba(123,47,255,0.5), 0 0 40px rgba(123,47,255,0.2);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto; /* GSAP handles scrolling */
  overflow-x: hidden;
}

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.6;
  cursor: none;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0, 255, 255, 0.012) 3px,
    rgba(0, 255, 255, 0.012) 4px
  );
  pointer-events: none;
  z-index: 500;
}

/* Vignette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 499;
}

/* ============================================================
   WEBGL CANVAS
   ============================================================ */
#webgl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  cursor: grab;
  touch-action: none;
}
#webgl:active {
  cursor: grabbing;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
#cursor-dot {
  position: fixed;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: var(--glow-cyan);
  will-change: transform;
  transition: transform 0.05s linear;
}

#cursor-ring {
  position: fixed;
  top: -18px;
  left: -18px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cyan-dim);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  will-change: transform;
  transition: width 0.25s ease, height 0.25s ease,
              top 0.25s ease, left 0.25s ease,
              border-color 0.25s ease, opacity 0.25s ease;
}

#cursor-ring.hovering {
  width: 60px;
  height: 60px;
  top: -30px;
  left: -30px;
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

/* End-effector IK hover: orange ring signals "grab for IK" */
#cursor-ring.ik-hover {
  width: 72px;
  height: 72px;
  top: -36px;
  left: -36px;
  border-color: #ff6600;
  box-shadow: 0 0 20px rgba(255,102,0,0.6), 0 0 40px rgba(255,102,0,0.3);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--section-pad-x);
  background: linear-gradient(to bottom, rgba(5,5,8,0.95) 0%, transparent 100%);
}

#nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  -webkit-user-select: none;
  user-select: none;
}

.logo-inv   { color: var(--text-primary); }
.logo-ix    { color: var(--cyan); }
.logo-dot   { color: var(--cyan); opacity: 0.6; }
.logo-tech  { color: var(--text-secondary); font-weight: 400; font-size: 0.75em; }

#nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

#nav-links li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

#nav-links li.active {
  text-shadow: 0 0 8px rgba(0,255,255,0.5);
}

.nav-num {
  color: var(--text-dim);
  font-size: 0.6rem;
}

#nav-links li.active .nav-num {
  color: var(--cyan-dim);
}

.nav-contact-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-contact-link:hover {
  color: var(--cyan);
}

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.04);
  z-index: 300;
}

#scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--electric-blue), var(--cyan));
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.1s linear;
}

/* Section indicator */
#section-indicator {
  position: fixed;
  bottom: 2rem;
  right: var(--section-pad-x);
  z-index: 200;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#section-current {
  color: var(--cyan);
  font-weight: 700;
  font-size: 1.1rem;
}

.indicator-sep {
  opacity: 0.3;
}

/* ============================================================
   SCROLL CONTAINER + PANELS
   ============================================================ */
#scroll-container {
  position: relative;
  height: 500vh;
  z-index: 1;
}

.panel {
  /*
   * CSS sticky handles the visual pinning (no overflow:hidden — that clips titles).
   * GSAP ScrollTrigger fires text animations via callbacks only (no pin:true).
   */
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.panel-content {
  position: relative;
  z-index: 10;
  max-width: 480px;
  padding-left: var(--section-pad-x);
  padding-top: 5rem; /* clear nav */
  pointer-events: all;
  will-change: transform;
}

.panel-content--wide {
  max-width: 100%;
  padding-right: var(--section-pad-x);
}

/* Eyebrow label */
.panel-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.panel-eyebrow::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}

.eyebrow-num {
  color: var(--text-dim);
  font-size: 0.55rem;
}

/* Main title */
.panel-title {
  font-family: var(--font-display);
  /*
   * Never use white-space:nowrap — it clips against overflow:hidden on parent.
   * clamp: min 1.8rem | fluid 3.8vw | max 3.8rem
   * At 1280px: 3.8vw = 48.6px → "Manipulators" ≈ 380px, fits in 480px container.
   * At 1600px: capped at 3.8rem = 60.8px.
   */
  font-size: clamp(1.8rem, 3.8vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  background: linear-gradient(140deg, #ffffff 0%, #b0c4d8 40%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sub paragraph */
.panel-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 380px;
}

/* Specs list */
.panel-specs {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.5rem;
  margin-bottom: 2.5rem;
}

.panel-specs li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.spec-label {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.spec-val {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* CTA Button */
.cta-btn {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg-void);
  background: var(--cyan);
  border: none;
  padding: 0.9rem 2.2rem;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.35s ease, transform 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: -110%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transition: top 0.45s ease;
}

.cta-btn:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.cta-btn:hover::before {
  top: 110%;
}

/* Panel horizontal scan line (decorative) */
.panel-scan-line {
  position: absolute;
  bottom: 15%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  pointer-events: none;
}

/* ============================================================
   SERVICES SECTION (Section 4)
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
  max-width: 900px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.8rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at top left, var(--cyan-faint) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 30px rgba(0,255,255,0.06);
  transform: translateY(-3px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card-icon {
  width: 32px;
  height: 32px;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.service-card-icon svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.service-tags span {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  background: var(--cyan-faint);
}

/* D3 container */
.d3-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.d3-panel {
  flex: 1;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  position: relative;
}

.d3-label {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

#d3-network {
  width: 100%;
  height: 240px;
  display: block;
}

#d3-radial {
  width: 100%;
  height: 240px;
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  position: relative;
  z-index: 10;
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 4rem var(--section-pad-x);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-copy {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* ============================================================
   MOBILE HAMBURGER BUTTON
   ============================================================ */
#nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 0.4rem;
  z-index: 210;
}

#nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cyan);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav-hamburger.open span:nth-child(2) { opacity: 0; }
#nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav drawer */
#mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5,5,8,0.97);
  z-index: 205;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

#mobile-nav-drawer.open {
  display: flex;
}

#mobile-nav-drawer li {
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: none;
  transition: color 0.2s ease;
}

#mobile-nav-drawer li:hover,
#mobile-nav-drawer li.active {
  color: var(--cyan);
}

#mobile-nav-drawer .nav-num {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-right: 0.6rem;
}

/* ============================================================
   TABLET  (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --section-pad-x: 2rem;
  }

  #nav-links   { display: none; }
  #nav-contact { display: none; }
  #nav-hamburger { display: flex; }

  .panel-title {
    font-size: clamp(1.9rem, 5.5vw, 3.8rem);
    white-space: normal;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

  /* Move panel content higher so it clears nav and 3D scene */
  .panel-content {
    max-width: 420px;
  }
}

/* ============================================================
   PHONE  (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
  :root {
    --section-pad-x: 1.2rem;
  }

  /* Nav */
  #nav {
    padding: 1rem var(--section-pad-x);
  }
  #nav-logo { font-size: 0.95rem; }
  #nav-hamburger { display: flex; }

  /* Canvas is behind content on mobile — let native scroll pass through */
  #webgl { touch-action: pan-y; pointer-events: none; }

  /* Force vertical-pan scroll on every layer so no element swallows touches */
  html, body, #scroll-container, .panel, .panel-content {
    touch-action: pan-y !important;
  }

  /* Panel layout — stack content bottom-left */
  .panel {
    align-items: flex-end;
  }

  .panel-content {
    max-width: 100%;
    width: 100%;
    padding-left: var(--section-pad-x);
    padding-right: var(--section-pad-x);
    padding-top: 0;
    padding-bottom: 5rem; /* clear section indicator */
    overflow-y: visible;
    max-height: none;
    /* subtle backdrop so text is readable over 3D */
    background: linear-gradient(
      to top,
      rgba(5,5,8,0.92) 0%,
      rgba(5,5,8,0.75) 60%,
      transparent 100%
    );
  }

  /* Title */
  .panel-title {
    font-size: clamp(1.7rem, 8.5vw, 2.6rem);
    white-space: normal;
    line-height: 1.1;
    margin-bottom: 0.9rem;
  }

  /* Eyebrow */
  .panel-eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.25em;
    margin-bottom: 0.8rem;
  }

  /* Sub */
  .panel-sub {
    font-size: 0.72rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
  }

  /* Specs grid → 2 columns still but compact */
  .panel-specs {
    gap: 0.4rem 1rem;
    margin-bottom: 1.5rem;
  }

  .spec-label { font-size: 0.5rem; }
  .spec-val   { font-size: 0.72rem; }

  /* CTA button */
  .cta-btn {
    font-size: 0.6rem;
    padding: 0.75rem 1.6rem;
    /* Remove angled clip-path on mobile (cleaner) */
    clip-path: none;
  }

  /* Services section */
  .panel-content--wide {
    padding-bottom: 2rem;
    max-height: 80vh;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
  }

  .service-card {
    padding: 1.1rem 1rem;
    /* Remove angled clip on mobile */
    clip-path: none;
  }

  .service-title { font-size: 0.8rem; }
  .service-desc  { font-size: 0.65rem; margin-bottom: 0.7rem; }

  .service-tags span { font-size: 0.5rem; padding: 0.15rem 0.45rem; }

  /* D3 charts */
  .d3-container {
    flex-direction: column;
    gap: 0.8rem;
  }

  .d3-panel { min-width: unset; width: 100%; }

  #d3-network { height: 180px; }
  #d3-radial  { height: 180px; }

  /* Section indicator */
  #section-indicator {
    right: var(--section-pad-x);
    bottom: 1.2rem;
    font-size: 0.6rem;
  }

  #section-current { font-size: 0.9rem; }

  /* Scroll progress */
  #scroll-progress { height: 1.5px; }

  /* Hide scanline on mobile (perf) */
  body::after { display: none; }

  /* Hide joint control panel on mobile — sliders block the view */
  #joint-ctrl { display: none !important; }
}

/* ============================================================
   UTILITY / ANIMATION HELPERS
   ============================================================ */

/* GSAP will-change hints */
.panel-content,
.panel-title,
.panel-eyebrow,
.panel-sub,
.panel-specs,
.cta-btn {
  will-change: transform, opacity;
}

/* Hidden state for GSAP entry animations (set via JS) */
.gsap-hidden {
  opacity: 0;
  transform: translateY(30px);
}

/* Glitch text effect on hover (for logo) */
#nav-logo:hover .logo-inv {
  animation: glitch 0.3s steps(2) both;
}

@keyframes glitch {
  0%   { clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%); transform: translate(-2px, 0); }
  25%  { clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%); transform: translate(2px, 0); }
  50%  { clip-path: polygon(0 20%, 100% 20%, 100% 50%, 0 50%); transform: translate(-1px, 0); }
  75%  { clip-path: polygon(0 50%, 100% 50%, 100% 80%, 0 80%); transform: translate(1px, 0); }
  100% { clip-path: none; transform: translate(0, 0); }
}

/* Loading overlay */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.8s ease;
}

#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

.loading-bar-wrap {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: var(--cyan);
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px var(--cyan);
}

.loading-text {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ============================================================
   JOINT CONTROL PANEL (manipulator section)
   ============================================================ */
#joint-ctrl {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 220px;
  background: rgba(5, 5, 8, 0.88);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity 0.3s ease;
}
#joint-ctrl.visible { display: flex; }
#joint-ctrl.fading  { opacity: 0; }

.joint-ctrl-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.joint-ctrl-header span:first-child {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.joint-ctrl-model {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.joint-row {
  display: grid;
  grid-template-columns: 52px 1fr 38px;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 2px 0;
  border-radius: 2px;
  transition: background 0.15s;
}
.joint-row:hover { background: rgba(0,255,255,0.04); }
.joint-row.active { background: rgba(0,255,255,0.08); }

.joint-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  line-height: 1.2;
  text-transform: uppercase;
}
.joint-label strong {
  display: block;
  color: var(--cyan);
  font-size: 0.6rem;
}
.joint-label .jname {
  font-size: 0.48rem;
  color: var(--text-dim);
}

.joint-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
}
.joint-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  cursor: pointer;
  transition: transform 0.1s;
}
.joint-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.joint-slider::-moz-range-thumb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  border: none;
  cursor: pointer;
}
.joint-row.active .joint-slider { background: rgba(0,255,255,0.2); }

.joint-val {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
}

.joint-ctrl-footer {
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.4rem;
}
.joint-reset-btn {
  flex: 1;
  padding: 0.3rem 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.joint-reset-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.joint-highlight-info {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-dim);
  text-align: center;
  padding-top: 0.2rem;
  min-height: 0.8rem;
  transition: color 0.2s;
}
.joint-highlight-info.active { color: var(--cyan); }

/* Drag hint */
#drag-hint {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  pointer-events: none;
  animation: hint-fade 4s ease forwards;
}
#drag-hint svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}
@keyframes hint-fade {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}
