:root {
  /* Dark Mode Palette */
  --bg-dark: #0b1120; /* Very dark blue/black */
  --bg-card: #1e293b; /* Dark slate for cards */
  --bg-darker: #020617; /* Almost black for contrast */

  --primary: #3b82f6; /* Bright Blue */
  --primary-glow: rgba(59, 130, 246, 0.5);

  --secondary: #10b981; /* Tech Green */
  --secondary-glow: rgba(16, 185, 129, 0.5);

  --accent: #f59e0b; /* Amber for warnings/processing */

  --text-main: #e2e8f0; /* Light gray for reading */
  --text-muted: #94a3b8; /* Muted gray */

  --font-sans: 'Fira Sans', sans-serif;
  --font-mono: 'Fira Code', monospace;

  --border-color: #334155;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Background Grid Effect */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  pointer-events: none;
}

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

ul {
  list-style: none;
}

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

/* Typography Helpers */
h1,
h2,
h3,
h4 {
  font-family: var(--font-mono); /* Tech feel for headers */
  font-weight: 700;
  letter-spacing: -0.02em;
}

.highlight {
  color: var(--primary);
}

.highlight-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 12px 30px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary);
  box-shadow: 0 0 25px var(--primary-glow);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--secondary);
  padding: 12px 30px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1px solid var(--secondary);
  box-shadow: 0 0 10px var(--secondary-glow);
}

.btn-secondary:hover {
  background-color: var(--secondary);
  color: #000;
  box-shadow: 0 0 20px var(--secondary-glow);
}

/* Header */
.header {
  background-color: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 20px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Removed font properties as they are for text logo */
}

.logo-icon {
  color: var(--primary);
}

.nav ul {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 100px 0 80px;
  position: relative;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 20px;
}

.blink {
  animation: blink 2s infinite;
}

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

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.stat-item {
  border-left: 2px solid var(--border-color);
  padding-left: 20px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

/* Real-time Log Simulator */
.hero-log {
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
}

.hero-log::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(11, 17, 32, 0),
    rgba(11, 17, 32, 0.8) 90%
  );
  pointer-events: none;
  z-index: 2;
}

.log-header {
  background: var(--bg-card);
  padding: 10px 15px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-content {
  flex: 1;
  padding: 15px;
  overflow-y: hidden; /* JS will handle scroll/append */
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Keep new items at bottom */
}

.log-entry {
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.log-time {
  color: var(--text-muted);
}

.log-msg {
  color: var(--text-main);
}

.log-status {
  margin-left: auto;
}

.status-success {
  color: var(--secondary);
}
.status-process {
  color: var(--accent);
}
.status-error {
  color: #ef4444;
}

.log-footer {
  background: var(--bg-card);
  padding: 5px 15px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
}

/* Services Section */
.services {
  padding: 100px 0;
  background-color: var(--bg-dark);
}

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

.section-header h2 {
  font-size: 2.5rem;
  color: var(--text-main);
}

.section-line {
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 20px auto;
}

.section-header p {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 40px 30px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

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

.card-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover .card-border {
  opacity: 1;
}

.icon-box {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.tech-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.service-desc {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.service-list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
}

.bullet {
  color: var(--secondary);
}

/* Success Cases Section */
.cases {
  padding: 100px 0;
  background-color: #0b1120; /* Slightly darker or same as body */
  position: relative;
}

/* Case Stats */
.case-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 80px;
}

.case-stat-item {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.case-stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--secondary);
}

.case-stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
  font-family: var(--font-mono);
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  margin-bottom: 10px;
}

.case-stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.case-stat-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.05);
}

/* Case Cards */
.case-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.case-card {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.case-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.case-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.case-header {
  margin-bottom: 20px;
}

.case-icon {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 15px;
}

.case-header h3 {
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 600;
}

.case-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 25px;
  min-height: 72px; /* Minimum height for 3 lines alignment */
  /* height: 60px; Removed fixed height to prevent truncation */
  /* overflow: hidden; Removed to show full text */
  /* display: -webkit-box; Removed line clamping */
  /* -webkit-line-clamp: 3; */
  /* -webkit-box-orient: vertical; */
}

/* Timeline in Case Card */
.case-timeline {
  margin-bottom: 25px;
  position: relative;
  padding-left: 15px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-item {
  position: relative;
  padding-left: 20px;
  margin-bottom: 15px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -21px; /* Adjust based on border width and padding */
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-body);
  border: 2px solid var(--text-muted);
  transition: var(--transition);
}

.timeline-item.active .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.timeline-content {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.timeline-title {
  color: var(--text-main);
}

.timeline-date {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.case-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.case-footer .highlight {
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.1rem;
}

.case-glow {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: var(--secondary);
  filter: blur(80px);
  opacity: 0.1;
  border-radius: 50%;
  pointer-events: none;
  transition: var(--transition);
}

.case-card:hover .case-glow {
  opacity: 0.2;
}

/* Reviews Grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.review-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 25px;
  position: relative;
}

.review-stars {
  color: #fbbf24;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.review-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 20px;
}

.review-author {
  display: flex;
  flex-direction: column;
}

.author-name {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1rem;
}

.author-role {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.review-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: #fbbf24;
  color: #000;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  transform: rotate(5deg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Responsive Cases */
@media (max-width: 992px) {
  .case-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .case-stats-grid {
    grid-template-columns: 1fr;
  }

  .case-cards-grid {
    grid-template-columns: 1fr;
  }

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

/* Team Section */
.team {
  padding: 100px 0;
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.team-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--primary-glow);
}

.team-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(11, 17, 32, 0.5);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: var(--transition);
  overflow: hidden; /* Ensure image stays within circle */
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.team-card:hover .team-avatar img {
  transform: scale(1.1);
}

.team-card:hover .team-avatar {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.team-card h3 {
  color: var(--secondary);
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.team-title {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-desc {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 30px;
  height: 80px; /* Fixed height for alignment */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.team-stats {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.t-stat {
  display: flex;
  flex-direction: column;
}

.t-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}

.t-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.team-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: var(--primary);
  filter: blur(80px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 0;
}

.team-card:hover .team-glow {
  opacity: 0.15;
}

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

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact Section */
.contact {
  padding: 100px 0;
}

.contact-wrapper {
  display: flex;
  gap: 60px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.contact-terminal {
  flex: 1;
  background: #000;
  border-radius: 8px;
  border: 1px solid #333;
  font-family: var(--font-mono);
  overflow: hidden;
}

.terminal-header {
  background: #111;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #333;
}

.circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red {
  background: #ff5f56;
}
.yellow {
  background: #ffbd2e;
}
.green {
  background: #27c93f;
}

.terminal-header span {
  color: #888;
  font-size: 0.8rem;
  margin-left: 10px;
}

.terminal-body {
  padding: 20px;
  color: #ddd;
  font-size: 0.9rem;
}

.key {
  color: var(--primary);
}
.string {
  color: var(--secondary);
}
.boolean {
  color: var(--accent);
}

.cursor-line {
  animation: blink 1s infinite;
}

.contact-qrcode-wrapper {
  text-align: center;
}

.qrcode-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.qrcode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qrcode-box {
  width: 180px; /* Slightly smaller to fit two side-by-side */
  height: 180px;
  background: #fff;
  padding: 10px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2); /* Add subtle glow */
}

.qrcode-img {
  width: 100%;
  height: 100%;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
  animation: scan 2s infinite linear;
}

@keyframes scan {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

.qr-text {
  margin-top: 15px;
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 0.9rem;
  letter-spacing: 2px;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  margin: 0 10px;
  color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 992px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-log {
    display: none; /* Hide log on smaller tablets/mobile for simplicity */
  }

  .contact-wrapper {
    flex-direction: column;
    padding: 30px;
  }

  .contact-terminal {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
    width: 100%;
    margin-top: 20px;
  }

  .nav.active {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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