/* ============================================
   BI-Analytix — Enterprise Consulting
   Light, clean, enterprise-grade design
   ============================================ */

:root {
  --bg-primary: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-deep: #0f172a;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.08);
  --cyan: #0891b2;
  --green: #059669;
  --purple: #7c3aed;
  --orange: #d97706;
  --heading: #0f172a;
  --text: #334155;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 40px rgba(37,99,235,0.06);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --header-h: 100px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  line-height: 1.25;
  font-weight: 700;
}

/* --- Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section--surface {
  background: var(--bg-surface);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: 2.75rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

.section-header {
  margin-bottom: 64px;
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-subtitle {
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--heading);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37,99,235,0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.btn--large {
  padding: 16px 36px;
  font-size: 0.95rem;
}

.btn-arrow {
  transition: transform var(--transition);
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  transition: all var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  height: 120px;
}

.logo img {
  height: 100%;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav a:hover,
.nav a.active {
  color: var(--heading);
}

.nav .btn {
  margin-left: 12px;
}

.nav .btn--primary {
  color: var(--heading);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--heading);
  margin: 5px 0;
  transition: all var(--transition);
  border-radius: 2px;
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-h);
  background: var(--bg-surface);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(var(--accent) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.08;
}

.hero-glow--1 {
  background: var(--accent);
  top: -200px;
  right: -100px;
}

.hero-glow--2 {
  background: var(--purple);
  bottom: -200px;
  left: -200px;
  opacity: 0.04;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(37,99,235,0.15);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
}

.hero-tag .pulse {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  font-size: 3.8rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-terminal {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  background: #1a2234;
  border: 1px solid #2d3a4f;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid #2d3a4f;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #64748b;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: #94a3b8;
}

.terminal-body .cmd { color: #06b6d4; }
.terminal-body .str { color: #10b981; }
.terminal-body .key { color: #8b5cf6; }
.terminal-body .comment { color: #64748b; }

.hero-layout {
  display: flex;
  align-items: center;
  gap: 80px;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
  background: var(--accent-glow);
  border: 1px solid rgba(37,99,235,0.12);
}

.service-icon--cyan { background: rgba(8,145,178,0.08); border-color: rgba(8,145,178,0.12); }
.service-icon--green { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.12); }
.service-icon--purple { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.12); }
.service-icon--orange { background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.12); }

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-tags span,
.service-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 50px;
}

/* --- Security Section --- */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.security-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.security-item:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.security-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.12);
  flex-shrink: 0;
}

.security-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.security-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --- Architecture / Process --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.process-step {
  counter-increment: step;
  position: relative;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.process-step:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.process-step::before {
  content: '0' counter(step);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 16px;
}

.process-step h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* --- Integration Logos --- */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.integration-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-align: center;
}

.integration-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.integration-item .int-icon {
  font-size: 2rem;
}

.integration-item span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 80px 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--heading);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- CTA Banner --- */
.cta-section {
  text-align: center;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  position: relative;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-section .btn {
  position: relative;
}

/* --- Footer --- */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer .logo {
  height: 80px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 280px;
  line-height: 1.7;
}

.footer h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  color: #cbd5e1;
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-col a,
.footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-col a:hover,
.footer-links a:hover {
  color: #e2e8f0;
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #64748b;
}

/* --- Page Hero (subpages) --- */
.page-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: 3rem;
  margin-bottom: 16px;
  position: relative;
}

.page-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  position: relative;
}

/* --- Detail List --- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all var(--transition);
}

.detail-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.detail-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.detail-card ul {
  list-style: none;
  padding: 0;
}

.detail-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 5px 0;
  padding-left: 18px;
  position: relative;
}

.detail-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* --- Contact Form --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-detail:last-child {
  border-bottom: none;
}

.contact-detail .cd-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.contact-detail span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- About --- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 16px;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.about-value {
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.about-value h4 {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.about-value p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-layout {
    flex-direction: column;
    gap: 48px;
  }

  .hero-terminal {
    position: static;
    transform: none;
    width: 100%;
    max-width: 500px;
  }

  .hero h1 { font-size: 3rem; }

  .contact-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 32px;
    gap: 0;
    transition: right 0.35s ease;
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
  }

  .nav.open { right: 0; }

  .nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
  }

  .nav .btn { margin-left: 0; margin-top: 16px; width: 100%; justify-content: center; }

  .section { padding: 80px 0; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.05rem; }
  .section-title { font-size: 2rem; }

  .services-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .page-hero { padding: 130px 0 60px; }
  .page-hero h1 { font-size: 2.2rem; }

  .stats-row { grid-template-columns: 1fr 1fr; }
  .about-values { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .stats-row { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr 1fr; }
}
