/* ==========================================================================
   OpenWaveNetworks - Foundational Stylesheet & Design System
   ========================================================================== */

/* Import components and responsive styles */
@import url('components.css?v=13');
@import url('responsive.css?v=13');
@import url('style-effects.css?v=13');

/* Import modern typography from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #1e2026;
  --bg-secondary: #272930;
  --bg-tertiary: #32353e;
  
  --text-primary: #f5f6f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Brand Accents */
  --orange-primary: #f37a22;
  --orange-secondary: #ff8e3c;
  --orange-glow: rgba(243, 122, 34, 0.15);
  
  --cyan-primary: #00f2fe;
  --cyan-secondary: #4facfe;
  --cyan-glow: rgba(0, 242, 254, 0.15);
  
  /* Gradients */
  --grad-orange: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-secondary) 100%);
  --grad-cyan: linear-gradient(135deg, var(--cyan-primary) 0%, var(--cyan-secondary) 100%);
  --grad-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  --grad-accent: linear-gradient(135deg, var(--orange-primary) 0%, var(--cyan-secondary) 100%);
  
  /* Border & Glassmorphism */
  --border-color: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.15);
  --glass-bg: rgba(30, 32, 38, 0.7);
  --glass-blur: blur(12px);
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  /* Fonts */
  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  
  /* Layout */
  --header-height: 64px;
  --container-width: 1200px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button, input, select, textarea {
  font-family: inherit;
  background: none;
  border: none;
  outline: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--orange-primary);
}

/* ==========================================================================
   Preloader & Transitions
   ========================================================================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  pointer-events: auto;
}

.preloader-panel {
  position: absolute;
  top: 0;
  width: 50vw;
  height: 100vh;
  background-color: var(--bg-primary);
  overflow: hidden;
  transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.preloader-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.12);
  width: 120px;
  height: 120px;
  border: 3px solid var(--orange-primary);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  animation: revealRingPulse 1.8s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.preloader-ring:nth-child(2) {
  animation-delay: 0.6s;
}

.preloader-ring:nth-child(3) {
  animation-delay: 1.2s;
}

@keyframes revealRingPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.12);
    opacity: 0.95;
    box-shadow: 0 0 15px rgba(243, 122, 34, 0.6);
  }
  100% {
    transform: translate(-50%, -50%) scale(8);
    opacity: 0;
    box-shadow: 0 0 50px rgba(243, 122, 34, 0);
  }
}

.left-panel {
  left: 0;
}

.right-panel {
  right: 0;
}

.preloader.loaded .left-panel {
  transform: translateX(-100%);
}

.preloader.loaded .right-panel {
  transform: translateX(100%);
}

.preloader.loaded {
  pointer-events: none;
}

.preloader.loaded .preloader-ring {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(0) !important;
  transition: opacity 0.4s ease, transform 0.4s ease !important;
  animation: none !important;
}

.preloader-content-half {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.left-half {
  right: -240px;
}

.right-half {
  left: -240px;
}

.preloader-logo {
  width: 480px;
  height: auto;
  max-width: none;
  transition: opacity 0.3s ease;
  animation: logoPulse 2.5s infinite ease-in-out;
}

.preloader.blink .preloader-logo {
  animation: logoBlinkEffect 0.6s ease-in-out forwards;
}

.preloader-slogan {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 18px;
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  width: 100%;
}

.preloader.show-slogan .preloader-slogan {
  opacity: 1;
  transform: translateY(0);
}

.preloader-progress-container {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  margin-top: 28px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.preloader.show-slogan .preloader-progress-container {
  opacity: 1;
}

.preloader-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--orange-gradient);
  transition: width 2.0s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader.start-progress .preloader-progress-bar {
  width: 100%;
}

.preloader-percentage {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 14px;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  width: 100%;
}

.preloader.show-slogan .preloader-percentage {
  opacity: 1;
  transform: translateY(0);
}

/* Light Theme overrides for preloader */
body.light-theme .preloader-slogan {
  color: rgba(15, 23, 42, 0.65) !important;
  text-shadow: none !important;
}

body.light-theme .preloader-percentage {
  color: rgba(15, 23, 42, 0.85) !important;
}

body.light-theme .preloader-progress-container {
  background: rgba(15, 23, 42, 0.08) !important;
}

@keyframes logoPulse {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(243, 122, 34, 0.2)) brightness(1);
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(243, 122, 34, 0.5)) brightness(1.05);
    transform: scale(1.01);
  }
}

@keyframes logoBlinkEffect {
  0% { opacity: 1; filter: brightness(1); }
  25% { opacity: 0.05; filter: brightness(2); }
  50% { opacity: 1; filter: brightness(2) drop-shadow(0 0 20px var(--orange-primary)); }
  75% { opacity: 0.15; filter: brightness(1); }
  100% { opacity: 1; filter: brightness(1); }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: transparent;
  transition: var(--transition-smooth);
}

.header.scrolled {
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  height: 52px;
  box-shadow: var(--shadow-glow);
}

.header-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  height: 38px;
  width: auto;
}

.brand-logo svg {
  height: 100%;
  width: auto;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.brand-text span {
  color: var(--orange-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad-orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn.nav-cta {
  background: var(--grad-orange);
  color: var(--text-primary);
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.88rem;
  line-height: 1.2;
  box-shadow: 0 3px 10px var(--orange-glow);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn.nav-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--grad-cyan);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.btn.nav-cta:hover::before {
  opacity: 1;
}

.btn.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--cyan-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background-color: var(--bg-primary);
  overflow: hidden;
}

#wave-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: all;
  opacity: 0.85;
}

.hero-container {
  position: relative;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

.hero-content {
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 81, 47, 0.08);
  border: 1px solid rgba(255, 81, 47, 0.2);
  color: #ff7d63;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-badge .ping {
  width: 8px;
  height: 8px;
  background-color: var(--orange-primary);
  border-radius: 50%;
  position: relative;
}

.hero-badge .ping::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--orange-primary);
  border-radius: 50%;
  animation: pingPulse 1.5s infinite ease-in-out;
}

@keyframes pingPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-title span.accent-orange {
  background: var(--grad-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title span.accent-cyan {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--grad-orange);
  color: var(--text-primary);
  box-shadow: 0 4px 20px var(--orange-glow);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--grad-cyan);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--cyan-glow);
}

.btn-secondary {
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-glow-sphere {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 81, 47, 0.15) 0%, rgba(79, 172, 254, 0.05) 50%, rgba(0, 0, 0, 0) 70%);
  filter: blur(40px);
  z-index: -1;
  animation: float 6s infinite ease-in-out;
}

.hero-wave-animation {
  width: 100%;
  max-width: 350px;
  height: 350px;
  position: relative;
}

.wave-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 81, 47, 0.2);
  border-radius: 50%;
  animation: ripple 4s infinite linear;
}

.wave-ring:nth-child(2) {
  animation-delay: 1.33s;
  border-color: rgba(79, 172, 254, 0.2);
}

.wave-ring:nth-child(3) {
  animation-delay: 2.66s;
  border-color: rgba(255, 255, 255, 0.1);
}

@keyframes ripple {
  0% {
    width: 50px;
    height: 50px;
    opacity: 0.8;
  }
  100% {
    width: 350px;
    height: 350px;
    opacity: 0;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.05); }
}

/* ==========================================================================
   Stats Banner
   ========================================================================== */
.stats {
  padding: 60px 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
}

.stats-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  background: var(--grad-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.stat-item:nth-child(even) .stat-number {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   Services Grid Section
   ========================================================================== */
.section {
  padding: 120px 0;
  position: relative;
}

.section-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 70px auto;
}

.section-badge {
  color: var(--orange-primary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.service-card {
  flex: 1 1 350px;
  max-width: 380px;
  background-color: rgba(13, 15, 22, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 81, 47, 0.05) 0%, rgba(0, 0, 0, 0) 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

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

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 81, 47, 0.3);
  box-shadow: 0 12px 40px rgba(255, 81, 47, 0.08);
}

.service-card:nth-child(even):hover {
  border-color: rgba(79, 172, 254, 0.3);
  box-shadow: 0 12px 40px rgba(79, 172, 254, 0.08);
}
.service-card:nth-child(even)::before {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.05) 0%, rgba(0, 0, 0, 0) 50%);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 81, 47, 0.1);
  color: var(--orange-primary);
  margin-bottom: 24px;
  font-size: 1.5rem;
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 81, 47, 0.2);
}

.service-card:nth-child(even) .service-icon {
  background: rgba(79, 172, 254, 0.1);
  color: var(--cyan-secondary);
  border-color: rgba(79, 172, 254, 0.2);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--grad-orange);
  color: var(--text-primary);
  box-shadow: 0 8px 20px var(--orange-glow);
}

.service-card:nth-child(even):hover .service-icon {
  background: var(--grad-cyan);
  color: var(--text-primary);
  box-shadow: 0 8px 20px var(--cyan-glow);
}

.service-title {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.service-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--orange-primary);
  margin-top: auto;
}

.service-card:nth-child(even) .service-link {
  color: var(--cyan-secondary);
}

.service-link span {
  transition: transform 0.3s ease;
}

.service-card:hover .service-link span {
  transform: translateX(4px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 30px 0;
  position: relative;
  z-index: 10;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  height: 40px;
  margin-bottom: 20px;
  display: inline-block;
}

.footer-logo svg {
  height: 100%;
  width: auto;
}

.footer-brand-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.social-link:hover {
  background-color: var(--orange-primary);
  color: var(--text-primary);
}
