/* ==========================================================================
   ASTRAPX ULTRA-LUXURY DESIGN SYSTEM (TotalX.io Inspiration)
   ========================================================================== */
:root {
  --bg-dark: #070c18;
  --bg-surface: #0e172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --brand-blue: #0052FF;
  --brand-blue-glow: rgba(0, 82, 255, 0.35);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-violet: #8b5cf6;
  --accent-amber: #f59e0b;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 82, 255, 0.4);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --border-color: #e2e8f0;
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: 'Outfit', sans-serif;
}

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

/* Ambient Background Orbs */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}
.orb-blue {
  top: -100px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--brand-blue-glow) 0%, transparent 70%);
}
.orb-cyan {
  top: 400px;
  right: -100px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
}

/* Container & Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-blue), var(--accent-cyan), var(--accent-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 16px 36px var(--brand-blue-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-blue), #00369d);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--brand-blue-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--brand-blue-glow);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald), #047857);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--accent-emerald-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--border-color);
  border-color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(0, 82, 255, 0.12);
  border: 1px solid rgba(0, 82, 255, 0.3);
  color: #60a5fa;
  letter-spacing: 0.02em;
}

/* --- Navigation Bar --- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 12, 24, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.1rem 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--brand-blue), var(--accent-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: white;
  box-shadow: 0 6px 16px var(--brand-blue-glow);
}
.brand-text {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--text-main);
}

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

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

.hero-title {
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 1.5rem 0;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

/* Floating Tech Stack Pills */
.tech-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.tech-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}
.tech-pill:hover {
  border-color: var(--brand-blue);
  color: var(--text-main);
  transform: translateY(-2px);
}

/* Trust Stats Metric Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}
.stat-card {
  padding: 1.75rem;
  text-align: center;
}
.stat-val {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}
.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* --- Services Section --- */
.section {
  padding: 100px 0;
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.section-title {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

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

.service-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: rgba(0, 82, 255, 0.15);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}
.service-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.service-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
}

/* --- TotalX-Style Project Cost Estimator & Calculator --- */
.calculator-box {
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}
.calc-step {
  margin-bottom: 2rem;
}
.calc-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.calc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.calc-btn {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}
.calc-btn:hover, .calc-btn.active {
  border-color: var(--brand-blue);
  background: rgba(0, 82, 255, 0.15);
  color: var(--text-main);
  box-shadow: 0 4px 16px var(--brand-blue-glow);
}

.calc-result-box {
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Case Studies Portfolio Tabs --- */
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn.active {
  background: var(--brand-blue);
  color: white;
  border-color: var(--brand-blue);
  box-shadow: 0 4px 16px var(--brand-blue-glow);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

/* --- Global Office Hubs --- */
.hubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.hub-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
}
.hub-flag {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}
.modal-card {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-weight: 700; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}
.form-control:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-glow); }

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  background: rgba(7, 12, 24, 0.95);
}
