/* ============================================
   GENERAL STYLES
   ============================================ */

:root {
  /* Dark theme (default) */
  --bg-primary: #07090E;
  --bg-secondary: #0E121C;
  --bg-tertiary: #0B0E16;
  --text-primary: #F4F6FA;
  --text-secondary: #A2AABA;
  --text-muted: #5C6478;
  --border-color: rgba(255, 255, 255, 0.07);
  --accent-blue: #4F8BFF;
  --accent-cyan: #6EE7FF;
  --accent-green: #2ED573;
  
  /* Light theme */
  --light-bg-primary: #FFFFFF;
  --light-bg-secondary: #F8F9FC;
  --light-bg-tertiary: #EFF1F6;
  --light-text-primary: #06121F;
  --light-text-secondary: #5C6478;
  --light-text-muted: #8A92A3;
  --light-border-color: rgba(79, 139, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

body.light-theme {
  background: var(--light-bg-primary);
  color: var(--light-text-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes invFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes invBubble {
  from {
    opacity: 0;
    scale: 0.95;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes invPulse {
  0%, 100% {
    box-shadow: 0 0 10px #2ED573;
  }
  50% {
    box-shadow: 0 0 20px #2ED573;
  }
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.light-theme header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(79, 139, 255, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4F8BFF, #6EE7FF);
  box-shadow: 0 6px 18px rgba(79, 139, 255, 0.4);
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #F4F6FA;
}

.logo-text .accent {
  color: #6E7689;
  font-weight: 500;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav a {
  font-size: 14.5px;
  color: #A8AFBE;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #EEF1F6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

[data-theme-toggle] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(79,139,255,0.08);
  border: 1px solid rgba(79,139,255,0.12);
  color: var(--accent-cyan);
  font-size: 20px;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  border: none;
  background: transparent;
  font-size: 22px;
  color: inherit;
  cursor: pointer;
}

/* Mobile nav behavior */
nav.main-nav.open {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

@media (max-width: 768px) {
  nav.main-nav {
    display: none;
    position: fixed;
    top: 72px;
    right: 0;
    left: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 16px;
  }
  body.light-theme nav.main-nav {
    background: var(--light-bg-secondary);
  }
  .mobile-menu-button {
    display: inline-flex;
  }
  nav.main-nav.open {
    display: flex;
  }
  nav.main-nav a {
    font-size: 16px;
    color: var(--text-secondary);
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  background: #4F8BFF;
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 8px 22px rgba(79, 139, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #3F7BF2;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 24px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #EEF1F6;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-large {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 26px;
  border-radius: 13px;
  background: linear-gradient(135deg, #4F8BFF, #6EE7FF);
  color: #06121F;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 12px 30px rgba(79, 139, 255, 0.36);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.btn-large:hover {
  transform: translateY(-1px);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 84px 24px 72px;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 56px;
  align-items: center;
}

.section-grid.reverse {
  grid-template-columns: 0.94fr 1.06fr;
}

.fade-up {
  animation: invFadeUp 0.7s ease both;
}

.fade-up-delay {
  animation: invFadeUp 0.8s ease 0.12s both;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-column h3 {
  font-size: 14px;
  color: #A8AFBE;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-column a {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #A8AFBE;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #EEF1F6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
  color: #5C6478;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.glow-blue {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(60% 50% at 60% 40%, rgba(79, 139, 255, 0.22), transparent 72%);
  filter: blur(10px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 13px 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(79, 139, 255, 0.32);
  background: rgba(79, 139, 255, 0.08);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6EE7FF;
  box-shadow: 0 0 10px #6EE7FF;
}

.badge-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9EC2FF;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.feature-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: #F4F6FA;
}

.feature-item p {
  font-size: 14px;
  color: #9AA2B2;
  line-height: 1.6;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: #9AA2B2;
}

/* ============================================
   BOT CHAT DEMO
   ============================================ */
.chat-container {
  position: relative;
  max-width: 392px;
  margin-left: auto;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #0E121C, #0B0E16);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.018);
}

.chat-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F8BFF, #6EE7FF);
  font-weight: 700;
  color: #06121F;
  font-size: 16px;
}

.chat-avatar .online-indicator {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2ED573;
  border: 2px solid #0C0F17;
  animation: invPulse 2.4s infinite;
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-info .name {
  font-weight: 600;
  font-size: 14.5px;
  color: #EFF2F7;
}

.chat-info .status {
  font-size: 12px;
  color: #2ED573;
}

.chat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #5C6478;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 7px;
  border-radius: 6px;
}

.chat-messages {
  height: 392px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(79, 139, 255, 0.05), transparent 60%);
  overflow-y: auto;
  overflow-x: hidden;
}

.message {
  display: flex;
  max-width: 80%;
  animation: invBubble 0.34s ease both;
}

.message.bot {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
}

.message-bubble {
  padding: 10px 13px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.45;
}

.message.bot .message-bubble {
  border-radius: 15px 15px 15px 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #E7EAF1;
}

.message.user .message-bubble {
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(135deg, #4F8BFF, #5A93FF);
  color: #fff;
}

.message-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.chip {
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(79, 139, 255, 0.4);
  color: #9EC2FF;
  background: rgba(79, 139, 255, 0.08);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .section-grid,
  .section-grid.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  nav {
    gap: 16px;
    font-size: 13px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .header-container {
    padding: 0 16px;
  }

  .container {
    padding: 48px 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}
