/* ============================================================
   METRIC ERA — Global Styles
   Dark + neon aesthetic. Deep navy, cyan/electric accents.
   ============================================================ */

:root {
  /* Backgrounds */
  --bg-0: #04060d;
  --bg-1: #070a16;
  --bg-2: #0b1024;
  --bg-glass: rgba(11, 16, 36, 0.55);
  --border: rgba(120, 190, 255, 0.12);
  --border-strong: rgba(120, 190, 255, 0.28);

  /* Text */
  --fg: #e9eefb;
  --fg-dim: #98a4c4;
  --fg-mute: #5f6a88;

  /* Accents */
  --neon: #00e5ff;
  --neon-2: #4d7cff;
  --magenta: #b94fff;
  --lime: #b4ff4d;
  --warn: #ff9d4d;

  /* Radii + spacing */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Shadows / glows */
  --glow-cyan: 0 0 30px rgba(0, 229, 255, 0.35), 0 0 80px rgba(0, 229, 255, 0.15);
  --glow-cyan-soft: 0 0 20px rgba(0, 229, 255, 0.2);
  --glow-magenta: 0 0 40px rgba(185, 79, 255, 0.3);
}

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

html, body {
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(0, 229, 255, 0.08), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(185, 79, 255, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 40%, var(--bg-0));
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
h4 { font-size: 1.15rem; font-weight: 600; }
p { color: var(--fg-dim); }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--neon);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--neon);
  box-shadow: var(--glow-cyan-soft);
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff 0%, var(--neon) 60%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Layout ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.grid { display: grid; gap: 24px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(4, 6, 13, 0.6);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.05rem; letter-spacing: 0.04em;
}
.logo-mark {
  width: 34px; height: 34px;
  position: relative;
  display: inline-block;
}
.logo-mark svg { width: 100%; height: 100%; }
.logo .accent { color: var(--neon); }

.nav-links {
  display: flex; gap: 32px; align-items: center;
  list-style: none;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--fg-dim);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
  height: 1px; background: var(--neon); box-shadow: var(--glow-cyan-soft);
}

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: rgba(0, 229, 255, 0.08);
  color: var(--fg);
  font-size: 0.85rem; font-weight: 500;
  transition: all 0.25s;
}
.nav-cta:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--neon);
  box-shadow: var(--glow-cyan-soft);
}
.nav-cta::after {
  content: '→'; transition: transform 0.25s;
}
.nav-cta:hover::after { transform: translateX(3px); }

.mobile-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-toggle {
    display: flex; flex-direction: column; gap: 4px;
    width: 32px; height: 32px; justify-content: center; align-items: center;
  }
  .mobile-toggle span { width: 20px; height: 1.5px; background: var(--fg); }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-1); padding: 24px 32px; gap: 20px;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s;
  cursor: pointer;
}
.btn-primary {
  background: var(--neon);
  color: #04060d;
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover {
  background: #4dfbff;
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.5), 0 0 100px rgba(0, 229, 255, 0.25);
}
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--fg);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover {
  border-color: var(--neon);
  background: rgba(0, 229, 255, 0.08);
}
.btn-arrow::after { content: '→'; transition: transform 0.25s; }
.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- Cards / Glass panels ---------- */
.glass {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), transparent 40%);
  pointer-events: none;
}
.glass-hover {
  transition: all 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.glass-hover:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

/* ---------- Grid backdrop utility ---------- */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 190, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 190, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Chat widget + AI call agent ---------- */
.floating-cta {
  position: fixed; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}
.floating-cta.bottom { bottom: 24px; }

.ai-call-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 100px;
  background: linear-gradient(135deg, #0b1024, #1a2447);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  cursor: pointer;
}
.ai-call-btn:hover {
  border-color: var(--neon);
  box-shadow: var(--glow-cyan-soft), 0 8px 24px rgba(0,0,0,0.4);
}
.ai-call-btn .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.chat-bubble {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon-2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-cyan);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.chat-bubble:hover { transform: scale(1.08) rotate(-4deg); }
.chat-bubble svg { width: 26px; height: 26px; color: #04060d; }
.chat-bubble .badge {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--magenta);
  color: white; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-0);
}

.chat-panel {
  position: fixed; bottom: 100px; right: 24px;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 140px);
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  z-index: 199;
  display: none; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,229,255,0.15);
  animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.chat-panel.open { display: flex; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 800px) {
  .floating-cta {
    right: 16px;
    bottom: 16px;
  }

  .ai-call-btn {
    display: none;
  }

  .chat-bubble {
    width: 52px;
    height: 52px;
  }
}

.chat-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(0,229,255,0.1), transparent);
}
.chat-header .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon-2));
  display: flex; align-items: center; justify-content: center;
  color: #04060d; font-weight: 700; font-family: var(--font-display);
  position: relative;
}
.chat-header .avatar::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--bg-1);
}
.chat-header .info h4 { font-size: 0.95rem; font-family: var(--font-display); }
.chat-header .info .status { font-size: 0.72rem; color: var(--fg-mute); font-family: var(--font-mono); }
.chat-close {
  margin-left: auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-dim); font-size: 20px;
}
.chat-close:hover { background: rgba(255,255,255,0.05); color: var(--fg); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-msg {
  max-width: 82%; padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  animation: msgIn 0.3s ease-out;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.bot {
  align-self: flex-start;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--neon);
  color: #04060d;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.chat-lead-form {
  align-self: stretch;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(7, 10, 22, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}
.chat-lead-form p {
  font-size: 0.78rem;
  color: var(--fg-dim);
}
.chat-lead-form input {
  width: 100%;
  padding: 9px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font: inherit;
  font-size: 0.8rem;
  outline: none;
}
.chat-lead-form input:focus { border-color: var(--neon); }
.chat-lead-form button {
  padding: 9px 12px;
  background: var(--neon);
  border-radius: 8px;
  color: #04060d;
  font-size: 0.8rem;
  font-weight: 600;
}
.chat-lead-form button:hover { background: #4dfbff; }
.chat-lead-form .form-status { color: var(--lime); font-size: 0.75rem; }
.chat-msg.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.chat-msg.typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--neon);
  animation: typing 1.2s infinite;
}
.chat-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.chat-quick {
  padding: 10px 20px 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chat-quick button {
  padding: 6px 12px;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--fg-dim);
  background: transparent;
  transition: all 0.2s;
}
.chat-quick button:hover { border-color: var(--neon); color: var(--fg); }

.chat-input-wrap {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center;
}
.chat-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
}
.chat-input:focus { border-color: var(--neon); }
.chat-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--neon);
  color: #04060d;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-send:hover { background: #4dfbff; }
.chat-send svg { width: 18px; height: 18px; }

.chat-email-notice {
  padding: 10px 20px;
  font-size: 0.72rem;
  color: var(--fg-mute);
  font-family: var(--font-mono);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-0);
  position: relative;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand h3 { font-size: 1.5rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; max-width: 300px; }
.footer h5 {
  font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--fg-mute); margin-bottom: 16px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--fg-dim); font-size: 0.9rem; transition: color 0.2s; }
.footer ul a:hover { color: var(--neon); }
.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--fg-mute);
  font-family: var(--font-mono);
}
@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ---------- Utility ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono); font-size: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--fg-dim);
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon); }

/* Reveal: fail-open. Hidden state only applied when JS marks the doc as ready to reveal. */
.reveal { transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1); }
html.js-reveal .reveal:not(.in) { opacity: 0; transform: translateY(30px); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: rgba(120,190,255,0.15); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,229,255,0.4); }

/* Selection */
::selection { background: var(--neon); color: #04060d; }

/* Shared: page header */
.page-header {
  padding: 180px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 50% 20%, rgba(0,229,255,0.12), transparent 60%),
    linear-gradient(180deg, rgba(0,229,255,0.03), transparent);
  pointer-events: none;
}
.page-header .container { position: relative; }
.page-header h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin: 20px auto 24px; max-width: 900px; font-weight: 500; }
.page-header p.lead { max-width: 640px; margin: 0 auto; font-size: 1.1rem; color: var(--fg-dim); }

.section-head { text-align: center; max-width: 780px; margin: 0 auto; }
.section-head h2 { margin-top: 16px; }
.section-head p { margin-top: 20px; font-size: 1.05rem; }

/* Global CTA row */
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
