/* =============================================
   VOLTRA SERVICES — Home.css
   Dark tech aesthetic: deep navy/black base,
   electric-blue accents, Barlow type family
   ============================================= */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark:       #040b18;
  --bg-card:       rgba(6, 18, 40, 0.82);
  --blue-bright:   #1a8cff;
  --blue-mid:      #0f5fc2;
  --blue-glow:     rgba(26, 140, 255, 0.18);
  --blue-border:   rgba(26, 140, 255, 0.35);
  --white:         #ffffff;
  --white-soft:    rgba(255, 255, 255, 0.85);
  --white-muted:   rgba(255, 255, 255, 0.55);
  --font-display:  'Barlow Condensed', sans-serif;
  --font-body:     'Barlow', sans-serif;
  --nav-h:         68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- BACKGROUND ---------- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* When no image is provided the overlay still gives a rich dark base */
  opacity: 0.55;
}

/* If the image fails to load or no src is set, show a gradient fallback */
.bg-img[src="YOUR_BACKGROUND_IMAGE_HERE.jpg"],
.bg-img:not([src]),
.bg-img[src=""] {
  opacity: 0;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 30%, rgba(10, 50, 120, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 10% 60%, rgba(5, 20, 60, 0.7) 0%, transparent 70%),
    linear-gradient(180deg, rgba(4, 11, 24, 0.55) 0%, rgba(4, 11, 24, 0.92) 100%);
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: auto;
}

.nav-inner {
  background: rgba(8, 20, 50, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--blue-border);
  border-radius: 40px;
  padding: 0 20px 0 32px;
  display: flex;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 52px;
}

.nav-link {
  text-decoration: none;
  color: var(--white-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 24px;
  transition: color 0.22s, background 0.22s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(26, 140, 255, 0.12);
}

.nav-link.active::after {
  content: '';
  display: block;
  height: 2px;
  width: 60%;
  background: var(--blue-bright);
  border-radius: 2px;
  margin: 2px auto 0;
}

/* ---------- MAIN LAYOUT ---------- */
main {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- HERO SECTION ---------- */
.hero {
  width: 100%;
  max-width: 1100px;
  padding: 0 24px;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--blue-border);
  border-radius: 20px;
  padding: 42px 48px 36px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 0 60px rgba(26, 140, 255, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tagline */
.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--blue-bright);
  background: rgba(26, 140, 255, 0.1);
  border: 1px solid rgba(26, 140, 255, 0.3);
  border-radius: 24px;
  padding: 5px 16px;
  margin-bottom: 22px;
}

.bolt {
  font-size: 0.9rem;
}

/* Title */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--white);
  margin-bottom: 10px;
  text-shadow: 0 0 40px rgba(26, 140, 255, 0.25);
}

.accent {
  color: var(--blue-bright);
}

/* Subtitle */
.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--white-muted);
  margin-bottom: 30px;
}

/* Body columns */
.hero-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}

.hero-left p,
.hero-right p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--white-soft);
  margin-bottom: 14px;
}

.hero-left p:last-child,
.hero-right p:last-child {
  margin-bottom: 0;
}

.scale-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem !important;
  color: var(--blue-bright) !important;
  margin-bottom: 10px !important;
}

.scale-icon { font-size: 1rem; }

/* CTA Buttons */
.hero-ctas {
  display: flex;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 26px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  border: none;
}

.btn-primary {
  background: var(--blue-bright);
  color: #fff;
  box-shadow: 0 4px 20px rgba(26, 140, 255, 0.4);
}

.btn-primary:hover {
  background: #3d9fff;
  box-shadow: 0 6px 28px rgba(26, 140, 255, 0.6);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
  background: rgba(26, 140, 255, 0.07);
  transform: translateY(-2px);
}

/* Feature pills row */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px solid var(--blue-border);
  padding-top: 28px;
  margin-top: 8px;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(26, 140, 255, 0.06);
  border: 1px solid rgba(26, 140, 255, 0.18);
  border-radius: 12px;
  padding: 14px 14px;
  transition: background 0.2s, border-color 0.2s;
}

.feature:hover {
  background: rgba(26, 140, 255, 0.12);
  border-color: rgba(26, 140, 255, 0.4);
}

.feature-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-text strong {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  text-transform: uppercase;
}

.feature-text span {
  font-size: 0.72rem;
  color: var(--white-muted);
  line-height: 1.4;
}

/* ---------- STATS BAR ---------- */
.stats-bar {
  width: 100%;
  max-width: 1100px;
  padding: 0 24px;
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: rgba(4, 11, 24, 0.6);
  border: 1px solid var(--blue-border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px;
  border-right: 1px solid var(--blue-border);
  transition: background 0.2s;
}

.stat:last-child { border-right: none; }

.stat:hover {
  background: rgba(26, 140, 255, 0.06);
}

.stat-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  background: rgba(26, 140, 255, 0.12);
  border: 1px solid rgba(26, 140, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
  line-height: 1;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--blue-bright);
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--white-muted);
  font-weight: 500;
}

/* ---------- SCROLL HINT ---------- */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 0 36px;
  color: var(--white-muted);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  font-weight: 500;
  text-transform: uppercase;
  animation: fadeUp 1s 1.1s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--blue-bright);
  border-radius: 2px;
  animation: scrollDown 1.6s ease-in-out infinite;
}

@keyframes scrollDown {
  0%   { opacity: 1; transform: translateY(0); }
  70%  { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero-card { padding: 32px 28px 28px; }

  .hero-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-top: 1px solid var(--blue-border); border-right: 1px solid var(--blue-border); }
  .stat:nth-child(4) { border-top: 1px solid var(--blue-border); border-right: none; }
}

@media (max-width: 600px) {
  .navbar { top: 12px; width: calc(100% - 24px); }
  .nav-inner { border-radius: 28px; padding: 0 14px; }
  .nav-link { font-size: 0.72rem; padding: 5px 10px; }

  .hero-card { padding: 24px 18px 22px; }
  .hero-title { font-size: 2.4rem; }

  .features { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }

  .stat { padding: 20px 16px; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-top: 1px solid var(--blue-border); }
  .stat:nth-child(4) { border-top: 1px solid var(--blue-border); border-right: none; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-card, .scroll-hint { animation: none; }
  .scroll-wheel { animation: none; }
}

/* ================================================
   HAMBURGER BUTTON (hidden on desktop)
   ================================================ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  z-index: 110;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease, width 0.2s ease;
  transform-origin: center;
}

/* Animated X state when open */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================
   MOBILE NAVBAR  ≤ 680px
   Converts pill nav → full-width bar + dropdown
   ================================================ */
@media (max-width: 680px) {

  /* Show hamburger */
  .nav-hamburger { display: flex; }

  /* Strip the pill shape — go full width sticky bar */
  .navbar {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
  }

  .nav-inner {
    border-radius: 0 !important;
    width: 100% !important;
    padding: 0 18px !important;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  /* Dropdown — hidden by default */
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(6, 14, 38, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(26, 140, 255, 0.25);
    border-bottom: 1px solid rgba(26, 140, 255, 0.25);
    padding: 10px 0 14px;
    gap: 0;
    height: auto;
    z-index: 200;
    /* Slide-down animation */
    animation: none;
  }

  /* Visible when toggled */
  .nav-links.is-open {
    display: flex;
    animation: slideDown 0.22s ease both;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav-links li { width: 100%; }

  .nav-link {
    display: block;
    width: 100%;
    padding: 13px 24px !important;
    font-size: 0.9rem !important;
    border-radius: 0 !important;
    text-align: left;
    letter-spacing: 0.06em;
  }

  /* Active indicator becomes left border instead of underline */
  .nav-link.active::after { display: none; }
  .nav-link.active {
    border-left: 3px solid var(--blue-bright);
    padding-left: 21px !important;
    background: rgba(26, 140, 255, 0.08);
  }

  /* Push main content below the fixed 56px bar */
  main {
    padding-top: calc(56px + 24px) !important;
  }

  /* Hero card tighter on small screens */
  .hero-card {
    padding: 22px 16px 20px !important;
  }

  .hero-title { font-size: clamp(1.9rem, 8vw, 2.6rem) !important; }

  .hero-subtitle {
    font-size: 0.7rem !important;
    letter-spacing: 0.18em !important;
    margin-bottom: 20px !important;
  }

  .hero-tagline {
    font-size: 0.68rem !important;
    padding: 4px 12px !important;
    margin-bottom: 16px !important;
  }

  /* Single column layout for hero body */
  .hero-body {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    margin-bottom: 24px !important;
  }

  /* Feature pills: 1 column on very small, 2 on slightly bigger */
  .features {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding-top: 20px !important;
  }

  .feature { padding: 12px 10px !important; gap: 8px !important; }
  .feature-icon { font-size: 1.1rem !important; }
  .feature-text strong, .feature-text span { font-size: 0.65rem !important; }

  /* Hero CTA buttons stack */
  .hero-ctas {
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }
  .btn { width: 100%; justify-content: center; padding: 12px 20px !important; }

  /* Stats: 2×2 grid */
  .stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    margin-top: 20px !important;
  }

  .stat { padding: 18px 14px !important; gap: 10px !important; }
  .stat-icon { font-size: 1.4rem !important; padding: 8px !important; }
  .stat-num  { font-size: 1.8rem !important; }
  .stat-label { font-size: 0.7rem !important; }

  .stat:nth-child(2) { border-right: none !important; }
  .stat:nth-child(3) { border-top: 1px solid var(--blue-border); border-right: 1px solid var(--blue-border); }
  .stat:nth-child(4) { border-top: 1px solid var(--blue-border); border-right: none !important; }
}

/* Very small screens  ≤ 380px — features go 1 col */
@media (max-width: 380px) {
  .features { grid-template-columns: 1fr !important; }
  .hero { padding: 0 12px !important; }
  .stats-bar { padding: 0 12px !important; }
}

/* ================================================
   LIGHT MODE — toggled by .light-mode on <body>
   ================================================ */
body.light-mode {
  background-color: #f0f4ff;
  color: #0d1117;
}
body.light-mode .page-bg { opacity: 0.08; }
body.light-mode .bg-overlay {
  background: linear-gradient(180deg, rgba(240,244,255,0.85) 0%, rgba(240,244,255,0.97) 100%);
}
body.light-mode .nav-inner {
  background: rgba(255,255,255,0.92);
  border-color: rgba(26,140,255,0.25);
}
body.light-mode .nav-link { color: #334155; }
body.light-mode .nav-link:hover,
body.light-mode .nav-link.active { color: #1a8cff; background: rgba(26,140,255,0.08); }
body.light-mode .hero-card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(26,140,255,0.2);
  box-shadow: 0 4px 40px rgba(26,140,255,0.1);
}
body.light-mode .hero-title { color: #0d1117; text-shadow: none; }
body.light-mode .hero-subtitle { color: #475569; }
body.light-mode .hero-tagline { color: #1a8cff; background: rgba(26,140,255,0.08); }
body.light-mode .hero-left p,
body.light-mode .hero-right p { color: #334155; }
body.light-mode .scale-heading { color: #1a8cff !important; }
body.light-mode .feature {
  background: rgba(26,140,255,0.05);
  border-color: rgba(26,140,255,0.15);
}
body.light-mode .feature-text strong { color: #0d1117; }
body.light-mode .feature-text span   { color: #64748b; }
body.light-mode .stats-bar {
  background: rgba(255,255,255,0.9);
  border-color: rgba(26,140,255,0.2);
}
body.light-mode .stat { border-right-color: rgba(26,140,255,0.15); }
body.light-mode .stat-label { color: #64748b; }
body.light-mode .stat-icon {
  background: rgba(26,140,255,0.08);
  border-color: rgba(26,140,255,0.2);
}
body.light-mode .scroll-hint { color: #94a3b8; }
/* Mobile nav dropdown in light mode */
body.light-mode .nav-links {
  background: rgba(255,255,255,0.98) !important;
  border-color: rgba(26,140,255,0.2) !important;
}
body.light-mode .nav-link { color: #334155 !important; }
body.light-mode .nav-link.active { color: #1a8cff !important; background: rgba(26,140,255,0.08) !important; }

/* ================================================
   THEME TOGGLE — inside navbar
   Desktop: small horizontal pill to the RIGHT of the nav links
   Mobile:  sits top-right, opposite the hamburger (top-left)
   ================================================ */

/* The wrapper sits inside .nav-inner flex row */
.theme-toggle {
  display: flex;
  align-items: center;
  margin-left: 18px;          /* gap from nav links on desktop */
  flex-shrink: 0;
  cursor: pointer;
}

/* Horizontal pill — desktop */
.toggle-pill {
  width: 48px;
  height: 26px;
  background: rgba(26,140,255,0.15);
  border: 1.5px solid rgba(26,140,255,0.45);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
}
.toggle-pill:hover {
  border-color: #1a8cff;
  background: rgba(26,140,255,0.25);
}

/* Moon emoji left, sun right — via pseudo */
.toggle-pill::before {
  content: '🌙';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.toggle-pill::after {
  content: '☀️';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.3s;
}

/* Sliding knob */
.toggle-knob {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  left: 3px;
  background: linear-gradient(135deg, #60a5fa, #1a8cff);
  box-shadow: 0 2px 6px rgba(26,140,255,0.5);
  transition: left 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.3s;
}

/* LIGHT MODE — knob slides right, icons swap */
body.light-mode .toggle-knob {
  left: calc(100% - 21px);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 2px 6px rgba(251,191,36,0.55);
}
body.light-mode .toggle-pill {
  background: rgba(251,191,36,0.15);
  border-color: rgba(251,191,36,0.5);
}
body.light-mode .toggle-pill::before { opacity: 0.4; }   /* moon dim */
body.light-mode .toggle-pill::after  { opacity: 1; }     /* sun bright */
body:not(.light-mode) .toggle-pill::before { opacity: 1; }  /* moon bright */
body:not(.light-mode) .toggle-pill::after  { opacity: 0.4; } /* sun dim */

/* ── MOBILE ≤ 680px ── */
/* Hamburger is top-LEFT, toggle is top-RIGHT inside the same flex bar */
@media (max-width: 680px) {
  .theme-toggle {
    margin-left: auto;   /* pushes toggle to far right */
    margin-right: 0;
    /* order: hamburger (auto left) … nav-links (hidden) … toggle (right) */
    order: 3;
  }

  /* nav-inner on mobile is already flex row with space-between via Home.css
     We just need the toggle to show on the right */
  .toggle-pill {
    width: 44px;
    height: 24px;
  }
  .toggle-knob {
    width: 16px;
    height: 16px;
    left: 3px;
  }
  body.light-mode .toggle-knob {
    left: calc(100% - 19px);
  }
}

/* Hamburger lines → black in light mode */
body.light-mode .nav-hamburger span {
  background: #0d1117;
}