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

:root {
  --bg: #0a0a1a;
  --bg-light: #12122a;
  --bg-card: #1a1a2e;
  --green: #00ff41;
  --cyan: #00ccff;
  --error: #ff0055;
  --yellow: #ffcc00;
  --purple: #aa55ff;
  --white: #e0e0e0;
  --dim: #555577;
  --font-mono: 'Courier New', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="light"] {
  --bg: #f5f5f0;
  --bg-light: #eeeee8;
  --bg-card: #ffffff;
  --green: #00aa30;
  --cyan: #0088aa;
  --error: #cc0044;
  --yellow: #cc9900;
  --purple: #7733cc;
  --white: #1a1a2e;
  --dim: #888899;
}

[data-theme="light"] body::after { display: none; }
[data-theme="light"] .hero-bg { opacity: 0.03; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ========== NAV ========== */
.lp-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 12px 10%;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 204, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  flex-wrap: wrap;
  gap: 8px;
}

[data-theme="light"] .lp-nav {
  background: rgba(245, 245, 240, 0.92);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--green);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
  text-decoration: none;
  font-weight: bold;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--dim);
  color: var(--white);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-cta {
  background: var(--green);
  color: var(--bg);
  border: none;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s;
}

.nav-cta:hover {
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.5);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 140px 10% 80px;
  text-align: center;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.06;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--green);
  overflow: hidden;
  white-space: pre;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: var(--green);
  text-shadow: 0 0 30px rgba(0, 255, 65, 0.6), 0 0 60px rgba(0, 255, 65, 0.3);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(0, 255, 65, 0.6), 0 0 40px rgba(0, 255, 65, 0.3); }
  50% { text-shadow: 0 0 40px rgba(0, 255, 65, 0.9), 0 0 80px rgba(0, 255, 65, 0.5); }
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-block;
  background: var(--green);
  color: #0a0a1a;
  padding: 16px 48px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 255, 65, 0.5);
}

.hero-cta::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  animation: ctaShine 3s ease-in-out infinite;
}

@keyframes ctaShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.hero-robot {
  margin-top: 40px;
}

.hero-note {
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 16px;
  font-family: var(--font-mono);
}

/* ========== SECTION COMMON ========== */
.section {
  padding: 80px 10%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s, transform 0.8s;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--cyan);
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: 0.1em;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--cyan);
  margin: 16px auto 0;
  box-shadow: 0 0 10px var(--cyan);
}

/* ========== FEATURES ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--dim);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.feature-card:hover {
  border-color: var(--cyan);
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 204, 255, 0.15);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
  display: block;
}

.feature-name {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--dim);
  line-height: 1.6;
}

/* ========== FIELDS SECTION ========== */
.fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.field-card {
  background: var(--bg-card);
  border: 1px solid var(--dim);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
}

.field-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 204, 255, 0.12);
}

.field-card-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}

.field-card-name {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: 8px;
}

.field-card-desc {
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 14px;
  line-height: 1.5;
}

.field-card-levels {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

/* ========== STATS ========== */
.stats-section {
  background: var(--bg-light);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

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

.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  color: var(--green);
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
  font-weight: bold;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--dim);
  margin-top: 4px;
}

/* ========== TRAINING ========== */
.training-content {
  text-align: center;
}

.training-desc {
  font-size: 1rem;
  color: var(--dim);
  margin-bottom: 32px;
  line-height: 1.8;
}

.training-use-cases {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.training-use-case {
  background: var(--bg-card);
  border: 1px solid var(--dim);
  border-radius: 10px;
  padding: 24px 28px;
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.training-use-case-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.training-use-case-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan);
  margin-bottom: 8px;
}

.training-use-case-desc {
  font-size: 0.85rem;
  color: var(--dim);
  line-height: 1.5;
}

.training-cta {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  padding: 14px 40px;
  font-family: var(--font-mono);
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  letter-spacing: 0.05em;
}

.training-cta:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.4);
}

/* ========== FOOTER ========== */
.lp-footer {
  padding: 40px 10%;
  border-top: 1px solid var(--bg-card);
  text-align: center;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--dim);
}

.footer-copy a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.3s;
}

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

.footer-caravan {
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 8px;
}

.footer-caravan a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.footer-caravan a:hover {
  text-decoration: underline;
}

/* ========== HERO ROBOT ========== */
.hero-robot-wrap {
  display: inline-block;
  animation: robotFloat 3s ease-in-out infinite;
}

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

.hero-cd-robot { width: 80px; }

/* Comadori Robot */
.cd-robot {
  width: 50px;
}

.cd-antenna {
  width: 3px;
  height: 12px;
  background: var(--cyan);
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 6px var(--cyan);
}

.cd-antenna::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  animation: glowBlink 2s ease-in-out infinite;
}

@keyframes glowBlink {
  0%, 100% { box-shadow: 0 0 10px var(--cyan); }
  50% { box-shadow: 0 0 20px var(--cyan), 0 0 30px rgba(0, 204, 255, 0.4); }
}

.cd-head {
  width: 44px;
  height: 34px;
  background: var(--bg-card);
  border: 2px solid var(--cyan);
  margin: 0 auto;
  position: relative;
  clip-path: polygon(12% 0%, 88% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
}

.cd-eye {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--green);
  border-radius: 2px;
  top: 11px;
  box-shadow: 0 0 6px var(--green);
}

.cd-eye-l { left: 8px; }
.cd-eye-r { right: 8px; }

.cd-mouth {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  width: 16px;
}

.cd-mouth span {
  flex: 1;
  height: 3px;
  background: var(--cyan);
  border-radius: 1px;
  box-shadow: 0 0 3px var(--cyan);
}

.cd-body {
  width: 36px;
  height: 28px;
  background: var(--bg-card);
  border: 2px solid var(--cyan);
  margin: 2px auto 0;
  border-radius: 0 0 6px 6px;
  position: relative;
}

.cd-body::before {
  content: '>';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
}

/* Hero robot size overrides */
.hero-cd-robot .cd-antenna { width: 4px; height: 18px; }
.hero-cd-robot .cd-antenna::after { width: 12px; height: 12px; top: -8px; }
.hero-cd-robot .cd-head { width: 66px; height: 52px; }
.hero-cd-robot .cd-eye { width: 13px; height: 13px; top: 16px; border-radius: 3px; }
.hero-cd-robot .cd-eye-l { left: 12px; }
.hero-cd-robot .cd-eye-r { right: 12px; }
.hero-cd-robot .cd-mouth { width: 22px; bottom: 8px; }
.hero-cd-robot .cd-mouth span { height: 4px; }
.hero-cd-robot .cd-body { width: 52px; height: 40px; border-radius: 0 0 8px 8px; }
.hero-cd-robot .cd-body::before { font-size: 14px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .stats-grid {
    gap: 24px;
  }

  .hero {
    padding: 120px 10% 60px;
    min-height: auto;
  }

  .training-use-cases {
    flex-direction: column;
    align-items: center;
  }

  .training-use-case {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .fields-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    padding: 14px 32px;
    font-size: 1rem;
  }
}
