/* ═══════════════════════════════════════════════════════════════
   SIVION AI — Core Design System CSS
   Cinematic Brutalism · The Void Protocol
   ═══════════════════════════════════════════════════════════════ */

/* === CINEMATIC LOADER === */
#sivion-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #030508;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
}
#sivion-loader::before {
  content: '';
  position: absolute; inset: 0;
  background: 
    linear-gradient(180deg, rgba(0,207,181,0.03) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(0,207,181,0.04) 0%, transparent 70%);
  pointer-events: none;
}
#sivion-loader::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,207,181,0.008) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  animation: loader-scanline 8s linear infinite;
}
@keyframes loader-scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}
#sivion-loader.fade-out { 
  opacity: 0; 
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Loader Mark (SVG) */
.loader-mark { position: relative; z-index: 2; }
.loader-mark svg { width: 100px; height: 100px; }
.loader-mark circle {
  stroke: #00CFB5; fill: none;
  stroke-width: 2;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  filter: drop-shadow(0 0 6px rgba(0,207,181,0.5));
}
.loader-mark .hex-path {
  stroke: #00CFB5; fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  opacity: 0.6;
}
.loader-mark .cross-path {
  stroke: #00CFB5; fill: none;
  stroke-width: 1;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  opacity: 0.3;
}

/* Loader Pulse Ring */
.loader-pulse-ring {
  position: absolute;
  width: 140px; height: 140px;
  border: 1px solid rgba(0,207,181,0.15);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring 2s ease-out infinite;
}
.loader-pulse-ring:nth-child(2) { animation-delay: 0.5s; }
.loader-pulse-ring:nth-child(3) { animation-delay: 1s; }
@keyframes pulse-ring {
  0% { width: 100px; height: 100px; opacity: 0.6; }
  100% { width: 220px; height: 220px; opacity: 0; }
}

/* Loader Text */
.loader-wordmark {
  font-family: 'Syne', 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: #EEF1F5;
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateY(16px);
  position: relative; z-index: 2;
  text-shadow: 0 0 40px rgba(0,207,181,0.3);
}
.loader-tagline {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1rem;
  color: #6B8090;
  opacity: 0;
  margin-top: 8px;
  position: relative; z-index: 2;
}
.loader-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(0,207,181,0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 24px;
  opacity: 0;
  position: relative; z-index: 2;
}
.loader-progress {
  width: 240px; height: 2px;
  background: #152436;
  margin-top: 16px;
  overflow: hidden;
  position: relative; z-index: 2;
}
.loader-progress-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #00CFB5, #00E5C8);
  box-shadow: 0 0 12px rgba(0,207,181,0.6);
}
.loader-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #00CFB5;
  letter-spacing: 0.1em;
  margin-top: 12px;
  opacity: 0;
  position: relative; z-index: 2;
}
.loader-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: rgba(0,207,181,0.2);
  border-style: solid;
  border-width: 0;
}
.loader-corner.tl { top: 30px; left: 30px; border-top-width: 1px; border-left-width: 1px; }
.loader-corner.tr { top: 30px; right: 30px; border-top-width: 1px; border-right-width: 1px; }
.loader-corner.bl { bottom: 30px; left: 30px; border-bottom-width: 1px; border-left-width: 1px; }
.loader-corner.br { bottom: 30px; right: 30px; border-bottom-width: 1px; border-right-width: 1px; }

/* === ENHANCED CUSTOM CURSOR === */
.custom-cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: #00CFB5;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(0.19,1,0.22,1), 
              height 0.25s cubic-bezier(0.19,1,0.22,1), 
              background 0.25s, 
              border 0.25s,
              opacity 0.25s;
  mix-blend-mode: difference;
}
.custom-cursor::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: rgba(0,207,181,0.6);
  transform: translate(-50%, -50%);
  filter: blur(4px);
}
.custom-cursor-ring {
  position: fixed;
  width: 40px; height: 40px;
  border: 1px solid rgba(0,207,181,0.25);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.19,1,0.22,1),
              height 0.4s cubic-bezier(0.19,1,0.22,1),
              border-color 0.3s,
              opacity 0.3s;
}
.custom-cursor-ring::before {
  content: '';
  position: absolute; inset: -4px;
  border: 1px solid rgba(0,207,181,0.08);
}
body { cursor: none; }
a, button, [role="button"], input, textarea, select { cursor: none; }

/* Cursor Hover States */
.cursor-hover .custom-cursor {
  width: 20px; height: 20px;
  background: transparent;
  border: 2px solid #00CFB5;
  mix-blend-mode: normal;
}
.cursor-hover .custom-cursor::after { display: none; }
.cursor-hover .custom-cursor-ring {
  width: 56px; height: 56px;
  border-color: rgba(0,207,181,0.15);
}
.cursor-text .custom-cursor {
  width: 2px; height: 24px;
  background: #00CFB5;
  border-radius: 0;
}
.cursor-text .custom-cursor-ring { opacity: 0; }

/* === ANIMATED NAV LOGO === */
.nav-logo-svg circle {
  transition: all 0.4s cubic-bezier(0.19,1,0.22,1);
  filter: drop-shadow(0 0 3px rgba(0,207,181,0.3));
}
.nav-logo-svg:hover circle {
  filter: drop-shadow(0 0 8px rgba(0,207,181,0.7));
}
.nav-logo-svg .hex-outline {
  stroke-dasharray: 300;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.19,1,0.22,1);
}
.nav-logo-svg:hover .hex-outline {
  stroke-dashoffset: 300;
  animation: logo-draw 1.2s cubic-bezier(0.19,1,0.22,1) forwards;
}
@keyframes logo-draw {
  0% { stroke-dashoffset: 300; }
  100% { stroke-dashoffset: 0; }
}
.nav-logo-svg circle {
  animation: logo-node-pulse 3s ease-in-out infinite;
}
.nav-logo-svg circle:nth-child(1) { animation-delay: 0s; }
.nav-logo-svg circle:nth-child(2) { animation-delay: 0.5s; }
.nav-logo-svg circle:nth-child(3) { animation-delay: 1s; }
.nav-logo-svg circle:nth-child(4) { animation-delay: 1.5s; }
.nav-logo-svg circle:nth-child(5) { animation-delay: 2s; }
.nav-logo-svg circle:nth-child(6) { animation-delay: 2.5s; }
@keyframes logo-node-pulse {
  0%, 100% { r: 4; opacity: 1; }
  50% { r: 5; opacity: 0.7; filter: drop-shadow(0 0 6px rgba(0,207,181,0.8)); }
}

/* === SCANLINES & TEXTURES === */
.scanlines {
  background: linear-gradient(to bottom, transparent 50%, rgba(0,207,181,0.012) 50%);
  background-size: 100% 4px;
}
.dot-grid {
  background-image: radial-gradient(rgba(0,207,181,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.text-glow { text-shadow: 0 0 30px rgba(0,207,181,0.35); }
.teal-ambient { box-shadow: 0 0 40px rgba(0,207,181,0.08); }
.teal-hover-glow:hover {
  box-shadow: 0 0 30px rgba(0,207,181,0.25);
  border-color: #00CFB5 !important;
  transform: translateY(-8px);
}

/* === MARQUEE === */
.marquee-track { display: flex; animation: marquee-scroll 35s linear infinite; gap: 1rem; padding-right: 1rem; }
.marquee-track-reverse { display: flex; animation: marquee-scroll-reverse 35s linear infinite; gap: 1rem; padding-right: 1rem; }
.marquee-track:hover, .marquee-track-reverse:hover { animation-play-state: paused; }
@keyframes marquee-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes marquee-scroll-reverse { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* === GLOBE CONTAINER === */
.globe-container { position: relative; width: 100%; aspect-ratio: 1/1; max-width: 600px; margin: 0 auto; }
.globe-container canvas { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1s ease; }

/* === CURSOR BLINK === */
.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* === REVEAL ANIMATION === */
.reveal-up { opacity: 0; transform: translateY(40px); }
.hero-reveal, .hero-visual-container { transform: translateY(40px); }

/* === NAV GLASSMORPHISM === */
.nav-glass {
  background: rgba(3,5,8,0.85);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

/* === PARTICLE CANVAS === */
#particle-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* === MATERIAL SYMBOLS === */
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; }

/* === SELECTION === */
::selection { background: #00CFB5; color: #030508; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #030508; }
::-webkit-scrollbar-thumb { background: #152436; }
::-webkit-scrollbar-thumb:hover { background: #00CFB5; }

/* === MOBILE CURSOR FIX === */
@media (hover: none) {
  .custom-cursor, .custom-cursor-ring { display: none !important; }
  body, a, button { cursor: auto; }
}

/* === SCANNING LINE EFFECT === */
.scan-line-effect {
  position: relative;
  overflow: hidden;
}
.scan-line-effect::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,207,181,0.4), transparent);
  animation: scan-move 4s ease-in-out infinite;
}
@keyframes scan-move {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* === HUD GRID BACKGROUND === */
.hud-grid {
  background-image: 
    linear-gradient(rgba(0,207,181,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,207,181,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* === ENHANCED NAV LOGO LOADING ANIMATION === */
@keyframes ultimate-spin {
  0% { transform: rotate(0deg) scale(0.95); }
  50% { transform: rotate(180deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(0.95); }
}

@keyframes ultimate-node-glitch {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(0,207,181,0.5)); transform: scale(1); opacity: 0.7; }
  10%, 14% { filter: drop-shadow(0 0 15px rgba(0,207,181,1)); transform: scale(1.4); opacity: 1; fill: #fff; }
  12%, 16% { filter: drop-shadow(0 0 4px rgba(0,207,181,0.8)); transform: scale(1.1); opacity: 0.9; fill: #00CFB5; }
}

@keyframes ultimate-data-flow {
  0% { stroke-dashoffset: 300; filter: drop-shadow(0 0 2px rgba(0,207,181,0.4)); opacity: 0.6; }
  50% { filter: drop-shadow(0 0 8px rgba(0,207,181,1)); opacity: 1; }
  100% { stroke-dashoffset: 0; filter: drop-shadow(0 0 2px rgba(0,207,181,0.4)); opacity: 0.6; }
}

.nav-logo-svg {
  animation: ultimate-spin 24s linear infinite;
  transform-origin: 50% 50%;
  overflow: visible;
}

.nav-logo-svg circle {
  transform-origin: center;
  transform-box: fill-box;
  animation: ultimate-node-glitch 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* Highly randomized delays and durations for an organic, computing "brain" feel */
.nav-logo-svg circle:nth-of-type(1) { animation-delay: 0.0s; animation-duration: 4.1s; }
.nav-logo-svg circle:nth-of-type(2) { animation-delay: 1.3s; animation-duration: 5.2s; }
.nav-logo-svg circle:nth-of-type(3) { animation-delay: 0.7s; animation-duration: 4.8s; }
.nav-logo-svg circle:nth-of-type(4) { animation-delay: 2.5s; animation-duration: 6.5s; }
.nav-logo-svg circle:nth-of-type(5) { animation-delay: 1.8s; animation-duration: 5.3s; }
.nav-logo-svg circle:nth-of-type(6) { animation-delay: 0.4s; animation-duration: 4.0s; }

.nav-logo-svg path.hex-outline {
  stroke-dasharray: 4 6 12 6 36 12;
  animation: ultimate-data-flow 6s linear infinite;
  stroke-linecap: round;
}



/* === CORE OFFERINGS === */
.offering-card {
  will-change: transform;
}

/* === HERO SECTION REFINEMENTS === */
/* Hero Spline Container */
.hero-visual-container {
  z-index: 5;
  filter: drop-shadow(0 0 50px rgba(0, 207, 181, 0.1));
}

/* Ensure text remains legible over any background bleed */
#hero-text-container {
  position: relative;
  z-index: 10;
}

@media (max-width: 1023px) {
  #hero {
    padding-top: 120px;
    padding-bottom: 60px;
    align-items: flex-start;
  }
  .hero-visual-container {
    height: 450px;
    order: 2;
    margin-top: 2rem;
  }
}

/* === TECH MARQUEE === */
.marquee-content {
  will-change: transform;
}

/* Enhanced Contact Form */
.contact-wrapper {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

#sivion-form input, 
#sivion-form textarea, 
#sivion-form select {
  background: rgba(10, 15, 25, 0.4) !important;
  border-bottom: 2px solid rgba(0, 229, 255, 0.1) !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

#sivion-form input:focus, 
#sivion-form textarea:focus, 
#sivion-form select:focus {
  background: rgba(10, 15, 25, 0.6) !important;
  border-bottom-color: #00E5FF !important;
}

#sivion-form button[type="submit"] {
  background: #00E5FF !important;
  color: #030508 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

#sivion-form button[type="submit"]:hover {
  background: #ffffff !important;
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.5);
  transform: translateY(-2px);
}
