/* ══════════════════════════════════════════════════════
   NOCK TECHNOLOGIES — Brand System
   Shared across all pages
   ══════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #0B0F1A;
  --bg-card: #111827;
  --bg-card-hover: #1A2235;
  --bg-surface: #0F1629;
  --blue-primary: #3B6FD4;
  --blue-light: #5B8DEA;
  --blue-glow: rgba(59, 111, 212, 0.15);
  --blue-subtle: rgba(59, 111, 212, 0.08);
  --purple-accent: #7C5CFC;
  --gradient-brand: linear-gradient(135deg, #3B6FD4 0%, #7C5CFC 100%);
  --text-primary: #E8ECF4;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(59, 111, 212, 0.3);
  --green: #22C55E;
  --amber: #F59E0B;
  --red: #EF4444;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 320px;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}

/* ── LAYOUT ── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.scroll-progress {
  position: absolute; bottom: 0; left: 0; height: 3px;
  width: 0%; background: var(--gradient-brand);
  transition: width 0.12s ease-out; pointer-events: none;
}
nav .container-wide { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo {
  width: 34px; height: 34px;
  /* REPLACE: swap this background for your actual logo image */
  /* Example: background: url('/assets/logo.svg') center/contain no-repeat; */
  border-radius: 8px;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; color: white;
}
.nav-logo img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 8px;
  filter: brightness(1.2) contrast(1.2);
}
.nav-text {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.nav-text span { color: var(--text-muted); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-size: 14px; color: var(--text-secondary); text-decoration: none;
  font-weight: 500; transition: color 0.2s ease;
  position: relative;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 4px; border-radius: 4px; }
.nav-link.active { color: var(--blue-light); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -20px; left: 0; right: 0;
  height: 2px; background: var(--gradient-brand); border-radius: 1px;
}
.nav-cta {
  padding: 10px 24px; border-radius: 8px; border: none;
  background: var(--gradient-brand); color: white;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 24px rgba(59, 111, 212, 0.3); }
.nav-cta:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 4px; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 4px; border-radius: 4px; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--text-secondary); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: rgba(11, 15, 26, 0.95);
    backdrop-filter: blur(20px); padding: 16px 24px; gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-link.active::after { display: none; }
  .nav-toggle { display: block; }
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 10px; border: none;
  background: var(--gradient-brand); color: white;
  font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.25s ease;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 32px rgba(59, 111, 212, 0.4); }
.btn-primary:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 4px; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: all 0.25s ease;
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--blue-subtle); }
.btn-secondary:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 4px; }
.btn-sm { padding: 10px 24px; font-size: 14px; }

/* ── SECTIONS ── */
.section { padding: 100px 0; }
.section-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--blue-light); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 40px); font-weight: 700;
  letter-spacing: -0.01em; margin-bottom: 16px; line-height: 1.2;
}
.section-desc {
  font-size: 17px; color: var(--text-secondary); max-width: 640px;
  line-height: 1.7; margin-bottom: 48px;
}
.section-desc.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ── CARDS ── */
.card {
  padding: 32px; border-radius: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.25s ease;
}
.card { position: relative; }
.card:focus-visible { outline: 2px solid var(--blue-primary); outline-offset: 4px; }
.card:hover { border-color: var(--blue-light); background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: 0 0 20px var(--blue-glow); transition: all 0.3s ease; }
.chapter-card:focus-visible { outline: 2px solid var(--blue-primary); outline-offset: 4px; }
.chapter-card:hover { border-color: var(--blue-light); box-shadow: 0 0 20px var(--blue-glow); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--blue-subtle); border: 1px solid rgba(59, 111, 212, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 20px;
}
.card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-size: 14px; font-weight: 600; color: var(--blue-light); text-decoration: none;
  transition: gap 0.2s ease;
}
.card-link:hover { gap: 10px; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 12px; border-radius: 6px;
}
.badge-blue { background: var(--blue-subtle); color: var(--blue-light); border: 1px solid rgba(59, 111, 212, 0.15); }
.badge-green { background: rgba(34, 197, 94, 0.1); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.15); }
.badge-amber { background: rgba(245, 158, 11, 0.1); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.15); }

/* ── DIVIDERS ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── FOOTER ── */
footer {
  padding: 60px 0 40px; border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-brand-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-top: 12px; max-width: 300px; }
.footer-creds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.footer-creds span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 2px 8px; border-radius: 4px; background: rgba(148, 163, 184, 0.08); }
.footer-col h4 {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-secondary); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 14px; color: var(--text-muted); text-decoration: none;
  padding: 4px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-col a:focus-visible, .nav-brand:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 4px; border-radius: 4px; }
.footer-link-with-icon { display: inline-flex; align-items: center; gap: 8px; }
.footer-icon { width: 18px; height: 18px; flex-shrink: 0; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 13px; color: var(--text-muted); }
.footer-bottom a { color: var(--blue-light); text-decoration: none; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── GSAP: particles, grid, vision connectors ── */
.particle {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: var(--blue-primary); opacity: 0;
}
.hero-grid {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; opacity: 0.15;
}
.hero-grid-line { position: absolute; background: var(--blue-primary); opacity: 0; }
.hero-grid-line.h { height: 1px; width: 100%; }
.hero-grid-line.v { width: 1px; height: 100%; }
.vision-connector {
  width: 2px; height: 0;
  background: var(--gradient-brand);
  margin-left: 23px;
  border-radius: 1px;
}

/* ── HERO GLOW ── */
.hero-glow {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(59, 111, 212, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow-pulse 8s ease-in-out infinite;
}
@keyframes hero-glow-pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.85; transform: translateX(-50%) scale(1.05); }
}

/* ── Motion & accessibility ── */
.particle, .hero-grid-line { will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) {
  .particle, .hero-grid-line { display: none !important; }
  .gradient-text { animation: none !important; background-size: 100% !important; }
  .hero-glow { animation: none !important; }
}

/* ── Narrow viewports (e.g. iPhone SE 320px) ── */
@media (max-width: 380px) {
  .stat-num { font-size: 28px; }
}
