/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;700&display=swap');

/* Design Tokens */
:root {
  --bg: #FAFBFE;
  --surface: #F0F2F8;
  --text: #1A1D2B;
  --primary: #0066FF;
  --accent: #00D4AA;
  --muted: #8892A7;
  --line: #D4D9E6;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Nav transitions */
.nav-transparent {
  background: transparent;
  border-bottom: 1px solid transparent;
}
.nav-solid {
  background: rgba(250, 251, 254, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
nav { transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease; }

/* SVG utilities */
svg { max-width: 100%; height: auto; }
.svg-draw {
  stroke-dasharray: var(--dash-length, 1000);
  stroke-dashoffset: var(--dash-length, 1000);
}

/* Geometric element base styles */
.geo-line { stroke: var(--line); stroke-width: 1; fill: none; }
.geo-node { stroke: var(--line); stroke-width: 1.5; fill: white; }
.geo-dot { fill: var(--primary); }
.geo-accent { stroke: var(--primary); fill: none; }

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
}
.btn-primary:hover {
  background: #0055DD;
  border-color: #0055DD;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: rgba(0, 102, 255, 0.08);
  transform: translateY(-1px);
}

/* Card base */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}
.card:hover {
  border-color: rgba(0, 102, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Eyebrow label */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
}

/* Section spacing */
.section { padding: 6rem 2rem; }
.section-surface { background: var(--surface); }

/* Container */
.container { max-width: 72rem; margin: 0 auto; }
.container-narrow { max-width: 64rem; margin: 0 auto; }

/* Responsive */
@media (max-width: 768px) {
  .section { padding: 3rem 1rem; }
}

/* ===========================
   RESPONSIVE FIXES
   =========================== */

/* Mobile type scaling */
@media (max-width: 640px) {
  h1 { font-size: 2rem !important; line-height: 1.15 !important; }
  h2 { font-size: 1.5rem !important; }
  .section { padding: 3rem 1rem; }
}

/* Timeline mobile adjustments */
@media (max-width: 768px) {
  .timeline-number {
    font-size: 2.5rem;
  }
}

/* SVG responsive scaling */
svg:not([width]) {
  max-width: 100%;
  height: auto;
}

/* Prevent horizontal overflow */
body {
  overflow-x: hidden;
}

/* ===========================
   FOCUS & ACCESSIBILITY
   =========================== */

/* Focus ring for keyboard nav */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================
   SELECTION & MISC
   =========================== */

::selection {
  background: rgba(0, 102, 255, 0.15);
  color: var(--text);
}

/* Smooth image rendering for SVGs */
svg {
  shape-rendering: geometricPrecision;
}

/* Code block styling for contact page */
.code-block {
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}

/* Hero dark gradient for particle mesh contrast */
#hero {
  background: linear-gradient(180deg, #0D1117 0%, #151B26 50%, #1A2233 100%);
}
#hero .hero-content h1 { color: #FFFFFF; }
#hero .hero-content p { color: #8892A7; }

/* Nav on dark hero — light text when transparent (home page only) */
.hero-dark .nav-transparent .nav-link { color: rgba(255, 255, 255, 0.7) !important; }
.hero-dark .nav-transparent .nav-link:hover { color: #FFFFFF !important; }
.hero-dark .nav-transparent a[href="index.html"].nav-link { color: #FFFFFF !important; }
.hero-dark .nav-transparent [class*="tracking-"] { color: #FFFFFF !important; }
.hero-dark .nav-transparent #nav-hamburger span { background: #FFFFFF !important; }
.hero-dark .nav-transparent #nav-mobile-menu .nav-link { color: rgba(255, 255, 255, 0.7) !important; }
.hero-dark .nav-transparent #nav-mobile-menu .btn-primary { color: #FFFFFF !important; }
#hero .btn-outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}
#hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}
#hero .stats-bar {
  background: rgba(13, 17, 23, 0.7) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(212, 217, 230, 0.1) !important;
}
#hero .stats-bar [data-count-to] { color: #FFFFFF !important; }
#hero .stats-bar .text-xs,
#hero .stats-bar .text-sm { color: #8892A7 !important; }

/* Trust Bar marquee */
.marquee {
  --gap: 4rem;
  --duration: 35s;
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: var(--gap);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-content {
  flex-shrink: 0;
  min-width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: var(--gap);
  list-style: none;
  padding: 0;
  margin: 0;
  animation: marquee-scroll var(--duration) linear infinite;
}
.trust-logo {
  display: block;
  height: 28px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.trust-logo:hover {
  opacity: 0.85;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - var(--gap))); }
}
.marquee:hover .marquee-content {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .marquee-content { animation-play-state: paused; }
}

/* Performance stats dark section */
#performance-stats {
  position: relative;
  background: linear-gradient(180deg, #0D1117 0%, #1A2233 100%);
}
#performance-stats .eyebrow { color: var(--primary); }
#performance-stats .stat-value { color: #FFFFFF; }
#performance-stats .stat-label { color: #8892A7; }

/* Closing CTA dark section */
#closing-cta {
  position: relative;
  background: linear-gradient(180deg, #1A2233 0%, #0D1117 100%);
}
#closing-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 102, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}
#closing-cta h2 { color: #FFFFFF; }
#closing-cta p { color: #8892A7; }
#closing-cta .btn-outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}
#closing-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}
