/* IntelligentMobilityHub — landing + dashboard shared design system.
   Scoped to /landing assets so the RM app's own styles at public/css/style.css
   stay untouched. */
:root {
  --bg: #0b1220;
  --bg-2: #0e1628;
  --ink: #e6edf7;
  --ink-dim: #9aa6bb;
  /* #6b7891 measured 4.24:1 on --bg #0b1220 — below WCAG AA 4.5:1 for
     normal-size text. Lifted to #94a3b8 (7.30:1 on --bg) to match the same
     fix already shipped in /admin/system.css, so the apex marketing copy
     and the admin chrome carry hint text at the same contrast tier. */
  --ink-faint: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --green: #1D9E75;
  --green-glow: #2bd39a;
  --blue: #60a5fa;
  --blue-glow: #93c5fd;
  --amber: #EF9F27;
  --orange: #f97316;
  --red: #ef4444;
  --radius: 12px;
  --radius-lg: 16px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); }
body {
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(96, 165, 250, 0.08), transparent 60%),
    radial-gradient(900px 600px at 10% 10%, rgba(29, 158, 117, 0.07), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle 40×40 grid overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

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

/* Typography */
.mono {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  font-weight: 500;
}
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(40px, 5.6vw, 76px); font-weight: 500; }
h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 500; }
h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
p  { margin: 0; color: var(--ink-dim); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; position: relative; }

/* Liquid-glass card */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 50px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--green);
  color: #04150f;
  box-shadow: 0 0 0 1px rgba(43, 211, 154, 0.25), 0 12px 30px -12px rgba(29, 158, 117, 0.6);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--green-glow); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); }

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.12);
  color: var(--green-glow);
  border: 1px solid rgba(29, 158, 117, 0.3);
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-glow);
  box-shadow: 0 0 8px var(--green-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.chip.amber { background: rgba(239, 159, 39, 0.1); color: var(--amber); border-color: rgba(239, 159, 39, 0.25); }
.chip.amber .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* Section layout */
.section { position: relative; padding: 120px 0; z-index: 1; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--green-glow);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease-out, transform .6s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Utility */
.stack-2 { display: flex; flex-direction: column; gap: 8px; }
.stack-4 { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

/* Tweaks panel — internal demo only, gated behind ?tweaks=1 in App.jsx */
.tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 280px;
  z-index: 9999;
  padding: 16px;
  border-radius: var(--radius);
  display: none;
}
.tweaks.on { display: block; }
.tweaks h4 { margin: 0 0 12px 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.tweaks label { display: block; font-size: 11px; color: var(--ink-dim); margin: 10px 0 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.tweaks input[type="range"] { width: 100%; accent-color: var(--green); }
.tweaks .swatches { display: flex; gap: 8px; }
.tweaks .sw {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line-strong);
  cursor: pointer; position: relative;
}
.tweaks .sw.active { outline: 2px solid var(--ink); outline-offset: 2px; }
.tweaks .seg { display: flex; gap: 4px; padding: 3px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; }
.tweaks .seg button { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; color: var(--ink-dim); transition: background .15s ease, color .15s ease; }
.tweaks .seg button.on { background: rgba(255,255,255,0.08); color: var(--ink); }

/* Layout grids — referenced from HTML */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1040px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .module-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
@media (max-width: 840px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
}
.pipeline-step { padding: 20px 4px; position: relative; }
.pipeline-node {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  z-index: 1;
}
.pipeline-line {
  position: absolute; left: 70px; right: 70px; top: 50px; z-index: 0;
}

.module-card, .cap-card { will-change: transform; }

@media (max-width: 840px) {
  .section { padding: 80px 0; }
  .container { padding: 0 20px; }
}
