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

:root {
  --bg-color: #0b0f1a;
  --bg-grid: #131b2d;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --secondary: #a855f7;
  --secondary-glow: rgba(168, 85, 247, 0.5);
  --accent: #4ade80;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: rgba(17, 24, 39, 0.7);
  --border: rgba(255, 255, 255, 0.1);
  --terminal-header: #1f2937;
}

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

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 2px 2px, var(--bg-grid) 1px, transparent 0);
  background-size: 40px 40px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains+Mono', monospace; }

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(11, 15, 26, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--text-main);
  -webkit-text-fill-color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-login {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn-get-started {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 20px var(--primary-glow);
  transition: transform 0.3s;
}

.btn-get-started:hover {
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 5% 60px;
  margin-top: 60px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: var(--primary);
  filter: blur(150px);
  opacity: 0.2;
  z-index: -1;
}

.badge {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 1000px;
  padding: 0 10%;
  background: linear-gradient(to bottom, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.2));
}

.hero p {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* Cyber Cat Illustration (The Zen Master / Coder) */
.hero-decor {
  position: absolute;
  right: -5%;
  top: 35%;
  transform: translateY(-50%);
  width: 320px;
  max-width: 25vw;
  filter: drop-shadow(0 0 65px rgba(168, 85, 247, 0.4));
  animation: float-zen 8s ease-in-out infinite;
  z-index: 5;
  pointer-events: none;
}

.hero-decor img {
  width: 100%;
  height: auto;
  opacity: 0.9;
}

@keyframes float-zen {
  0%, 100% { transform: translateY(-50%) rotate(2deg); }
  50% { transform: translateY(-54%) rotate(-2deg); }
}

/* Cyber Badger Illustration (The Bug - Aggressive & Glitchy) */
.hero-decor-left {
  position: absolute;
  left: -2%;
  top: 70%;
  transform: translateY(-50%);
  width: 280px;
  max-width: 28vw;
  filter: drop-shadow(0 0 50px rgba(239, 68, 68, 0.4));
  animation: float-brute 3.5s ease-in-out infinite alternate, badger-glitch 5s infinite;
  z-index: 5;
  pointer-events: none;
}

.hero-decor-left img {
  width: 100%;
  height: auto;
}

@keyframes float-brute {
  0% { transform: translateY(-50%) rotate(-5deg); }
  100% { transform: translateY(-58%) rotate(5deg) scale(1.05); }
}

@keyframes badger-glitch {
  0%, 95%, 100% { filter: drop-shadow(0 0 50px rgba(239, 68, 68, 0.5)); }
  96% { filter: drop-shadow(-5px 0 red) drop-shadow(5px 0 blue); opacity: 0.8; }
  97% { filter: drop-shadow(5px 0 green); opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Terminal Window */
.terminal {
  width: 100%;
  max-width: 650px;
  background: #111827;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: left;
  overflow: hidden;
}

.terminal-header {
  background: var(--terminal-header);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-title {
  margin-left: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.code-comment { color: #6b7280; }
.code-keyword { color: #c084fc; }
.code-string { color: #fbbf24; }
.code-variable { color: #38bdf8; }

/* Sections */
section { padding: 100px 5%; }

.section-label {
  text-align: center;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 4rem;
}

/* Methodology Cards */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 16px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.card:hover::before { transform: translateX(100%); }

.card:hover { border-color: var(--primary); box-shadow: 0 0 30px rgba(59, 130, 246, 0.1); }

.card-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Tech Trust Bar */
.tech-trust-bar {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0.6;
  transition: 0.3s;
}

.tech-trust-bar:hover { opacity: 1; }

.tech-trust-bar span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.tech-logos img {
  height: 40px;
  filter: grayscale(1) invert(1);
  opacity: 0.8;
}

/* Live Toast */
.live-toast {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 2000;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 12px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: translateX(-150%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.live-toast.show {
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon { font-size: 1.5rem; }

.toast-text {
  font-size: 0.85rem;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

.toast-text span#toast-name {
  font-weight: 800;
  color: var(--primary);
}

.toast-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* FAQ Accordion */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.faq-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.faq-question {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.faq-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 20px;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 20px 18px;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text-main);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Nav CTA inside menu */
.nav-mobile-cta {
  display: none;
}

/* Mobile Bottom CTA Bar */
.mobile-bottom-bar {
  display: none;
}

/* Nav mobile CTA - hidden by default, shown inside mobile menu */
.nav-mobile-cta {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3rem; padding: 0 5%; }
  .hero-decor, .hero-decor-left { width: 220px; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .logo { font-size: 1.4rem; }
  .logo img { height: 36px !important; }
  
  /* Hamburger visible */
  .hamburger { display: block; }
  .nav-actions { display: none !important; }
  
  /* Mobile Nav Slide */
  .nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(11, 15, 26, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 30px 40px;
    gap: 0;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 999;
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
  }
  
  .nav-links.mobile-open {
    right: 0;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  
  .nav-mobile-cta {
    display: block !important;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  /* Hero mobile */
  .hero { padding: 80px 5% 40px; margin-top: 60px; }
  .hero-decor, .hero-decor-left { 
    position: relative;
    top: auto; left: auto; right: auto;
    width: 180px;
    margin: 15px auto;
    max-width: 100%;
    transform: none;
    animation: float-zen 8s ease-in-out infinite;
  }
  .hero-decor-left { animation: float-brute 3.5s ease-in-out infinite alternate; }
  .section-title { font-size: 1.8rem; margin-bottom: 2rem; }
  .tech-logos img { height: 30px; }
  
  /* Mobile Bottom Bar */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(11, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 0;
  }
  
  .mobile-bar-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
  }
  
  .mobile-bar-call {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
  }
  
  .mobile-bar-zalo {
    background: linear-gradient(135deg, #0068ff, #0045b5);
  }
  
  /* Side bar hidden on mobile (bottom bar replaces it) */
  
  /* Add padding to body for bottom bar */
  body { padding-bottom: 56px; }
  
  /* Cards grid mobile */
  .grid-cards { grid-template-columns: 1fr; gap: 1rem; }
  
  section { padding: 60px 5%; }
  
  footer h2 { font-size: 2rem !important; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; padding: 0; }
  .hero p { font-size: 0.85rem; }
  .terminal-body { padding: 1rem; font-size: 0.8rem; }
  .section-title { font-size: 1.6rem; }
  footer h2 { font-size: 1.6rem !important; }
}

#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.12;
}

/* Sticky Side Contact Bar */
.side-contact-bar {
  position: fixed;
  right: -70px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: right 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.side-contact-bar.visible {
  right: 0;
}

.side-contact-btn {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  position: relative;
  transition: all 0.3s;
  border-radius: 8px 0 0 8px;
}

.side-contact-btn:hover {
  width: 60px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}

.side-btn-phone {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.side-btn-zalo {
  background: linear-gradient(135deg, #0068ff, #0050cc);
  animation: zalo-pulse-side 2.5s infinite;
}

.side-btn-email {
  background: linear-gradient(135deg, var(--secondary), #7c3aed);
}

.side-btn-form {
  background: linear-gradient(135deg, var(--primary), #2563eb);
}

.side-btn-top {
  background: linear-gradient(135deg, #475569, #334155);
}

/* Tooltip on hover */
.side-tooltip {
  position: absolute;
  right: 60px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: all 0.3s;
}

.side-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.9);
}

.side-contact-btn:hover .side-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@keyframes zalo-pulse-side {
  0% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(0, 104, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0); }
}

@media (max-width: 768px) {
  /* Hide side bar on mobile (use bottom bar instead) */
  .side-contact-bar { display: none !important; }
}


