/* ==========================================
   BASE & GLOBAL LAYOUT STYLES
   ========================================== */

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  background-color: #000000;
}

/* Lenis Smooth Scroll Engine Styles */
html.lenis, html.lenis body {
  height: auto;
  background-color: #000000;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  background-color: #000000;
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden !important;
  overflow-y: auto;
}

/* Custom Cursor System */
*,
*::before,
*::after {
  cursor: none !important;
}

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 2000000 !important;
  transform: translate3d(-100px, -100px, 0);
  transition: filter 0.2s ease, opacity 0.2s ease;
  will-change: transform;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.85));
}

.custom-cursor-dot svg {
  width: 100%;
  height: 100%;
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 70%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1999999 !important;
  transform: translate(-30%, -30%);
  will-change: transform;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.25), 0 0 15px rgba(255, 255, 255, 0.15);
}

.custom-cursor-follower.hovering,
.custom-cursor-follower.text-hover-lens {
  width: 68px;
  height: 68px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 65%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(3px) saturate(1.15);
  -webkit-backdrop-filter: blur(3px) saturate(1.15);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.35), 0 0 25px rgba(255, 255, 255, 0.3);
}

.custom-cursor-dot.hovering {
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.9));
}

.custom-cursor-dot.cursor-hidden,
.custom-cursor-follower.cursor-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* HIDE TRACING FOLLOWER BALL WHEN CURSOR IS INSIDE CHAT BOX, ORB WIDGET, OR WHEN CHAT BOX IS EXPANDED */
body:has(.ai-chat-widget:hover) .custom-cursor-follower,
body:has(.ai-chat-widget.expanded) .custom-cursor-follower,
body:has(.system-control-orb:hover) .custom-cursor-follower {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ai-chat-widget,
.ai-chat-widget *,
html, body, a, button, input, textarea, select, label, [role="button"], *, *::before, *::after {
  cursor: none !important;
}

/* CLEAN LIGHTWEIGHT ZERO-GPU TEXT HOVER STATE */
.glass-spotlight-active {
  text-shadow: none !important;
}

/* HIDE CUSTOM DESKTOP CURSOR ON MOBILE TOUCH SCREENS & RESTORE DEFAULT TOUCH CURSOR */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .custom-cursor-dot,
  .custom-cursor-follower {
    display: none !important;
  }
  *, *::before, *::after, html, body, a, button, input, textarea, select {
    cursor: auto !important;
  }
}

