/* ============================================================
   ABtech Systems & Media — Core Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* Custom Properties */
:root {
  --bg-primary:    #080c18;
  --bg-secondary:  #0d1224;
  --bg-card:       rgba(13, 18, 36, 0.85);
  --bg-elevated:   #111827;

  --accent-cyan:   #00d4ff;
  --accent-cyan-dim: rgba(0, 212, 255, 0.15);
  --accent-violet: #7c3aed;
  --accent-violet-dim: rgba(124, 58, 237, 0.15);
  --accent-green:  #10b981;
  --accent-red:    #ef4444;
  --accent-yellow: #f59e0b;

  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  --border:        rgba(0, 212, 255, 0.12);
  --border-hover:  rgba(0, 212, 255, 0.35);
  --border-glow:   rgba(0, 212, 255, 0.6);

  --shadow-card:   0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,212,255,0.08);
  --shadow-glow:   0 0 40px rgba(0, 212, 255, 0.2);
  --shadow-violet: 0 0 40px rgba(124, 58, 237, 0.2);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --font-body:  'Space Grotesk', system-ui, sans-serif;
  --font-mono:  'Space Mono', monospace;

  --nav-height: 72px;
  --section-pad: 100px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  overscroll-behavior-x: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-cyan-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
  position: fixed; inset: 0;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo {
  margin-bottom: 2rem;
}
.preloader-logo-img { height: clamp(160px, 40vw, 450px); width: auto; max-width: 90vw; }
.preloader-bar {
  width: 240px; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin: 0 auto 1rem;
  overflow: hidden;
}
.preloader-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--accent-cyan) 0%,
    #6366f1 40%,
    var(--accent-violet) 65%,
    var(--accent-cyan) 100%
  );
  background-size: 200% 100%;
  animation: preloaderShimmer 1.4s linear infinite;
  border-radius: 2px;
  width: 0%;
  transition: width 0.05s linear;
}
@keyframes preloaderShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.preloader-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Selection */
::selection { background: var(--accent-cyan); color: var(--bg-primary); }

/* Typography */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

/* Utility */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* Cyan text gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #6366f1 50%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-cyan  { color: var(--accent-cyan); }
.text-muted { color: var(--text-secondary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: var(--transition);
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #6366f1);
  color: var(--bg-primary);
  box-shadow: 0 0 24px rgba(0,212,255,0.3);
}
.btn-primary:hover { box-shadow: 0 0 40px rgba(0,212,255,0.5); transform: translateY(-2px); }

.btn-outline {
  border: 1px solid var(--border-hover);
  color: var(--accent-cyan);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  box-shadow: 0 0 20px rgba(0,212,255,0.15);
}

.btn-ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-hover); }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }

.btn-danger {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--accent-red);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* Section headers */
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--accent-cyan-dim);
  border: 1px solid var(--border-hover);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 16px auto 0;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-open    { background: rgba(0,212,255,0.15); color: var(--accent-cyan); border: 1px solid rgba(0,212,255,0.3); }
.badge-progress{ background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.badge-waiting { background: rgba(245,158,11,0.15); color: var(--accent-yellow); border: 1px solid rgba(245,158,11,0.3); }
.badge-resolved{ background: rgba(16,185,129,0.15); color: var(--accent-green); border: 1px solid rgba(16,185,129,0.3); }
.badge-closed  { background: rgba(71,85,105,0.15); color: var(--text-muted); border: 1px solid rgba(71,85,105,0.3); }
.badge-new     { background: rgba(0,212,255,0.15); color: var(--accent-cyan); border: 1px solid rgba(0,212,255,0.3); }
.badge-high    { background: rgba(239,68,68,0.15); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.3); }
.badge-medium  { background: rgba(245,158,11,0.15); color: var(--accent-yellow); border: 1px solid rgba(245,158,11,0.3); }
.badge-low     { background: rgba(71,85,105,0.15); color: var(--text-secondary); border: 1px solid rgba(71,85,105,0.3); }
.badge-urgent  { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
  background: rgba(0,212,255,0.04);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group select option { background: var(--bg-elevated); color: var(--text-primary); }

.form-row { display: grid; gap: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }

.form-error {
  color: var(--accent-red);
  font-size: 0.82rem;
  margin-top: 5px;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  border: 1px solid;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.toast.success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.35); color: #6ee7b7; }
.toast.error   { background: rgba(239,68,68,0.15);  border-color: rgba(239,68,68,0.35);  color: #fca5a5; }
.toast.info    { background: rgba(0,212,255,0.12);   border-color: rgba(0,212,255,0.3);   color: var(--accent-cyan); }
.toast.warning { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.35); color: #fcd34d; }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-out { animation: toastOut 0.3s cubic-bezier(0.4,0,0.2,1) forwards; }

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  border-radius: 2px;
  margin: 16px auto;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(0,212,255,0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
  :root { --section-pad: 60px; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
  .btn-lg { padding: 14px 28px; }
}
