/* QWAMOS Cyberpunk Theme - Main Stylesheet */
/* ========================================= */

/* Import additional stylesheets */
@import url('animations.css');
@import url('responsive.css');
@import url('cyberpunk-enhanced.css');

/* CSS Variables */
:root {
  /* Colors */
  --bg-primary: #0b0f16;
  --bg-panel: #101621;
  --bg-panel-hover: #141a28;
  --text-primary: #e8edf5;
  --text-secondary: #9aa5b8;
  --text-muted: #6b7280;
  --accent-cyan: #0fffea;
  --accent-violet: #8a4af3;
  --accent-red: #ff3366;
  --border-color: rgba(148, 163, 184, 0.1);
  
  /* Glows */
  --glow-cyan: 0 0 20px rgba(15, 255, 234, 0.5);
  --glow-violet: 0 0 20px rgba(138, 74, 243, 0.5);
  --glow-cyan-intense: 0 0 40px rgba(15, 255, 234, 0.8);
  
  /* Typography */
  --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-code: 'JetBrains Mono', 'Courier New', monospace;
  
  /* Spacing */
  --spacing-unit: 8px;
  --container-max: 1440px;
  --navbar-height: 80px;
  
  /* Animation */
  --transition-fast: 150ms ease-out;
  --transition-normal: 300ms ease-out;
  --transition-slow: 500ms ease-out;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
}

/* Selection */
::selection {
  background-color: var(--accent-cyan);
  color: var(--bg-primary);
}

/* Focus Outline */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Scanline Effect */
.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.02) 50%
  );
  background-size: 100% 4px;
  animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
  0% { background-position: 0 0; }
  100% { background-position: 0 10px; }
}

/* Particle Canvas */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
  text-shadow: var(--glow-cyan);
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(16, 22, 33, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.classified-mark {
  color: var(--accent-cyan);
  font-family: var(--font-code);
  font-size: 0.75rem;
  opacity: 0.8;
}

.logo-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-normal);
}

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

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

.nav-link.external::before {
  content: '↗';
  margin-left: 0.25rem;
  font-size: 0.875rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--navbar-height);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hex-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='50,1 95,25 95,75 50,99 5,75 5,25' fill='none' stroke='%230fffea' stroke-width='0.5' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 100px 100px;
  animation: float 20s ease-in-out infinite;
}

.mesh-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 70%);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.glitch-wrapper {
  margin-bottom: 1rem;
}

.glitch {
  position: relative;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch::before {
  animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  color: var(--accent-cyan);
  z-index: -1;
}

.glitch::after {
  animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
  color: var(--accent-violet);
  z-index: -2;
}

@keyframes glitch-anim {
  0% {
    clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
    transform: translateX(-3px);
  }
  10% {
    clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%);
    transform: translateX(3px);
  }
  20% {
    clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
    transform: translateX(-3px);
  }
  30% {
    clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%);
    transform: translateX(0);
  }
  40% {
    clip-path: polygon(0 35%, 100% 35%, 100% 35%, 0 35%);
    transform: translateX(3px);
  }
  50% {
    clip-path: polygon(0 45%, 100% 45%, 100% 46%, 0 46%);
    transform: translateX(-3px);
  }
  60% {
    clip-path: polygon(0 50%, 100% 50%, 100% 70%, 0 70%);
    transform: translateX(3px);
  }
  70% {
    clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%);
    transform: translateX(-3px);
  }
  80% {
    clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%);
    transform: translateX(3px);
  }
  90% {
    clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%);
    transform: translateX(-3px);
  }
  100% {
    clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%);
    transform: translateX(0);
  }
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 300;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  background: var(--text-primary);
  box-shadow: var(--glow-cyan-intense);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-cyan);
  border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  animation: bounce 2s ease-in-out infinite;
}

.hero-scroll span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  margin: 0.5rem auto 0;
  border-right: 2px solid var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* Sections */
section {
  padding: 5rem 0;
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.875rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1.5rem;
}

.section-desc {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Feature Grid */
.features {
  background: var(--bg-panel);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.feature-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  transform: translateX(100%);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
}

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

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

.feature-card p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--accent-cyan);
  transition: all var(--transition-fast);
}

.feature-link:hover {
  transform: translateX(4px);
}

/* Architecture Section */
.architecture {
  background: var(--bg-primary);
  overflow: hidden;
}

.arch-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.arch-diagram {
  position: relative;
  padding: 2rem;
}

.arch-layer {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  transition: all var(--transition-normal);
}

.arch-layer::before {
  content: attr(data-layer);
  position: absolute;
  top: 50%;
  left: -2rem;
  transform: translateY(-50%);
  font-family: var(--font-code);
  font-size: 0.875rem;
  color: var(--accent-cyan);
  opacity: 0.5;
}

.arch-layer:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateX(8px);
}

.layer-label {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.layer-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.arch-info h3 {
  margin-bottom: 1.5rem;
}

.arch-features {
  list-style: none;
  margin-bottom: 2rem;
}

.arch-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.arch-features li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* CTA Section */
.cta {
  background: linear-gradient(135deg, var(--bg-panel) 0%, var(--bg-primary) 100%);
  text-align: center;
  padding: 6rem 0;
}

.cta-content h2 {
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-secondary);
}

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

.footer-version {
  font-family: var(--font-code);
  font-size: 0.875rem;
  color: var(--accent-cyan);
  opacity: 0.8;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.classified-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .arch-preview {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .arch-layer::before {
    display: none;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Quick Navigation Grid */
.quick-nav {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.nav-card:hover {
  transform: translateY(-8px);
}

.card-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

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

/* CTA Links */
.cta-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.cta-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--accent-cyan);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cta-link:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-cyan);
}

.link-icon {
  font-size: 1.5rem;
  color: var(--accent-cyan);
}

.cta-link:hover .link-icon {
  color: var(--bg-primary);
}

/* Scroll Indicator */
.scroll-indicator {
  position: relative;
  width: 30px;
  height: 30px;
  margin: 0 auto;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: pulse-expand 3s ease-out infinite;
}

.pulse-ring:nth-child(2) {
  animation-delay: 1s;
}

.pulse-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--accent-cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

@keyframes pulse-expand {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
  }
}

/* Footer Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

.footer-legal {
  text-align: right;
}

.footer-legal p {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Hero Tagline */
.hero-tagline {
  margin: 2rem 0;
}

.logo-container {
  margin-bottom: 2rem;
}

/* Section Tag */
.section-tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.875rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent-cyan);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.section-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-cyan);
  opacity: 0.1;
  transition: left 0.3s ease;
}

.section-tag:hover::before {
  left: 0;
}

/* Section Title with Subtitle */
.section-subtitle {
  font-size: 1.5rem;
  margin: 2rem 0;
  color: var(--accent-cyan);
  text-align: center;
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .scanline,
  #particles,
  .hero-bg,
  nav,
  .matrix-rain {
    display: none;
  }
}