/* ============================================
   WAZED LTD — ENTERPRISE ELECTRICAL ENGINEERING
   Cinematic Industrial Design System
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
  /* Color Palette */
  --deep-graphite: #0C0C0C;
  --electric-blue: #008CFF;
  --gunmetal-silver: #C0C0C0;
  --safety-yellow: #F9D71C;
  --pure-white: #FFFFFF;
  --dark-overlay: rgba(12, 12, 12, 0.85);
  
  /* Typography */
  --font-heading: 'Space Grotesk', 'Eurostile', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Transitions */
  --ease-cinematic: cubic-bezier(0.18, 1, 0.25, 1);
  --ease-power: cubic-bezier(0.65, 0, 0.35, 1);
  
  /* Effects */
  --glow-blue: 0 0 20px rgba(0, 140, 255, 0.5);
  --glow-yellow: 0 0 30px rgba(249, 215, 28, 0.6);
}

[data-theme="dark"] {
  --deep-graphite: #000000;
  --gunmetal-silver: #A0A0A0;
}

[data-theme="light"] {
  --deep-graphite: #FFFFFF;
  --electric-blue: #0056B3;
  --gunmetal-silver: #2C2C2C;
  --safety-yellow: #CC9900;
  --pure-white: #000000;
  --dark-overlay: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] body {
  background: #F8F9FA !important;
  color: #212529 !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #1A1A1A !important;
}

[data-theme="light"] .card {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(0, 86, 179, 0.3) !important;
  color: #2C2C2C !important;
}

[data-theme="light"] .card p {
  color: #4A4A4A !important;
}

[data-theme="light"] .main-nav {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid rgba(0, 86, 179, 0.2);
}

[data-theme="light"] .nav-menu a {
  color: #2C2C2C !important;
}

[data-theme="light"] .nav-menu a:hover,
[data-theme="light"] .nav-menu a.active {
  color: #0056B3 !important;
}

[data-theme="light"] .main-footer {
  background: rgba(248, 249, 250, 0.98) !important;
  border-top-color: rgba(0, 86, 179, 0.3) !important;
}

[data-theme="light"] .footer-section p,
[data-theme="light"] .footer-section a {
  color: #4A4A4A !important;
}

[data-theme="light"] .footer-section h4 {
  color: #0056B3 !important;
}

[data-theme="light"] .technical-text {
  color: #0056B3 !important;
}

[data-theme="light"] .subheading {
  color: #CC9900 !important;
}

[data-theme="light"] .tagline {
  color: #4A4A4A !important;
}

[data-theme="light"] .data-value {
  color: #CC9900 !important;
}

[data-theme="light"] section {
  background: #F8F9FA !important;
}

[data-theme="light"] .hero-bg-layer-1 {
  filter: brightness(1.2) !important;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  background: var(--deep-graphite);
  color: var(--gunmetal-silver);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  cursor: none;
}

a, button, input, textarea, select, .card, .cta-button {
  cursor: none !important;
}

::selection {
  background: var(--electric-blue);
  color: var(--pure-white);
}

/* ===== LINKS ===== */
a {
  color: var(--safety-yellow);
  transition: color 0.3s var(--ease-cinematic);
}

a:visited {
  color: var(--safety-yellow);
}

a:hover {
  color: var(--electric-blue);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--pure-white);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.3;
}

.technical-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--electric-blue);
}

.subheading {
  font-size: 1.125rem;
  color: var(--safety-yellow);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

/* ===== ANIMATED GRADIENT CANVAS ===== */
#gradient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
}

/* ===== NAVIGATION ===== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 5%;
  background: linear-gradient(to bottom, rgba(12, 12, 12, 0.95), transparent);
  backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-cinematic);
}

.main-nav.scrolled {
  background: rgba(12, 12, 12, 0.98);
  padding: 1rem 5%;
  box-shadow: 0 4px 30px rgba(0, 140, 255, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  height: 70px;
  transition: transform 0.3s var(--ease-power);
  filter: drop-shadow(0 0 10px rgba(0, 140, 255, 0.3));
}

.logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 20px rgba(0, 140, 255, 0.8));
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-menu a {
  color: var(--gunmetal-silver);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: color 0.3s var(--ease-cinematic);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--electric-blue), var(--safety-yellow));
  transition: width 0.4s var(--ease-cinematic);
}

.nav-menu a:hover {
  color: var(--pure-white);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--electric-blue);
  transition: all 0.3s var(--ease-power);
}


/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--spacing-md);
  z-index: auto;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-layer {
  position: absolute;
  width: 110%;
  height: 110%;
  left: -5%;
  top: -5%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

.hero-bg-layer-1 {
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-bg-layer-2 {
  background: radial-gradient(circle at 30% 50%, rgba(0, 140, 255, 0.15), transparent 60%);
  z-index: 2;
  animation: pulse-energy 4s ease-in-out infinite;
}

.hero-bg-layer-3 {
  z-index: 3;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 140, 255, 0.03) 2px,
    rgba(0, 140, 255, 0.03) 4px
  );
}

@keyframes pulse-energy {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Lightning Effect */
.lightning-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(0, 140, 255, 0.2) 50%, transparent 70%);
  animation: lightning-flash 8s ease-in-out infinite;
}

@keyframes lightning-flash {
  0%, 100% { opacity: 0; }
  45%, 55% { opacity: 0; }
  48%, 52% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Voltage Lines */
.voltage-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.voltage-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
  opacity: 0;
  animation: voltage-sweep 6s ease-in-out infinite;
  box-shadow: var(--glow-blue);
}

.voltage-line:nth-child(1) {
  top: 20%;
  width: 40%;
  left: 0;
  animation-delay: 0s;
}

.voltage-line:nth-child(2) {
  top: 60%;
  width: 50%;
  right: 0;
  animation-delay: 2s;
}

.voltage-line:nth-child(3) {
  top: 80%;
  width: 35%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes voltage-sweep {
  0%, 100% { opacity: 0; transform: translateX(-100%); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(200%); }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 1200px;
  animation: fadeInUp 1s var(--ease-cinematic);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content .subheading {
  margin-bottom: 1rem;
  animation: fadeInUp 1s var(--ease-cinematic) 0.2s both;
}

.hero-content h1 {
  margin-bottom: 2rem;
  animation: fadeInUp 1s var(--ease-cinematic) 0.4s both;
  text-shadow: 0 0 30px rgba(0, 140, 255, 0.5);
}

.hero-content .tagline {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--gunmetal-silver);
  margin-bottom: 3rem;
  line-height: 1.8;
  animation: fadeInUp 1s var(--ease-cinematic) 0.6s both;
}

/* ===== BUTTONS ===== */
.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--electric-blue), #0066CC);
  color: var(--pure-white);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-cinematic);
  box-shadow: 0 4px 15px rgba(0, 140, 255, 0.3);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--safety-yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease-power), height 0.6s var(--ease-power);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 140, 255, 0.5), var(--glow-yellow);
}

.cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.cta-button span {
  position: relative;
  z-index: 1;
}

.cta-button.secondary {
  background: transparent;
  border: 2px solid var(--electric-blue);
  box-shadow: none;
}

.cta-button.secondary:hover {
  background: var(--electric-blue);
  box-shadow: var(--glow-blue);
}

/* Electrical Flicker Effect */
@keyframes electrical-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.9; }
  55% { opacity: 1; }
  60% { opacity: 0.95; }
}

.cta-button:hover {
  animation: electrical-flicker 0.1s ease-in-out 3;
}

/* ===== SECTIONS ===== */
section {
  padding: var(--spacing-xl) 5%;
  position: relative;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.section-header::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
  margin: 2rem auto 0;
  animation: power-surge 2s ease-in-out infinite;
}

@keyframes power-surge {
  0%, 100% { opacity: 0.5; width: 100px; }
  50% { opacity: 1; width: 200px; }
}

/* ===== GRID LAYOUTS ===== */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== CARDS ===== */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 140, 255, 0.2);
  border-radius: 8px;
  padding: var(--spacing-md);
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease-cinematic);
  backdrop-filter: blur(10px);
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 140, 255, 0.1), transparent);
  transition: left 0.6s var(--ease-power);
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--electric-blue);
  box-shadow: 0 10px 40px rgba(0, 140, 255, 0.3);
}

.card:hover::before {
  left: 100%;
}

.card-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
  color: var(--electric-blue);
  filter: drop-shadow(var(--glow-blue));
}

.card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card p {
  color: var(--gunmetal-silver);
  line-height: 1.8;
}

/* ===== PROJECT CARDS (3D TILT) ===== */
.project-card {
  position: relative;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 140, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: all 0.4s var(--ease-cinematic);
  min-height: 450px;
  display: flex;
  flex-direction: column;
}

.project-card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-cinematic);
  flex-shrink: 0;
}

.project-card:hover .project-card-image {
  transform: scale(1.1);
}

.project-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.95) 80%, transparent 100%);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s var(--ease-cinematic);
  max-height: 280px;
  overflow: hidden;
}

.project-card:hover .project-card-overlay {
  transform: translateY(0);
  opacity: 1;
}

.project-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.project-card .technical-text {
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-card-data {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.data-point {
  display: flex;
  flex-direction: column;
  min-width: 60px;
}

.data-label {
  font-size: 0.65rem;
  color: var(--gunmetal-silver);
  text-transform: uppercase;
  line-height: 1.2;
}

.data-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--safety-yellow);
  font-weight: 700;
  line-height: 1.2;
}

/* Light Reflection Effect */
.project-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-cinematic);
}

.project-card:hover::after {
  opacity: 1;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--pure-white);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(0, 140, 255, 0.3);
  border-radius: 4px;
  color: var(--pure-white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s var(--ease-cinematic);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: var(--glow-blue);
  background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* ===== FOOTER ===== */
.main-footer {
  background: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(0, 140, 255, 0.3);
  padding: var(--spacing-lg) 5% var(--spacing-md);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--electric-blue);
}

.footer-section p,
.footer-section a {
  color: var(--gunmetal-silver);
  text-decoration: none;
  line-height: 2;
  transition: color 0.3s var(--ease-cinematic);
}

.footer-section a:hover {
  color: var(--safety-yellow);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(0, 140, 255, 0.2);
  color: var(--gunmetal-silver);
  font-size: 0.875rem;
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-cinematic);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Fix header blocking content */
  body {
    padding-top: 80px;
  }
  
  .hero {
    min-height: calc(100vh - 80px);
  }
  
  /* Center logo on mobile */
  .nav-container {
    justify-content: space-between;
    width: 100%;
    position: relative;
  }
  
  .logo {
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    height: 65px;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(12, 12, 12, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s var(--ease-cinematic);
    z-index: 999;
    padding-top: 120px;
  }

  .nav-menu.active {
    right: 0;
  }
  
  /* Add logo to mobile menu */
  .nav-menu::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 140px;
    background: url('../logo/wazed-logo.svg') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 15px rgba(0, 140, 255, 0.5));
  }

  .menu-toggle {
    display: flex;
    z-index: 1001;
    position: relative;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  section {
    padding: var(--spacing-lg) 5%;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== LOADING STATES ===== */
.lazy-image {
  opacity: 0;
  transition: opacity 0.5s var(--ease-cinematic);
}

.lazy-image.loaded {
  opacity: 1;
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--safety-yellow);
  outline-offset: 2px;
}

a:focus,
button:focus,
.logo:focus,
.menu-toggle:focus {
  outline: none;
}

/* ===== PRINT STYLES ===== */
@media print {
  .main-nav,
  .theme-toggle,
  .cta-button,
  .main-footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

