/* ============================================================
   Jianzhik.com — Global Design System
   Big-Data / Cybersecurity / Cyberpunk Visual Language
   ============================================================ */

/* ----------- Reset & Base ----------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.6;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ----------- Design Tokens ----------- */
:root {
  --bg-0: #05070d;
  --bg-1: #0a0e1a;
  --bg-2: #0f1424;
  --bg-3: #141a2e;
  --bg-glass: rgba(15, 20, 36, 0.55);

  --text-1: #e6edf7;
  --text-2: #aab4c8;
  --text-3: #6c7891;
  --text-mute: #4a5469;

  --cyan: #00e5ff;
  --cyan-2: #00b8d4;
  --cyan-soft: rgba(0, 229, 255, 0.15);
  --violet: #7c5cff;
  --violet-2: #5b3aff;
  --violet-soft: rgba(124, 92, 255, 0.18);
  --green: #00ffa3;
  --green-soft: rgba(0, 255, 163, 0.15);
  --amber: #ffb547;
  --red: #ff4d6d;

  --border-1: rgba(0, 229, 255, 0.15);
  --border-2: rgba(124, 92, 255, 0.20);
  --border-3: rgba(255, 255, 255, 0.06);

  --glow-cyan: 0 0 12px rgba(0, 229, 255, 0.55), 0 0 30px rgba(0, 229, 255, 0.25);
  --glow-violet: 0 0 12px rgba(124, 92, 255, 0.55), 0 0 30px rgba(124, 92, 255, 0.25);

  --radius-1: 6px;
  --radius-2: 12px;
  --radius-3: 18px;
  --radius-4: 24px;

  --ff-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Consolas, monospace;
  --ff-display: 'Space Grotesk', 'Inter', sans-serif;
}

/* ----------- Typography ----------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-1);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
h4 { font-size: 1.15rem; }
p  { color: var(--text-2); }

a { color: var(--cyan); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--cyan-2); }
::selection { background: var(--cyan); color: var(--bg-0); }

/* ----------- Layout primitives ----------- */
.wrap-1200, .wrap-1400 { max-width: 1320px; margin: 0 auto; padding: 0 28px; }
.wrap-1400 { max-width: 1400px; }

section { position: relative; padding: 110px 0; }
@media (max-width: 900px) { section { padding: 80px 0; } }

.section-header { max-width: 820px; margin: 0 auto 70px; text-align: center; }
.section-header .eyebrow {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: .8rem;
  letter-spacing: .25em;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--border-1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.section-header h2 { margin-bottom: 18px; }
.section-header p { color: var(--text-2); font-size: 1.05rem; }

/* ----------- Buttons ----------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  font-family: var(--ff-display); font-weight: 600; font-size: .95rem;
  border-radius: var(--radius-1);
  cursor: pointer; transition: all .25s ease;
  border: 1px solid transparent;
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  color: #04111a;
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover { transform: translateY(-2px); color: #04111a; box-shadow: 0 0 18px rgba(0,229,255,.7), 0 0 36px rgba(124,92,255,.5); }
.btn-ghost {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-1);
  color: var(--text-1);
}
.btn-ghost:hover { background: var(--cyan-soft); border-color: var(--cyan); color: var(--cyan); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ----------- Cards ----------- */
.card {
  background: linear-gradient(180deg, rgba(15,20,36,0.7) 0%, rgba(10,14,26,0.7) 100%);
  border: 1px solid var(--border-3);
  border-radius: var(--radius-2);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, transparent 50%, rgba(0,229,255,0.06) 100%);
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-1); box-shadow: 0 12px 40px rgba(0, 229, 255, 0.08); }
.card:hover::before { opacity: 1; }
.card-title { color: var(--text-1); font-family: var(--ff-display); font-size: 1.2rem; margin-bottom: 10px; }
.card-text { color: var(--text-2); font-size: .96rem; }

/* ----------- Top Navigation ----------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: all .3s ease;
  background: rgba(5, 7, 13, 0.45);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border-3);
}
.nav.scrolled {
  background: rgba(5, 7, 13, 0.85);
  border-bottom-color: var(--border-1);
  padding: 12px 0;
}
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--ff-display); font-weight: 700; font-size: 1.15rem;
  color: var(--text-1);
  letter-spacing: .02em;
}
.nav-brand .brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #04111a; font-weight: 800;
  box-shadow: var(--glow-cyan);
  font-family: var(--ff-mono);
}
.nav-brand small { color: var(--text-3); font-weight: 400; font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; margin-left: 6px; font-family: var(--ff-mono); }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text-2);
  padding: 9px 16px;
  border-radius: 6px;
  font-size: .94rem;
  font-weight: 500;
  position: relative;
  transition: all .2s ease;
}
.nav-links a:hover { color: var(--text-1); background: rgba(0,229,255,0.06); }
.nav-links a.active { color: var(--cyan); background: rgba(0,229,255,0.08); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 16px; height: 2px; background: var(--cyan); border-radius: 2px;
  box-shadow: var(--glow-cyan);
}
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-mobile-toggle { display: none; }
@media (max-width: 980px) {
  .nav-links {
    position: fixed; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(5,7,13,.97);
    padding: 22px;
    gap: 6px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: all .3s ease;
    border-bottom: 1px solid var(--border-1);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 18px; }
  .nav-mobile-toggle {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-1);
    border-radius: 8px;
    color: var(--cyan); cursor: pointer;
  }
}

/* ----------- Footer ----------- */
.footer {
  position: relative;
  background: linear-gradient(180deg, var(--bg-0) 0%, #02040a 100%);
  border-top: 1px solid var(--border-1);
  padding: 80px 0 30px;
  margin-top: 60px;
  overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .6;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h5 {
  font-family: var(--ff-mono);
  font-size: .78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-2); font-size: .94rem; transition: color .2s ease; }
.footer-col a:hover { color: var(--cyan); }
.footer-brand p { color: var(--text-2); font-size: .94rem; margin: 16px 0 22px; }
.footer-meta { font-size: .85rem; color: var(--text-3); }
.footer-meta .legal-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; }
.footer-meta .legal-links a { color: var(--text-3); font-size: .82rem; }
.footer-meta .legal-links a:hover { color: var(--cyan); }
.footer-bottom {
  border-top: 1px solid var(--border-3);
  padding-top: 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: .85rem; color: var(--text-3);
  font-family: var(--ff-mono);
  flex-wrap: wrap;
}
@media (max-width: 700px) { .footer-bottom { flex-direction: column; text-align: center; } }

/* ----------- Utility classes ----------- */
.text-cyan { color: var(--cyan); }
.text-violet { color: var(--violet); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-mono { font-family: var(--ff-mono); }
.divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border-1), transparent);
  margin: 40px 0;
}
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono); font-size: .72rem;
  letter-spacing: .15em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--cyan-soft); color: var(--cyan);
  border: 1px solid var(--border-1);
}
.tag.violet { background: var(--violet-soft); color: var(--violet); border-color: var(--border-2); }
.tag.green { background: var(--green-soft); color: var(--green); border-color: rgba(0,255,163,.3); }

/* ----------- Accessibility ----------- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--cyan); color: var(--bg-0);
  padding: 8px 12px; border-radius: 4px;
  z-index: 9999;
}
.skip-link:focus { top: 8px; }

/* ----------- Section positioning relative to grid-bg ----------- */
main, header, footer, section { position: relative; z-index: 2; }

/* ----------- Scrollbar ----------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  border-radius: 6px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }
/* ----------- Grid background (global) ----------- */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
}
.bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='1'/></svg>");
}
