/* ==========================================================================
   BitNiti Technologies — design tokens & base
   ========================================================================== */

:root {
  /* Palette */
  --navy-950: #0B0E1A;   /* page background */
  --navy-900: #10142A;   /* raised section surface */
  --navy-800: #161B36;   /* card surface */
  --navy-700: #232A4D;   /* borders / dividers */
  --tile-navy: #3B3556;  /* brand-mark tile navy */
  --accent-500: #7B7FEB; /* periwinkle — primary accent */
  --accent-400: #9A9DF2; /* lavender — hover / highlight */
  --accent-300: #C3C5F8; /* faint lavender — tints, glows */
  --text-primary: #F3F4FB;
  --text-muted: #9096B8;
  --text-faint: #5C6288;
  --white: #FFFFFF;

  /* Type */
  --font-display: "Archivo", system-ui, -apple-system, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --step-1: clamp(2.75rem, 2.1rem + 3vw, 4.5rem);   /* hero display */
  --step-2: clamp(2rem, 1.7rem + 1.6vw, 2.75rem);   /* section h2 */
  --step-3: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem); /* h3 */
  --step-0: 1.0625rem;  /* body */
  --step--1: 0.9375rem; /* small */

  /* Layout */
  --container-max: 1240px;
  --gutter: 24px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --tile-gap: 3px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--text-primary);
}

h1 { font-size: var(--step-1); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-3); font-weight: 700; }

p { margin: 0 0 1em; color: var(--text-muted); max-width: 62ch; }

a { color: var(--accent-400); text-decoration: none; }
a:hover { color: var(--accent-300); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-400);
  outline-offset: 3px;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 9vw, 128px);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head .eyebrow {
  color: var(--accent-400);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  margin-bottom: 0.75em;
  display: block;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-500);
  color: var(--navy-950);
  padding: 12px 20px;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: var(--gutter); top: var(--gutter); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.btn-primary {
  background: var(--accent-500);
  color: var(--navy-950);
}
.btn-primary:hover { background: var(--accent-400); color: var(--navy-950); }

.btn-ghost {
  background: transparent;
  border-color: var(--navy-700);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--accent-400); color: var(--accent-300); }

.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 26, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--navy-700);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
}
.brand:hover { color: var(--text-primary); }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.nav-links a:hover { color: var(--text-primary); background: var(--navy-900); }
.nav-links a.active { color: var(--accent-400); }

.nav-cta { display: none; }
@media (min-width: 900px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: none;
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0;
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.nav-toggle:hover { border-color: var(--accent-400); color: var(--accent-300); }
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-menu { display: none; }
.nav-toggle.is-open .icon-close { display: block; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

.nav-links { display: none; }
@media (min-width: 900px) { .nav-links { display: flex; } }

@media (max-width: 899px) {
  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy-950);
    border-bottom: 1px solid var(--navy-700);
    padding: 12px;
    gap: 0;
  }
  .nav-links.is-open a { padding: 14px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(123,127,235,0.08), transparent 40%),
    var(--navy-950);
  border-bottom: 1px solid var(--navy-700);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--navy-900) 1px, transparent 1px),
    linear-gradient(90deg, var(--navy-900) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, black, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  padding-block: clamp(72px, 11vw, 140px) clamp(56px, 8vw, 96px);
}

.hero-network-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.95) 65%, black 100%);
  mask-image: linear-gradient(100deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.95) 65%, black 100%);
}

.hero-copy { max-width: 640px; }

.hero-copy .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-400);
  border: 1px solid var(--navy-700);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.hero-copy h1 { max-width: 15ch; }

.hero-copy .lede {
  font-size: 1.125rem;
  max-width: 46ch;
  color: var(--text-muted);
  margin-bottom: 32px;
}


/* ==========================================================================
   Tile components — echoes the brand-mark's highlighted-tile motif
   ========================================================================== */

.tile-grid {
  display: grid;
  gap: var(--tile-gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tile-grid--five {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) {
  .tile-grid--five { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1120px) {
  .tile-grid--five { grid-template-columns: repeat(5, 1fr); }
}

.tile-card {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  padding: 32px 28px;
  transition: background-color 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
}

.tile-card .tile-index {
  font-family: var(--font-mono);
  color: var(--accent-400);
  font-size: 0.8125rem;
  display: block;
  margin-bottom: 20px;
}

.tile-card h3 { margin-bottom: 0.4em; }
.tile-card p { color: var(--text-muted); margin-bottom: 20px; }

.tile-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.tile-card li { padding-left: 18px; position: relative; }
.tile-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent-400);
}

.tile-card:hover,
.tile-card:focus-within {
  background: var(--accent-500);
  border-color: var(--accent-500);
}
.tile-card:hover h3,
.tile-card:hover .tile-index,
.tile-card:focus-within h3,
.tile-card:focus-within .tile-index { color: var(--navy-950); }
.tile-card:hover p,
.tile-card:focus-within p { color: var(--navy-950); opacity: 0.82; }
.tile-card:hover li,
.tile-card:focus-within li { color: var(--navy-950); }
.tile-card:hover li::before,
.tile-card:focus-within li::before { background: var(--navy-950); }

/* ==========================================================================
   Stats scorecard
   ========================================================================== */

.stat-grid {
  display: grid;
  gap: var(--tile-gap);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }

.stat-tile {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  padding: 28px 20px;
  text-align: left;
}

.stat-tile .stat-value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  color: var(--text-primary);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-tile .stat-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stat-tile.is-highlight {
  background: var(--accent-500);
  border-color: var(--accent-500);
}
.stat-tile.is-highlight .stat-value,
.stat-tile.is-highlight .stat-label { color: var(--navy-950); }

/* ==========================================================================
   Process
   ========================================================================== */

.process-list {
  display: grid;
  gap: var(--tile-gap);
  counter-reset: step;
}
@media (min-width: 860px) { .process-list { grid-template-columns: repeat(4, 1fr); } }

.process-step {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  padding: 32px 26px;
  position: relative;
}

.process-step .step-number {
  font-family: var(--font-mono);
  color: var(--accent-400);
  font-size: 1.5rem;
  display: block;
  margin-bottom: 24px;
}

.process-step h3 { font-size: 1.1875rem; margin-bottom: 0.5em; }
.process-step p { font-size: var(--step--1); }

/* ==========================================================================
   Cards: case studies, blog, jobs
   ========================================================================== */

.card-grid {
  display: grid;
  gap: var(--tile-gap);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card .tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-400);
}

a.card {
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}
a.card:hover {
  border-color: var(--accent-400);
  background: var(--navy-900);
}

.empty-state {
  border: 1px dashed var(--navy-700);
  padding: 48px 32px;
  text-align: left;
  color: var(--text-muted);
  max-width: 640px;
}
.empty-state h3 { color: var(--text-primary); }

/* ==========================================================================
   Split section (about / offices)
   ========================================================================== */

.split {
  display: grid;
  gap: 56px;
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.center { align-items: center; }
  .split.reverse > *:first-child { order: 2; }
  .split.reverse > *:last-child { order: 1; }
}

.service-visual {
  border-radius: var(--radius-md);
  border: 1px solid var(--navy-700);
  overflow: hidden;
  transition: border-color 220ms var(--ease);
  aspect-ratio: 4 / 3;
}
.service-visual:hover { border-color: var(--accent-400); }
.service-visual img,
.service-visual svg,
.service-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   Service illustrations — subtle idle motion + hover response.
   Reduced-motion users get the animation-suppression rule near the top of
   this file, which already zeroes out every animation-duration below.
   ========================================================================== */

@keyframes illusFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes illusDashFlow {
  to { stroke-dashoffset: -24; }
}
@keyframes illusSpin {
  to { transform: rotate(360deg); }
}
@keyframes illusBarPulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.06); }
}
@keyframes illusScan {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
}

.illus-float {
  animation: illusFloat 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 250ms var(--ease);
}
.service-visual:hover .illus-float { transform: translate(6px, -14px); }

.illus-flow { animation: illusDashFlow 1.4s linear infinite; }

.illus-outcome {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 250ms var(--ease);
}
.service-visual:hover .illus-outcome { transform: scale(1.14); }

.illus-rotate {
  animation: illusSpin 20s linear infinite;
  transform-box: view-box;
  transform-origin: 200px 150px;
  transition: animation-duration 250ms var(--ease);
}
.service-visual:hover .illus-rotate { animation-duration: 6s; }

.illus-bar {
  animation: illusBarPulse 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom;
}

.illus-magnifier {
  animation: illusScan 5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.illus-canvas-bg {
  position: relative;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--navy-900) 1px, transparent 1px),
    linear-gradient(90deg, var(--navy-900) 1px, transparent 1px);
  background-size: 40px 40px;
  background-color: var(--navy-800);
}
.illus-canvas-bg canvas { position: absolute; inset: 0; }

.bullet-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullet-list li {
  padding-left: 20px;
  position: relative;
  color: var(--text-muted);
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent-400);
}

.stripe {
  border-top: 1px solid var(--navy-700);
  border-bottom: 1px solid var(--navy-700);
  background: var(--navy-900);
}

.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--navy-700);
  color: var(--text-muted);
}
.kv-list li strong { color: var(--text-primary); font-weight: 600; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--navy-900);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--step-0);
  padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field-error {
  color: #F2A0A0;
  font-size: var(--step--1);
  margin-top: 6px;
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--navy-700);
  background: var(--navy-900);
  padding-block: 64px 32px;
}

.footer-grid {
  display: grid;
  gap: 40px;
  margin-bottom: 48px;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: var(--step--1); max-width: 34ch; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-faint);
  text-transform: none;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: var(--step--1); }
.footer-col a:hover { color: var(--accent-300); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--navy-700);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.footer-legal a {
  color: var(--text-faint);
  font-size: 0.8125rem;
}
.footer-legal a:hover { color: var(--accent-300); }

/* ==========================================================================
   Utilities
   ========================================================================== */

.prose { max-width: 720px; }
.prose .updated {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin-bottom: 40px;
  display: block;
}
.prose h2 { margin-top: 2.25em; font-size: 1.375rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 1.75em; font-size: 1.0625rem; }
.prose p, .prose li { max-width: none; }
.prose ul, .prose ol { color: var(--text-muted); padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--accent-400); }
.prose strong { color: var(--text-primary); }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
