/* ============================================================
   AID — Applied Intelligence Deployments
   Refined, structured aesthetic (Palantir-inspired):
   hairline grid, monospace technical layer, restrained accent.
   Brand: electric blue #1f9fe0 + deep navy. Self-contained.
   ============================================================ */

:root {
  --bg:        #060c13;
  --bg-2:      #08111a;
  --panel:     #0b1622;
  --panel-2:   #0e1c29;
  --ink:       #eef3f8;
  --ink-2:     #aebdcc;
  --muted:     #66788b;
  --muted-2:   #47566620;
  --line:      rgba(150, 178, 206, 0.13);
  --line-2:    rgba(150, 178, 206, 0.22);
  --line-soft: rgba(150, 178, 206, 0.07);
  --blue:      #1f9fe0;
  --blue-br:   #57bdf0;
  --blue-dim:  #2b7ba8;
  --good:      #37c98b;

  --maxw: 1200px;
  --ease: cubic-bezier(0.4, 0, 0.1, 1);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.018em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

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

/* ---------- Monospace technical labels ---------- */
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; }

.kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue);
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--blue); opacity: 0.6; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.section--bordered { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 64px; }
.section-index {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.1em; margin-bottom: 22px; display: flex; align-items: center; gap: 12px;
}
.section-index b { color: var(--ink); font-weight: 500; }
.section-head h2 { font-size: clamp(29px, 4vw, 44px); margin: 16px 0 18px; }
.section-head p { color: var(--ink-2); font-size: 18px; max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 4px; font-size: 14px; font-weight: 500;
  font-family: var(--sans); cursor: pointer; border: 1px solid transparent;
  transition: background .2s var(--ease), border-color .2s, color .2s, transform .15s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #04121c; font-weight: 600; }
.btn-primary:hover { background: var(--blue-br); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: #fff; background: rgba(31,159,224,0.06); }
.btn .arw { transition: transform .25s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 12, 19, 0.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(6, 12, 19, 0.94); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 30px; height: 35px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text .name { font-weight: 700; font-size: 19px; letter-spacing: 0.06em; color: #fff; }
.brand-text .sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { font-size: 14px; color: var(--ink-2); font-weight: 450; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 132px 0 108px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 30% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 30% 0%, #000 10%, transparent 70%);
}
.hero-glow {
  position: absolute; top: -280px; right: -140px; width: 760px; height: 620px;
  background: radial-gradient(circle, rgba(31,159,224,0.12) 0%, transparent 60%); filter: blur(8px);
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.hero .status {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,0.02);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-2);
  text-transform: uppercase; margin-bottom: 30px;
}
.hero .status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(55,201,139,0.16); }
.hero h1 { font-size: clamp(40px, 6.6vw, 74px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.03; }
.hero h1 .accent { color: var(--blue); }
.hero .lead { font-size: clamp(17px, 1.9vw, 20px); color: var(--ink-2); max-width: 640px; margin: 28px 0 40px; line-height: 1.62; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; gap: 40px; flex-wrap: wrap; }
.hero-meta div { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.hero-meta b { display: block; font-family: var(--sans); font-size: 14px; color: var(--ink); font-weight: 500; margin-top: 4px; letter-spacing: 0; }

/* ---------- Stats ---------- */
.stats { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 40px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--mono); font-size: clamp(28px, 3.2vw, 38px); font-weight: 500; color: #fff; letter-spacing: -0.01em; }
.stat .num i { color: var(--blue); font-style: normal; }
.stat .label { font-size: 13px; color: var(--muted); margin-top: 8px; letter-spacing: 0.01em; }
.stats-note { font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 16px 0 0; letter-spacing: 0.02em; }

/* ---------- Cards ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 32px;
  transition: border-color .3s, background .3s, transform .3s var(--ease);
}
.card:hover { border-color: var(--line-2); background: var(--panel-2); }

.icon-box {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 5px; display: grid; place-items: center;
  background: rgba(31,159,224,0.08); border: 1px solid rgba(31,159,224,0.24); color: var(--blue);
}
.icon-box svg { width: 20px; height: 20px; }

/* ---------- What we do ---------- */
.do-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.do-col .tag { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.do-col h3 { font-size: 22px; margin: 12px 0 10px; }
.do-col > p { color: var(--ink-2); margin-bottom: 28px; font-size: 15px; }
.do-list { display: grid; gap: 20px; }
.do-item { display: flex; gap: 16px; }
.do-item h4 { font-size: 15px; margin-bottom: 4px; }
.do-item p { font-size: 13.5px; color: var(--muted); }

/* ---------- Systems ---------- */
.systems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sys { display: flex; flex-direction: column; }
.sys .sys-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.sys .sys-num { font-family: var(--mono); font-size: 12px; color: var(--blue); letter-spacing: 0.08em; }
.sys .sys-cat { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.sys h3 { font-size: 19px; margin-bottom: 11px; letter-spacing: -0.01em; }
.sys p { font-size: 14px; color: var(--ink-2); flex-grow: 1; }
.sys .applies { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.03em; }
.sys.is-foresight { background: linear-gradient(165deg, rgba(31,159,224,0.10), rgba(31,159,224,0.015)); border-color: rgba(31,159,224,0.28); }
.sys .badge { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); border: 1px solid rgba(31,159,224,0.4); border-radius: 3px; padding: 3px 7px; }

.sys-cta {
  margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 32px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-2); flex-wrap: wrap;
}
.sys-cta h4 { font-size: 18px; }
.sys-cta p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- Process ---------- */
.process { background: var(--bg-2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.step { background: var(--bg); padding: 30px; transition: background .3s; }
.step:hover { background: var(--panel); }
.step .n { font-family: var(--mono); font-size: 12px; color: var(--blue); letter-spacing: 0.08em; }
.step h4 { font-size: 16.5px; margin: 16px 0 8px; }
.step p { font-size: 13.5px; color: var(--muted); }

/* ---------- Industries ---------- */
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.ind { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: var(--bg); transition: background .25s; position: relative; }
.ind:hover { background: var(--panel); }
.ind .ix { font-family: var(--mono); font-size: 11px; color: var(--muted); flex-shrink: 0; }
.ind .ic { color: var(--blue); flex-shrink: 0; }
.ind .ic svg { width: 22px; height: 22px; }
.ind .nm { font-weight: 500; font-size: 15px; }
.ind .nm small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--mono); letter-spacing: 0.01em; }

/* ---------- Why AID ---------- */
.why-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start; }
.why-list { display: grid; gap: 8px; }
.why-item { display: flex; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.why-item:first-child { border-top: 0; }
.why-item .wn { font-family: var(--mono); font-size: 12px; color: var(--blue); flex-shrink: 0; padding-top: 3px; }
.why-item h4 { font-size: 16px; margin-bottom: 6px; }
.why-item p { font-size: 14px; color: var(--muted); }
.why-panel { position: sticky; top: 100px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 34px; }
.why-panel .kicker { margin-bottom: 20px; }
.why-panel h3 { font-size: 19px; margin-bottom: 6px; }
.why-panel .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.mini-stat { padding: 20px; background: var(--bg-2); }
.mini-stat .num { font-family: var(--mono); font-size: 25px; font-weight: 500; color: #fff; }
.mini-stat .num i { color: var(--blue); font-style: normal; }
.mini-stat .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- CTA / Contact ---------- */
.cta-card {
  position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: linear-gradient(150deg, var(--panel-2) 0%, var(--bg-2) 100%); padding: 68px 60px;
}
.cta-card .glow { position: absolute; top: -180px; right: -100px; width: 460px; height: 460px; background: radial-gradient(circle, rgba(31,159,224,0.14), transparent 62%); filter: blur(8px); pointer-events: none; }
.cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: 52px; align-items: center; }
.cta h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 16px 0 18px; letter-spacing: -0.025em; }
.cta p { color: var(--ink-2); font-size: 16.5px; margin-bottom: 30px; }
.contact-box { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.contact-row { display: flex; gap: 15px; align-items: center; padding: 20px 22px; background: rgba(255,255,255,0.015); }
.contact-row + .contact-row { border-top: 1px solid var(--line); }
.contact-row .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-row .v { font-size: 15px; color: #fff; font-weight: 500; margin-top: 3px; }
.contact-row a.v:hover { color: var(--blue-br); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 36px; background: var(--bg-2); }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; margin-bottom: 44px; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--muted); font-size: 13.5px; margin-top: 18px; }
.footer-cols { display: flex; gap: 68px; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 18px; font-weight: 500; }
.footer-col a { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-bottom p { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: block; }
  .site-header.menu-open .nav-links {
    display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column;
    align-items: flex-start; gap: 2px; padding: 16px 32px 24px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  }
  .site-header.menu-open .nav-links a { padding: 11px 0; font-size: 16px; width: 100%; }
  .do-grid, .why-grid, .cta-inner { grid-template-columns: 1fr; }
  .systems-grid, .steps, .ind-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:last-child { grid-column: 1 / -1; }
  .why-panel { position: static; }
  .cta-card { padding: 44px 28px; }
}
@media (max-width: 600px) {
  .container { padding: 0 22px; }
  .section { padding: 80px 0; }
  .systems-grid, .steps, .ind-grid, .mini-stats { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .footer-top { flex-direction: column; gap: 32px; }
  .hero-meta { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover .arw { transform: none; }
}
