:root {
  --bg:#0b0e13; --panel:#10151d; --text:#e6eaf2; --muted:#a6b0c3; --border:#1c2533;
  --accent:#7cc4ff; --accent-2:#3b82f6; --success:#22c55e; --warning:#f59e0b; --header-height:56px;}
html { scroll-behavior: smooth; }
body { margin:0; background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial; line-height:1.6; -webkit-font-smoothing:antialiased; }
.container { max-width:1080px; margin:0 auto; padding:0 20px; }
a { color:var(--accent); text-decoration:none; transition: color 0.2s ease; }
a:hover { color:var(--accent-2); }
header { position:sticky; top:0; backdrop-filter: blur(6px); border-bottom:1px solid var(--border); z-index: 100; }
.nav { display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.nav-desktop { display: flex; align-items: center; gap: 20px; }
.nav-buttons { display: flex; gap: 12px; align-items: center; }
.brand { display:flex; gap:10px; align-items:center; font-weight:700; }
.brand .logo { width:28px; height:28px; }
nav ul { margin:0; padding:0; list-style:none; display:flex; gap:16px; }
nav a { color:var(--muted); font-weight:600; transition: color 0.2s ease; }
nav a:hover { color:var(--text); }
.btn { display:inline-block; background:var(--accent); color:#0b0e13; font-weight:700; padding:10px 14px; border-radius:10px; transition: all 0.2s ease; border: none; cursor: pointer; }
.btn:hover { background:var(--accent-2); color:#fff; transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.ghost { padding:10px 14px; border-radius:10px; border:1px solid var(--border); color:var(--text); font-weight:600; transition: all 0.2s ease; }
.ghost:hover { border-color: var(--accent); color: var(--accent); }
main section { padding:60px 0; border-top:1px solid var(--border);}
main section:first-of-type { border-top:none; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height:1.1; margin:0 0 10px; }
h2 { font-size: clamp(22px, 3vw, 30px); margin:0 0 14px; }
.lead { color:var(--muted); margin:0 0 22px; }
.hero-stats { display: flex; gap: 20px; margin: 20px 0; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.9rem; color: var(--muted); }
.row { display:grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap:16px; }
.card { background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:16px; transition: all 0.2s ease; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.chips { display:flex; gap:10px; flex-wrap:wrap; margin: 20px 0; }
.chip { border:1px solid var(--border); background:var(--panel); border-radius:12px; padding:8px 12px; color:var(--muted); font-size: 0.9rem; }
.testimonial { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin: 20px 0; }
.testimonial-quote { font-style: italic; margin-bottom: 10px; }
.testimonial-author { color: var(--muted); font-size: 0.9rem; }
input,button { font:inherit; }
input[type=email] { width:100%; padding:12px 14px; border-radius:10px; border:1px solid var(--border); background:var(--panel); color:var(--text); transition: border-color 0.2s ease; }
input[type=email]:focus { outline: none; border-color: var(--accent); }
form { display:flex; gap:10px; flex-wrap:wrap; margin: 20px 0; }
.form-success { color: var(--success); font-weight: 600; margin-top: 10px; }
.pricing-preview { background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; padding: 20px; margin: 20px 0; }
.pricing-note { font-size: 0.9rem; color: var(--muted); }
footer { border-top:1px solid var(--border); color:var(--muted); padding:40px 0 60px; }
pre { margin:0; padding:14px; background:#0f1722; border:1px solid var(--border); border-radius:12px; overflow:auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 30px 0; }
.feature-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }

/* Demo CTA sections */
.demo-section { text-align: center; margin-top: 30px; }
.demo-btn-lg { font-size: 1.1rem; padding: 14px 28px; }
.demo-subtitle { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }

/* FAQ section */
.faq-section { text-align: center; margin-top: 40px; }
.faq-title { margin-bottom: 15px; }

/* Detection signals heading */
.signals-heading { margin-top: 40px; margin-bottom: 20px; }

/* Privacy section spacing */
.privacy-cta { margin-top: 15px; }

/* Pricing preview override for spacing */
.pricing-preview.spaced { margin-top: 30px; }
.feature-icon { width: 40px; height: 40px; background: var(--accent); border-radius: 8px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--bg); }
nav a.active { color: var(--accent) !important; }

/* Desktop Navigation - Default State */
@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
  .mobile-nav { display: none !important; }
  .nav-desktop { display: flex !important; }
}

/* Mobile Menu Styles */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 4px;
  z-index: 101;
  align-self: center;
  height: fit-content;
}

.hamburger {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
  border-radius: 1px;
}

.mobile-menu-btn.open .hamburger:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.open .hamburger:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.open .hamburger:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 100;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav.open {
  transform: translateY(0);
}

.mobile-nav nav ul {
  flex-direction: column;
  gap: 0;
  margin: 20px 0;
}

.mobile-nav nav ul li {
  border-bottom: 1px solid var(--border);
}

.mobile-nav nav ul li:last-child {
  border-bottom: none;
}

.mobile-nav nav ul li a {
  display: block;
  padding: 16px 0;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 600;
}

.mobile-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

.mobile-nav-buttons .ghost,
.mobile-nav-buttons .btn {
  text-align: center;
}

/* Improved Mobile Responsive Styles */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  
  /* Navigation */
  .nav { 
    flex-direction: row; 
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
  }
  
  .brand {
    align-items: center;
  }
  
  .mobile-menu-btn { 
    display: flex;
    align-items: center;
  }
  .nav-desktop { display: none !important; }
  .mobile-nav { display: block; }
  
  /* Typography */
  h1 { font-size: clamp(24px, 6vw, 36px); }
  h2 { font-size: clamp(20px, 5vw, 26px); }
  
  /* Hero section */
  .hero-stats { 
    justify-content: center;
    gap: 16px;
  }
  
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 0.8rem; }
  
  /* Cards and grids */
  .row { 
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .feature-grid { 
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 20px 0;
  }
  
  .feature-card { padding: 20px; }
  
  .card { padding: 14px; }
  
  /* Chips */
  .chips { gap: 8px; }
  .chip { padding: 6px 10px; font-size: 0.85rem; }
  
  /* Buttons */
  .btn, .ghost { 
    padding: 12px 16px;
    font-size: 0.95rem;
  }
  
  .demo-btn-lg { 
    font-size: 1rem;
    padding: 14px 24px;
  }
  
  /* Sections */
  main section { padding: 40px 0; }
  
  /* Forms */
  form { 
    flex-direction: column;
    gap: 12px;
  }
  
  input[type=email] { 
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Code blocks */
  pre { 
    font-size: 12px;
    padding: 12px;
    overflow-x: auto;
  }
  
  /* Footer */
  footer { 
    padding: 30px 0 40px;
    text-align: center;
  }
  
  /* Testimonial */
  .testimonial { 
    padding: 16px;
    margin: 16px 0;
  }
  
  /* Demo sections */
  .demo-section { margin-top: 24px; }
  .faq-section { margin-top: 30px; }
  
  /* Pricing preview */
  .pricing-preview { 
    padding: 16px;
    margin: 16px 0;
  }
  
  .privacy-cta { margin-top: 12px; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  
  h1 { font-size: clamp(22px, 7vw, 32px); }
  h2 { font-size: clamp(18px, 6vw, 24px); }
  
  .hero-stats { 
    gap: 12px;
  }
  
  .stat-number { font-size: 1.3rem; }
  
  .btn, .ghost { 
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  .demo-btn-lg { 
    font-size: 0.95rem;
    padding: 12px 20px;
  }
  
  main section { padding: 30px 0; }
  
  .feature-icon { 
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
  }
}


/* --- Mobile nav visibility/cropping fix (append override) --- */
@media (max-width: 768px) {
  /* Ensure header sits above the drawer */
  header { z-index: 100; position: sticky; top: 0; }

  /* Hide the drawer fully above the viewport when closed, and show under header when open */
  .mobile-nav {
    position: fixed;
    top: var(--header-height, 56px);
    left: 0;
    right: 0;
    z-index: 99;
    transform: translateY(calc(-100% - var(--header-height, 56px)));
  }
  .mobile-nav.open {
    transform: translateY(0);
  }
}

/* Let grid items shrink inside .row (prevents horizontal overflow) */
.row > * { min-width: 0; }
.card { min-width: 0; }

/* Encourage wrapping of long strings in the "How it works" cards */
#how .card, #how .card * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Keep code blocks readable without expanding page width */
pre, code {
  max-width: 100%;
  overflow-x: auto;   /* horizontal scroll inside code only */
}
/* Center the universal CTA on the Services page */
.cta-center {
  text-align: center;      /* center anything inside */
  margin: 3rem 0 2rem;     /* add a bit of breathing room */
}

.cta-center .btn {
  display: inline-block;   /* so it respects text-align */
}
