/* ==========================================================================
   KAS Info Tech — Modern Enterprise Design System Stylesheet
   Aesthetic: Industrial Cyber-Physical Enterprise
   ========================================================================== */

:root {
  --bg-canvas: #050814;
  --bg-surface-1: #0b1120;
  --bg-surface-2: #111c33;
  --bg-surface-3: #1a2744;
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-focus: rgba(37, 99, 235, 0.5);
  --primary-blue: #2563eb;
  --primary-glow: #3b82f6;
  --primary-light: #60a5fa;
  --cyber-cyan: #06b6d4;
  --live-emerald: #10b981;
  --text-white: #ffffff;
  --text-slate-100: #f1f5f9;
  --text-slate-300: #cbd5e1;
  --text-slate-400: #94a3b8;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-slate-100);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
}

/* Subtle background grid & radial glow effects */
.bg-cyber-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-gradient-overlay {
  background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.18) 0%, rgba(5, 8, 20, 0.85) 60%, var(--bg-canvas) 100%);
}

.glow-ambient-blue {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}

.glow-ambient-cyan {
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}

/* Live Status Pulse Indicator */
.live-status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--live-emerald);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.live-status-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.4);
  animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Glassmorphism Cards & Borders */
.glass-panel {
  background: rgba(11, 17, 32, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -10px rgba(11, 17, 32, 0.7), 0 0 20px -5px rgba(37, 99, 235, 0.2);
}

.glass-card-static {
  background: rgba(11, 17, 32, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

/* Marquee infinite scroll */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.marquee-content {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Service Card Interactive Highlights */
.service-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--primary-light);
  transition: all 0.3s ease;
}

.glass-panel:hover .service-icon-wrap {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.6);
  transform: scale(1.06);
}

/* Metric Counter Box */
.stat-box {
  background: linear-gradient(180deg, rgba(17, 28, 51, 0.6) 0%, rgba(11, 17, 32, 0.6) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

/* Video Slider styling */
.video-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 1rem;
}

.video-track::-webkit-scrollbar {
  display: none;
}

.video-slide-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s, border-color 0.25s;
}

@media (max-width: 480px) {
  .video-slide-card {
    flex: 0 0 calc(100vw - 3.5rem);
    max-width: 310px;
  }
}

.video-slide-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(11, 17, 32, 0.6);
  transition: all 0.2s ease;
  overflow: hidden;
}

.faq-item.active {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(17, 28, 51, 0.8);
}

.faq-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-weight: 600;
  color: white;
  cursor: pointer;
  border: none;
  background: transparent;
}

.faq-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--primary-light);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1.5rem;
  color: var(--text-slate-300);
}

.faq-item.active .faq-content {
  padding-bottom: 1.25rem;
}

/* Floating Action Dock */
.floating-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 90;
}

.floating-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.floating-btn-wa {
  background: #25d366;
  color: white;
}

.floating-btn-wa:hover {
  background: #20ba59;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
}

.floating-btn-quote {
  background: var(--primary-blue);
  color: white;
}

.floating-btn-quote:hover {
  background: var(--primary-glow);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

/* Modal styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-container {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(37, 99, 235, 0.2);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

/* Custom form elements */
.form-input {
  width: 100%;
  background: rgba(17, 28, 51, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: white;
  font-family: inherit;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-glow);
  background: rgba(17, 28, 51, 0.9);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-input::placeholder {
  color: var(--text-slate-400);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary-blue);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.8125rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.8125rem 1.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Badges */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--primary-light);
}

/* Responsive utilities */
@media (max-width: 768px) {
  .floating-dock {
    bottom: 16px;
    right: 16px;
  }
  .floating-btn span {
    display: none;
  }
  .floating-btn {
    padding: 12px;
  }
}
/* ==========================================================================
   Sub-page Footer Responsive Layout (Strictly Scoped - Zero Impact on Homepage)
   ========================================================================== */
.subpage-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .subpage-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .subpage-footer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #mobile-menu-toggle {
    display: none !important;
  }
}

/* ==========================================================================
   Mobile Optimization & Zero Horizontal Overflow Rules
   ========================================================================== */

/* Universal mobile viewport constraints */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
}

/* Ambient glow container safeguard */
.glow-ambient-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -10;
}

/* Footer tap targets - minimum 28px height for accessibility */
footer ul li a,
.subpage-footer-grid ul li a {
  display: inline-block;
  padding-top: 4px;
  padding-bottom: 4px;
  min-height: 28px;
}

/* Responsive media queries */
@media (max-width: 639px) {
  /* Prevent header CTA from pushing toggle out of viewport */
  .btn-primary.hidden,
  button.btn-primary.hidden,
  a.btn-primary.hidden,
  .hidden.sm\:inline-flex {
    display: none !important;
  }

  /* Allow long button text to wrap cleanly on small screens */
  .btn-primary,
  .btn-secondary {
    white-space: normal !important;
    max-width: 100% !important;
    text-align: center;
    box-sizing: border-box;
  }

  /* Mobile brand title and subtitle fit */
  #main-header a > div > span:last-child {
    letter-spacing: 0.08em !important;
    font-size: 8.5px !important;
    max-width: 190px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Mobile header padding */
  #main-header .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (min-width: 640px) {
  .sm\:inline-flex {
    display: inline-flex !important;
  }
}

/* ==========================================================================
   Mobile Drawer Navigation Menu Styling
   ========================================================================== */
#mobile-menu {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background-color: #050814 !important;
  background: #050814 !important;
  z-index: 99999 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  display: none;
  flex-direction: column;
  padding: 1.5rem !important;
  box-sizing: border-box;
}

#mobile-menu.flex {
  display: flex !important;
}

#mobile-menu a {
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

#mobile-menu nav a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #e2e8f0;
  font-size: 1.125rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#mobile-menu nav a:hover,
#mobile-menu nav a:active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

#mobile-menu #mobile-menu-close {
  cursor: pointer;
  background-color: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.8);
  color: #ffffff;
  transition: background-color 0.2s;
}

#mobile-menu #mobile-menu-close:hover {
  background-color: rgba(51, 65, 85, 1);
}
