/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: #111827; background: #fff; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-alt { background: #f9fafb; }
.text-center { text-align: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: 68px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-weight: 700; font-size: 1.1rem; color: #111827; }
.nav-logo span { color: #2563eb; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: #374151; transition: color 0.2s; }
.nav-links a:hover { color: #2563eb; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; transition: all 0.2s; cursor: pointer;
}
.btn-primary {
  background: #2563eb; color: #fff;
  box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.4); }
.btn-secondary {
  background: transparent; color: #2563eb;
  border: 2px solid #2563eb;
}
.btn-secondary:hover { background: #eff6ff; }
.btn-white {
  display: inline-block; padding: 14px 32px; border-radius: 8px;
  background: #fff; color: #2563eb; font-weight: 700; font-size: 1rem;
  transition: all 0.2s;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #eff6ff 0%, #f8faff 50%, #f0f9ff 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.stats-bar {
  display: flex; gap: 40px; margin-top: 56px;
  padding-top: 40px; border-top: 1px solid rgba(0,0,0,0.08);
  flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-number { font-size: 2rem; font-weight: 700; color: #111827; }
.stat-label { font-size: 0.85rem; color: #6b7280; font-weight: 500; }

/* ===== TYPOGRAPHY ===== */
.text-display { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0 24px; }
.text-headline { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.text-body-large { font-size: 1.15rem; color: #4b5563; line-height: 1.7; max-width: 640px; }
.text-caption { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #2563eb; }
.text-gradient { background: linear-gradient(135deg, #2563eb, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== CARDS ===== */
.card {
  background: #fff; border-radius: 12px; padding: 28px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-color: #bfdbfe; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; color: #111827; }
.card p { font-size: 0.92rem; color: #6b7280; line-height: 1.7; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, #1e40af, #2563eb, #0891b2);
  border-radius: 20px; padding: 64px; text-align: center; color: #fff;
}
.cta-section h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 700; margin-bottom: 16px; }
.cta-section p { font-size: 1.05rem; opacity: 0.85; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== FOOTER ===== */
.footer { background: #0f172a; color: #fff; padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer h4 { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: #94a3b8; margin-bottom: 16px; }
.footer ul li { margin-bottom: 10px; font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.footer ul li a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer ul li a:hover { color: #fff; }

/* ===== FADE-IN ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ===== AI CHAT WIDGET ===== */
#chatWidget {
  position: fixed; bottom: 24px; right: 24px; z-index: 998;
  font-family: 'Inter', sans-serif;
}
#chatToggle {
  width: 56px; height: 56px; border-radius: 50%;
  background: #2563eb; border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,235,0.45);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s; color: white;
}
#chatToggle:hover { transform: scale(1.07); box-shadow: 0 6px 28px rgba(37,99,235,0.55); }
#chatPanel {
  position: absolute; bottom: 70px; right: 0;
  width: 360px; height: 480px; background: #fff;
  border-radius: 16px; box-shadow: 0 12px 48px rgba(0,0,0,0.16);
  display: flex; flex-direction: column; overflow: hidden;
  animation: chatSlideIn 0.22s ease-out;
}
@keyframes chatSlideIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#chatHeader {
  background: #2563eb; color: white;
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.chat-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.chat-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
#chatCloseBtn { background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; opacity: 0.8; line-height: 1; padding: 0; }
#chatCloseBtn:hover { opacity: 1; }
#chatMessages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.chat-message {
  max-width: 86%; padding: 10px 14px; border-radius: 14px;
  font-size: 0.875rem; line-height: 1.55; word-wrap: break-word;
}
.chat-message-user { background: #2563eb; color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-message-assistant { background: #f3f4f6; color: #1f2937; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-typing { display: flex; align-items: center; gap: 4px; padding: 12px 14px; }
.chat-typing span {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: #9ca3af;
  animation: chatDot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatDot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
  40% { transform: translateY(-5px); opacity: 1; }
}
#chatSuggestions { padding: 0 16px 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.chat-suggestion {
  background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;
  border-radius: 20px; padding: 5px 12px; font-size: 0.78rem;
  cursor: pointer; transition: background 0.15s; font-family: inherit;
}
.chat-suggestion:hover { background: #dbeafe; }
#chatInputArea {
  padding: 12px 16px; border-top: 1px solid #e5e7eb;
  display: flex; gap: 8px; align-items: center;
}
#chatInputField {
  flex: 1; border: 1px solid #d1d5db; border-radius: 22px;
  padding: 9px 14px; font-size: 0.875rem; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
#chatInputField:focus { border-color: #2563eb; }
#chatSendBtn {
  background: #2563eb; color: white; border: none; border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.15s;
}
#chatSendBtn:hover { background: #1d4ed8; }
@media (max-width: 480px) {
  #chatPanel { width: calc(100vw - 32px); right: -8px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats-bar { gap: 24px; }
  .hero { padding: 100px 0 60px; }
  .cta-section { padding: 40px 24px; }
  #about .container > div { grid-template-columns: 1fr !important; }
  #about .container > div > div:last-child > div { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 16px; }
  .nav-links li:not(:last-child) { display: none; }
}
