/* ============================================================
   JCAN.us — JC3 Marketing Website
   Brand: #00FF88 phosphor green, dark tactical aesthetic
   Fonts: Orbitron (headers), Share Tech Mono (data), Inter (body)
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #00FF88;
  --green-dim: #00CC6E;
  --green-glow: rgba(0, 255, 136, 0.15);
  --green-faint: rgba(0, 255, 136, 0.06);
  --bg-primary: #0A0A0A;
  --bg-secondary: #0F0F0F;
  --bg-surface: #141414;
  --bg-elevated: #1A1A1A;
  --border: rgba(255, 255, 255, 0.08);
  --border-green: rgba(0, 255, 136, 0.2);
  --text-primary: #E8E8E8;
  --text-secondary: #999999;
  --text-dim: #9A9A9A;
  --font-display: 'Orbitron', monospace, sans-serif;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #33FFaa;
}

/* --- Focus Styles (Accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.sidebar-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* --- Skip Navigation (Accessibility) --- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  background: var(--green);
  color: #000;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 12px 24px;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-nav:focus {
  top: 0;
  color: #000;
}

::selection {
  background: rgba(0, 255, 136, 0.25);
  color: #fff;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  border-bottom-color: var(--border-green);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  font-size: 28px;
  color: var(--green);
  line-height: 1;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--green);
  letter-spacing: 3px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--green);
  background: var(--green-faint);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.scan-line {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--green) 50%,
    transparent 100%
  );
  opacity: 0.4;
  animation: scan 6s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { top: -2px; opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { top: 100%; opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--green);
  border: 1px solid var(--border-green);
  padding: 6px 20px;
  border-radius: 2px;
  margin-bottom: 32px;
  background: var(--green-faint);
}

.hero-title {
  margin-bottom: 24px;
}

.title-accent {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 10vw, 96px);
  color: var(--green);
  letter-spacing: 8px;
  line-height: 1.1;
  text-shadow: 0 0 60px rgba(0, 255, 136, 0.3);
}

.title-sub {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(16px, 3vw, 24px);
  color: var(--text-secondary);
  letter-spacing: 4px;
  line-height: 1.4;
  margin-top: 8px;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  min-width: 180px;
}

.btn-primary {
  background: var(--green);
  color: #000;
  border-color: var(--green);
  font-weight: 600;
}

.btn-primary:hover {
  background: #33FFaa;
  color: #000;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--green);
  border-color: var(--border-green);
}

.btn-secondary:hover {
  background: var(--green-faint);
  border-color: var(--green);
}

.btn-full {
  width: 100%;
}

/* --- Hero Stats --- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.stat {
  background: var(--bg-surface);
  padding: 20px 16px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--green);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text-primary);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Product Cards --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 32px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}

.product-card:hover {
  border-color: var(--border-green);
  transform: translateY(-4px);
}

.product-card.featured {
  border-color: var(--border-green);
  background: linear-gradient(
    135deg,
    var(--bg-surface) 0%,
    rgba(0, 255, 136, 0.03) 100%
  );
}

.product-card.featured::before {
  content: 'FLAGSHIP';
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--green);
  background: var(--green-faint);
  border: 1px solid var(--border-green);
  padding: 3px 10px;
  border-radius: 2px;
}

.product-icon {
  width: 56px;
  height: 56px;
  color: var(--green);
  margin-bottom: 20px;
}

.product-icon svg {
  width: 100%;
  height: 100%;
}

.product-platform {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.product-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.product-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-features li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.product-features li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--green);
}

/* --- Capabilities --- */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.capability {
  padding: 32px 24px;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s;
}

.capability:hover {
  border-left-color: var(--green);
}

.capability-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--green);
  opacity: 0.4;
  margin-bottom: 16px;
}

.capability-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.capability p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- About --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-standards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.standard-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--green);
  background: var(--green-faint);
  border: 1px solid var(--border-green);
  padding: 6px 14px;
  border-radius: 2px;
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mesh-diagram {
  position: relative;
  width: 300px;
  height: 300px;
}

.mesh-node {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--green);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
  animation: pulse 3s ease-in-out infinite;
}

.mesh-node:nth-child(2) { animation-delay: 0.4s; }
.mesh-node:nth-child(3) { animation-delay: 0.8s; }
.mesh-node:nth-child(4) { animation-delay: 1.2s; }
.mesh-node:nth-child(5) { animation-delay: 1.6s; }
.mesh-node:nth-child(6) { animation-delay: 2.0s; }
.mesh-node:nth-child(7) { animation-delay: 2.4s; }
.mesh-node:nth-child(8) { animation-delay: 2.8s; }

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
}

.mesh-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  color: var(--green);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-item h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Form --- */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-faint);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
  text-align: center;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: #111111;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-legal {
  text-align: right;
}

.footer-legal p {
  font-size: 12px;
  color: var(--text-dim);
}

.footer-classification {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-top: 4px;
  opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-visual {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 14px 12px;
    min-height: 44px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links a {
    padding: 8px 4px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .footer-legal {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    min-width: auto;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* --- Animation utilities --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
