/* ═══════════════════════════════════════════════════════════
   NSAI Design System — Shared Theme
   Include on ALL pages: <link rel="stylesheet" href="/css/theme.css">
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --bg-deep: #0B1220;
  --bg-surface: #1E2B40;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --cyan: #00FFFF;
  --cyan-muted: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #61DAFB;
  --violet: #7C3AED;
  --violet-muted: #8b5cf6;
  --emerald: #34d399;
  --amber: #f59e0b;
  --white: #ffffff;
  --zinc-100: #f4f4f5;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: linear-gradient(170deg, var(--bg-deep) 0%, #0d1829 40%, var(--bg-surface) 100%);
  background-attachment: fixed;
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
.mono { font-family: var(--font-mono); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
img[loading="lazy"] { opacity: 0; transition: opacity .4s; }
img[loading="lazy"].loaded, img[loading="lazy"][complete] { opacity: 1; }

/* ── Focus Styling (A11y) ── */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ── Film Grain Overlay ── */
.nsai-grain {
  position: fixed; inset: 0; pointer-events: none; opacity: .012; z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Animations ── */
@keyframes nsai-fadeUp { from { opacity:0; transform:translateY(24px) } to { opacity:1; transform:translateY(0) } }
@keyframes nsai-pulse { 0%,100% { opacity:1 } 50% { opacity:.4 } }
@keyframes nsai-glow { 0%,100% { box-shadow:0 0 30px rgba(0,255,255,0.1) } 50% { box-shadow:0 0 60px rgba(0,255,255,0.2) } }
@keyframes nsai-float { 0%,100% { transform:translateY(0) } 50% { transform:translateY(-6px) } }
.nsai-fade-up { animation: nsai-fadeUp .55s ease both; }
.nsai-float { animation: nsai-float 5s ease-in-out infinite; }

/* ── Navbar ── */
.nsai-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 68px;
  background: linear-gradient(180deg, rgba(11,18,32,0.95) 0%, rgba(11,18,32,0.88) 100%);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all .3s;
}
.nsai-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nsai-nav-brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
}
.nsai-nav-brand span {
  font-weight: 700; font-size: 16px; color: var(--white);
  letter-spacing: -0.01em;
}
.nsai-nav-brand .nsai-ai { color: var(--cyan); }
.nsai-nav-logo {
  width: 56px; height: 56px; border-radius: 14px;
  box-shadow: 0 0 24px rgba(0,255,255,0.15), 0 0 0 1px rgba(0,255,255,0.12);
  transition: box-shadow .3s, transform .3s;
}
.nsai-nav-logo:hover {
  box-shadow: 0 0 32px rgba(0,255,255,0.25), 0 0 0 1px rgba(0,255,255,0.2);
  transform: scale(1.03);
}

/* Nav links */
.nsai-nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none;
}
.nsai-nav-links a {
  color: var(--zinc-400); font-size: 14px; font-weight: 500;
  transition: color .2s;
}
.nsai-nav-links a:hover { color: var(--white); }

/* Nav CTA */
.nsai-nav-cta {
  display: flex; align-items: center; gap: 16px;
}

/* Hamburger (mobile) */
.nsai-hamburger {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  color: var(--zinc-400); transition: color .2s;
}
.nsai-hamburger:hover { color: var(--white); }
.nsai-mobile-menu {
  display: none; position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
  background: rgba(11,18,32,0.98); backdrop-filter: blur(20px);
  z-index: 99; padding: 24px;
  flex-direction: column; gap: 8px;
}
.nsai-mobile-menu.active { display: flex; }
.nsai-mobile-menu a {
  display: block; padding: 14px 20px; border-radius: var(--radius-md);
  color: var(--zinc-300); font-size: 16px; font-weight: 500;
  transition: all .2s;
}
.nsai-mobile-menu a:hover { background: rgba(255,255,255,0.05); color: var(--white); }

@media (max-width: 768px) {
  .nsai-nav-links { display: none; }
  .nsai-hamburger { display: block; }
  .nsai-nav-logo { width: 46px; height: 46px; border-radius: 12px; }
  .nsai-nav-brand span { font-size: 14px; }
}

/* ── Buttons ── */
.nsai-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--cyan-muted), #3b82f6);
  color: var(--white); font-family: var(--font-body);
  font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: var(--radius-lg); border: none;
  cursor: pointer; transition: all .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 4px 20px rgba(0,255,255,0.15);
  text-decoration: none;
}
.nsai-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0,255,255,0.25);
  filter: brightness(1.08);
}
.nsai-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--white); font-family: var(--font-body);
  font-weight: 600; font-size: 15px;
  padding: 14px 28px; border-radius: var(--radius-lg);
  border: 1px solid rgba(0,255,255,0.2);
  cursor: pointer; transition: all .3s;
  text-decoration: none;
}
.nsai-btn-secondary:hover {
  border-color: rgba(0,255,255,0.4);
  background: rgba(0,255,255,0.05);
  transform: translateY(-1px);
}
.nsai-btn-sm { padding: 10px 20px; font-size: 13px; border-radius: var(--radius-md); }

/* ── Glass Cards ── */
.nsai-glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(20px);
  transition: all .3s;
}
.nsai-glass:hover {
  border-color: rgba(0,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* ── Trust Badges ── */
.nsai-trust-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.15);
  border-radius: var(--radius-md); padding: 10px 20px;
  color: var(--emerald); font-weight: 600; font-size: 13px;
  transition: all .3s;
}
.nsai-trust-badge:hover { border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.1); }

/* ── Section helpers ── */
.nsai-section { padding: 80px 0; position: relative; z-index: 10; }
.nsai-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.nsai-section-label {
  color: var(--cyan); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px; margin-bottom: 12px;
}
.nsai-section-title {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800;
  color: var(--white); line-height: 1.15;
}

/* ── Footer ── */
.nsai-footer {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 40px 0; position: relative; z-index: 10;
}
.nsai-footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.nsai-footer a { color: var(--zinc-500); font-size: 13px; transition: color .2s; }
.nsai-footer a:hover { color: var(--zinc-300); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ── Selection ── */
::selection { background: rgba(0,255,255,0.2); color: var(--white); }
