/* ==========================================================================
   APEX DIGITAL STUDIO — CORE DESIGN SYSTEM & STYLESHEET
   Brand: Apex Web & AI Studio (India)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0c0f17;
  --bg-card: rgba(16, 20, 31, 0.72);
  --bg-card-hover: rgba(22, 28, 44, 0.88);
  --bg-glass: rgba(12, 16, 25, 0.65);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(99, 102, 241, 0.35);
  --border-glow: rgba(168, 85, 247, 0.45);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #a855f7;
  
  --brand-violet: #8b5cf6;
  --brand-indigo: #6366f1;
  --brand-cyan: #06b6d4;
  --brand-emerald: #10b981;
  --brand-rose: #f43f5e;
  
  --gradient-apex: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  --gradient-dark: linear-gradient(180deg, rgba(15, 19, 32, 0.85) 0%, rgba(9, 11, 18, 0.95) 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.22), transparent 70%);
  --gradient-pill: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, 0.56);
  --shadow-neon: 0 0 35px -5px rgba(99, 102, 241, 0.35);
  --shadow-purple: 0 0 35px -5px rgba(168, 85, 247, 0.3);
}

/* Base & Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Glows */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient-orb-1 {
  position: absolute;
  top: -150px;
  left: 15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 68%);
  filter: blur(80px);
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  position: absolute;
  top: 40%;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 65%);
  filter: blur(90px);
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

.text-gradient {
  background: var(--gradient-apex);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: var(--gradient-pill);
  border: 1px solid var(--border-accent);
  font-size: 0.8rem;
  font-weight: 600;
  color: #c4b5fd;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-emerald);
  box-shadow: 0 0 10px var(--brand-emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* ==========================================================================
   NETFLIX-STYLE CINEMATIC INTRO POPUP (APEX REVEAL)
   ========================================================================== */
#apexIntroSplash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #040508;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.85, 0, 0.15, 1), visibility 0.8s;
  overflow: hidden;
}

#apexIntroSplash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-particles {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.25) 0%, transparent 60%);
  opacity: 0.7;
}

.intro-branding {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.intro-logo-mark {
  width: 90px;
  height: 90px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.8));
  animation: introLogoReveal 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 40%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: introTextGlow 2s ease-in-out forwards;
}

.intro-subtitle {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
  opacity: 0;
  animation: introFadeSub 1.4s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-status {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: #64748b;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: introFadeSub 1.2s 0.8s forwards;
}

.intro-loader-line {
  width: 140px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.intro-loader-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gradient-apex);
  animation: introLoadingBar 2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.intro-skip-btn {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.intro-skip-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

@keyframes introLogoReveal {
  0% { transform: scale(0.6) rotate(-15deg); opacity: 0; filter: blur(10px); }
  60% { transform: scale(1.08) rotate(0deg); opacity: 1; filter: blur(0px); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes introTextGlow {
  0% { transform: translateY(20px); opacity: 0; letter-spacing: 0.45em; }
  100% { transform: translateY(0); opacity: 1; letter-spacing: 0.28em; }
}

@keyframes introFadeSub {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introLoadingBar {
  0% { width: 0%; }
  60% { width: 75%; }
  100% { width: 100%; }
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
}

.navbar.scrolled {
  padding: 0.85rem 0;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

/* Bespoke Apex Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.brand-icon-svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.45));
}

.brand-name {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
}

.brand-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-apex);
  border-radius: 99px;
  box-shadow: 0 0 10px var(--brand-indigo);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-apex);
  color: #ffffff;
  box-shadow: 0 8px 24px -6px rgba(99, 102, 241, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(168, 85, 247, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

.btn-portal {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.btn-portal:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.97);
  backdrop-filter: blur(25px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.close-drawer-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  list-style: none;
}

.mobile-nav-link {
  font-size: 1.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-secondary);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: #fff;
}

/* ==========================================================================
   CARDS, GRIDS & GLASSMORPHISM
   ========================================================================== */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.card-glass:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-neon);
  transform: translateY(-4px);
}

.card-glow-edge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-apex);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-glow-edge:hover::before {
  opacity: 1;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: 9rem;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.6rem, 5.8vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 1.6rem 0 1.4rem;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

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

.hero-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.trust-icon {
  color: var(--brand-emerald);
  font-size: 1rem;
}

/* ==========================================================================
   PORTFOLIO & DELIVERED PROJECTS SHOWCASE
   ========================================================================== */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s ease;
}

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

.project-preview {
  height: 250px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f131e;
}

.project-preview-mockup {
  width: 90%;
  height: 90%;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s ease;
  position: relative;
}

.project-card:hover .project-preview-mockup {
  transform: scale(1.03);
}

.mockup-browser-header {
  height: 24px;
  background: #161b29;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  gap: 0.35rem;
}

.mockup-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mockup-screen-content {
  height: calc(100% - 24px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.project-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  color: var(--brand-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-info {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-client {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-violet);
  margin-bottom: 0.4rem;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.project-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1.4rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-emerald);
}

.metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.project-tech {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   AI TALKING ASSISTANT (APEX INTELLIGENCE CONCIERGE)
   ========================================================================== */
#apexAiWidget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
}

.ai-trigger-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-apex);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.ai-trigger-btn:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 12px 35px rgba(168, 85, 247, 0.65);
}

.ai-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.5);
  animation: pulseRing 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

.ai-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 390px;
  height: 570px;
  max-height: calc(100vh - 120px);
  background: rgba(11, 14, 22, 0.96);
  backdrop-filter: blur(25px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), var(--shadow-purple);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.ai-chat-header {
  padding: 1.1rem 1.4rem;
  background: rgba(18, 24, 38, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-apex);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.ai-header-name {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-header-status {
  font-size: 0.72rem;
  color: var(--brand-emerald);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ai-header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.voice-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #94a3b8;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.voice-toggle-btn.voice-active {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--brand-emerald);
  color: #34d399;
}

.ai-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.ai-chat-body {
  flex: 1;
  padding: 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 86%;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-bubble-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble-user {
  align-self: flex-end;
  background: var(--gradient-apex);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.ai-speech-waves {
  display: none;
  align-items: center;
  gap: 3px;
  height: 14px;
  margin-top: 0.4rem;
}

.ai-speech-waves.speaking {
  display: flex;
}

.wave-bar {
  width: 3px;
  height: 100%;
  background: var(--brand-cyan);
  border-radius: 3px;
  animation: wavePulse 0.9s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.15s; }

@keyframes wavePulse {
  from { height: 4px; }
  to { height: 14px; }
}

.ai-quick-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1.2rem;
  border-top: 1px solid var(--border-subtle);
  scrollbar-width: none;
}

.ai-quick-chips::-webkit-scrollbar {
  display: none;
}

.ai-chip {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: #cbd5e1;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-indigo);
  color: #fff;
}

.ai-chat-footer {
  padding: 0.85rem 1.2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(14, 18, 28, 0.7);
}

.ai-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.ai-input:focus {
  border-color: var(--brand-indigo);
}

.ai-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-apex);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.ai-send-btn:hover {
  transform: scale(1.08);
}

/* ==========================================================================
   CLIENT PORTAL & AUTH MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.auth-modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), var(--shadow-neon);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .auth-modal-card {
  transform: translateY(0);
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  text-align: center;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--gradient-apex);
  color: #fff;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #05070a;
  border-top: 1px solid var(--border-subtle);
  padding: 5rem 0 2.5rem;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3.5rem;
  margin-bottom: 4rem;
}

.footer-bio {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 1.2rem 0;
  max-width: 320px;
}

.footer-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--brand-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  list-style: none;
}

.footer-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-contact-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.footer-mail-link {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--brand-violet);
  display: inline-block;
  margin-top: 0.4rem;
  word-break: break-all;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu, .btn-portal {
    display: none;
  }
  .hamburger-btn {
    display: block;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .ai-chat-window {
    width: calc(100vw - 2rem);
    right: -1rem;
    bottom: 75px;
    height: 520px;
  }
}
