/* ============================================================
   NEXUM SYSTEM — Global Design System
   Motion: Signal-pulse — elements broadcast into existence
   Palette: Cold-precision tech (navy × electric cyan)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@1&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Colors */
  --navy:         #0A0F1E;
  --navy-2:       #0D1526;
  --navy-card:    #111827;
  --navy-border:  #1A2235;
  --cyan:         #00D4FF;
  --cyan-15:      rgba(0, 212, 255, 0.15);
  --cyan-30:      rgba(0, 212, 255, 0.30);
  --cyan-dark:    #009ec2;
  --white:        #FFFFFF;
  --gray:         #B0B0B0;
  --gray-dim:     rgba(176, 176, 176, 0.4);
  --success:      #22c55e;
  --error:        #ef4444;

  /* Typography */
  --font:         'Geist', 'Inter', -apple-system, sans-serif;
  --font-mono:    'Geist Mono', 'Courier New', monospace;
  --font-serif:   'Instrument Serif', Georgia, serif;

  /* Spacing scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Container */
  --container-w: 1200px;
  --section-py:  clamp(64px, 8vw, 110px);

  /* Transitions */
  --t-fast:  0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t-med:   0.3s  cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:  0.55s cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring:0.4s  cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index scale */
  --z-base:    0;
  --z-above:   10;
  --z-nav:     100;
  --z-modal:   200;
  --z-toast:   300;
  --z-chatbot: 400;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--white); }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

.label {
  font-family: var(--font-mono);
  font-size: clamp(11px, 3.2vw, 20px);
  font-weight: 500;
  letter-spacing: clamp(1.5px, 0.55vw, 3px);
  text-transform: uppercase;
  color: var(--cyan);
}

.label::before {
  content: '// ';
  opacity: 0.5;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--sp-4); }
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all var(--t-med);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cyan);
  color: #000;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.btn-primary:hover::after { transform: scaleX(1); }
.btn-primary:hover { color: #000; box-shadow: 0 0 28px var(--cyan-30); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--navy-border);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-15);
}

.btn-ghost {
  background: transparent;
  color: var(--cyan);
  padding: 14px 0;
  gap: var(--sp-2);
}
.btn-ghost::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width var(--t-med);
}
.btn-ghost:hover::after { width: 100%; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  transition: border-color var(--t-med), box-shadow var(--t-med);
}
.card:hover {
  border-color: var(--cyan-30);
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.06);
}

/* ── Section utility ───────────────────────────────────────── */
.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-header {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-header h2 {
  font-size: clamp(32px, 4vw, 52px);
  margin-top: 12px;
}

/* ── Grid ──────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--navy-border) 30%, var(--navy-border) 70%, transparent);
  margin: 0;
}

/* ── Glow dot ──────────────────────────────────────────────── */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.dot.pulse {
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--cyan); opacity: 1; }
  50%       { box-shadow: 0 0 14px var(--cyan); opacity: 0.7; }
}

/* ── Reveal animation (scroll-triggered via JS) ─────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"] { transition-delay: 0.4s; }
[data-reveal][data-delay="5"] { transition-delay: 0.5s; }

/* ── Neural network background canvas ───────────────────────── */
canvas.neural-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
}

/* Anything inside a neural-bg parent that should sit above the canvas */
.neural-content {
  position: relative;
  z-index: 1;
}

/* ── Background grid (kept for non-hero sections) ───────────── */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(26,34,53,0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26,34,53,0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── Toast / notification ───────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: var(--z-toast);
  transition: transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.success { border-color: var(--success); }
#toast.error   { border-color: var(--error); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--navy-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-30); }

/* ── Utility ────────────────────────────────────────────────── */
.text-cyan  { color: var(--cyan); }
.text-gray  { color: var(--gray); }
.text-white { color: var(--white); }
.italic     { font-family: var(--font-serif); font-style: italic; }
.mono       { font-family: var(--font-mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── WHATSAPP FLOAT ──────────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

@media (max-width: 768px) {
  .whatsapp-float { bottom: 20px; left: 20px; width: 50px; height: 50px; }
  .whatsapp-float svg { width: 24px; height: 24px; }
}

/* ── FOOTER NEWSLETTER ───────────────────────────────────────── */
.footer-newsletter {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--navy-border);
  border-bottom: 1px solid var(--navy-border);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
}

.footer-newsletter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  margin: 0;
}

.footer-newsletter-form {
  display: flex;
  gap: var(--sp-2);
  flex: 1;
  min-width: 260px;
}

.footer-newsletter-form input[type="email"] {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--navy-border);
  border-radius: 6px;
  color: var(--white);
  font-size: 14px;
  transition: border-color var(--t-fast);
}

.footer-newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--cyan);
}

.footer-newsletter-form input[type="email"]::placeholder { color: #4B5563; }

.footer-newsletter-form button {
  padding: 10px 20px;
  background: var(--cyan);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast);
}

.footer-newsletter-form button:hover:not(:disabled) { background: var(--cyan-dark, #00b8d9); }
.footer-newsletter-form button:disabled { opacity: 0.7; cursor: default; }

@media (max-width: 600px) {
  .footer-newsletter { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .footer-newsletter-form { flex-direction: column; }
}
