/* MiciMike ReV Devices – shared stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:          #0d0f0e;
  --surface:     #141816;
  --surface2:    #1c201e;
  --border:      #2a302c;
  --accent:      #3ddc84;      /* PCB green */
  --accent-dim:  #2ba860;
  --text:        #e8ede9;
  --text-muted:  #8a9e8e;
  --text-faint:  #4a574d;
  --mono:        'Space Mono', monospace;
  --sans:        'DM Sans', sans-serif;
  --radius:      6px;
  --max:         1200px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,14,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.nav-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}
.nav-logo span {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover { color: var(--accent); }

/* ── Page wrapper ── */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Chip / badge ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.chip.live {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(61,220,132,.07);
}
.chip.live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .18s;
}
.btn-primary {
  background: var(--accent);
  color: #0a1209;
}
.btn-primary:hover {
  background: #5ae89a;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(61,220,132,.25);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Section divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ── Lightbox ── */
#lb {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  backdrop-filter: blur(6px);
}
#lb.open { display: flex; }
#lb img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 64px rgba(0,0,0,.7);
  cursor: default;
}
#lb-close {
  position: fixed;
  top: 16px; right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  opacity: .7;
  transition: opacity .15s;
}
#lb-close:hover { opacity: 1; }

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}
footer p {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
footer a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color .15s;
}
footer a:hover { color: var(--accent); }

/* ── Contact form ── */
.contact-form {
  max-width: 560px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color .15s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea { min-height: 140px; }
.form-status {
  margin-top: 16px;
  font-size: 0.875rem;
  padding: 12px 16px;
  border-radius: var(--radius);
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(61,220,132,.1);
  border: 1px solid rgba(61,220,132,.3);
  color: var(--accent);
}
.form-status.error {
  display: block;
  background: rgba(220,61,61,.1);
  border: 1px solid rgba(220,61,61,.3);
  color: #f87171;
}

/* ── Legal pages ── */
.legal-content h1 {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 8px;
}
.legal-content .last-updated {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 40px;
}
.legal-content h2 {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 36px 0 12px;
}
.legal-content p,
.legal-content li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}
.legal-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.legal-content a {
  color: var(--accent);
  text-decoration: none;
}
.legal-content a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Nav */
  .nav-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 0.8rem;
  }

  /* Page padding */
  .page {
    padding: 0 16px 60px;
  }

  /* Hero */
  .hero {
    padding: 40px 0 32px;
  }
  .hero-logo {
    width: 140px;
  }

  /* Campaign banner */
  .campaign-banner {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  .campaign-banner .btn {
    width: 100%;
    justify-content: center;
  }

  /* Product cards on index */
  .products {
    grid-template-columns: 1fr;
  }
  .card-images img {
    height: 140px;
  }

  /* Gen1/Gen2 product hero */
  .product-hero {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  /* Gallery thumbs smaller */
  .gallery-thumbs img {
    flex: 0 0 60px;
    width: 60px;
    height: 45px;
  }

  /* Spec table */
  .specs-table td:first-child {
    width: 38%;
    font-size: 0.75rem;
  }

  /* Features grid */
  .features {
    grid-template-columns: 1fr !important;
  }

  /* CS CTA button */
  .cs-cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* Bottom CTA */
  .bottom-cta {
    padding: 24px 16px;
  }
  .bottom-cta .btn-row {
    flex-direction: column;
  }
  .bottom-cta .btn-row .btn {
    width: 100%;
    justify-content: center;
  }

  /* Legal pages */
  .legal-content h1 {
    font-size: 1.4rem;
  }

  /* Contact form */
  .contact-form {
    max-width: 100%;
  }

  /* Footer */
  footer {
    padding: 20px 16px;
  }
  footer p {
    line-height: 2;
  }
}

@media (max-width: 480px) {
  .nav-logo span {
    display: none;
  }
  .hero h1 {
    font-size: 1.4rem;
  }
  .specs-table {
    font-size: 0.8rem;
  }
  .specs-table td:first-child {
    width: 35%;
  }
}
