/* ==========================================================================
   INFRABIT SYSTEMS - DESIGN SYSTEM & STYLESHEET
   Pure Standalone CSS3 for HTML Build with Full Responsiveness
   ========================================================================== */

:root {
  --background: #050505;
  --foreground: #E0E6ED;
  --foreground-muted: rgba(224, 230, 237, 0.6);
  --foreground-subtle: rgba(224, 230, 237, 0.4);
  
  --brand-cyan: #00F0FF;
  --brand-violet: #A259FF;
  --brand-gold: #FFD166;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --glass-bg: rgba(15, 15, 15, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: #222222;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-violet);
}

/* Glow Mesh Background */
.glow-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 240, 255, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(162, 89, 255, 0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Glassmorphism Classes */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-cyan {
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.08);
}

.glass-violet {
  border-color: rgba(162, 89, 255, 0.2);
  box-shadow: 0 0 25px rgba(162, 89, 255, 0.08);
}

/* Color & Text Gradients */
.text-brand-cyan { color: var(--brand-cyan); }
.text-brand-violet { color: var(--brand-violet); }
.text-brand-gold { color: var(--brand-gold); }

.bg-brand-cyan { background-color: var(--brand-cyan); }
.bg-brand-violet { background-color: var(--brand-violet); }
.bg-brand-gold { background-color: var(--brand-gold); }

.text-gradient-cyan {
  background: linear-gradient(135deg, #00F0FF 0%, #A259FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-muted { color: var(--foreground-muted); }
.text-subtle { color: var(--foreground-subtle); }

/* Shimmer Animation */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: skewX(-25deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  100% {
    left: 200%;
  }
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 240, 255, 0.15);
  border-top-color: var(--brand-cyan);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

/* Header & Navbar */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 24px 16px;
  transition: padding 0.3s ease;
}

.navbar {
  width: 100%;
  max-width: 1280px;
  padding: 12px 24px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-display: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--brand-cyan);
  transition: transform 0.5s ease;
}

.logo:hover .logo-icon {
  transform: rotate(90deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(224, 230, 237, 0.7);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-cyan);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--brand-cyan);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.btn-cyan {
  background-color: var(--brand-cyan);
  color: #050505;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-cyan:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.btn-cyan:active {
  transform: scale(0.95);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--foreground);
}

.btn-outline:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 4px;
}

/* Mobile Nav Modal Drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav .close-btn {
  position: absolute;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
}

.mobile-nav .nav-link {
  font-size: 1.75rem;
  font-family: var(--font-display);
  font-weight: 700;
}

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 96px;
  text-align: center;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 5.5rem);
  font-weight: 700;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--foreground-muted);
  max-width: 640px;
  margin: 0 auto 40px auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Grid System */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .section { padding: 72px 0; }
  .hero { padding-top: 140px; padding-bottom: 72px; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 20px; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .hero-title { font-size: clamp(1.8rem, 8vw, 3rem); margin-bottom: 16px; }
  .hero-subtitle { font-size: 0.95rem; margin-bottom: 32px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; max-width: 320px; }
  .navbar-wrapper { padding: 16px 12px; }
  .navbar { padding: 10px 18px; }
  .card { padding: 24px 20px; border-radius: 20px; }
  .modal-content { padding: 24px 18px; border-radius: 24px; }
  .section { padding: 56px 0; }
  
  /* Flex Row Stacking for 2-column sections */
  .grid-2-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
}

.card {
  padding: 32px;
  border-radius: 24px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 240, 255, 0.1);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--brand-cyan);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-desc {
  color: var(--foreground-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Code / Terminal Block */
.terminal-window {
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

/* Interactive Tabs */
.tabs-header {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 32px;
}

.tab-btn {
  padding: 12px 24px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--brand-cyan);
  color: #050505;
  border-color: var(--brand-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 32px;
  padding: 40px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--foreground);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Form inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground-subtle);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--foreground);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--brand-cyan);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 64px 0 32px 0;
  background: rgba(5, 5, 5, 0.9);
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }
  
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 16px;
  }
  
  .footer-grid > div:first-child .logo {
    justify-content: center;
  }
  
  .footer-grid > div:first-child p {
    margin: 0 auto;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--foreground-subtle);
  font-size: 0.85rem;
}
