/* ============================================================
   INTELLI ENGINE — MAIN CSS
   Design System & Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  --primary:        #0ABDE3;
  --primary-dark:   #0770A2;
  --primary-glow:   rgba(10, 189, 227, 0.25);
  --accent:         #10AC84;
  --accent-light:   #1dd1a1;
  --accent-2:       #5F27CD;
  --accent-glow:    rgba(16, 172, 132, 0.3);
  --bg-dark:        #060D1F;
  --bg-card:        #0D1B3E;
  --bg-card-hover:  #112050;
  --bg-nav:         rgba(6, 13, 31, 0.85);
  --border:         rgba(10, 189, 227, 0.15);
  --border-hover:   rgba(10, 189, 227, 0.4);
  --text-primary:   #FFFFFF;
  --text-secondary: #C8D6E5;
  --text-muted:     #8892A4;
  --gradient-brand: linear-gradient(135deg, #0ABDE3 0%, #10AC84 100%);
  --gradient-hero:  linear-gradient(135deg, #0ABDE3 0%, #5F27CD 50%, #10AC84 100%);
  --gradient-dark:  linear-gradient(180deg, #060D1F 0%, #0D1B3E 100%);
  --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow:    0 0 40px rgba(10, 189, 227, 0.2);
  --shadow-btn:     0 4px 20px rgba(16, 172, 132, 0.4);
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-xl:      32px;
  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font:           'Inter', sans-serif;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { color: var(--text-secondary); line-height: 1.8; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

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

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

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  background: rgba(10, 189, 227, 0.1);
  color: var(--primary);
  border: 1px solid rgba(10, 189, 227, 0.3);
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  background: linear-gradient(135deg, #fff 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 172, 132, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: rgba(10, 189, 227, 0.1);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--border-hover);
}

.btn-lg { padding: 18px 36px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card:hover::before { opacity: 1; }

/* ── GLASSMORPHISM ── */
.glass {
  background: rgba(13, 27, 62, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(10, 189, 227, 0.1);
}

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(10, 189, 227, 0.15);
  color: var(--primary);
  border: 1px solid rgba(10, 189, 227, 0.3);
}

.badge-accent {
  background: rgba(16, 172, 132, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(16, 172, 132, 0.3);
}

.badge-purple {
  background: rgba(95, 39, 205, 0.2);
  color: #a29bfe;
  border: 1px solid rgba(95, 39, 205, 0.4);
}

/* ── GRID ── */
.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: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .container { padding: 0 16px; }
}

/* ── DIVIDERS ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 60px 0;
  opacity: 0.3;
}

/* ── GRADIENT TEXT ── */
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-hero {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── ANIMATE ON SCROLL ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── STATUS DOTS ── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-online { background: var(--accent-light); box-shadow: 0 0 8px var(--accent-light); animation: pulse-dot 2s infinite; }
.status-pending { background: #ffd32a; }
.status-answered { background: var(--primary); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

/* ── ICON BOXES ── */
.icon-box {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  position: relative;
  flex-shrink: 0;
}

.icon-box-primary {
  background: rgba(10, 189, 227, 0.1);
  border: 1px solid rgba(10, 189, 227, 0.2);
  color: var(--primary);
}

.icon-box-accent {
  background: rgba(16, 172, 132, 0.1);
  border: 1px solid rgba(16, 172, 132, 0.2);
  color: var(--accent-light);
}

.icon-box-purple {
  background: rgba(95, 39, 205, 0.15);
  border: 1px solid rgba(95, 39, 205, 0.25);
  color: #a29bfe;
}

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
  border-color: var(--primary);
  background: rgba(10, 189, 227, 0.05);
  box-shadow: 0 0 0 3px rgba(10, 189, 227, 0.1);
}

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892A4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select.form-control option { background: var(--bg-card); }

/* ── RANGE SLIDER ── */
input[type="range"] {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gradient-brand);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(10, 189, 227, 0.5);
}

/* ── CHECKBOX CUSTOM ── */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.checkbox-item:hover {
  border-color: var(--primary);
  background: rgba(10, 189, 227, 0.05);
}

.checkbox-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── TOOLTIP ── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── COUNTER NUMBERS ── */
.counter-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
