@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,700;1,400&family=Space+Grotesk:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg-dark: #05080d;
  --bg-card: rgba(12, 18, 28, 0.75);
  --bg-card-hover: rgba(18, 27, 42, 0.85);
  --border-cyan: rgba(0, 240, 255, 0.25);
  --border-cyan-bright: rgba(0, 240, 255, 0.7);
  --border-muted: rgba(255, 255, 255, 0.08);
  
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.4);
  --green-spark: #00ff9d;
  --green-glow: rgba(0, 255, 157, 0.35);
  --gold-accent: #ffb700;
  --purple-accent: #8a2be2;
  
  --text-main: #f0f6fc;
  --text-muted: #8b9bb4;
  --text-dim: #54657e;
  
  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', system-ui, sans-serif;
  
  --header-height: 76px;
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  background: var(--bg-dark);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Cyber Grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -2;
  pointer-events: none;
}

/* Radial Ambient Lighting */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 800px;
  background: radial-gradient(circle at 50% -100px, rgba(0, 240, 255, 0.12) 0%, rgba(138, 43, 226, 0.05) 50%, transparent 80%);
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Common Container */
.container {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
}

/* Glassmorphic Panel Style */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-cyan-bright);
  box-shadow: 0 12px 40px rgba(0, 240, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* HUD Corner Accents */
.hud-corners {
  position: relative;
}

.hud-corners::before,
.hud-corners::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--cyan);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}

.hud-corners::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.hud-corners::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

/* Tag / Badge Styling */
.cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 4px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.cyber-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--green-spark);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green-spark);
  animation: pulse-glow 2s infinite;
}

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

/* Section Titles */
.section-code {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-code::before {
  content: "//";
  color: var(--gold-accent);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin-top: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #00a8ff 100%);
  color: #040810;
  border: none;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(45deg) translateY(-100%);
  transition: transform 0.6s ease;
}

.btn-primary:hover::before {
  transform: rotate(45deg) translateY(100%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.7);
  color: #000;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-cyan);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.btn-large {
  padding: 16px 36px;
  font-size: 17px;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--cyan);
  color: #000;
  font-weight: bold;
  transform: translateY(-150%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 50;
  background: rgba(5, 8, 13, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-muted);
  transition: all 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(5, 8, 13, 0.92);
  border-bottom-color: var(--border-cyan);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-logo-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.brand-logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  color: #fff;
}

.brand-text span {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
}

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

.nav-link {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: #fff;
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Canvas Background for Spark Particles */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-info {
  max-width: 600px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  margin-top: 18px;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--cyan) 50%, var(--green-spark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.hero-specs {
  display: flex;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-muted);
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-item .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spec-item .value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  font-weight: 700;
  margin-top: 2px;
}

/* Hero Showcase Card (Right Side) */
.hero-visual {
  position: relative;
  perspective: 1000px;
}

.showcase-card {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(10, 15, 24, 0.85);
  border: 1px solid var(--border-cyan);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 240, 255, 0.15);
  transform-style: preserve-3d;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.showcase-card:hover {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 45px rgba(0, 240, 255, 0.3);
}

.showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-muted);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.showcase-viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.showcase-viewport img,
.showcase-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Laser Scanning Line Animation */
.laser-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--green-spark), var(--cyan), transparent);
  box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--cyan);
  z-index: 5;
  animation: scan-move 4s ease-in-out infinite alternate;
}

@keyframes scan-move {
  0% { top: 5%; opacity: 0.8; }
  100% { top: 92%; opacity: 0.8; }
}

/* HUD Overlay Elements on Image */
.hud-overlay-tag {
  position: absolute;
  padding: 6px 12px;
  background: rgba(4, 8, 14, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-cyan);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  z-index: 6;
}

.hud-top-right {
  top: 16px;
  right: 16px;
}

.hud-bottom-left {
  bottom: 16px;
  left: 16px;
}

/* Floating HUD Widget */
.floating-hud-card {
  position: absolute;
  bottom: -24px;
  right: -20px;
  padding: 16px 20px;
  background: rgba(6, 12, 20, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--green-spark);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--green-glow);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
}

.floating-hud-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 255, 157, 0.15);
  color: var(--green-spark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.floating-hud-text div:first-child {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.floating-hud-text div:last-child {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* ==========================================================================
   Metrics Bar / Ticker
   ========================================================================== */
.metrics-strip {
  border-y: 1px solid var(--border-muted);
  background: rgba(8, 12, 19, 0.9);
  backdrop-filter: blur(10px);
  padding: 30px 0;
  margin-bottom: 60px;
  position: relative;
  z-index: 5;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-right: 1px solid var(--border-muted);
}

.metric-card:last-child {
  border-right: none;
}

.metric-icon {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow);
}

.metric-info h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: #fff;
  font-weight: 700;
}

.metric-info p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Core Capabilities (Grid Cards)
   ========================================================================== */
.capabilities-section {
  padding: 80px 0;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.cap-card {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.cap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cap-number {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
  transition: color 0.3s;
}

.cap-card:hover .cap-number {
  color: var(--cyan);
}

.cap-card h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #fff;
  margin-bottom: 12px;
}

.cap-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.cap-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
}

/* ==========================================================================
   Live NC Code Streamer & Interactive Visualizer
   ========================================================================== */
.demo-section {
  padding: 80px 0;
}

.demo-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  margin-top: 40px;
  align-items: stretch;
}

/* Terminal / Code Window */
.terminal-window {
  background: #04070c;
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.terminal-header {
  padding: 12px 16px;
  background: rgba(12, 20, 32, 0.9);
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: #a9b7c6;
  overflow-y: auto;
  max-height: 380px;
  flex: 1;
}

.code-line {
  display: flex;
  gap: 16px;
}

.line-num {
  color: #4b5a6d;
  user-select: none;
  width: 24px;
  text-align: right;
}

.code-content {
  color: var(--text-main);
}

.gcode-cmd { color: var(--cyan); font-weight: bold; }
.gcode-coord { color: var(--green-spark); }
.gcode-comment { color: var(--text-dim); italic: true; }
.gcode-awt { color: var(--gold-accent); font-weight: bold; }

/* Visualizer Window */
.visualizer-window {
  display: flex;
  flex-direction: column;
}

.vis-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.vis-tab-btn {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vis-tab-btn.active,
.vis-tab-btn:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}

.vis-view-container {
  flex: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-cyan);
  aspect-ratio: 16 / 10;
}

.vis-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.vis-media.active {
  display: block;
}

/* ==========================================================================
   4-Step Workflow Pipeline
   ========================================================================== */
.workflow-section {
  padding: 80px 0;
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.05) 0%, transparent 70%);
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
  position: relative;
}

.pipeline-card {
  padding: 28px 24px;
  position: relative;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.pipeline-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
}

.pipeline-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================================
   Download Section
   ========================================================================== */
.download-section {
  padding: 100px 0 120px;
  position: relative;
}

.download-box {
  padding: 60px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(12, 20, 32, 0.9) 0%, rgba(5, 8, 13, 0.95) 100%);
  border: 1px solid var(--border-cyan-bright);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.15);
}

.download-box h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 48px);
  color: #fff;
  margin-top: 16px;
  margin-bottom: 16px;
}

.download-box p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 36px;
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sys-requirements {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 24px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-muted);
  padding: 40px 0;
  background: #030508;
  font-size: 14px;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* Reveal Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Rules */
@media (max-width: 992px) {
  .hero-grid,
  .capabilities-grid,
  .demo-layout,
  .pipeline-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-visual {
    margin-top: 40px;
  }
  
  .nav-menu {
    display: none; /* Can be toggled or responsive */
  }
}

@media (max-width: 600px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .download-box {
    padding: 36px 20px;
  }
}
