/* ============================================================
   4D Imagination — Main Stylesheet
   Style: Navy Authority × Charcoal Tech fusion
   ============================================================ */

/* ── THEME: Navy Authority (default) ── */
:root,
html.theme-navy {
  --bg-primary:    #0a0a16;
  --bg-surface:    #0d0d1a;
  --bg-surface-2:  #08080f;
  --bg-nav:        rgba(10, 10, 22, 0.97);
  --border:        #16162a;
  --border-accent: rgba(37, 99, 235, 0.22);
  --accent:        #2563eb;
  --accent-dark:   #1d4ed8;
  --accent-rgb:    37, 99, 235;
  --highlight:     #38bdf8;
  --highlight-rgb: 56, 189, 248;
  --text-primary:  #f8fafc;
  --text-secondary:#94a3b8;
  --text-muted:    #3a3a5e;
  --text-faint:    #1e1e32;
  --glow-hero:     rgba(37, 99, 235, 0.13);
  --glow-ai:       rgba(56, 189, 248, 0.07);
  --card-bg:       #0d0d1a;
  --card-hover:    #0f0f22;
  --stat-grad:     linear-gradient(135deg, #ffffff, #94a3b8);
  --btn-shadow:    0 8px 28px rgba(37, 99, 235, 0.35);
  --scan-color:    rgba(37, 99, 235, 0.45);
  --nav-link:      #4a4a6a;
  --nav-link-hover:#94a3b8;
  --section-tag:   #2563eb;
}

/* ── THEME: Charcoal Tech ── */
html.theme-charcoal {
  --bg-primary:    #0d0d14;
  --bg-surface:    #12121e;
  --bg-surface-2:  #0a0a12;
  --bg-nav:        rgba(13, 13, 20, 0.98);
  --border:        #1e1e32;
  --border-accent: rgba(124, 58, 237, 0.22);
  --accent:        #7c3aed;
  --accent-dark:   #6d28d9;
  --accent-rgb:    124, 58, 237;
  --highlight:     #00d4ff;
  --highlight-rgb: 0, 212, 255;
  --text-primary:  #e0e0ff;
  --text-secondary:#8080a0;
  --text-muted:    #3a3a5a;
  --text-faint:    #1a1a2e;
  --glow-hero:     rgba(124, 58, 237, 0.12);
  --glow-ai:       rgba(0, 212, 255, 0.07);
  --card-bg:       #12121e;
  --card-hover:    #16162a;
  --stat-grad:     linear-gradient(135deg, #e0e0ff, #8080a0);
  --btn-shadow:    0 8px 28px rgba(124, 58, 237, 0.35);
  --scan-color:    rgba(0, 212, 255, 0.4);
  --nav-link:      #444464;
  --nav-link-hover:#8080a0;
  --section-tag:   #7c3aed;
}

/* ── THEME: Professional Blue-Green ── */
html.theme-blue-green {
  --bg-primary:    #f8faff;
  --bg-surface:    #ffffff;
  --bg-surface-2:  #eef4ff;
  --bg-nav:        rgba(255, 255, 255, 0.97);
  --border:        #dce8f5;
  --border-accent: rgba(30, 58, 95, 0.18);
  --accent:        #1e3a5f;
  --accent-dark:   #16304f;
  --accent-rgb:    30, 58, 95;
  --highlight:     #10b981;
  --highlight-rgb: 16, 185, 129;
  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --text-faint:    #dce8f5;
  --glow-hero:     rgba(30, 58, 95, 0.07);
  --glow-ai:       rgba(16, 185, 129, 0.07);
  --card-bg:       #f8faff;
  --card-hover:    #eef4ff;
  --stat-grad:     linear-gradient(135deg, #0f172a, #475569);
  --btn-shadow:    0 8px 28px rgba(30, 58, 95, 0.25);
  --scan-color:    rgba(16, 185, 129, 0.35);
  --nav-link:      #64748b;
  --nav-link-hover:#1e3a5f;
  --section-tag:   #1e3a5f;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  transition: background-color 0.4s ease;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ─────────────────────────────────────────────
   SCROLL REVEAL
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────── */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  height: 68px;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-accent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
#main-nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  color: var(--nav-link);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--nav-link-hover); }
.nav-links a.nav-ai { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Theme swatches */
.theme-swatches {
  display: flex;
  gap: 6px;
  align-items: center;
}
.theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}
.theme-swatch:hover { transform: scale(1.25); }
.theme-swatch.active { border-color: var(--text-secondary); }
.swatch-navy       { background: #2563eb; }
.swatch-charcoal   { background: #7c3aed; }
.swatch-blue-green { background: #10b981; }

/* Language toggle */
.lang-btn {
  font-size: 0.72rem;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 4px;
  padding: 5px 12px;
  letter-spacing: 0.08em;
  transition: background 0.2s;
}
.lang-btn:hover { background: rgba(var(--accent-rgb), 0.15); }

/* CTA button */
.nav-cta {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  padding: 9px 22px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--btn-shadow);
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  padding: 8px 0 16px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 30px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.mobile-menu a:hover { color: var(--text-primary); }

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
#hero {
  position: relative;
  padding: 110px 50px 100px;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  overflow: hidden;
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

/* Scan line */
.hero-scan {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--scan-color) 30%,
    rgba(var(--highlight-rgb), 0.55) 50%,
    var(--scan-color) 70%,
    transparent 100%
  );
  animation: scanDown 7s linear infinite;
  top: 0;
  pointer-events: none;
}
@keyframes scanDown {
  0%   { top: 0;    opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

/* Glow blobs */
.hero-glow-1 {
  position: absolute;
  top: -150px; right: -120px;
  width: 650px; height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-hero) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  bottom: -120px; left: 8%;
  width: 450px; height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-ai) 0%, transparent 65%);
  pointer-events: none;
}

/* Flowing dots */
.hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.dot-flow {
  position: absolute;
  width: 10px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  top: 60%; left: -20px;
  animation: flowAcross 5s linear infinite;
  opacity: 0;
}
.dot-flow:nth-child(2) { top: 65%; animation-delay: 1.6s; }
.dot-flow:nth-child(3) { top: 70%; animation-delay: 3.2s; }
@keyframes flowAcross {
  0%   { left: -20px;         opacity: 0; }
  5%   {                       opacity: 1; }
  90%  {                       opacity: 0.8; }
  100% { left: calc(100% + 20px); opacity: 0; }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 660px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 24px;
  font-family: 'Courier New', monospace;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2s infinite;
  flex-shrink: 0;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.75); }
}

.hero-content h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}
.hero-content h1 .accent {
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.78;
  margin: 22px 0 40px;
  max-width: 540px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  box-shadow: var(--btn-shadow);
  transition: opacity 0.2s, transform 0.2s;
  display: inline-block;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }

.btn-secondary {
  color: var(--text-muted);
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border-accent);
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text-secondary); }

/* ─────────────────────────────────────────────
   STATS BAR
───────────────────────────────────────────── */
#stats {
  display: flex;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-accent);
  border-bottom: 1px solid var(--border-accent);
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 30px 20px;
  border-right: 1px solid var(--border);
  position: relative;
}
.stat-item:last-child { border-right: none; }
.stat-item::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  background: var(--stat-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-number .stat-accent {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 7px;
  font-family: 'Courier New', monospace;
}

/* ─────────────────────────────────────────────
   SECTION COMMON
───────────────────────────────────────────── */
section { padding: 80px 50px; }

.section-header { margin-bottom: 48px; }
.section-tag {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--section-tag);
  font-family: 'Courier New', monospace;
  margin-bottom: 10px;
  display: block;
}
.section-tag::before { content: '// '; opacity: 0.45; }
.section-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.section-title .ghost {
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
}

/* ─────────────────────────────────────────────
   SERVICES
───────────────────────────────────────────── */
#services { background: var(--bg-surface-2); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.service-card:hover {
  border-color: var(--border-accent);
  background: var(--card-hover);
  transform: translateY(-4px);
}
.service-card:hover::before { transform: scaleX(1); }

.card-num {
  font-size: 0.6rem;
  color: var(--text-faint);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.card-icon {
  width: 42px; height: 42px;
  margin-bottom: 16px;
}
.card-icon svg { width: 100%; height: 100%; }

.card-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.card-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.card-link {
  font-size: 0.7rem;
  color: var(--accent);
  font-family: 'Courier New', monospace;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.card-link:hover { gap: 8px; }

/* ─────────────────────────────────────────────
   SERVICE MODAL
───────────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  padding: 40px 44px;
  max-width: 560px;
  width: 100%;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
#modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.modal-close:hover { color: var(--text-primary); background: var(--border); }

.modal-icon { margin-bottom: 20px; }
.modal-icon svg { width: 48px; height: 48px; }

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}
.modal-body li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.modal-body li::before {
  content: '→';
  color: var(--accent);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
  margin-top: 1px;
}
.modal-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  padding: 12px 26px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--btn-shadow);
  transition: opacity 0.2s;
}
.modal-cta:hover { opacity: 0.85; }

/* ─────────────────────────────────────────────
   PROCESS PIPELINE
───────────────────────────────────────────── */
#process { background: var(--bg-primary); }

.pipeline-wrap {
  position: relative;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 32px;
  overflow: hidden;
}
/* Horizontal center line */
.pipeline-wrap::before {
  content: '';
  position: absolute;
  top: 50%; left: 30px; right: 30px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--accent-rgb), 0.2),
    rgba(var(--highlight-rgb), 0.3),
    rgba(var(--accent-rgb), 0.2),
    transparent
  );
  transform: translateY(-50%);
}

.pipeline-inner {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 1;
}
.pipeline-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.node-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.node-circle.accent-node {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}
.node-circle.ai-node {
  border-color: var(--highlight);
  background: rgba(var(--highlight-rgb), 0.08);
  box-shadow: 0 0 22px rgba(var(--highlight-rgb), 0.25);
}
.node-circle svg { width: 24px; height: 24px; }

.node-label {
  font-size: 0.66rem;
  color: var(--text-muted);
  text-align: center;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  letter-spacing: 0.04em;
}
.node-label.accent-label { color: var(--text-secondary); }
.node-label.ai-label { color: var(--highlight); opacity: 0.8; }

/* Arrows */
.pipeline-arrow {
  flex: 0 0 24px;
  text-align: center;
  color: var(--border-accent);
  font-size: 1rem;
  user-select: none;
}

/* Flowing dot animation */
.pipeline-dots {
  position: absolute;
  top: calc(50% - 1px);
  left: 30px; right: 30px;
  height: 4px;
  pointer-events: none;
  overflow: hidden;
}
.pdot {
  position: absolute;
  width: 12px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  top: 0; left: -20px;
  animation: pipeFlow 3.5s linear infinite;
  opacity: 0;
}
.pdot:nth-child(2) { animation-delay: 1.17s; }
.pdot:nth-child(3) { animation-delay: 2.34s; }
@keyframes pipeFlow {
  0%   { left: -20px;           opacity: 0; }
  6%   {                         opacity: 1; }
  92%  {                         opacity: 0.9; }
  100% { left: calc(100% + 20px); opacity: 0; }
}

/* ─────────────────────────────────────────────
   WHY US
───────────────────────────────────────────── */
#why-us { background: var(--bg-surface-2); }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 38px 30px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.pillar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.pillar:hover { border-color: var(--border-accent); }
.pillar:hover::after { opacity: 1; }

.pillar-icon { margin-bottom: 20px; }
.pillar-icon svg { width: 48px; height: 48px; }

.pillar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.pillar-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ─────────────────────────────────────────────
   AI / CLAUDE SECTION
───────────────────────────────────────────── */
#ai {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(var(--highlight-rgb), 0.1);
}
#ai::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--glow-ai) 0%, transparent 68%);
  pointer-events: none;
}

.ai-inner {
  display: flex;
  gap: 70px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ai-content { flex: 1; }

.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  color: var(--highlight);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-family: 'Courier New', monospace;
}
.ai-tag::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--highlight);
}

.ai-content h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 18px;
}
.ai-content h2 .accent {
  color: var(--highlight);
}
.ai-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 480px;
}
.ai-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.ai-features li::before {
  content: '→';
  color: var(--highlight);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
  font-size: 0.78rem;
  margin-top: 2px;
}

/* AI Chat card */
.ai-visual { flex: 0 0 300px; }
.ai-card {
  background: var(--card-bg);
  border: 1px solid rgba(var(--highlight-rgb), 0.18);
  border-radius: 14px;
  padding: 24px;
  font-family: 'Courier New', monospace;
}
.ai-card-header {
  font-size: 0.6rem;
  color: var(--highlight);
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  opacity: 0.75;
}
.ai-chat { display: flex; flex-direction: column; gap: 12px; }
.ai-msg {
  font-size: 0.72rem;
  line-height: 1.6;
  padding: 11px 14px;
  border-radius: 8px;
  white-space: pre-line;
}
.ai-msg.user {
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  color: var(--text-muted);
  align-self: flex-end;
  max-width: 85%;
}
.ai-msg.claude {
  background: rgba(var(--highlight-rgb), 0.06);
  border: 1px solid rgba(var(--highlight-rgb), 0.12);
  color: var(--text-secondary);
  align-self: flex-start;
}
.ai-cursor {
  display: inline-block;
  width: 7px; height: 0.85em;
  background: var(--highlight);
  margin-left: 2px;
  vertical-align: text-bottom;
  border-radius: 1px;
  animation: cursorBlink 1.1s infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────── */
#contact { background: var(--bg-surface-2); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.66rem;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
}
.form-input {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 14px;
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-input::placeholder { color: var(--text-faint); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}
textarea.form-input { resize: vertical; min-height: 110px; }

.submit-btn {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  box-shadow: var(--btn-shadow);
  transition: opacity 0.2s, transform 0.2s;
}
.submit-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* Map + info */
.contact-right { display: flex; flex-direction: column; gap: 24px; }
.map-container {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 220px;
}
.map-container iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-info { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: flex; align-items: flex-start; gap: 14px; }
.info-icon {
  width: 34px; height: 34px;
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-icon svg { width: 16px; height: 16px; }
.info-text-lbl {
  font-size: 0.63rem;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
  margin-bottom: 2px;
}
.info-text-val {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.info-text-val a { color: var(--accent); }
.info-text-val a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
  background: var(--bg-surface-2);
  border-top: 1px solid rgba(var(--accent-rgb), 0.1);
  padding: 28px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-left {
  font-size: 0.7rem;
  color: var(--text-faint);
  font-family: 'Courier New', monospace;
}
.footer-left span { color: var(--text-muted); }
.footer-right { display: flex; gap: 22px; align-items: center; }
.footer-right a {
  font-size: 0.7rem;
  color: var(--text-faint);
  font-family: 'Courier New', monospace;
  transition: color 0.2s;
}
.footer-right a:hover { color: var(--accent); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .ai-inner { gap: 40px; }
  .ai-visual { flex: 0 0 260px; }
}

@media (max-width: 900px) {
  #main-nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  section { padding: 60px 24px; }
  #hero { padding: 90px 24px 80px; min-height: auto; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid { grid-template-columns: 1fr 1fr; }
  .ai-inner { flex-direction: column; gap: 36px; }
  .ai-visual { flex: none; width: 100%; max-width: 420px; }
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
  footer { padding: 24px; }
  .pipeline-wrap { padding: 32px 16px; }
  .pipeline-inner { overflow-x: auto; gap: 4px; padding-bottom: 8px; }
  .pipeline-node { min-width: 70px; flex: 0 0 auto; }
  .node-circle { width: 46px; height: 46px; }
  .pipeline-arrow { flex: 0 0 14px; font-size: 0.7rem; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  #stats { flex-wrap: wrap; }
  .stat-item { flex: 0 0 50%; border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .btn-primary, .btn-secondary { text-align: center; width: 100%; max-width: 280px; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
  .footer-right { justify-content: center; }
  .modal-box { padding: 28px 20px; }
  .section-title { letter-spacing: -0.2px; }
}

@media (max-width: 400px) {
  .theme-swatches { display: none; }
  #hero { padding: 80px 16px 60px; }
  section { padding: 50px 16px; }
}

/* ─────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-scan,
  .dot-flow,
  .pdot,
  .hero-eyebrow::before,
  .ai-cursor { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .service-card, .pillar { transition: none; }
}
